term

package
v0.0.0-...-eb6d389 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, t Term)

Types

type AttrBuilder

type AttrBuilder interface {
	Reset() AttrBuilder
	Fore(color Color) AttrBuilder
	Back(color Color) AttrBuilder
	Bright() AttrBuilder
	Dim() AttrBuilder
	Underscore() AttrBuilder
	Blink() AttrBuilder
	Reverse() AttrBuilder
	Done() ([]byte, error)
}

type Color

type Color int
const (
	Default Color = iota
	Black
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

type Full

type Full struct {
	// contains filtered or unexported fields
}

func New

func New(term Term, w io.Writer) *Full

func (*Full) Attr

func (full *Full) Attr() FullAttr

func (*Full) Clear

func (full *Full) Clear() *Full

func (*Full) Error

func (full *Full) Error() error

func (*Full) GetDimensions

func (full *Full) GetDimensions() (width, height uint32)

func (*Full) Pos

func (full *Full) Pos(x, y int) *Full

func (*Full) Printf

func (full *Full) Printf(format string, args ...interface{}) *Full

func (*Full) SetDimensions

func (full *Full) SetDimensions(width, height uint32)

func (*Full) Write

func (full *Full) Write(b []byte) (n int, err error)

type FullAttr

type FullAttr struct {
	// contains filtered or unexported fields
}

func (FullAttr) Back

func (fa FullAttr) Back(color Color) FullAttr
func (fa FullAttr) Blink() FullAttr

func (FullAttr) Bright

func (fa FullAttr) Bright() FullAttr

func (FullAttr) Dim

func (fa FullAttr) Dim() FullAttr

func (FullAttr) Done

func (fa FullAttr) Done() *Full

func (FullAttr) Fore

func (fa FullAttr) Fore(color Color) FullAttr

func (FullAttr) Reset

func (fa FullAttr) Reset() FullAttr

func (FullAttr) Reverse

func (fa FullAttr) Reverse() FullAttr

func (FullAttr) Underscore

func (fa FullAttr) Underscore() FullAttr

type Term

type Term interface {
	Clear(b []byte) []byte
	Pos(b []byte, x, y int) []byte
	Attr(b []byte) AttrBuilder
}

func Resolve

func Resolve(name string) Term

type TermVT100

type TermVT100 struct{}

func (TermVT100) Attr

func (t TermVT100) Attr(b []byte) AttrBuilder

func (TermVT100) Clear

func (t TermVT100) Clear(b []byte) []byte

func (TermVT100) Pos

func (t TermVT100) Pos(b []byte, x, y int) []byte

Jump to

Keyboard shortcuts

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