summaryrefslogtreecommitdiff
path: root/src/Term.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Term.zig')
-rw-r--r--src/Term.zig31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Term.zig b/src/Term.zig
new file mode 100644
index 00000000..36315df4
--- /dev/null
+++ b/src/Term.zig
@@ -0,0 +1,31 @@
+//! The terminal as the core sees it (docs/next-terminal.md, Phase 0): the
+//! entries the core calls and the plain records they take and give. A
+//! terminal pane holds a `*State` the core never looks into: what it knows
+//! of one it is told here, as numbers, bytes and text. The emulator
+//! (ghostty-vt) and what it brings stay behind this file, in src/term/;
+//! this is the one file outside it that names a file inside it (and so
+//! the one place Phase 1 turns into the module's registration).
+const std = @import("std");
+const terminal = @import("term/terminal.zig");
+
+/// A terminal pane's emulator, its parse and what pardes keeps beside it.
+pub const State = terminal.State;
+
+// ---- lifecycle ----
+
+/// A new emulator, `cols` by `rows`, allocated with `gpa` (its own from
+/// then on).
+pub const open = terminal.open;
+/// Its emulator and what it holds, freed; the kitty images' caches were
+/// `gpa`'s.
+pub const close = terminal.close;
+/// When its next kitty animation frame is due (ms on the core's clock), as
+/// its last drawn frame left it; null when nothing plays.
+pub const due = terminal.due;
+/// Loaded from a dump without its shell: its program's modes reset, its
+/// history marked off from what the next shell prints.
+pub const revive = terminal.revive;
+/// The PNG resize workers kitty images are decoded with, started and
+/// stopped with the host.
+pub const start = terminal.TerminalImages.start;
+pub const stop = terminal.TerminalImages.stop;