pub enum Event<T> {
Pressed,
Pressing,
PressLost,
ShortClicked,
Clicked,
LongPressed,
LongPressedRepeat,
Released,
Pointer(PointerEvent),
Special(T),
}
Expand description
Events are triggered in LVGL when something happens which might be interesting to the user, e.g. if an object:
- is clicked
- is dragged
- its value has changed, etc.
All objects (such as Buttons/Labels/Sliders etc.) receive these generic events regardless of their type.
Variants§
Pressed
The object has been pressed
Pressing
The object is being pressed (sent continuously while pressing)
PressLost
The input device is still being pressed but is no longer on the object
ShortClicked
Released before long_press_time
config time. Not called if dragged.
Clicked
Called on release if not dragged (regardless to long press)
LongPressed
Pressing for long_press_time
config time. Not called if dragged.
LongPressedRepeat
Called after long_press_time
config in every long_press_rep_time
ms. Not
called if dragged.
Released
Called in every case when the object has been released even if it was dragged. Not called
if slid from the object while pressing and released outside of the object. In this
case, Event<_>::PressLost
is sent.
Pointer(PointerEvent)
Pointer-like input devices events (E.g. mouse or touchpad)
Special(T)
Special event for the object type
Trait Implementations§
source§impl<S> From<Event<S>> for lv_event_code_t
impl<S> From<Event<S>> for lv_event_code_t
source§impl<T: Ord> Ord for Event<T>
impl<T: Ord> Ord for Event<T>
source§impl<T: PartialEq> PartialEq<Event<T>> for Event<T>
impl<T: PartialEq> PartialEq<Event<T>> for Event<T>
source§impl<T: PartialOrd> PartialOrd<Event<T>> for Event<T>
impl<T: PartialOrd> PartialOrd<Event<T>> for Event<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more