attach windo focusHandler to LVGL events
This commit is contained in:
committed by
Raphael Coeffic
parent
85e9f1d7ca
commit
c1e143c4fd
@@ -139,6 +139,12 @@ extern "C" void window_event_cb(lv_event_t * e)
|
||||
else if (code == LV_EVENT_CANCEL) {
|
||||
TRACE("CANCEL[%p]", window);
|
||||
window->onCancel();
|
||||
} else if (code == LV_EVENT_FOCUSED) {
|
||||
if(window->focusHandler)
|
||||
window->focusHandler(true);
|
||||
} else if (code == LV_EVENT_DEFOCUSED) {
|
||||
if(window->focusHandler)
|
||||
window->focusHandler(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -65,10 +65,13 @@ constexpr WindowFlags WINDOW_FLAGS_LAST = PUSH_FRONT;
|
||||
// };
|
||||
|
||||
typedef lv_obj_t *(*LvglCreate)(lv_obj_t *);
|
||||
extern "C" void window_event_cb(lv_event_t * e);
|
||||
|
||||
|
||||
class Window
|
||||
{
|
||||
friend class GridLayout;
|
||||
friend void window_event_cb(lv_event_t * e);
|
||||
|
||||
public:
|
||||
Window(Window *parent, const rect_t &rect, WindowFlags windowFlags = 0,
|
||||
|
||||
Reference in New Issue
Block a user