diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-04 19:22:04 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 01:23:06 +0300 |
| commit | 41dd733ca7123c9ac4bfc6c781697a660e95b052 (patch) | |
| tree | 3fc91815ca139ef2e0b281bba0abda4ef15175f4 /vendor/libghostty-vt/src/termio.zig | |
| parent | 55c138263e190a1e79d4b997bfb9397306c0ec1f (diff) | |
feat: finish ghostty pane backend integration
Diffstat (limited to 'vendor/libghostty-vt/src/termio.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/termio.zig | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/termio.zig b/vendor/libghostty-vt/src/termio.zig new file mode 100644 index 00000000..b1688510 --- /dev/null +++ b/vendor/libghostty-vt/src/termio.zig @@ -0,0 +1,39 @@ +//! Termio is responsible for "terminal IO." Specifically, this is the +//! reading and writing of bytes for the underlying pty or pty-like device. +//! +//! Termio is constructed of a few components: +//! - Termio - The main shared struct that has common logic across all +//! backends and mailboxes (defined below). +//! - Backend - Responsible for the actual physical IO. For example, one +//! implementation creates a subprocess, allocates and assigns a pty, +//! and sets up a read thread on the pty. +//! - Mailbox - Responsible for storing/dispensing event messages to +//! the backend. This exists separately from backends because termio +//! is built to be both single and multi-threaded. +//! +//! Termio supports (and recommends) multi-threaded operation. Multi-threading +//! enables the read/writes to generally happen on separate threads and +//! almost always improves throughput and latency under heavy IO load. To +//! enable threading, use the Thread struct. This wraps a Termio, requires +//! specific backend/mailbox capabilities, and sets up the necessary threads. + +const stream_handler = @import("termio/stream_handler.zig"); + +const message = @import("termio/message.zig"); +pub const backend = @import("termio/backend.zig"); +pub const mailbox = @import("termio/mailbox.zig"); +pub const Exec = @import("termio/Exec.zig"); +pub const Options = @import("termio/Options.zig"); +pub const Termio = @import("termio/Termio.zig"); +pub const Thread = @import("termio/Thread.zig"); +pub const Backend = backend.Backend; +pub const DerivedConfig = Termio.DerivedConfig; +pub const Mailbox = mailbox.Mailbox; +pub const Message = message.Message; +pub const StreamHandler = stream_handler.StreamHandler; + +test { + @import("std").testing.refAllDecls(@This()); + + _ = @import("termio/shell_integration.zig"); +} |
