Skip to main content

Crate teksilo_terminal

Crate teksilo_terminal 

Source
Expand description

teksilo-terminal — an embeddable, fully-accessible terminal-emulator (Console) widget for Teksilo.

Teksilo owns the view (grid rendering, input encoding, selection, Role::Terminal accessibility, theming, lifecycle); the actual VT emulation and the pseudo-terminal are delegated to proven crates behind the engine::TerminalEngine trait. The default backend (alacritty_engine, enabled by the alacritty feature) pairs portable-pty (the PTY) with alacritty_terminal (the VT model) — nothing in this crate re-implements escape-code handling.

Sits at the teksilo-widgets tier but depends only on teksilo-core / teksilo-tokens / teksilo-canvas / teksilo-platform, so apps that don’t embed a terminal pay nothing.

Re-exports§

pub use color_scheme::ColorScheme;
pub use color_scheme::TermColor;
pub use engine::Cell;
pub use engine::CellAttrs;
pub use engine::CursorInfo;
pub use engine::GridSnapshot;
pub use engine::PtyGeom;
pub use engine::Scroll;
pub use engine::SelectionKind;
pub use engine::SelectionSpan;
pub use engine::SpawnedEngine;
pub use engine::TermCursorShape;
pub use engine::TermEvent;
pub use engine::TermMode;
pub use engine::TerminalCommand;
pub use engine::TerminalEngine;
pub use engine::TerminalEngineFactory;
pub use engine::TerminalExit;
pub use memory::MemoryEngine;
pub use memory::MemoryEngineFactory;
pub use memory::MemoryOutput;
pub use memory::MemoryShared;
pub use style::RecipeTerminalStyle;
pub use style::TerminalChrome;
pub use style::TerminalStyle;
pub use alacritty_engine::AlacrittyEngineFactory;

Modules§

alacritty_engine
The default TerminalEngine backend: alacritty_terminal’s VT model (parser + grid + scrollback + selection) driven over a portable-pty child.
color_scheme
Terminal colour model: the themeable 16-colour ANSI palette plus the fixed xterm 256-colour cube, and how a cell’s TermColor resolves to a concrete teksilo_tokens::Color.
engine
The engine boundary: a swappable TerminalEngine that owns the pseudo-terminal (PTY) and the VT emulation (parsing + grid + scrollback), plus the engine-agnostic value types the view consumes.
memory
An in-memory TerminalEngine test double. It performs no VT emulation — it records what the view writes/resizes/kills and returns a snapshot the test sets directly. Used by this crate’s own headless tests and available to downstream apps for testing terminal-driven UI without spawning a real shell. Mirrors teksilo_webview::MemoryWebViewBackend.
style
Tier-3 styling for the terminal’s chrome (the frame around the grid — the grid’s own colours are the ColorScheme’s job). Follows the framework’s per-widget style-protocol pattern: a TerminalStyle trait, a default RecipeTerminalStyle, resolved per-call (.style(...)) or left to default.

Structs§

CellMetrics
The fixed size of one terminal cell, in logical pixels.
Terminal
The terminal-emulator widget. See the crate docs for the design.
TerminalController
A cloneable handle to a live terminal, for driving it from app code outside build() (write to the child, control scrollback/selection, observe state). Holds a Weak reference, so keeping a controller does not keep the child process alive after the widget is gone.

Enums§

BellStyle
How the bell (^G) is presented.
CursorStyle
The preferred cursor shape.
TerminalClosePolicy
What happens to the child process when the widget is destroyed.
TerminalMenuCommand
One command the terminal’s context menu can run.
TouchReporting
What a direct pointer (a finger, a pen tip) is reported to the child program as, while that program has mouse tracking enabled.