pub struct PaneGrid { /* private fields */ }Expand description
Live grid + cursor + the parser that feeds them. Owns mutable
state, so callers wrap it in Mutex (the InProcess does this
since multiple PTY-reader threads + the RPC dispatch thread all
race for it).
Implementations§
Source§impl PaneGrid
impl PaneGrid
Sourcepub fn modes(&self) -> ModeSet
pub fn modes(&self) -> ModeSet
Every terminal mode this pane is in, taken at ONE instant.
This is how a client reads a mode under docs/SHUKEN.md — from the
authority, never from a parser of its own. Today mado reads
bracketed_paste from its OWN Terminal, which is correct only
because mado still parses every byte; it becomes a live bug the
instant this grid is authoritative, and it is a paste-sanitisation
decision, not a cosmetic one.
Returned as a whole ModeSet rather than one getter per mode so a
client cannot mix modes from two different instants.
pub fn snapshot(&self) -> PaneSnapshot
Sourcepub fn title(&self) -> Option<&str>
pub fn title(&self) -> Option<&str>
Current window title (OSC 0 / 2). None until the first title set; cleared on RIS.
Sourcepub fn stamp_yurai(&mut self, y: Yurai) -> bool
pub fn stamp_yurai(&mut self, y: Yurai) -> bool
Stamp the owning pane’s provenance so every block this grid
mints records WHO ran it. Write-once; returns true if
this call took effect.
Provenance enters through the grid deliberately. Under
shuken (docs/SHUKEN.md) PaneGrid is the sole VT
authority — it is the one place that sees the byte stream
and mints blocks from it — so attribution belongs at the
same seam as the authority. A second, parallel path that
attributed blocks anywhere else would be exactly the
duplicated-state split shuken exists to forbid.
Sourcepub fn cursor_keys_mode(&self) -> bool
pub fn cursor_keys_mode(&self) -> bool
DECCKM (DEC mode 1) cursor-keys application mode.
Consumers translating host keystrokes to PTY bytes (mado’s
keybind::madori_key_to_pty_bytes, any future tear-client
renderer) read this to encode Up/Down/Right/Left as
ESC O A/B/C/D (true) or ESC [ A/B/C/D (false).
Sourcepub fn scrollback_len(&self) -> usize
pub fn scrollback_len(&self) -> usize
Number of scrollback rows that have rolled off the primary screen. Useful for tests + UI affordances.
pub fn resize(&mut self, cols: usize, rows: usize)
Auto Trait Implementations§
impl Freeze for PaneGrid
impl RefUnwindSafe for PaneGrid
impl Send for PaneGrid
impl Sync for PaneGrid
impl Unpin for PaneGrid
impl UnsafeUnpin for PaneGrid
impl UnwindSafe for PaneGrid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.