Documentation ¶
Index ¶
- Constants
- type AltChar
- type AltShiftChar
- type Backspace
- type CHA
- type CNL
- type CPL
- type CUP
- type CarriageReturn
- type Char
- type Color
- type ColorMode
- type CtrlChar
- type Cursor
- type CursorMovement
- type DCH
- type DECSTBM
- type DL
- type Delete
- type Direction
- type ED
- type EL
- type EOF
- type Esc
- type ICH
- type IL
- type MouseDown
- type MouseDrag
- type MouseUp
- type Newline
- type Output
- type Parsed
- type Parser
- type PositionedChar
- type PrivateDEC
- type RI
- type Renderer
- type SCORC
- type SCOSC
- type SD
- type SU
- type ScrollDown
- type ScrollUp
- type Style
- type StyleBackground
- type StyleBold
- type StyleConceal
- type StyleCrossedOut
- type StyleFaint
- type StyleForeground
- type StyleItalic
- type StyleReset
- type StyleReverse
- type StyleUnderline
- type StyledChar
- type Tab
- type Unrecognized
- type VPA
Constants ¶
const ( Up = iota Down Right Left )
Directions!
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AltShiftChar ¶
type AltShiftChar struct {
Char rune
}
AltShiftChar is for alt+shift+[character]
type ColorMode ¶
type ColorMode int
ColorMode is the type of color associated with a cursor
const ( // ColorNone is the default unset color state ColorNone ColorMode = iota // ColorBit3Normal is for the 8 default non-bright colors ColorBit3Normal // ColorBit3Bright is for the 8 default bright colors ColorBit3Bright // ColorBit8 is specified at https://en.wikipedia.org/w/index.php?title=ANSI_escape_code&oldid=873901864#8-bit ColorBit8 // ColorBit24 is specified at https://en.wikipedia.org/w/index.php?title=ANSI_escape_code&oldid=873901864#24-bit ColorBit24 )
type CursorMovement ¶
CursorMovement is possibly caused by an arrow key
type DECSTBM ¶
DECSTBM (Set Scrolling Region). Bottom is -1 if it should be the bottom of the screen
type Parsed ¶
type Parsed interface { }
Parsed could be a simple character or maybe an escape sequence
type Parser ¶
type Parser struct { // RuneCounter is useful for detecting if the processer is lagging RuneCounter uint64 Shutdown chan error // contains filtered or unexported fields }
Parser maintains state. Create one with NewParser() then start the parsing via Run()
type PositionedChar ¶
A PositionedChar is a Char with a specific location on the screen
type PrivateDEC ¶
PrivateDEC is DECSET/DECRST (DEC Private Mode Set/Reset)
type Renderer ¶
type Renderer interface { HandleCh(PositionedChar) SetCursor(x, y int) }
type ScrollDown ¶
type ScrollDown int
type Style ¶
type Style struct {
Bold, Faint, Italic, Underline, Conceal, CrossedOut, Reverse bool
Fg Color // foreground color
Bg Color // background color
}
Style is the state of the terminal's drawing modes when printing a given character
type StyleBackground ¶
type StyleBackground Color
type StyleConceal ¶
type StyleConceal bool
type StyleCrossedOut ¶
type StyleCrossedOut bool
type StyleFaint ¶
type StyleFaint bool
type StyleForeground ¶
type StyleForeground Color
type StyleItalic ¶
type StyleItalic bool
type StyleReset ¶
type StyleReset struct{}
type StyleReverse ¶
type StyleReverse bool
type StyleUnderline ¶
type StyleUnderline bool
type StyledChar ¶
A Char is a rune with a visual style associated with it