From 8facd769003b970e7a2c933f1887e09bffb4bd08 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 21:37:08 -0300 Subject: kinds #46, the docs say pdf is Zig over MuPDF: reference.typ's Addons section (the module's init and held body, pdf.zig through pdf_bridge.c, its jobs, one place shown by each view, the text layer's lines and the glide), shared-libs.md (the library and the static build), the changelog Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- docs/typ/reference.typ | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'docs/typ/reference.typ') diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index 22065cd1..db9cdb54 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -988,21 +988,26 @@ wrapping every function of the header and every call of `pa_api`: the pane's arena and pardes's heap as `std.mem.Allocator`s, typed keys, clicks and views, a window to `put` text in (column first, where the header's `pa_put` is row first), a deadline for `tick`, a `prefix` written after -every tick, a struct's bytes as its record, and its own `zig test` (`zig +every tick, a body written (at most 4 KiB) or held (any length), an `init` +at load, a struct's bytes as its record, and its own `zig test` (`zig build addon-test` runs them); a Zig kind outside the tree runs `zig translate-c src/kinds/pardes_addon.h` once for the header: `addons/snake/snake.zig` is a game in it. Pictures are an addon too, `addons/image/image.zig` (PNG, JPEG, GIF, BMP, PPM, PGM and TGA through stb_image, at most 1280 pixels a side), which `zig build image` installs as `/lib/pardes/addons/image.so`, and so are PDFs, -`addons/pdf/pdf.c` over MuPDF (its pages rendered on jobs, two at once), -which `zig build pdf` installs as `/lib/pardes/addons/pdf.so` -(`zig build addons`, both); without them an image file and a PDF open as -text. A -PDF on a terminal without graphics shows its page's text layer, the moving -keys and the wheel a page a step; with them its pages, a fast scroll -rendering only the rows each page shows until it rests, a touchpad's turn -moving it by its fraction of a row, and the pointer a hand over a link. +`addons/pdf/pdf.zig`, in Zig over MuPDF through `pdf_bridge.c` (C, so +MuPDF's throws stay in C; its pages, their sizes, a page's text and a +search on jobs, two at once), which `zig build pdf` installs as +`/lib/pardes/addons/pdf.so` (`zig build addons`, both); without +them an image file and a PDF open as text. A PDF is one place, its page and +how far down it, shown by each view its own way. On a terminal without +graphics it shows its page's text layer from the line the place names, the +moving keys a page a step, the wheel, `gj`, `gk`, `Ctrl-e` and +`Ctrl-y` a line and a page at the window's edge; with them its pages, +a wheel's notch gliding there over four frames, a fast scroll rendering +only the rows each page shows until it rests, a touchpad's turn moving it +by its fraction of a row at once, and the pointer a hand over a link. The header is ABI 3.0: an addon built against another major (a 2.x one) is refused. A kind's state is one thing, stepped by `tick` however many views (windows and terminals on the session) show it; what each view sees -- cgit v1.3