Documentation
¶
Index ¶
- type Event
- type FocusEvent
- type Key
- type KeyEvent
- type MouseEvent
- type MouseKind
- type Option
- type PasteEvent
- type Pos
- type ResizeEvent
- type Terminal
- func (t *Terminal) Bell()
- func (t *Terminal) EnableMouse(on bool)
- func (t *Terminal) EnterAlt()
- func (t *Terminal) Events() <-chan Event
- func (t *Terminal) ExitAlt()
- func (t *Terminal) MouseEnabled() bool
- func (t *Terminal) RenderAlt(lines []string, cursor *Pos)
- func (t *Terminal) Resized(w, h int)
- func (t *Terminal) SetTitle(title string)
- func (t *Terminal) Size() (int, int)
- func (t *Terminal) Start() error
- func (t *Terminal) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FocusEvent ¶ added in v0.11.8
type FocusEvent struct {
Focused bool
}
FocusEvent reports whether the terminal window gained or lost focus.
type PasteEvent ¶
type PasteEvent struct {
Text string
}
type ResizeEvent ¶
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal drives a full-screen application in the alternate buffer: raw mode, input events, and row-diffed frame rendering. All methods must be called from a single goroutine.
func NewTerminal ¶
func (*Terminal) Bell ¶ added in v0.11.8
func (t *Terminal) Bell()
Bell requests the terminal's configured audible or visual notification.
func (*Terminal) EnableMouse ¶
EnableMouse turns SGR mouse reporting on or off; off restores the terminal's native text selection.
func (*Terminal) MouseEnabled ¶
func (*Terminal) RenderAlt ¶
RenderAlt draws a full-screen frame, rewriting only rows that changed since the previous frame. cursor, when non-nil, positions and shows the hardware cursor (row is a frame index).
func (*Terminal) Resized ¶
Resized must be called by the app when it receives a ResizeEvent, before re-rendering.