term

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CP437_TO_UTF8 = [256]rune{}/* 256 elements not displayed */

	CP850_TO_UTF8 = [256]rune{}/* 256 elements not displayed */

	UTF8_TO_CP437 = make(map[rune]byte, 256)
	UTF8_TO_CP850 = make(map[rune]byte, 256)
)

Functions

func HandleResize added in v0.1.12

func HandleResize(ptmx *os.File)

Types

type OutputMode

type OutputMode int
const (
	UTF8 OutputMode = iota
	CP437
	CP850
)

type Term

type Term struct {
	W int
	H int

	MaxInputLength int
	C              io.Writer

	InputField   []rune
	InputTrigger chan struct{}
	OutputMode   OutputMode
	OutputDelay  time.Duration
	// contains filtered or unexported fields
}

func (*Term) Clear

func (t *Term) Clear() error

func (*Term) Cls

func (t *Term) Cls() int

Cls clear screen.

func (*Term) EnterScreen

func (t *Term) EnterScreen() int

func (*Term) ExitScreen

func (t *Term) ExitScreen() int

func (*Term) GetField

func (t *Term) GetField() string

func (*Term) GetOutputDisplay

func (t *Term) GetOutputDisplay() string

func (*Term) GetPassword

func (t *Term) GetPassword() string

func (*Term) Input

func (t *Term) Input(s string)

Input receives user input and interprets depending on the state of the engine.

func (*Term) MoveCursor

func (t *Term) MoveCursor(x, y int) int

func (*Term) Print

func (t *Term) Print(lin, col int, s string) error

func (*Term) ResetScreen

func (t *Term) ResetScreen() int

ResetScreen reset terminal screen.

func (*Term) SetEcho

func (t *Term) SetEcho(b bool)

func (*Term) SetInputLimit

func (t *Term) SetInputLimit(limit int)

func (*Term) SetOutputDelay

func (t *Term) SetOutputDelay(delay int)

func (*Term) SetOutputMode

func (t *Term) SetOutputMode(mode string)

func (*Term) Write

func (t *Term) Write(s string) int

Write string.

func (*Term) WriteByte

func (t *Term) WriteByte(b byte)

func (*Term) WriteFromASCII

func (t *Term) WriteFromASCII(fileName string) int

func (*Term) WriteRune

func (t *Term) WriteRune(r rune)

func (*Term) WriteString

func (t *Term) WriteString(s string)

Jump to

Keyboard shortcuts

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