a modern tui library written in zig
at v0.2.1 691 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 button_8 = 128, 24 button_9 = 129, 25 button_10 = 130, 26 button_11 = 131, 27}; 28 29pub const Modifiers = packed struct(u3) { 30 shift: bool = false, 31 alt: bool = false, 32 ctrl: bool = false, 33}; 34 35pub const Type = enum { 36 press, 37 release, 38 motion, 39 drag, 40}; 41 42col: usize, 43row: usize, 44xoffset: usize = 0, 45yoffset: usize = 0, 46button: Button, 47mods: Modifiers, 48type: Type,