Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserClosed = errors.New("user closed UI")
Functions ¶
This section is empty.
Types ¶
type Params ¶ added in v0.0.10
type Params struct { EventBus *event.Bus Dispatcher func(event.Command) Logger *slog.Logger ClipboardAvailable bool BuildInfo domain.BuildInfo Screen *Screen // Screen may be nil. }
Params contains the parameters for starting a new terminal user interface.
type Screen ¶
type Screen struct { Screen tcell.Screen Width, Height int CaptureC chan<- ScreenCapture }
Screen represents a terminal screen. This includes its desired dimensions, which is required to initialize the tcell.SimulationScreen.
type ScreenCapture ¶
type ScreenCapture struct { Cells []tcell.SimCell Width, Height int }
ScreenCapture represents a screen capture, which is used for integration testing with the tcell.SimulationScreen.
type UI ¶
type UI struct {
// contains filtered or unexported fields
}
UI is responsible for managing the terminal user interface.
func NewUI ¶ added in v0.0.10
NewUI creates the user interface. Call [Run] on the *UI instance to block until it is completed.
func (*UI) Run ¶ added in v0.0.10
Run runs the user interface. It always returns a non-nil error, which will be ErrUserClosed if the user voluntarily closed the UI.
Click to show internal directories.
Click to hide internal directories.