a modern tui library written in zig
at main 726 B view raw
1/// A mouse event 2pub const Mouse = @This(); 3 4pub const Shape = enum { 5 default, 6 text, 7 pointer, 8 help, 9 progress, 10 wait, 11 @"ew-resize", 12 @"ns-resize", 13 cell, 14}; 15 16pub const Button = enum(u8) { 17 left, 18 middle, 19 right, 20 none, 21 wheel_up = 64, 22 wheel_down = 65, 23 wheel_right = 66, 24 wheel_left = 67, 25 button_8 = 128, 26 button_9 = 129, 27 button_10 = 130, 28 button_11 = 131, 29}; 30 31pub const Modifiers = packed struct(u3) { 32 shift: bool = false, 33 alt: bool = false, 34 ctrl: bool = false, 35}; 36 37pub const Type = enum { 38 press, 39 release, 40 motion, 41 drag, 42}; 43 44col: i16, 45row: i16, 46xoffset: u16 = 0, 47yoffset: u16 = 0, 48button: Button, 49mods: Modifiers, 50type: Type,