summaryrefslogtreecommitdiff
path: root/src/Term.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Term.zig')
-rw-r--r--src/Term.zig39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/Term.zig b/src/Term.zig
index a21c3d97..ee178adc 100644
--- a/src/Term.zig
+++ b/src/Term.zig
@@ -6,6 +6,7 @@
//! 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 plain = @import("plain");
const terminal = @import("term/terminal.zig");
const pager = @import("term/pager.zig");
const echo = @import("term/echo.zig");
@@ -74,6 +75,8 @@ pub const Grid = struct {
/// The view's top row while it is scrolled to one, null while it
/// follows the output.
view: ?usize = null,
+ /// Its grid's width (a pane's may differ while a resize is deferred).
+ cols: u16 = 0,
};
/// What a `feed` told the rows the core keeps positions on: each tracked
@@ -215,31 +218,35 @@ 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.
+// Plain data both ways: the core hands the theme's colours (`Ink`) and a
+// buffer, and is given its view's cells (`Painted`, `PaintedRow`) and its
+// images as placements; which of the body's rows they stand under is the
+// core's (src/ansi.zig).
-/// Its program's colours over the body's rows, through the theme's
+/// Its view's rows as cells in the theme's colours, through the theme's
/// filter when the pane has it on.
-pub const recolor = terminal.recolorAnsi;
+pub const paint = terminal.paint;
/// Its kitty graphics over the body's rows, as placements.
-pub const images = terminal.drawImages;
+pub const images = terminal.images;
+/// Its rows `first` and the `count` after it as text, prompts cut off (the
+/// edit copy's rows, as they were).
+pub const editRows = terminal.editRows;
/// 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;
+/// The filter a +Pager's spans are drawn through, and a span's colour
+/// through it.
+pub const filter = terminal.pagerFilter;
+pub const spanColor = terminal.spanColor;
+pub const Ink = plain.term.Ink;
+pub const FilterPalette = plain.term.FilterPalette;
+pub const Filter = plain.term.Filter;
+pub const Painted = plain.term.Painted;
+pub const PaintedRow = plain.term.PaintedRow;
+pub const ImagesAt = plain.term.ImagesAt;
// ---- its replicas ----