class

Egui::Terminal::Session

Inherits Egui::Terminal::Backend < Reference < Object

Constructors

new(shell : String | Nil = nil, args : Array(String) = [] of String, cwd : String | Nil = nil, env : Hash(String, String) | Nil = nil, cols : Int32 = 80, rows : Int32 = 24, scrollback : Int32 = 10000, on_output : Proc(Nil) | Nil = nil)
Source

Class methods

debug?

EGUI_FRAME_DEBUG also gates PTY-side logging (reader wakeups, evented-pass cost, session teardown) — see Backend::Sokol.

Source
default_shell
Source

Instance methods

alive?
Source
close

Ask the child to die (async; the session reaps itself).

Source
evented_pass(frame_time : Float64) : Nil

One bounded evented scheduler pass per FRAME, deduped by the frame's input time across every session in the process. Only needed by the LEGACY single-thread backend (sapp_run never yields, so PTY reader fibers would never run); with the detached render loop the scheduler is alive between frames and this is a no-op (Egui::Runtime.natural_scheduler?).

Source
exit_code

Exit code once dead, nil while alive/unknown.

Source
on_output
Source
on_output=(on_output : Proc(Nil) | Nil)
Source
pid

Child process pid, cached at spawn (the shim frees the session on reap). nil when the platform didn't provide one. Used by hosts for process-tree memory accounting.

Source
pump

Drain newly arrived bytes into the emulator (and flush emulator replies). Returns true when the visible state changed. The evented pass that fills the channel is #evented_pass — one per frame, shared by all sessions; a drain alone is cheap.

Source
resize(cols : Int32, rows : Int32) : Nil

Resize the emulator AND the PTY.

Source
term

The emulator state to render.

Source
write(bytes : Bytes) : Nil

Send input bytes to the child.

Source

Nested types