utils

package
v0.0.0-...-0d40e36 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TermWindow = &TerminalWindow{
		Rect: &Rect{
			P1: &Point{
				X: 0,
				Y: 0,
			},
			P2: &Point{
				X: 0,
				Y: 0,
			},
		},
		Cursor: &Point{
			X: 0,
			Y: 0,
		},
	}
)

Functions

This section is empty.

Types

type Point

type Point struct {
	X int
	Y int
}

func NewPoint

func NewPoint(x, y int) *Point

type Rect

type Rect struct {
	P1 *Point
	P2 *Point
}

func (*Rect) Height

func (r *Rect) Height() int

func (*Rect) SetHeight

func (r *Rect) SetHeight(h int)

func (*Rect) SetWidth

func (r *Rect) SetWidth(w int)

func (*Rect) SetX

func (r *Rect) SetX(x int)

func (*Rect) SetY

func (r *Rect) SetY(y int)

func (*Rect) Width

func (r *Rect) Width() int

type TerminalWindow

type TerminalWindow struct {
	Rect   *Rect
	Cursor *Point
}

func (*TerminalWindow) H

func (tw *TerminalWindow) H() int

func (*TerminalWindow) SelectArea

func (tw *TerminalWindow) SelectArea(x1, y1, w, h int) (x int, y int, width int, height int)

func (*TerminalWindow) SetCursorX

func (tw *TerminalWindow) SetCursorX(x int)

func (*TerminalWindow) SetCursorY

func (tw *TerminalWindow) SetCursorY(y int)

func (*TerminalWindow) Update

func (tw *TerminalWindow) Update()

func (*TerminalWindow) W

func (tw *TerminalWindow) W() int

func (*TerminalWindow) X

func (tw *TerminalWindow) X() int

func (*TerminalWindow) Y

func (tw *TerminalWindow) Y() int

Jump to

Keyboard shortcuts

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