Versions in this module Expand all Collapse all v1 v1.1.5 Oct 5, 2024 v1.1.4 Sep 18, 2024 v1.1.3 Sep 9, 2024 Changes in this version + var ErrProgramKilled = errors.New("program was killed") + func LogToFile(path string, prefix string) (*os.File, error) + func LogToFileWith(path string, prefix string, log LogOptionsSetter) (*os.File, error) + type BatchMsg []Cmd + type BlurMsg struct + type Cmd func() Msg + func Batch(cmds ...Cmd) Cmd + func Every(duration time.Duration, fn func(time.Time) Msg) Cmd + func Exec(c ExecCommand, fn ExecCallback) Cmd + func ExecProcess(c *exec.Cmd, fn ExecCallback) Cmd + func Printf(template string, args ...interface{}) Cmd + func Println(args ...interface{}) Cmd + func ScrollDown(newLines []string, topBoundary, bottomBoundary int) Cmd + func ScrollUp(newLines []string, topBoundary, bottomBoundary int) Cmd + func Sequence(cmds ...Cmd) Cmd + func Sequentially(cmds ...Cmd) Cmd + func SetWindowTitle(title string) Cmd + func SyncScrollArea(lines []string, topBoundary int, bottomBoundary int) Cmd + func Tick(d time.Duration, fn func(time.Time) Msg) Cmd + func WindowSize() Cmd + type ExecCallback func(error) Msg + type ExecCommand interface + Run func() error + SetStderr func(io.Writer) + SetStdin func(io.Reader) + SetStdout func(io.Writer) + type FocusMsg struct + type Key struct + Alt bool + Paste bool + Runes []rune + Type KeyType + func (k Key) String() (str string) + type KeyMsg Key + func (k KeyMsg) String() (str string) + type KeyType int + const KeyBackspace + const KeyBreak + const KeyCtrlA + const KeyCtrlAt + const KeyCtrlB + const KeyCtrlBackslash + const KeyCtrlC + const KeyCtrlCaret + const KeyCtrlCloseBracket + const KeyCtrlD + const KeyCtrlDown + const KeyCtrlE + const KeyCtrlEnd + const KeyCtrlF + const KeyCtrlG + const KeyCtrlH + const KeyCtrlHome + const KeyCtrlI + const KeyCtrlJ + const KeyCtrlK + const KeyCtrlL + const KeyCtrlLeft + const KeyCtrlM + const KeyCtrlN + const KeyCtrlO + const KeyCtrlOpenBracket + const KeyCtrlP + const KeyCtrlPgDown + const KeyCtrlPgUp + const KeyCtrlQ + const KeyCtrlQuestionMark + const KeyCtrlR + const KeyCtrlRight + const KeyCtrlS + const KeyCtrlShiftDown + const KeyCtrlShiftEnd + const KeyCtrlShiftHome + const KeyCtrlShiftLeft + const KeyCtrlShiftRight + const KeyCtrlShiftUp + const KeyCtrlT + const KeyCtrlU + const KeyCtrlUnderscore + const KeyCtrlUp + const KeyCtrlV + const KeyCtrlW + const KeyCtrlX + const KeyCtrlY + const KeyCtrlZ + const KeyDelete + const KeyDown + const KeyEnd + const KeyEnter + const KeyEsc + const KeyEscape + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyHome + const KeyInsert + const KeyLeft + const KeyNull + const KeyPgDown + const KeyPgUp + const KeyRight + const KeyRunes + const KeyShiftDown + const KeyShiftEnd + const KeyShiftHome + const KeyShiftLeft + const KeyShiftRight + const KeyShiftTab + const KeyShiftUp + const KeySpace + const KeyTab + const KeyUp + func (k KeyType) String() (str string) + type LogOptionsSetter interface + SetOutput func(io.Writer) + SetPrefix func(string) + type Model interface + Init func() Cmd + Update func(Msg) (Model, Cmd) + View func() string + type MouseAction int + const MouseActionMotion + const MouseActionPress + const MouseActionRelease + type MouseButton int + const MouseButton10 + const MouseButton11 + const MouseButtonBackward + const MouseButtonForward + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonNone + const MouseButtonRight + const MouseButtonWheelDown + const MouseButtonWheelLeft + const MouseButtonWheelRight + const MouseButtonWheelUp + type MouseEvent struct + Action MouseAction + Alt bool + Button MouseButton + Ctrl bool + Shift bool + Type MouseEventType + X int + Y int + func (m MouseEvent) IsWheel() bool + func (m MouseEvent) String() (s string) + type MouseEventType int + const MouseBackward + const MouseForward + const MouseLeft + const MouseMiddle + const MouseMotion + const MouseRelease + const MouseRight + const MouseUnknown + const MouseWheelDown + const MouseWheelLeft + const MouseWheelRight + const MouseWheelUp + type MouseMsg MouseEvent + func (m MouseMsg) String() string + type Msg interface + func ClearScreen() Msg + func ClearScrollArea() Msg + func DisableBracketedPaste() Msg + func DisableMouse() Msg + func DisableReportFocus() Msg + func EnableBracketedPaste() Msg + func EnableMouseAllMotion() Msg + func EnableMouseCellMotion() Msg + func EnableReportFocus() Msg + func EnterAltScreen() Msg + func ExitAltScreen() Msg + func HideCursor() Msg + func Quit() Msg + func ShowCursor() Msg + func Suspend() Msg + type Program struct + func NewProgram(model Model, opts ...ProgramOption) *Program + func (p *Program) DisableMouseAllMotion() + func (p *Program) DisableMouseCellMotion() + func (p *Program) EnableMouseAllMotion() + func (p *Program) EnableMouseCellMotion() + func (p *Program) EnterAltScreen() + func (p *Program) ExitAltScreen() + func (p *Program) Kill() + func (p *Program) Printf(template string, args ...interface{}) + func (p *Program) Println(args ...interface{}) + func (p *Program) Quit() + func (p *Program) ReleaseTerminal() error + func (p *Program) RestoreTerminal() error + func (p *Program) Run() (Model, error) + func (p *Program) Send(msg Msg) + func (p *Program) SetWindowTitle(title string) + func (p *Program) Start() error + func (p *Program) StartReturningModel() (Model, error) + func (p *Program) Wait() + type ProgramOption func(*Program) + func WithANSICompressor() ProgramOption + func WithAltScreen() ProgramOption + func WithContext(ctx context.Context) ProgramOption + func WithEnvironment(env []string) ProgramOption + func WithFPS(fps int) ProgramOption + func WithFilter(filter func(Model, Msg) Msg) ProgramOption + func WithInput(input io.Reader) ProgramOption + func WithInputTTY() ProgramOption + func WithMouseAllMotion() ProgramOption + func WithMouseCellMotion() ProgramOption + func WithOutput(output io.Writer) ProgramOption + func WithReportFocus() ProgramOption + func WithoutBracketedPaste() ProgramOption + func WithoutCatchPanics() ProgramOption + func WithoutRenderer() ProgramOption + func WithoutSignalHandler() ProgramOption + func WithoutSignals() ProgramOption + type QuitMsg struct + type ResumeMsg struct + type SuspendMsg struct + type WindowSizeMsg struct + Height int + Width int