Versions in this module Expand all Collapse all v0 v0.0.3 Dec 3, 2026 v0.0.2 Dec 2, 2026 v0.0.1 Dec 1, 2026 Changes in this version + const AttrBlink + const AttrBold + const AttrConceal + const AttrFaint + const AttrItalic + const AttrReverse + const AttrStrike + const AttrUnderline + const HoverMinContrast + const SelectionMinContrast + const SelectionTextMinContrast + const TabHoverMix + const UnderlineCurly + const UnderlineDashed + const UnderlineDotted + const UnderlineDouble + const UnderlineNone + const UnderlineSingle + var ErrBadTheme = fmt.Errorf("vt: bad theme") + var ErrNoTerminal = errors.New("vt: terminal is nil") + var ErrSmallSize = errors.New("vt: screen size must be positive") + var StandardThemeNames = []string + func BuiltinThemeNames() []string + func ContrastRatio(a, b color.RGBA) float64 + func IsNone(c PackedColor) bool + func MarshalTheme(t Theme) ([]byte, error) + func PaletteIndex(c PackedColor) (int, bool) + func RuneWidth(r rune) int + func Split(c PackedColor) (r, g, b uint8, ok bool) + type Callbacks struct + AltScreen func(on bool) + Bell func() + Clipboard func(payload string) + CursorPosition func(x, y int) + Damage func() + Hyperlink func(url string) + IconName func(string) + Reply func([]byte) + Title func(string) + WorkingDirectory func(string) + type Cell struct + A uint32 + BG uint32 + FG uint32 + R rune + func (c Cell) IsZero() bool + func (c Cell) Underline() int + func (c Cell) Width() int + type FindResult struct + Col int + Len int + Line int + type Modes struct + AltScreen bool + AppCursor bool + BracketedPaste bool + CursorBlink bool + CursorVisible bool + FocusEvents bool + InsertMode bool + MouseMode MouseMode + MouseSGR bool + MouseURXVT bool + ReverseVideo bool + SyncOutput bool + type MouseMode int + const MouseAny + const MouseButton + const MouseDrag + const MouseOff + const MouseX10 + func (m MouseMode) String() string + type PackedColor = uint32 + func PaletteColor(i int) PackedColor + func RGBColor(r, g, b uint8) PackedColor + type Terminal struct + func MustNew(cols, rows int) *Terminal + func New(cols, rows int) (*Terminal, error) + func (t *Terminal) Callbacks() Callbacks + func (t *Terminal) Cell(x, y int) Cell + func (t *Terminal) ClearScrollback() + func (t *Terminal) Cursor() (x, y int, visible bool) + func (t *Terminal) CursorShape() (shape int, blink bool) + func (t *Terminal) Damage() bool + func (t *Terminal) Find(text string, from, fromCol int, backward bool) (FindResult, bool) + func (t *Terminal) Flush() + func (t *Terminal) HistoryCell(x, line int) (Cell, bool) + func (t *Terminal) HistoryText() string + func (t *Terminal) LineExtra(x, y int) string + func (t *Terminal) LinkAt(x, y int) string + func (t *Terminal) Lock() + func (t *Terminal) Logger() *xlog.Logger + func (t *Terminal) Modes() Modes + func (t *Terminal) Reset() + func (t *Terminal) Resize(cols, rows int) error + func (t *Terminal) RowCells(line int) (cells []Cell, extras []string, ok bool) + func (t *Terminal) ScreenText() string + func (t *Terminal) ScrollbackLen() int + func (t *Terminal) ScrollbackMax() int + func (t *Terminal) SetCallbacks(cb Callbacks) + func (t *Terminal) SetLogger(log *xlog.Logger) + func (t *Terminal) SetScrollback(lines int) + func (t *Terminal) SetTheme(th Theme) + func (t *Terminal) Size() (cols, rows int) + func (t *Terminal) Theme() Theme + func (t *Terminal) Title() string + func (t *Terminal) Unlock() + func (t *Terminal) UnsupportedSequences() map[string]int + func (t *Terminal) VisibleCells(off int, cells []Cell, extras []string) ([]Cell, []string, int, int) + func (t *Terminal) WorkingDirectory() string + func (t *Terminal) Write(b []byte) (int, error) + type Theme struct + Background color.RGBA + BgDefault color.RGBA + Bright []color.RGBA + Cursor color.RGBA + Description string + Foreground color.RGBA + Name string + Normal []color.RGBA + Opacity float64 + Palette [256]color.RGBA + Selection color.RGBA + TabActive color.RGBA + TabActiveFg color.RGBA + TabClose color.RGBA + TabHover color.RGBA + func BuiltinTheme(name string) (Theme, bool) + func DefaultTheme() Theme + func LoadTheme(data []byte) (Theme, error) + func (t *Theme) BackgroundColor() color.RGBA + func (t *Theme) Build() error + func (t *Theme) Color(c PackedColor, def color.RGBA) color.RGBA + func (t *Theme) EnsureHoverContrast() + func (t *Theme) EnsurePalette() + func (t *Theme) EnsureSelectionContrast() + func (t *Theme) ForegroundColor() color.RGBA + func (t *Theme) HoverFill() color.RGBA + func (t *Theme) SelectionBackground() color.RGBA + func (t *Theme) SelectionText(fg color.RGBA) color.RGBA + func (t *Theme) SelectionVisible() color.RGBA + func (t Theme) Clone() Theme