Expand description
Bevy integration for slt.
Draw an SLT UI from a Bevy system by calling SltContext::draw on a
context resource. Two backends are provided:
SltTerminalPlugin(featureterminal, on by default) renders to the real terminal, forwards terminal input as Bevy messages, and restores the terminal on exit or panic.SltHeadlessPluginrenders to an in-memory buffer and publishes each frame as theSltOutputresource, for display via Bevy UI, a texture, or assertions in tests.
Structs§
- Headless
Backend - In-memory backend with no terminal attached.
- SltContext
- An SLT session (persistent
AppState,RunConfig, pending input) driven from Bevy systems. - SltHeadless
Plugin - Adds an
SltHeadlessContextnon-send resource and publishes each frame asSltOutputinPostUpdate. - SltKey
Message - A key event read from the terminal.
- SltMouse
Message - A mouse event read from the terminal.
- SltOutput
- The latest rendered headless frame, as both text and cells.
- SltPaste
Message - Text pasted into the terminal.
- SltResize
Message - The terminal was resized, in cells.
- SltTerminal
Plugin - Terminal-backed SLT plugin, modeled after
bevy_ratatui. - Terminal
Backend - Crossterm-backed slt
Backendwriting to stdout.
Enums§
- SltFocus
Message - The terminal gained or lost focus.
Traits§
- SltBackend
- A surface
SltContextcan drive: an sltBackendthat can also resize and expose the last completed frame.
Functions§
- restore_
terminal - Restores the terminal to its normal state.
Type Aliases§
- SltHeadless
Context SltContextrendering to an in-memory buffer.- SltTerminal
Context SltContextrendering to the real terminal.