diff options
Diffstat (limited to 'src/terminal/runtime.rs')
| -rw-r--r-- | src/terminal/runtime.rs | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs index 2aa49b68..13ce75c9 100644 --- a/src/terminal/runtime.rs +++ b/src/terminal/runtime.rs @@ -19,6 +19,61 @@ impl TerminalRuntime { self.0.shutdown(); } + #[cfg(unix)] + pub fn duplicate_handoff_fd(&self) -> std::io::Result<std::os::fd::RawFd> { + self.0.duplicate_handoff_fd() + } + + #[cfg(unix)] + pub fn preserve_for_handoff(self) { + self.0.preserve_for_handoff() + } + + #[cfg(unix)] + pub fn assume_handoff_ownership(&mut self) { + self.0.assume_handoff_ownership(); + } + + #[cfg(unix)] + pub fn set_handoff_reader_paused(&self, paused: bool) { + self.0.set_handoff_reader_paused(paused); + } + + #[cfg(unix)] + pub fn pause_handoff_reader(&self, timeout: std::time::Duration) -> std::io::Result<()> { + self.0.pause_handoff_reader(timeout) + } + + #[cfg(unix)] + pub fn handoff_pane(&self, pane_id: u32) -> crate::server::handoff::HandoffPane { + self.0.handoff_pane(pane_id) + } + + #[cfg(unix)] + pub fn handoff_history_ansi(&self) -> Option<String> { + self.0.handoff_history_ansi() + } + + #[cfg(unix)] + pub fn from_handoff_fd( + import: crate::pane::PaneRuntimeImport, + scrollback_limit_bytes: usize, + host_terminal_theme: crate::terminal_theme::TerminalTheme, + events: mpsc::Sender<AppEvent>, + render_notify: Arc<Notify>, + render_dirty: Arc<AtomicBool>, + ) -> std::io::Result<Self> { + crate::pane::PaneRuntime::from_handoff_fd( + import, + scrollback_limit_bytes, + host_terminal_theme, + events, + render_notify, + render_dirty, + ) + .map(Self) + } + pub fn spawn( pane_id: PaneId, rows: u16, @@ -172,6 +227,10 @@ impl TerminalRuntime { self.0.resize(rows, cols, cell_width_px, cell_height_px); } + pub fn nudge_child_redraw_after_handoff(&self) { + self.0.nudge_child_redraw_after_handoff(); + } + pub fn scroll_up(&self, lines: usize) { self.0.scroll_up(lines); } |
