commondriver

package
v0.0.0-...-deee935 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package commondriver implements part of the termui.TerminalDriver interface that is common between all drivers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Done   bool     // If true PollEvent will always return *EventQuit
	Events chan any // Events channel
}

Driver implements part of the termui.TerminalDriver interface that is common between all drives.

func New

func New() *Driver

New returns a new CommonDriver ready for use.

func (*Driver) FlushEvents

func (d *Driver) FlushEvents()

FlushEvents implements the termui.TerminalDriver interface.

func (*Driver) PollEvent

func (d *Driver) PollEvent() any

PollEvent implements the termui.TerminalDriver interface.

func (*Driver) Quit

func (d *Driver) Quit()

Quit implements the termui.TerminalDriver interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL