Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEventTimeout = errors.New("event timeout")
ErrEventTimeout is error returned by TimeoutEvent if timeout exceeded.
Functions ¶
This section is empty.
Types ¶
type Pty ¶
Pty is a PTY representation.
func (*Pty) TimeoutEvent ¶
TimeoutEvent polls terminal event but not greater than provided timeout. If timeout exceeded ErrEventTimeout will be returned.
type Terminal ¶
type Terminal interface { // Size returns terminal width and height. Size() (width, height int, err error) // Write puts provided bytes to terminal. Write([]byte) error // ToRaw puts terminal to "raw" state. Previous state should be saved. ToRaw() error // Reset resets terminal to saved state. Reset() error // TimeoutEvent waits for terminal event. It blocks until event caught or timeout exceeded. TimeoutEvent(timeout time.Duration) (termbox.Event, error) io.Closer }
Terminal is an interface for terminal.
Click to show internal directories.
Click to hide internal directories.