summaryrefslogtreecommitdiff
path: root/src/Event.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 06:24:42 -0300
committerGabriel Schneider <[email protected]>2026-11-06 11:19:44 -0300
commitc1917b949b9580de8bf0977874a210f0266812da (patch)
tree447dd2235ea00634f662cd3becf4bceb8a895f41 /src/Event.zig
parent76c55b5bce0f181b0b15b16596c900397dfef544 (diff)
downloadpardes-c1917b949b9580de8bf0977874a210f0266812da.tar.gz
pardes-c1917b949b9580de8bf0977874a210f0266812da.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Event.zig')
-rw-r--r--src/Event.zig14
1 files changed, 4 insertions, 10 deletions
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,