From c1917b949b9580de8bf0977874a210f0266812da Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 06:24:42 -0300 Subject: kinds #14, the core's PDF code gone: pdf.zig and pdf_view.zig leave and every pdf_enabled branch with them; look, Jump, Recent, dumps (one from before the addon opens as its pane), the watch, mouse, keys, the rail and the tag go through Kind for any kind's pane; test/pdf.zig's behaviours are T1 cases over 9P (addons_pdf.zig) and pane cases (a Shadow over a replica, a file changed under it), the harnesses load pdf.so by path Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/Event.zig | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/Event.zig') diff --git a/src/Event.zig b/src/Event.zig index bf27ff69..63dcb5f2 100644 --- a/src/Event.zig +++ b/src/Event.zig @@ -4,7 +4,6 @@ const config = @import("config.zig"); const selection_pipe = @import("selection_pipe.zig"); const Stream = @import("Stream.zig"); const Layer = @import("Layer.zig"); -const pdf_enabled = @import("panes.zig").Pdf.enabled; const RowMetrics = Layer.Metrics; const TagHit = Layer.TagHit; @@ -89,12 +88,12 @@ pub fn hit(key: Key, binding: []const config.Chord) bool { pub const sel_slot = @backingInt(config.select_button); -/// Pixel dimensions are meaningful only to the native PDF placement path. -/// Keep resize events layout-only when that path is not part of the build. -pub const CellPixels = if (pdf_enabled) struct { +/// A cell's pixels, as the frontend draws it: what a kind's pictures and a +/// terminal's kitty images are laid out at. +pub const CellPixels = struct { w: u16 = 8, h: u16 = 16, -} else struct {}; +}; pub const Event = union(enum) { key: Key, @@ -125,11 +124,6 @@ pub const Event = union(enum) { search: Stream.Batch, paste: []const u8, command: []const u8, - /// Native shells may preserve sub-cell wheel distance in physical pixels. - /// TTY button events still enter through the ordinary mouse path. - /// `glide`: a wheel's notch, which the strip glides; a touchpad's - /// fraction is followed as it comes. - pdf_scroll: struct { pane: u8, delta_pixels: f32, glide: bool = true }, /// The host pointer left the drawable area. Unlike an out-of-range motion, /// this must not clamp onto and preview the final grid cell. pointer_leave, -- cgit v1.3