term

package
v0.0.0-...-f515710 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Term

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

Term implements the input/output device interfaces for local execution in the terminal. Visual elements are displayed in the terminal, and key presses are handled via the keyboard.

func New

func New(w, h int, config *scenes.Config, exit chan<- bool) *Term

New returns a new terminal device with the given configuration.

func (*Term) Height

func (t *Term) Height() int

Height returns the display height.

func (*Term) RegisterHandlers

func (t *Term) RegisterHandlers(a, b, c, d, e func())

RegisterHandlers registers the given handler functions for each button.

func (*Term) SetBrightness

func (t *Term) SetBrightness(brightness byte)

SetBrightness sets the current brightness.

func (*Term) SetBuffer

func (t *Term) SetBuffer(buffer [][]byte)

SetBuffer overwrites the current display buffer.

func (*Term) SetColor

func (t *Term) SetColor(r, g, b byte)

SetColor sets the pixel color.

func (*Term) Show

func (t *Term) Show() error

Show outputs the buffer contents to the terminal.

func (*Term) Width

func (t *Term) Width() int

Width returns the display width.

Jump to

Keyboard shortcuts

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