summaryrefslogtreecommitdiff
path: root/abi
diff options
context:
space:
mode:
Diffstat (limited to 'abi')
-rw-r--r--abi/pardes.h11
-rw-r--r--abi/term.zig32
2 files changed, 16 insertions, 27 deletions
diff --git a/abi/pardes.h b/abi/pardes.h
index 24eb6701..3bacd588 100644
--- a/abi/pardes.h
+++ b/abi/pardes.h
@@ -299,13 +299,6 @@ float pardes_tagline_origin_col(uint16_t col, uint16_t row);
// read, so a host measuring in points passes points.
uint16_t pardes_grid_col_at(float x, uint16_t row, float body_w, float tagline_w);
-// The tag band's own background, the base a compact tag row is painted on: the
-// pane-wide band goes down in THIS colour on the body grid, then each cell's
-// own background on the narrower grid its glyph uses. One pass would put a
-// highlighted word's box on body pitch and its letters on tagline pitch.
-// PARDES_COLOR_DEFAULT before there is a session to ask.
-uint32_t pardes_tagline_bg(void);
-
// The fallback font PREFERENCE ORDER, shared with the SDL shell. Only the order
// travels: resolving a name is the host's business, because SDL matches font
// FILE STEMS while walking the font directories and CoreText matches PostScript
@@ -325,10 +318,6 @@ uint32_t pardes_topbar_pane_border_rgb(void);
// pardes.TOPBAR_H, and runtime/macos.zig asserts the two agree.
#define PARDES_TOPBAR_H 1u
-// The active pane's tag row background, for hosts that afford the active
-// tagline more than a tint — macOS raises it like an old-school bevel.
-uint32_t pardes_tag_active_bg(void);
-
// Persistent full-window effect switches and their display-clock time. A zero
// flags word means draw the CoreText frame directly; any nonzero combination
// is one postprocess pass. Snapshot by value, with no borrowed storage.
diff --git a/abi/term.zig b/abi/term.zig
index e84d6998..2fb7c260 100644
--- a/abi/term.zig
+++ b/abi/term.zig
@@ -136,33 +136,33 @@ pub const Span = struct { start: u32, end: u32, style: CellStyle };
// ---- its colours on the body ----
-/// A theme's colours as a terminal's paint takes them.
+/// A theme's colours as a terminal's paint takes them, worked out with the
+/// theme (colors.Chrome, DESIGN.md R1, R14, R15): its page, its text, SGR
+/// faint's ink on it, and its sixteen, which the filter keys a program's
+/// colours to as well. `host`: a theme that leaves its page and sixteen to
+/// the tty (`dark`), drawn in a tty, whose cells then name the tty's own.
pub const Ink = struct {
- fg: ?[3]u8,
- bg: ?[3]u8,
- tag_fg: [3]u8,
- tag_bg: [3]u8,
- /// The theme's own sixteen, when it has them.
- palette: ?[16][3]u8,
- /// The sixteen the filter keys a program's colours to: `palette`, else
- /// made of the theme's roles.
- base: [16][3]u8,
+ fg: [3]u8,
+ bg: [3]u8,
+ dim: [3]u8,
+ ansi: [16][3]u8,
+ host: bool,
- /// A palette index as the theme draws it: its own sixteen, else the
- /// index.
+ /// A palette index as the theme draws it: its sixteen, else the index.
pub fn palColor(ink: *const Ink, idx: u8) Color {
- if (ink.palette) |pal| if (idx < 16) return .{ .rgb = pal[idx] };
+ if (!ink.host and idx < 16) return .{ .rgb = ink.ansi[idx] };
return .{ .index = idx };
}
};
-/// The theme's 256 colours as the filter maps onto them, kept while the
-/// theme is the same (`Pardes.tty_filter_palette`).
+/// The theme's 256 colours as the filter maps onto them (ghostty's
+/// generator over its sixteen, page and text), made once a theme and kept
+/// while it is the same (`Pardes.tty_filter_palette`).
pub const FilterPalette = struct {
key: ?Key = null,
colors: [256][3]u8 = undefined,
- pub const Key = struct { bg: [3]u8, fg: [3]u8, base: [16][3]u8 };
+ pub const Key = struct { bg: [3]u8, fg: [3]u8, ansi: [16][3]u8 };
};
/// A program's colours mapped to the theme, once a frame: what a +Pager's