pub struct InlineTerminal { /* private fields */ }crossterm only.Expand description
Concrete crossterm terminal backends, exposed (issue #278) so external
integrations can drive SLT’s render pipeline with their own event loop —
pair with event::from_crossterm. Most apps should use run /
run_inline, which build and drive these internally.
Inline crossterm terminal backend: renders into a fixed-height region
below the cursor instead of taking over the whole screen.
Like Terminal, exposed (issue #278) for custom integrations. Backs the
crate::run_inline entry point.
Implementations§
Source§impl InlineTerminal
impl InlineTerminal
Sourcepub fn new(
height: u32,
mouse: bool,
kitty_keyboard: bool,
report_all_keys: bool,
color_depth: ColorDepth,
) -> Result<Self>
pub fn new( height: u32, mouse: bool, kitty_keyboard: bool, report_all_keys: bool, color_depth: ColorDepth, ) -> Result<Self>
Construct an inline terminal backend that renders height rows
below the current cursor without entering the alternate screen.
Optionally enables mouse capture and the kitty keyboard protocol.
When report_all_keys is set (and kitty_keyboard is too), bare
modifier presses are reported.
Sourcepub fn buffer_mut(&mut self) -> &mut Buffer
pub fn buffer_mut(&mut self) -> &mut Buffer
Mutable access to the back buffer used by the next render pass.
Sourcepub fn flush(&mut self) -> Result<()>
pub fn flush(&mut self) -> Result<()>
Diff the back buffer against the front buffer, write changed cells to stdout under a synchronized-output guard at the inline rows reserved below the cursor, then swap buffers.
Sourcepub fn handle_resize(&mut self) -> Result<()>
pub fn handle_resize(&mut self) -> Result<()>
Re-query the terminal size and resize the inline buffers to match the new column count, preserving the inline row height.