summaryrefslogtreecommitdiff
path: root/docs/typ/reference.typ
diff options
context:
space:
mode:
Diffstat (limited to 'docs/typ/reference.typ')
-rw-r--r--docs/typ/reference.typ23
1 files changed, 14 insertions, 9 deletions
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 `<prefix>/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 `<prefix>/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
+`<prefix>/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