vt100

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colorize

func Colorize(text string, fg colorCode) string

func Colorize8

func Colorize8(text string, fg int) string

func Colorize8WithBackground

func Colorize8WithBackground(text string, fg int, bg int) string

func ColorizeWithBackground

func ColorizeWithBackground(text string, fg colorCode, bg colorCode) string

Types

type VT100

type VT100 struct {
	// contains filtered or unexported fields
}

func NewVt100

func NewVt100(z io.Writer) *VT100

func (*VT100) ClearLine

func (l *VT100) ClearLine(_ string) (int, error)

func (*VT100) ClearScreen

func (l *VT100) ClearScreen() (int, error)

func (*VT100) Colorize

func (l *VT100) Colorize(text string, f int, b int, mode interfaces.ColorMode) string

func (*VT100) MoveCursorLeft

func (l *VT100) MoveCursorLeft() (int, error)

func (*VT100) MoveCursorRight

func (l *VT100) MoveCursorRight() (int, error)

func (*VT100) MoveCursorTopLeft

func (l *VT100) MoveCursorTopLeft() (int, error)

func (*VT100) RestoreCursor

func (l *VT100) RestoreCursor() (int, error)

func (*VT100) SaveCursor

func (l *VT100) SaveCursor() (int, error)

func (*VT100) Scan

func (l *VT100) Scan(data []byte)

func (*VT100) SetEnterKey

func (l *VT100) SetEnterKey(key rune)

func (*VT100) SetKeyFunc

func (l *VT100) SetKeyFunc(e interfaces.KeyFunc)

func (*VT100) SetSize

func (l *VT100) SetSize(w int, h int)

func (*VT100) Write

func (l *VT100) Write(text string) (int, error)

func (*VT100) WriteColor

func (l *VT100) WriteColor(text string, fg interfaces.ColorDef, bg interfaces.ColorDef, mode interfaces.ColorMode) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL