Open nagyrobi opened 10 months ago
Fyi OpenHASP chose these: https://www.openhasp.com/0.7.0/design/objects/#events
We need on_value
trigger because btnmatrix
control flag CLICK_TRIG
offers us this in a configurable way; and that seems the only way to know which button was pressed.
Also something like on_draw_end
(perhaps LV_EVENT_DRAW_POST_END
). Use case: after displaying a bootlogo on the top_layer, start a delay of a few seconds, and ditch the logo widget...
On gesture and on_draw_end to be done at a later date maybe.
A thought on events from: https://docs.lvgl.io/8.3/overview/event.html
A universal
on_event
trigger could be implemented with a parametertype
which can be chosen from an enum of LVGL events. A few shorthands could be implemented for most popular events:~
on_press
-> LV_EVENT_PRESSEDon_release
-> LV_EVENT_RELEASEDon_click
-> LV_EVENT_SHORT_CLICKEDon_long_press
-> LV_EVENT_LONG_PRESSED~on_value
-> LV_EVENT_VALUE_CHANGED, returning the value in x (slider has been moved to value x, switch/btn toggled)on_gesture
-> LV_EVENT_GESTURE, returning the gesture (eg. swipe direction)