summaryrefslogtreecommitdiff
path: root/src/wire.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/wire.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/wire.zig')
-rw-r--r--src/wire.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wire.zig b/src/wire.zig
index d083ea82..e39e25b4 100644
--- a/src/wire.zig
+++ b/src/wire.zig
@@ -518,6 +518,7 @@ pub fn encodeClient(out: []u8, msg: ClientMsg) Error![]const u8 {
try w.writeByte(@intFromBool(m.ctrl));
try w.writeByte(@intFromBool(m.shift));
try w.writeByte(@intFromBool(m.alt));
+ try w.writeInt(u32, @bitCast(m.amount), .little);
try putBodyHit(&w, m.body_hit);
try putTagHit(&w, m.tag_hit);
},
@@ -597,6 +598,7 @@ pub fn decodeClient(tag: u8, payload: []const u8) Error!ClientMsg {
.ctrl = try getBool(&r),
.shift = try getBool(&r),
.alt = try getBool(&r),
+ .amount = @bitCast(try r.takeInt(u32, .little)),
.body_hit = try getBodyHit(&r),
.tag_hit = try getTagHit(&r),
} } },
@@ -633,7 +635,7 @@ pub fn clientBound(msg: ClientMsg) usize {
.screen_ack, .want => |bytes| bytes.len,
.event => |ev| switch (ev) {
// Its hits' places (14 bytes each) past the slack.
- .mouse => 28,
+ .mouse => 32,
.resize, .pointer_leave, .focus, .frontend => 0,
.key => |k| k.text.len,
.paste => |b| b.len,