pikapython/package/pika_lvgl/pika_lvgl_lv_event.c

25 lines
634 B
C
Raw Normal View History

2022-09-17 13:57:17 +08:00
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
#include "lvgl.h"
2022-09-17 13:57:17 +08:00
#else
#include "../../lvgl.h"
#endif
#ifdef PIKASCRIPT
#include "pika_lvgl_lv_event.h"
int pika_lvgl_lv_event_get_code(PikaObj *self){
lv_event_t *lv_event = obj_getPtr(self, "lv_event");
return lv_event_get_code(lv_event);
}
2022-08-07 13:09:27 +08:00
PikaObj *New_pika_lvgl_lv_obj(Args *args);
PikaObj* pika_lvgl_lv_event_get_target(PikaObj *self){
lv_event_t *lv_event = obj_getPtr(self, "lv_event");
lv_obj_t* lv_obj = lv_event_get_target(lv_event);
PikaObj* new_obj = newNormalObj(New_pika_lvgl_lv_obj);
obj_setPtr(new_obj, "lv_obj", lv_obj);
return new_obj;
}
2022-09-17 13:57:17 +08:00
#endif