ansipixels

package
v0.10.0-pre8 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoundTopLeft     = "╭"
	RoundTopRight    = "╮"
	RoundBottomLeft  = "╰"
	RoundBottomRight = "╯"

	SquareTopLeft     = "┌"
	SquareTopRight    = "┐"
	SquareBottomLeft  = "└"
	SquareBottomRight = "┘"

	Horizontal = "─"
	Vertical   = "│"

	TopT        = "┬"
	BottomT     = "┴"
	LeftT       = "├"
	RightT      = "┤"
	MiddleCross = "┼"
)
View Source
const BUFSIZE = 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type AnsiPixels

type AnsiPixels struct {
	Out *bufio.Writer
	In  io.Reader

	Data []byte
	W, H int // Width and Height

	C chan os.Signal
	// contains filtered or unexported fields
}

func NewAnsiPixels

func NewAnsiPixels() *AnsiPixels

func (*AnsiPixels) ClearEndOfLine

func (ap *AnsiPixels) ClearEndOfLine()

func (*AnsiPixels) ClearScreen

func (ap *AnsiPixels) ClearScreen()

func (*AnsiPixels) DrawBox

func (ap *AnsiPixels) DrawBox(x, y, w, h int, topLeft, topRight, bottomLeft, bottomRight string) error

func (*AnsiPixels) DrawRoundBox

func (ap *AnsiPixels) DrawRoundBox(x, y, w, h int) error

func (*AnsiPixels) DrawSquareBox

func (ap *AnsiPixels) DrawSquareBox(x, y, w, h int) error

func (*AnsiPixels) GetSize

func (ap *AnsiPixels) GetSize() (err error)

func (*AnsiPixels) HideCursor

func (ap *AnsiPixels) HideCursor()

func (*AnsiPixels) IsResizeSignal

func (ap *AnsiPixels) IsResizeSignal(s os.Signal) bool

func (*AnsiPixels) MoveCursor

func (ap *AnsiPixels) MoveCursor(x, y int)

func (*AnsiPixels) MoveHorizontally

func (ap *AnsiPixels) MoveHorizontally(x int)

func (*AnsiPixels) Open

func (ap *AnsiPixels) Open() (err error)

func (*AnsiPixels) ReadCursorPos

func (ap *AnsiPixels) ReadCursorPos() (int, int, error)

This also synchronizes the display.

func (*AnsiPixels) Restore

func (ap *AnsiPixels) Restore()

func (*AnsiPixels) ShowCursor

func (ap *AnsiPixels) ShowCursor()

func (*AnsiPixels) SignalChannel

func (ap *AnsiPixels) SignalChannel()

func (*AnsiPixels) WriteAt

func (ap *AnsiPixels) WriteAt(x, y int, msg string, args ...interface{})

func (*AnsiPixels) WriteAtStr

func (ap *AnsiPixels) WriteAtStr(x, y int, msg string)

func (*AnsiPixels) WriteBoxed

func (ap *AnsiPixels) WriteBoxed(y int, msg string, args ...interface{})

func (*AnsiPixels) WriteCentered

func (ap *AnsiPixels) WriteCentered(y int, msg string, args ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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