Expand description
FrankenTUI public facade crate.
§Role in FrankenTUI
This crate is the user-facing entry point for the ecosystem. It re-exports the most commonly used types from the internal crates (core/render/layout/ runtime/widgets/style/text/extras) so application code does not need to wire each crate individually.
§What belongs here
- Stable public surface area (re-exports).
- Minimal glue and convenience APIs.
- A lightweight prelude for day-to-day use.
§How it fits in the system
- Input layer: provided by
ftui-core - Runtime loop: provided by
ftui-runtime - Render kernel: provided by
ftui-render - Layout, text, style, and widgets: provided by their respective crates
- This crate ties them together for application authors.
If you only depend on one crate in your application, it should be ftui.
Re-exports§
pub use error::DegradationAction;pub use error::Error;pub use error::LayoutError;pub use error::ProtocolError;pub use error::RenderError;pub use error::Result;pub use error::TerminalError;pub use error::WidgetError;pub use ftui_core as core;pub use ftui_layout as layout;pub use ftui_render as render;pub use ftui_runtime as runtime;pub use ftui_style as style;pub use ftui_text as text;pub use ftui_widgets as widgets;
Modules§
Structs§
- App
- Builder for creating and running programs.
- Buffer
- A 2D grid of terminal cells.
- Buffer
Diff - The diff between two buffers.
- Cell
- A single terminal cell (16 bytes).
- Cell
Attrs - Packed cell attributes:
- Clipboard
Event - A clipboard event from OSC 52 response.
- Color
Cache - Simple hash cache for downgrade results (bounded; clears on overflow).
- Cursor
Manager - Manages cursor save/restore operations.
- Cx
- Capability context handle.
- CxController
- Control handle for a
Cx. - Effect
Queue Config - Configuration for effect queue scheduling.
- Frame
- Frame = Buffer + metadata for a render pass.
- Grapheme
Pool - A reference-counted pool for complex grapheme clusters.
- Inline
Auto Remeasure Config - Policy for remeasuring inline auto UI height.
- KeyEvent
- A keyboard event.
- LabClock
- A manually-advanceable clock for deterministic tests.
- Link
Registry - Registry for OSC 8 hyperlink URLs.
- Locale
Context - Runtime locale context with scoped overrides.
- Locale
Override - RAII guard for scoped locale overrides.
- Modifiers
- Modifier keys that can be held during a key event.
- Mouse
Event - A mouse event.
- Packed
Rgba - A compact RGBA color.
- Paste
Event - A paste event from bracketed paste mode.
- Presenter
- State-tracked ANSI presenter.
- Program
- The program runtime that manages the update/view loop.
- Program
Config - Configuration for the program runtime.
- Resolved
Theme - A theme with all colors resolved to fixed values.
- Rgb
- RGB color (opaque).
- Runtime
Diff Config - Runtime-level configuration for diff strategy selection.
- Style
- Unified styling type with CSS-like cascading semantics.
- Style
Flags - Text attribute flags (16 bits for extended attribute support).
- StyleId
- Identifier for a named style in a StyleSheet.
- Style
Sheet - A registry of named styles for consistent theming.
- Table
Theme - Shared theme for all table render paths.
- Task
Spec - Scheduling metadata for background tasks.
- Terminal
Capabilities - Terminal capability model.
- Terminal
Writer - Unified terminal output coordinator.
- Theme
- A theme with semantic color slots.
- Theme
Builder - Builder for creating custom themes.
Enums§
- Adaptive
Color - An adaptive color that can change based on light/dark mode.
- Ansi16
- ANSI 16-color indices (0-15).
- Clipboard
Source - The source of clipboard content.
- Cmd
- Commands represent side effects to be executed by the runtime.
- Color
- A color value at varying fidelity levels.
- Color
Profile - Terminal color profile used for downgrade decisions.
- Cursor
Save Strategy - Strategy for cursor save/restore operations.
- CxError
- Error returned when an operation is cancelled or times out via
Cx. - Event
- Canonical input event.
- KeyCode
- Key codes for keyboard events.
- KeyEvent
Kind - The type of key event.
- Mono
Color - Monochrome output selection.
- Mouse
Button - Mouse button identifiers.
- Mouse
Event Kind - The type of mouse event.
- Resize
Behavior - Resize handling behavior for the runtime.
- Screen
Mode - Screen mode determines whether we use alternate screen or inline mode.
- Table
Preset Id - Built-in TableTheme preset identifiers.
- UiAnchor
- Where the UI region is anchored in inline mode.
Traits§
- Model
- The Model trait defines application state and behavior.
Functions§
- current_
locale - Convenience: get the global locale.
- detect_
system_ locale - Detect the system locale from environment variables.
- set_
locale - Convenience: set the global locale.
Type Aliases§
- Locale
- Locale identifier (e.g.,
"en","en-US","ru").