curses

package
v0.0.0-...-a67dd81 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Rune = iota

	CtrlA
	CtrlB
	CtrlC
	CtrlD
	CtrlE
	CtrlF
	CtrlG
	CtrlH
	Tab
	CtrlJ
	CtrlK
	CtrlL
	CtrlM
	CtrlN
	CtrlO
	CtrlP
	CtrlQ
	CtrlR
	CtrlS
	CtrlT
	CtrlU
	CtrlV
	CtrlW
	CtrlX
	CtrlY
	CtrlZ
	ESC

	Invalid
	Mouse
	DoubleClick

	BTab
	BSpace

	Del
	PgUp
	PgDn

	Up
	Down
	Left
	Right
	Home
	End

	SLeft
	SRight

	F1
	F2
	F3
	F4

	AltBS
	AltA
	AltB
	AltC
	AltD
	AltE
	AltF

	AltZ = AltA + 'z' - 'a'
)

Types of user action

View Source
const (
	ColNormal = iota
	ColPrompt
	ColMatch
	ColCurrent
	ColCurrentMatch
	ColSpinner
	ColInfo
	ColCursor
	ColSelected
	ColHeader
	ColUser
)

Pallete

Variables

View Source
var (
	Default16 *ColorTheme
	Dark256   *ColorTheme
	Light256  *ColorTheme
	FG        int
	CurrentFG int
	BG        int
	DarkBG    int
)

Functions

func CPrint

func CPrint(pair int, bold bool, text string)

func Clear

func Clear()

func Close

func Close()

func Endwin

func Endwin()

func GetBytes

func GetBytes() []byte

func Init

func Init(theme *ColorTheme, black bool, mouse bool)

func MaxX

func MaxX() int

func MaxY

func MaxY() int

func Move

func Move(y int, x int)

func MoveAndClear

func MoveAndClear(y int, x int)

func PairFor

func PairFor(fg int, bg int) int

func Print

func Print(text string)

func Refresh

func Refresh()

Types

type ColorTheme

type ColorTheme struct {
	UseDefault   bool
	Fg           int16
	Bg           int16
	DarkBg       int16
	Prompt       int16
	Match        int16
	Current      int16
	CurrentMatch int16
	Spinner      int16
	Info         int16
	Cursor       int16
	Selected     int16
	Header       int16
}

type Event

type Event struct {
	Type       int
	Char       rune
	MouseEvent *MouseEvent
}

func GetChar

func GetChar() Event

type MouseEvent

type MouseEvent struct {
	Y      int
	X      int
	S      int
	Down   bool
	Double bool
	Mod    bool
}

Jump to

Keyboard shortcuts

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