add(input): mouse support
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s

This commit is contained in:
2025-02-17 23:36:27 +01:00
parent c2080ab40f
commit e2f9408850
4 changed files with 81 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
const std = @import("std");
const terminal = @import("terminal.zig");
const Mouse = @import("mouse.zig").Mouse;
const Size = @import("size.zig").Size;
const Key = @import("key.zig").Key;
@@ -23,6 +24,8 @@ pub const SystemEvent = union(enum) {
resize: Size,
/// Input key event received from the user
key: Key,
/// Mouse input event
mouse: Mouse,
/// Focus event for mouse interaction
/// TODO: this should instead be a union with a `Size` to derive which container / element the focus meant for
focus: bool,