cui

package
v1.105.9-rc Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point struct{ X, Y int }

Point is a 2D coordinate in console.

X is the column
Y is the row

type Rect

type Rect struct{ Min, Max Point }

Rect is a 2D rectangle in console, excluding Max edge.

type Screen

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

Screen is a writable area on screen.

func NewScreen

func NewScreen() (*Screen, error)

NewScreen returns a new screen, only one screen can be use at a time.

func (*Screen) Close

func (screen *Screen) Close() error

Close closes the screen.

func (*Screen) Flush

func (screen *Screen) Flush() error

Flush flushes pending content to the console and clears for new frame.

func (*Screen) Lock

func (screen *Screen) Lock()

Lock screen for exclusive rendering.

func (*Screen) Run

func (screen *Screen) Run() error

Run runs the event loop.

func (*Screen) Size

func (screen *Screen) Size() (width, height int)

Size returns the current size of the screen.

func (*Screen) Unlock

func (screen *Screen) Unlock()

Unlock screen.

func (*Screen) Write

func (screen *Screen) Write(data []byte) (int, error)

Write writes to the screen.

Jump to

Keyboard shortcuts

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