mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
!118 pika_lvgl_v0.2.1_1663394188369
Merge pull request !118 from pikabot/pika_lvgl_v0.2.1_1663394188369
This commit is contained in:
commit
38aacc37d0
@ -1,4 +1,11 @@
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
|
||||
#include "pika_lvgl_point_t.h"
|
||||
|
||||
void pika_lvgl_point_t___init__(PikaObj* self) {
|
||||
@ -6,3 +13,4 @@ void pika_lvgl_point_t___init__(PikaObj* self) {
|
||||
args_setStruct(self->list, "lv_point_struct", lv_point);
|
||||
obj_setPtr(self, "lv_point", args_getStruct(self->list, "lv_point_struct"));
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,11 @@
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
|
||||
#include "pika_lvgl_lv_timer_t.h"
|
||||
|
||||
PikaEventListener* g_pika_lv_timer_event_listener;
|
||||
@ -34,3 +41,4 @@ void pika_lvgl_lv_timer_t__del(PikaObj* self) {
|
||||
lv_timer_t* lv_timer = obj_getPtr(self, "lv_timer");
|
||||
lv_timer_del(lv_timer);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,11 @@
|
||||
#include "BaseObj.h"
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
#include "BaseObj.h"
|
||||
#include "pika_lvgl.h"
|
||||
#include "pika_lvgl_arc.h"
|
||||
#include "pika_lvgl_bar.h"
|
||||
@ -176,7 +182,7 @@ void pika_lvgl_checkbox_set_text_static(PikaObj *self, char* txt){
|
||||
|
||||
char* pika_lvgl_checkbox_get_text(PikaObj *self){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
return lv_checkbox_get_text(lv_obj);
|
||||
return (char*) lv_checkbox_get_text(lv_obj);
|
||||
}
|
||||
|
||||
void pika_lvgl_dropdown___init__(PikaObj* self, PikaObj* parent) {
|
||||
@ -220,7 +226,7 @@ int pika_lvgl_dropdown_get_option_index(PikaObj *self, char* txt){
|
||||
}
|
||||
char* pika_lvgl_dropdown_get_options(PikaObj *self){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
return lv_dropdown_get_options(lv_obj);
|
||||
return (char*) lv_dropdown_get_options(lv_obj);
|
||||
}
|
||||
int pika_lvgl_dropdown_get_selected(PikaObj *self){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
@ -234,17 +240,17 @@ int pika_lvgl_dropdown_get_selected_highlight(PikaObj *self){
|
||||
char* pika_lvgl_dropdown_get_selected_str(PikaObj *self){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
obj_setBytes(self, "_buff",NULL, 128);
|
||||
char* _buff = obj_getBytes(self, "_buff");
|
||||
char* _buff = (char*)obj_getBytes(self, "_buff");
|
||||
lv_dropdown_get_selected_str(lv_obj, _buff, 128);
|
||||
return _buff;
|
||||
}
|
||||
int pika_lvgl_dropdown_get_symbol(PikaObj *self){
|
||||
char* pika_lvgl_dropdown_get_symbol(PikaObj *self){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
return lv_dropdown_get_symbol(lv_obj);
|
||||
return (char*)lv_dropdown_get_symbol(lv_obj);
|
||||
}
|
||||
char* pika_lvgl_dropdown_get_text(PikaObj *self){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
return lv_dropdown_get_text(lv_obj);
|
||||
return (char*)lv_dropdown_get_text(lv_obj);
|
||||
}
|
||||
int pika_lvgl_dropdown_is_open(PikaObj *self){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
@ -355,3 +361,4 @@ void pika_lvgl_textarea_set_one_line(PikaObj* self, int en) {
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
lv_textarea_set_one_line(lv_obj, en);
|
||||
}
|
||||
#endif
|
@ -1,6 +1,12 @@
|
||||
#include "pika_lvgl.h"
|
||||
#include "BaseObj.h"
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
#include "pika_lvgl.h"
|
||||
#include "BaseObj.h"
|
||||
#include "pika_lvgl_ALIGN.h"
|
||||
#include "pika_lvgl_ANIM.h"
|
||||
#include "pika_lvgl_EVENT.h"
|
||||
@ -190,4 +196,4 @@ PikaObj* pika_lvgl_timer_create_basic(PikaObj *self){
|
||||
obj_setPtr(new_obj,"lv_timer", lv_timer);
|
||||
return new_obj;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -226,7 +226,7 @@ class dropdown(lv_obj):
|
||||
def get_option_cnt(self) -> int: ...
|
||||
def get_selected_str(self) -> str: ...
|
||||
def get_option_index(self, option: str) -> int: ...
|
||||
def get_symbol(self) -> int: ...
|
||||
def get_symbol(self) -> str: ...
|
||||
def get_selected_highlight(self) -> int: ...
|
||||
def get_dir(self) -> int: ...
|
||||
def open(self): ...
|
||||
|
@ -1,5 +1,12 @@
|
||||
#include "pika_lvgl_indev_t.h"
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
|
||||
#include "pika_lvgl_indev_t.h"
|
||||
|
||||
void pika_lvgl_indev_t_get_vect(PikaObj* self, PikaObj* point) {
|
||||
lv_indev_t* lv_indev = obj_getPtr(self, "lv_indev");
|
||||
@ -8,3 +15,4 @@ void pika_lvgl_indev_t_get_vect(PikaObj* self, PikaObj* point) {
|
||||
obj_setInt(point, "x", lv_point->x);
|
||||
obj_setInt(point, "y", lv_point->y);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,11 @@
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
|
||||
#include "pika_lvgl_lv_event.h"
|
||||
|
||||
int pika_lvgl_lv_event_get_code(PikaObj *self){
|
||||
@ -14,3 +21,4 @@ PikaObj* pika_lvgl_lv_event_get_target(PikaObj *self){
|
||||
obj_setPtr(new_obj, "lv_obj", lv_obj);
|
||||
return new_obj;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,14 @@
|
||||
#include "pika_lvgl_lv_obj.h"
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
|
||||
#include "pika_lvgl_lv_obj.h"
|
||||
#include "BaseObj.h"
|
||||
#include "dataStrs.h"
|
||||
#include "lvgl.h"
|
||||
#include "pika_lvgl.h"
|
||||
#include "pika_lvgl_arc.h"
|
||||
#include "pika_lvgl_lv_event.h"
|
||||
@ -88,7 +95,7 @@ void pika_lvgl_lv_obj_add_event_cb(PikaObj* self,
|
||||
|
||||
void pika_lvgl_lv_obj_add_style(PikaObj *self, PikaObj* style, int selector){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
lv_state_t* lv_style = obj_getPtr(style, "lv_style");
|
||||
lv_style_t* lv_style = obj_getPtr(style, "lv_style");
|
||||
lv_obj_add_style(lv_obj, lv_style, selector);
|
||||
}
|
||||
|
||||
@ -106,3 +113,4 @@ void pika_lvgl_lv_obj_set_pos(PikaObj *self, int x, int y){
|
||||
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||
lv_obj_set_pos(lv_obj, x, y);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,11 @@
|
||||
#include "lvgl.h"
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PIKASCRIPT
|
||||
|
||||
#include "pika_lvgl_style_t.h"
|
||||
|
||||
void pika_lvgl_style_t_init(PikaObj* self) {
|
||||
@ -60,3 +67,4 @@ void pika_lvgl_style_t_set_shadow_width(PikaObj *self, int w){
|
||||
lv_style_t* lv_style = obj_getPtr(self, "lv_style");
|
||||
lv_style_set_shadow_width(lv_style, w);
|
||||
}
|
||||
#endif
|
||||
|
@ -219,7 +219,8 @@ name = "pika_lvgl"
|
||||
releases = [
|
||||
"v0.0.1 71364445e0894e660720f9a0c9e1db021663d6a1",
|
||||
"v0.1.0 027f06710e83ee3daa7b706fb8a9bf23b1ab14e4",
|
||||
"v0.2.0 871fbf701c24c9c05792d3c551c44b699f4de7bf"
|
||||
"v0.2.0 871fbf701c24c9c05792d3c551c44b699f4de7bf",
|
||||
"v0.2.1 72e84f05ae9e50c17f49c3f910a9f4b6066c7f6a"
|
||||
]
|
||||
|
||||
[[packages]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user