screen

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBg = "\x1b[48;2;25;23;29m"
View Source
const DefaultDecor = ""
View Source
const DefaultFg = "\x1b[38;2;200;200;200m"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	Ch    rune
	Bg    string
	Fg    string
	Decor string
}

type Screen

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

func NewScreen

func NewScreen(w, h int) *Screen

func (*Screen) Cell

func (s *Screen) Cell(x, y int) Cell

Cell returns the current cell at (x, y); a zero Cell for out-of-range coords. Intended for tests and diagnostics.

func (*Screen) Clear

func (s *Screen) Clear()

func (*Screen) Flush

func (s *Screen) Flush()

func (*Screen) Height

func (s *Screen) Height() int

func (*Screen) Set

func (s *Screen) Set(x, y int, ch rune, fg, bg, decor string)

func (*Screen) SetCursor

func (s *Screen) SetCursor(x, y int)

func (*Screen) SetOutput

func (s *Screen) SetOutput(out io.Writer)

SetOutput redirects flushed terminal bytes. It is primarily useful for tests that need to assert rendered output without writing to stdout.

func (*Screen) ShowCursor

func (s *Screen) ShowCursor()

func (*Screen) Width

func (s *Screen) Width() int

Jump to

Keyboard shortcuts

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