Documentation ¶
Index ¶
- type C0
- type CSI
- type DCS
- type DCSData
- type DCSEndOfData
- type EOF
- type ESC
- type EventBell
- type EventClosed
- type EventMouseMode
- type EventPanic
- type EventRedraw
- type EventTerminal
- type EventTitle
- type OSC
- type Parser
- type Print
- type Sequence
- type Surface
- type VT
- func (vt *VT) Attach(fn func(ev tcell.Event))
- func (vt *VT) Close()
- func (vt *VT) Cursor() (int, int, tcell.CursorStyle, bool)
- func (vt *VT) Detach()
- func (vt *VT) Draw()
- func (vt *VT) HandleEvent(e tcell.Event) bool
- func (vt *VT) Resize(w int, h int)
- func (vt *VT) SetSurface(srf Surface)
- func (vt *VT) Start(cmd *exec.Cmd) error
- func (vt *VT) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DCSData ¶ added in v0.7.0
type DCSData rune
A rune which is passed through during a DCS passthrough sequence
type DCSEndOfData ¶ added in v0.7.0
type DCSEndOfData struct{}
Sent at the end of a DCS passthrough sequence
type EventBell ¶ added in v0.6.0
type EventBell struct {
*EventTerminal
}
EventBell is emitted when BEL is received
type EventClosed ¶
type EventClosed struct {
*EventTerminal
}
EventClosed is emitted when the terminal exits
type EventMouseMode ¶
type EventMouseMode struct { *EventTerminal // contains filtered or unexported fields }
EventMouseMode is emitted when the terminal mouse mode changes
func (*EventMouseMode) Flags ¶
func (ev *EventMouseMode) Flags() []tcell.MouseFlags
type EventPanic ¶ added in v0.9.0
type EventPanic struct { *EventTerminal Error error }
type EventRedraw ¶ added in v0.7.0
type EventRedraw struct {
*EventTerminal
}
EventRedraw is emitted when the terminal requires redrawing
type EventTerminal ¶
type EventTerminal struct {
// contains filtered or unexported fields
}
EventTerminal is a generic terminal event
func (*EventTerminal) VT ¶ added in v0.7.0
func (ev *EventTerminal) VT() *VT
func (*EventTerminal) When ¶
func (ev *EventTerminal) When() time.Time
type EventTitle ¶
type EventTitle struct { *EventTerminal // contains filtered or unexported fields }
EventTitle is emitted when the terminal's title changes
func (*EventTitle) Title ¶
func (ev *EventTitle) Title() string
type OSC ¶ added in v0.7.0
type OSC struct {
Payload []rune
}
An OSC sequence. The Payload is the raw runes received, and must be parsed externally
type Parser ¶ added in v0.7.0
type Parser struct {
// contains filtered or unexported fields
}
https://vt100.net/emu/dec_ansi_parser
parser is an implementation of Paul Flo Williams' VT500-series parser, as seen [here](https://vt100.net/emu/dec_ansi_parser). The architecture is designed after Rob Pike's text/template parser, with a few modifications.
Many of the comments are directly from Paul Flo Williams description of the parser, licensed undo [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)
func (*Parser) Next ¶ added in v0.7.0
Next returns the next Sequence. Sequences will be of the following types:
error Sent on any parsing error Print Print the character to the screen C0 Execute the C0 code ESC Execute the ESC sequence CSI Execute the CSI sequence OSCStart Signals the start of an OSC sequence OSCData Characters from the OSC sequence OSCEnd Signals end of the OSC sequence DCS Signals start of a DCS sequence, and DCS params/intermediates DCSData Raw DCS passthrough data DCSEndOfData Signals end of DCS sequence EOF Sent at end of input
type Sequence ¶ added in v0.7.0
type Sequence interface{}
Sequence is the generic data type of items emitted from the parser. These can be control sequences, escape sequences, or printable characters.
type Surface ¶ added in v0.7.0
type Surface interface { // SetContent is used to update the content of the Surface at the given // location. SetContent(x int, y int, ch rune, comb []rune, style tcell.Style) // Size represents the visible size. Size() (int, int) }
Surface represents a logical view on an area. It uses a subset of methods from a tcell.Screen or a views.View, in order to be a more broad implementation. Both a Screen and a View are also a Surface
type VT ¶ added in v0.7.0
type VT struct { Logger *log.Logger // If true, OSC8 enables the output of OSC8 strings. Otherwise, any OSC8 // sequences will be stripped OSC8 bool // Set the TERM environment variable to be passed to the command's // environment. If not set, xterm-256color will be used TERM string // contains filtered or unexported fields }
VT models a virtual terminal