Help us shape the future of Go! Take the 2026 Go Developer Survey

window

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const CSI = "\x1B["

Variables

This section is empty.

Functions

This section is empty.

Types

type LineClear

type LineClear int
const (
	CURSOR_FORWARD   LineClear = 0
	CURSOR_BACKWARDS LineClear = 1
	FULL             LineClear = 2
)

type Window

type Window interface {
	SetWriter(writer io.Writer) Window
	SetWindowSize(size WindowSize) Window

	GetWindowSize() WindowSize
	ClearLine(LineClear)
	ClearWindow(LineClear)

	MoveCursor(x int, y int)
	SetCursorPosition(x int, y int)
	SetCursorColumn(x int)
	SaveCursor()
	RestoreCursor()

	// If int is positive, scrolls the page upwards by the amount shown, opposite
	// for negative
	ScrollPage(int)

	Write([]byte) (int, error)
}

func NewWindow

func NewWindow() Window

type WindowSize

type WindowSize struct {
	Width  int
	Height int
}

Jump to

Keyboard shortcuts

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