Documentation
¶
Index ¶
- Constants
- func AltScreen()
- func BgCol(c uint8) string
- func Clear()
- func DefaultScreen()
- func Dimensions() (w, h int)
- func FgCol(c uint8) string
- func Goto(x, y int)
- func HideCur()
- func IsTerminal() bool
- func LoadCur()
- func MouseDisable()
- func MouseEnable(mode int)
- func Raw()
- func Restore()
- func SaveCur()
- func ShowCur()
Constants ¶
View Source
const ( ESC = "\033" CSI = ESC + "[" // control CLEAR = CSI + "2J" HIDE_CUR = CSI + "?25l" SHOW_CUR = CSI + "?25h" MOVE_CUR = CSI + "%d;%dH" SAVE_CUR = CSI + "s" LOAD_CUR = CSI + "u" ALT_SCR = CSI + "?47h" DEF_SCR = CSI + "?47l" // mouse control MOUSE_X11_ENABLE = CSI + "?1000h" MOUSE_X11_DISABLE = CSI + "?1000l" MOUSE_X11_HI_ENABLE = CSI + "?1002h" MOUSE_X11_HI_DISABLE = CSI + "?1002l" MOUSE_X11_ALL_ENABLE = CSI + "?1003h" MOUSE_X11_ALL_DISABLE = CSI + "?1003l" // print NORMAL = CSI + "0m" BOLD = CSI + "1m" REVERSE = CSI + "7m" // default foreground colors FBLACK = CSI + "30m" FRED = CSI + "31m" FGREEN = CSI + "32m" FBROWN = CSI + "33m" FBLUE = CSI + "34m" FMAGENTA = CSI + "35m" FCYAN = CSI + "36m" FWHITE = CSI + "37m" // default background colors BBLACK = CSI + "40m" BRED = CSI + "41m" BGREEN = CSI + "42m" BBROWN = CSI + "43m" BBLUE = CSI + "44m" BMAGENTA = CSI + "45m" BCYAN = CSI + "46m" BWHITE = CSI + "47m" // 256 colors FCOL256 = CSI + "38;5;%dm" BCOL256 = CSI + "48;5;%dm" )
Variables ¶
This section is empty.
Functions ¶
func AltScreen ¶
func AltScreen()
AltScreen switches to the alternate terminal screen This may do nothing on some terminals
func DefaultScreen ¶
func DefaultScreen()
Default switches to the default terminal screen This may do nothing on some terminals
func IsTerminal ¶
func IsTerminal() bool
IsTerminal determines if STDIN & STDOUT are connected to terminal devices
func MouseEnable ¶
func MouseEnable(mode int)
MouseEnable enables terminal mouse support. mode determines the mode to use. 0=normal, 1=highlight, 2+=all
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.