package vt10x
Import Path
github.com/hinshun/vt10x (on go.dev)
Dependency Relation
imports 16 packages, and imported by one package
Involved Source Files
color.go
csi.go
Package terminal is a vt10x terminal emulation backend, influenced
largely by st, rxvt, xterm, and iTerm as reference. Use it for terminal
muxing, a terminal emulation frontend, or wherever else you need
terminal emulation.
In development, but very usable.
ioctl_posix.go
parse.go
state.go
str.go
vt.go
vt_posix.go
Package-Level Type Names (total 10)
ChangeFlag represents possible state changes of the terminal.
func (*State).Changed(change ChangeFlag) bool
const ChangedScreen
const ChangedTitle
Color maps to the ANSI colors [0, 16) and the xterm colors [16, 256).
ANSI returns true if Color is within [0, 16).
const Black
const Blue
const Cyan
const DarkGrey
const DefaultBG
const DefaultCursor
const DefaultFG
const Green
const LightBlue
const LightCyan
const LightGreen
const LightGrey
const LightMagenta
const LightRed
const LightYellow
const Magenta
const Red
const White
const Yellow
Attr Glyph
State uint8
X int
Y int
func (*State).Cursor() Cursor
func Terminal.Cursor() Cursor
func View.Cursor() Cursor
BG Color
Char rune
FG Color
Mode int16
func (*State).Cell(x, y int) Glyph
func Terminal.Cell(x, y int) Glyph
func View.Cell(x, y int) Glyph
ModeFlag represents various terminal mode states.
func (*State).Mode() ModeFlag
func Terminal.Mode() ModeFlag
func View.Mode() ModeFlag
const Mode8bit
const ModeAltScreen
const ModeAppCursor
const ModeAppKeypad
const ModeBlink
const ModeCRLF
const ModeEcho
const ModeFBlink
const ModeFocus
const ModeHide
const ModeInsert
const ModeKeyboardLock
const ModeMouseButton
const ModeMouseMany
const ModeMouseMask
const ModeMouseMotion
const ModeMouseSgr
const ModeMouseX10
const ModeReverse
const ModeWrap
State represents the terminal emulation state. Use Lock/Unlock
methods to synchronize data access with VT.
DebugLogger *log.Logger
Cell returns the glyph containing the character code, foreground color, and
background color at position (x, y) relative to the top left of the terminal.
Changed returns true if change has occured.
Cursor returns the current position of the cursor.
CursorVisible returns the visible state of the cursor.
Lock locks the state object's mutex.
Mode returns the current terminal mode.
(*State) Size() (cols, rows int)
(*State) String() string
Title returns the current title set via the tty.
Unlock resets change flags and unlocks the state object's mutex.
*State : github.com/pancsta/asyncmachine-go/internal/nofmt.Stringer
*State : expvar.Var
*State : fmt.Stringer
*State : sync.Locker
Terminal represents the virtual terminal emulator.
Cell returns the glyph containing the character code, foreground color, and
background color at position (x, y) relative to the top left of the terminal.
Cursor returns the current position of the cursor.
CursorVisible returns the visible state of the cursor.
Lock locks the state object's mutex.
Mode returns the current terminal mode.//
Parse blocks on read on pty or io.Reader, then parses sequences until
buffer empties. State is locked as soon as first rune is read, and unlocked
when buffer is empty.
Resize changes the size of the virtual terminal.
Size returns the size of the virtual terminal.
( Terminal) String() string
Title represents the title of the console window.
Unlock resets change flags and unlocks the state object's mutex.
( Terminal) Write([]byte) (int, error)
Terminal : View
Terminal : github.com/pancsta/asyncmachine-go/internal/nofmt.Stringer
Terminal : expvar.Var
Terminal : fmt.Stringer
Terminal : internal/bisect.Writer
Terminal : io.Writer
Terminal : sync.Locker
func New(opts ...TerminalOption) Terminal
type TerminalInfo (struct)
func WithSize(cols, rows int) TerminalOption
func WithWriter(w io.Writer) TerminalOption
func New(opts ...TerminalOption) Terminal
View represents the view of the virtual terminal emulator.
Cell returns the glyph containing the character code, foreground color, and
background color at position (x, y) relative to the top left of the terminal.
Cursor returns the current position of the cursor.
CursorVisible returns the visible state of the cursor.
Lock locks the state object's mutex.
Mode returns the current terminal mode.//
Resize changes the size of the virtual terminal.
Size returns the size of the virtual terminal.
( View) String() string
Title represents the title of the console window.
Unlock resets change flags and unlocks the state object's mutex.
Terminal (interface)
View : github.com/pancsta/asyncmachine-go/internal/nofmt.Stringer
View : expvar.Var
View : fmt.Stringer
View : sync.Locker
Package-Level Functions (total 4)
New returns a new virtual terminal emulator.
func WithSize(cols, rows int) TerminalOption func WithWriter(w io.Writer) TerminalOption
Package-Level Constants (total 41)
ANSI color values
ANSI color values
Terminal changes to occur in VT.ReadState
Terminal changes to occur in VT.ReadState
ANSI color values
ANSI color values
Default colors are potentially distinct to allow for special behavior.
For example, a transparent background. Otherwise, the simple case is to
map default colors to another color.
Default colors are potentially distinct to allow for special behavior.
For example, a transparent background. Otherwise, the simple case is to
map default colors to another color.
Default colors are potentially distinct to allow for special behavior.
For example, a transparent background. Otherwise, the simple case is to
map default colors to another color.
ANSI color values
ANSI color values
ANSI color values
ANSI color values
ANSI color values
ANSI color values
ANSI color values
ANSI color values
ANSI color values
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
Terminal modes
ANSI color values
ANSI color values
ANSI color values
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |