pikapython/package/pika_lvgl/pika_lvgl_indev_t.c

19 lines
459 B
C
Raw Normal View History

2022-09-17 13:57:17 +08:00
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
2022-08-07 13:09:27 +08:00
#include "lvgl.h"
2022-09-17 13:57:17 +08:00
#else
#include "../../lvgl.h"
#endif
#ifdef PIKASCRIPT
#include "pika_lvgl_indev_t.h"
2022-08-07 13:09:27 +08:00
void pika_lvgl_indev_t_get_vect(PikaObj* self, PikaObj* point) {
lv_indev_t* lv_indev = obj_getPtr(self, "lv_indev");
lv_point_t* lv_point = obj_getPtr(point, "lv_point");
lv_indev_get_vect(lv_indev, lv_point);
obj_setInt(point, "x", lv_point->x);
obj_setInt(point, "y", lv_point->y);
}
2022-09-17 13:57:17 +08:00
#endif