summaryrefslogtreecommitdiff
path: root/src/draw.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 11:38:06 -0300
committerGabriel Schneider <[email protected]>2026-11-06 12:03:00 -0300
commitf05c69380c8f23ab7dadb1c9d6240af687c88bed (patch)
tree8bb77af9ba2fadf64ac789bbe94c39df346a9db8 /src/draw.zig
parent239e8186111c215bf3bca842216205056e4b00e1 (diff)
downloadpardes-f05c69380c8f23ab7dadb1c9d6240af687c88bed.tar.gz
pardes-f05c69380c8f23ab7dadb1c9d6240af687c88bed.zip
kinds #18, ABI 2.2: pa_api says the core's ABI, pa_mouse grows a wheel's amount (a window passes a touchpad's fraction of a turn over a kind's pane, a terminal whole notches), pa_view says glyphs (no graphics), pa_paint's tail padding holds the pointer the kind asks for (the window shows a hand for PA_POINTER_LINK over its pane, a Shadow's frame carries it), and tick is told PA_FRAMED when a frame was drawn since its last; addon-test gains graphics on|off
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/draw.zig')
-rw-r--r--src/draw.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/draw.zig b/src/draw.zig
index 8538c6a6..b17e2458 100644
--- a/src/draw.zig
+++ b/src/draw.zig
@@ -183,6 +183,11 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
// afford it the arrow instead.
if (p.look_hover_preview != null) s.pointer_shape = .target;
if (v.drag == .move or v.drag == .column_move) s.pointer_shape = .box;
+ // Over a kind's pane, the pointer its last frame asked for (a PDF's
+ // hand over a link; 2.2).
+ if (v.kind_hover) |id| if (p.panes[id]) |pane| if (pane.addon) |k| {
+ if ((if (k.shadow) |sh| sh.pointer else k.pointer) == pardes.Kind.c.PA_POINTER_LINK) s.pointer_shape = .link;
+ };
for (&s.body_layers) |*layer| layer.rows = 0;
for (&s.tag_layers) |*layer| layer.rows = 0;
s.placements.clearRetainingCapacity();