rlvgl_core/event.rs
1//! Basic UI events used for widgets.
2
3/// Event types propagated through the widget tree.
4#[derive(Debug, Clone, PartialEq, Eq)]
5pub enum Event {
6 /// Called periodically to advance animations or timers.
7 Tick,
8 /// A pointer (mouse or touch) was pressed at the given coordinates.
9 PointerDown {
10 /// Horizontal coordinate relative to the widget origin.
11 x: i32,
12 /// Vertical coordinate relative to the widget origin.
13 y: i32,
14 },
15 /// The pointer was released.
16 PointerUp {
17 /// Horizontal coordinate relative to the widget origin.
18 x: i32,
19 /// Vertical coordinate relative to the widget origin.
20 y: i32,
21 },
22 /// The pointer moved while still pressed.
23 PointerMove {
24 /// Horizontal coordinate relative to the widget origin.
25 x: i32,
26 /// Vertical coordinate relative to the widget origin.
27 y: i32,
28 },
29}