diff options
Diffstat (limited to 'src/macos/pardes.h')
| -rw-r--r-- | src/macos/pardes.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/macos/pardes.h b/src/macos/pardes.h index 8b798df6..c28b3514 100644 --- a/src/macos/pardes.h +++ b/src/macos/pardes.h @@ -269,6 +269,38 @@ uint32_t pardes_tagline_band_offset(uint16_t row, float canvas_h, uint32_t cell_ uint32_t tagline_h); uint32_t pardes_topbar_pane_border_px(uint32_t cell_h, uint32_t tagline_h); +// The column a compact tagline band anchors at: the pane's left edge, so a tag +// row advances on the tagline face's own narrower pitch instead of centring a +// smaller glyph inside every body-width cell. CELLS, not pixels — the host +// knows both widths — and fractional, because an animating panel's origin is. +// +// glyph_x = origin * body_cell_w + (col - origin) * tagline_cell_w +float pardes_tagline_origin_col(uint16_t col, uint16_t row); + +// The inverse, for the pointer: which grid column `x` falls in on `row`, given +// that a tag row's glyphs step at the narrower pitch. Compacting the text +// without compacting this makes a click drift one word further right for every +// word along the row. `x` and both widths must share a unit; only the ratio is +// 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 +// and family names, which for one face are routinely different strings. +// +// `pardes_fallback_font_name` returns a borrowed, NOT NUL-terminated pointer +// and writes its byte length through `len`; NULL past the end. +uint32_t pardes_fallback_font_count(void); +const char *pardes_fallback_font_name(uint32_t index, uint32_t *len); + // Colour of that rule: a compiled override, else the theme's scrollbar track. // PARDES_COLOR_DEFAULT before there is a session to ask — do not draw it then. uint32_t pardes_topbar_pane_border_rgb(void); |
