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 style::RecipeTerminalStyle;pub use style::TerminalChrome;pub use style::TerminalStyle;pub use alacritty_engine::AlacrittyEngineFactory;
Modules§
- alacritty_
engine - The default
TerminalEnginebackend:alacritty_terminal’s VT model (parser + grid + scrollback + selection) driven over aportable-ptychild. - color_
scheme - Terminal colour model: the themeable 16-colour ANSI palette plus the fixed
xterm 256-colour cube, and how a cell’s
TermColorresolves to a concreteteksilo_tokens::Color. - engine
- The engine boundary: a swappable
TerminalEnginethat 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
TerminalEnginetest 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. Mirrorsteksilo_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: aTerminalStyletrait, a defaultRecipeTerminalStyle, resolved per-call (.style(...)) or left to default.
Structs§
- Cell
Metrics - The fixed size of one terminal cell, in logical pixels.
- Terminal
- The terminal-emulator widget. See the crate docs for the design.
- Terminal
Controller - 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 aWeakreference, so keeping a controller does not keep the child process alive after the widget is gone.
Enums§
- Bell
Style - How the bell (
^G) is presented. - Cursor
Style - The preferred cursor shape.
- Terminal
Close Policy - What happens to the child process when the widget is destroyed.
- Terminal
Menu Command - One command the terminal’s context menu can run.
- Touch
Reporting - What a direct pointer (a finger, a pen tip) is reported to the child program as, while that program has mouse tracking enabled.