Skip to main content

Crate urushi_tui_app

Crate urushi_tui_app 

Source
Expand description

A TEA application framework for full-screen Urushi interfaces.

An application is a value: Application describes a program, its Model is the state the runtime owns, and its update returns an Effect rather than performing one. Everything the program wants to hear from — terminal input included — it declares as a Subscription. Building those values reads no terminal and starts no work; the runtime’s executor machinery interprets them behind boundaries that do not appear in application types.

The framework resolves each application urushi::View and presents it through urushi_tui::Screen. Cell storage, diffing, and transactional frame commit stay in urushi-tui; this crate owns application state, delivery ordering, effects, subscriptions, drawing policy, terminal input, and session restoration.

§Cargo features

  • crossterm is enabled by default and provides run and Runtime::run. Cell-only builds and platforms without the native Unix connection use its portable backend; graphics-enabled Unix builds use the native bidirectional backend so protocol support can be queried. With default features disabled, supply a backend through Runtime::backend.
  • graphics integrates Kitty or Sixel presentation and re-exports GraphicsPreference for runtime selection. The runtime retains Kitty uploads and caches encoded Sixel bands while redrawing each complete Sixel scene. Applications construct image views with a direct urushi-graphics dependency.

Structs§

Admission
What a source does with an item the runtime has not accepted yet.
CellPixels
Effect
Work the runtime performs on behalf of an update, whose result returns as a message.
KeyEvent
One normalized key event.
KeyEventState
Additional state reported with an enhanced keyboard event.
Modifiers
The keyboard modifiers held for one input event.
MouseEvent
One normalized mouse event at a zero-based cell position.
Runtime
A blocking full-screen application runtime.
SendError
The runtime is no longer taking this source’s messages.
Sender
Where an application-defined source puts its messages.
Subscription
The sources an application wants to hear from, for as long as it keeps declaring them.
Surface
What an application can observe about the surface it draws on.
SurfaceSize
The visible dimensions of a terminal in character cells.
TokioClock
The system monotonic clock driven by Tokio timers.
TokioExecutor
Tokio’s task runner, kept behind Urushi’s executor vocabulary.

Enums§

Error
A failure to construct or drive a terminal application.
FocusChange
Input
Terminal input as it reaches an application.
KeyCode
A backend-independent terminal key.
KeyKind
The transition represented by a key event.
MediaKeyCode
ModifierKeyCode
MouseButton
MouseKind
A normalized mouse action.
Signal
A process signal an application can subscribe to.

Traits§

Application
A full-screen terminal application, as a value that describes a program rather than the program’s running state.
Clock
The source of time shared by delayed effects and interval subscriptions.
Execution
A running task whose drop cancels work that has not completed yet.
Executor
Where runtime work runs, expressed without an executor’s task type.

Functions§

run
Runs an application with the production defaults.

Type Aliases§

BlockingTask
Blocking work accepted by a runtime executor.
Task
Asynchronous work accepted by a runtime executor.