summaryrefslogtreecommitdiff
path: root/src/addon_test.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/addon_test.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/addon_test.zig')
-rw-r--r--src/addon_test.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/addon_test.zig b/src/addon_test.zig
index 427f0289..7b151ee6 100644
--- a/src/addon_test.zig
+++ b/src/addon_test.zig
@@ -17,6 +17,8 @@
//! seed 7 what every pane's seed is made from (before open)
//! click 3 1 a left click at the body's column 3, row 1
//! focus, blur the window takes the keyboard, or loses it
+//! graphics on|off a frontend that shows pictures, or one without
+//! them (glyph art, the start's)
//! dump the pane's record (its length) loaded into a
//! fresh pane, which the script goes on with
//! body, ctl the pane's body, or its ctl file's read
@@ -108,6 +110,9 @@ fn run(io: std.Io, gpa: std.mem.Allocator, lib: []const u8, script_path: ?[]cons
p.update(.{ .mouse = .{ .button = .left, .kind = mk, .col = body.x + col, .row = body.y + row } });
} else if (is(verb, "focus") or is(verb, "blur")) {
p.update(.{ .focus = is(verb, "focus") });
+ } else if (is(verb, "graphics")) {
+ // A frontend that shows pictures (`graphics on`), or glyph art.
+ p.update(.{ .frontend = .{ .windowed = false, .native_images = std.mem.eql(u8, arg, "on") } });
} else if (is(verb, "dump")) {
id = try reloaded(p, gpa, at, out);
} else if (is(verb, "body") or is(verb, "ctl")) {