Documentation
¶
Index ¶
- Constants
- Variables
- type Canvas
- func (c *Canvas) ClearLine()
- func (c *Canvas) ClearScreen()
- func (c *Canvas) ClearStatus()
- func (c *Canvas) CursorDown()
- func (c *Canvas) CursorLeft()
- func (c *Canvas) CursorRight()
- func (c *Canvas) CursorUp()
- func (c *Canvas) HighlightBytes(bs []byte)
- func (c *Canvas) Pos() (int, int)
- func (c *Canvas) SyncCursor()
- func (c *Canvas) UpdatePos(col int, row int)
- func (c *Canvas) UpdateSize(w int, h int)
- func (c *Canvas) Width() int
- func (c *Canvas) WriteByte(b byte)
- type Handler
- type StdinReader
- type Terminal
Constants ¶
View Source
const ESC = "\033"
View Source
const MACHINE_INTERVAL = time.Millisecond
Variables ¶
View Source
var ( EFFICIENT = true // false -> redraw upon every action, true -> use the terminal efficiently // human reaction times are an order of magnitude slower than this // and auto generated stdin bytes are an order of magnitude faster than this WIDTH_POLLING_INTERVAL = 10 * time.Millisecond XCLIP = "/usr/bin/xclip" )
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
structure the terminal window as a rectangle of characters
func (*Canvas) ClearScreen ¶
func (c *Canvas) ClearScreen()
func (*Canvas) ClearStatus ¶
func (c *Canvas) ClearStatus()
func (*Canvas) CursorDown ¶
func (c *Canvas) CursorDown()
func (*Canvas) CursorLeft ¶
func (c *Canvas) CursorLeft()
func (*Canvas) CursorRight ¶
func (c *Canvas) CursorRight()
func (*Canvas) SyncCursor ¶
func (c *Canvas) SyncCursor()
func (*Canvas) UpdateSize ¶
type StdinReader ¶
type StdinReader struct { Chan chan []byte // contains filtered or unexported fields }
InputReader collects inputs
func NewStdinReader ¶
func NewStdinReader() *StdinReader
func (*StdinReader) Read ¶
func (r *StdinReader) Read()
func (*StdinReader) Start ¶
func (r *StdinReader) Start()
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
custom terminal prompt, because the existing discoverable terminal libraries suck
func NewTerminal ¶
Click to show internal directories.
Click to hide internal directories.