diff options
Diffstat (limited to 'src/Term.zig')
| -rw-r--r-- | src/Term.zig | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/Term.zig b/src/Term.zig index 6c9bd4e3..a21c3d97 100644 --- a/src/Term.zig +++ b/src/Term.zig @@ -8,6 +8,11 @@ const std = @import("std"); const terminal = @import("term/terminal.zig"); const pager = @import("term/pager.zig"); +const echo = @import("term/echo.zig"); +/// The screen state replicas are sent (its encoder, a terminal's versions, +/// what a peer holds, a replica's side), and its streams and soak for the +/// replica tests outside src/. +pub const screen_state = @import("term/screen_state.zig"); /// A terminal pane's emulator, its parse and what pardes keeps beside it. pub const State = terminal.State; @@ -208,6 +213,63 @@ pub const Page = pager.Page; /// Bytes `start..end` of a page's text, drawn in `style`. pub const Span = pager.Span; +// ---- draw ---- +// +// ponytail: not yet narrowed to plain data (docs/next-terminal.md's draw +// row): these still take the core's Pardes, Surface and Pane, read the +// pane's edit copy and write the surface's cells and placements +// themselves. Phase 1 needs them as a cell hand-over (`paint`) and a +// placement list (`images`) first. + +/// Its program's colours over the body's rows, through the theme's +/// filter when the pane has it on. +pub const recolor = terminal.recolorAnsi; +/// Its kitty graphics over the body's rows, as placements. +pub const images = terminal.drawImages; +/// The Petscii builtin on it: its kitty graphics as glyph art, or back to +/// pixels; null for none. +pub const petscii = terminal.petscii; +pub const togglePetscii = terminal.togglePetscii; +/// Whether the screen showing holds any kitty graphics image. +pub const hasImages = terminal.hasImages; +/// A program's colours mapped to the theme (Filter): a terminal's cells +/// or a +Pager's spans (`spanColor`). +pub const Filter = terminal.FilteredColors; +/// The theme's 256 colours as the filter maps onto them, kept while the +/// theme is the same (`Pardes.tty_filter_palette`). +pub const FilterPalette = terminal.FilterPalette; +/// A palette index as the theme draws it: its own sixteen, else the index. +pub const palColor = terminal.palColor; + +// ---- its replicas ---- + +/// What a peer is owed of it, a delta against what the peer was sent. +pub const encode = terminal.encode; +/// Rows of it a replica holds as holes. +pub const encodeRows = terminal.encodeRows; +/// A peer's track of it let go. +pub const untrack = terminal.untrack; +/// Whether a step read its rows since `clearRead`. +pub const wasRead = terminal.wasRead; +pub const clearRead = terminal.clearRead; +/// A replica's side: a delta applied, rows applied, the rows its view +/// shows, rows blank until they come. +pub const apply = terminal.apply; +pub const applyRows = terminal.applyRows; +pub const shown = terminal.shown; +pub const blank = terminal.blank; +pub const dumpScreen = terminal.dumpScreen; +pub const Encoder = screen_state.Encoder; +pub const Track = screen_state.Track; +pub const Peer = screen_state.Peer; +pub const Replica = screen_state.Replica; +/// A replica's keys into a terminal drawn at once, before its authority +/// says (predicted echo). +pub const Echo = echo.Echo; + test { + _ = terminal; _ = pager; + _ = echo; + _ = screen_state; } |
