summaryrefslogtreecommitdiff
path: root/docs/typ/reference.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 22:21:45 -0300
committerGabriel Schneider <[email protected]>2026-11-05 23:08:36 -0300
commit71e5a0f4a8685b385fac762995d45575b638179f (patch)
treebf643875b0567b45cf659c1b3ad4b872f311a774 /docs/typ/reference.typ
parentd8e5fc18f5923c4213de1cb4105a677e725200af (diff)
downloadpardes-71e5a0f4a8685b385fac762995d45575b638179f.tar.gz
pardes-71e5a0f4a8685b385fac762995d45575b638179f.zip
kinds #1, the paint contract: a picture over the cells is one Placement (raster: ptr, w, h, stride; src in pixels; dst in the frame's cells; at, where in them in pixels, or none for the frontend to fit; key, the pixels' identity by pane serial, page and revision; a terminal program's kitty z; dirty, the rows changed since an older key; art, the pane's Petscii, Palette and Ascii), where ImagePlace carried native.{revision, page, fit, pan_x, pan_y, geometry, pixel_offset_y, paper_bg, exact}, cell rects and an ImageCacheKey of three shapes by build; a PDF strip's scroll is its body region's scroll_px, whose fraction the window draws as pixel_offset_y was; glyph art leaves the core for src/Art.zig, the frontends' (the matcher, both palettes and a cache by key, ex image.zig's GlyphArt and TerminalImages' glyph cache): the core always hands an image pane, a PDF's pages and a terminal's kitty images as placements, whatever the frontend shows, and the tty draws them as glyph art without kitty graphics or when the pane asks, the window when the pane asks; the four words set the same pane bytes as before and the frontend reads them off the placement, so config.zig, builtins.zig and exec.zig are untouched; /screen lists a frame's placements as images (only a frame with pictures has the field); no golden changes: the snapshot goldens are the tty's, which draws the same art (images.snap and tagbottomimage.snap pass unchanged, and the tty's bytes for an image, its Palette and its Ascii are byte-identical to the base's), no /screen golden holds a picture, and the window's goldens hash the same; tests: kitty.zig's glyph-art case becomes its core half (a placement over the 8x4 cells, the cells the pane's) with the art in tui.zig's own test, terminal.zig's glyph-art case the same, surface.zig's two ImageCacheKey cases one keyOf case, the GlyphArt cases move to Art.zig with a frame case; gates: core-test 959/959, behaviour-test 244/244, unit-test 1486/1487 tui and 1530/1531 gui, pane-test 171/172, snap all ok, process-test 0 of 37 failed on both, hxdiff 19 and hxparity 6 mismatches by the base's names, replicas, gui-golden, monkey-gui, kitty-test 44/44, kitty-harness and image-harness on both, daemon.py main and window-clients
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'docs/typ/reference.typ')
-rw-r--r--docs/typ/reference.typ12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index cb2df2a8..b515e1b2 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -572,7 +572,9 @@ drawn: glyph art (`on`) or pixels (`off`). With no graphics it is always
colours the glyph art uses, the C64's (`commodore`) or the terminal
theme's own 16 (#word("Palette") toggles it); `ascii` is whether the
printable ASCII bitmaps join the glyph set the matcher picks from
-(#word("Ascii") toggles it). #word("Palette") and ascii only change the glyph art.
+(#word("Ascii") toggles it). #word("Palette") and ascii only change the glyph art,
+which the frontend draws: a tui without graphics always, a window when
+#word("Petscii") is on.
#word("Petscii") and #word("Ascii") (`on|off`) and #word("Palette")
(`commodore|terminal`) take the value their tag word shows and set it, as
a PDF's #word("PdfFit") (`width|height`) and #word("PdfTint")
@@ -931,7 +933,13 @@ at 200, ending in `…`. Control characters become spaces.
row 5. Cells are #file("/screen")'s.
- #file("/screen"): JSON `cols`, `rows`, `cursor`, `styles`, and row-major
`cells` of `[grapheme, style_index]`; one frame per open. Compare a
- cell's style through `styles`, not the index.
+ cell's style through `styles`, not the index. A frame with pictures
+ (an image, a PDF's pages, a terminal program's kitty images) has
+ `images` too, a `{serial, rect, src, key, petscii}` each: the pane, the
+ cells it lies over (`[x, y, w, h]`), the part of its pixels shown, a
+ key naming those pixels, and whether its pane asks for glyph art. The
+ cells under a picture are the pane's ground: the glyph art a terminal
+ without graphics shows there is drawn by the frontend, not the core.
- #file("/commands"): `Word [arg] root|pane|both [values] -- sentence`, one
a line, generated from the builtin registry (`both`: #word("Edit"), at the active
pane from the root).