Versions in this module Expand all Collapse all v0 v0.22.0 Oct 23, 2022 v0.21.2 Dec 22, 2021 v0.21.1 Mar 4, 2021 v0.21.0 Mar 3, 2021 Changes in this version + type DriverPollMsg interface + PollMsg func() (Msg, error) v0.20.0 Feb 22, 2021 v0.19.0 Feb 21, 2021 v0.18.0 Feb 19, 2021 v0.12.0 Jan 25, 2021 Changes in this version type Grid + func (gd Grid) String() string type Point + func (p Point) String() string type Range + func (rg Range) String() string v0.11.0 Jan 20, 2021 Changes in this version + type App struct + CatchPanics bool + func NewApp(cfg AppConfig) *App + func (app *App) Start(ctx context.Context) (err error) + type AppConfig struct + Driver Driver + FrameWriter io.Writer + Logger *log.Logger + Model Model + type AttrMask uint32 + const AttrsDefault + type Cell struct + Rune rune + Style Style + func (c Cell) WithRune(r rune) Cell + func (c Cell) WithStyle(st Style) Cell + type Cmd func() Msg + func End() Cmd + type Color uint32 + const ColorDefault + type Driver interface + Close func() + Flush func(Frame) + Init func() error + PollMsgs func(context.Context, chan<- Msg) error + type Effect interface + func Batch(effs ...Effect) Effect + type Frame struct + Cells []FrameCell + Height int + Time time.Time + Width int + type FrameCell struct + Cell Cell + P Point + type FrameDecoder struct + func NewFrameDecoder(r io.Reader) (*FrameDecoder, error) + func (fd *FrameDecoder) Decode(framep *Frame) error + type Grid struct + func NewGrid(w, h int) Grid + func (gd Grid) At(p Point) Cell + func (gd Grid) Bounds() Range + func (gd Grid) Contains(p Point) bool + func (gd Grid) Copy(src Grid) Point + func (gd Grid) Fill(c Cell) + func (gd Grid) Iter(fn func(Point, Cell)) + func (gd Grid) Iterator() GridIterator + func (gd Grid) Map(fn func(Point, Cell) Cell) + func (gd Grid) Range() Range + func (gd Grid) Resize(w, h int) Grid + func (gd Grid) Set(p Point, c Cell) + func (gd Grid) Size() Point + func (gd Grid) Slice(rg Range) Grid + type GridIterator struct + func (it *GridIterator) Cell() Cell + func (it *GridIterator) Next() bool + func (it *GridIterator) P() Point + func (it *GridIterator) Reset() + func (it *GridIterator) SetCell(c Cell) + func (it *GridIterator) SetP(p Point) + type Key string + const KeyArrowDown + const KeyArrowLeft + const KeyArrowRight + const KeyArrowUp + const KeyBackspace + const KeyDelete + const KeyEnd + const KeyEnter + const KeyEscape + const KeyHome + const KeyInsert + const KeyPageDown + const KeyPageUp + const KeySpace + const KeyTab + func (k Key) In(keys []Key) bool + func (k Key) IsRune() bool + type ModMask int16 + const ModAlt + const ModCtrl + const ModMeta + const ModNone + const ModShift + func (m ModMask) String() string + type Model interface + Draw func() Grid + Update func(Msg) Effect + type MouseAction int + const MouseAuxiliary + const MouseMain + const MouseMove + const MouseRelease + const MouseSecondary + const MouseWheelDown + const MouseWheelUp + func (ma MouseAction) String() string + type Msg interface + type MsgInit struct + type MsgKeyDown struct + Key Key + Mod ModMask + Time time.Time + type MsgMouse struct + Action MouseAction + Mod ModMask + P Point + Time time.Time + type MsgQuit time.Time + type MsgScreen struct + Height int + Time time.Time + Width int + type Point struct + X int + Y int + func (p Point) Add(q Point) Point + func (p Point) Div(k int) Point + func (p Point) In(rg Range) bool + func (p Point) Mul(k int) Point + func (p Point) Shift(x, y int) Point + func (p Point) Sub(q Point) Point + type Range struct + Max Point + Min Point + func NewRange(x0, y0, x1, y1 int) Range + func (rg Range) Add(p Point) Range + func (rg Range) Column(x int) Range + func (rg Range) Columns(x0, x1 int) Range + func (rg Range) Empty() bool + func (rg Range) Eq(r Range) bool + func (rg Range) In(r Range) bool + func (rg Range) Intersect(r Range) Range + func (rg Range) Iter(fn func(Point)) + func (rg Range) Line(y int) Range + func (rg Range) Lines(y0, y1 int) Range + func (rg Range) Overlaps(r Range) bool + func (rg Range) RelMsg(msg Msg) Msg + func (rg Range) Shift(x0, y0, x1, y1 int) Range + func (rg Range) Size() Point + func (rg Range) Sub(p Point) Range + func (rg Range) Union(r Range) Range + type Style struct + Attrs AttrMask + Bg Color + Fg Color + func (st Style) WithAttrs(attrs AttrMask) Style + func (st Style) WithBg(cl Color) Style + func (st Style) WithFg(cl Color) Style + type Sub func(context.Context, chan<- Msg)