mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
!165 pika_lvgl_v0.4.1_1668858451209
Merge pull request !165 from pikabot/pika_lvgl_v0.4.1_1668858451209
This commit is contained in:
commit
8c0080ddf9
@ -434,7 +434,7 @@ void pika_lvgl_img_set_size_mode(PikaObj* self, int mode) {
|
|||||||
void pika_lvgl_img_dsc_t___init__(PikaObj* self, PikaObj* dsc_dict) {
|
void pika_lvgl_img_dsc_t___init__(PikaObj* self, PikaObj* dsc_dict) {
|
||||||
obj_setRef(self, "dsc_dict", dsc_dict);
|
obj_setRef(self, "dsc_dict", dsc_dict);
|
||||||
PikaDict* dsc_dict_ = obj_getPtr(dsc_dict, "dict");
|
PikaDict* dsc_dict_ = obj_getPtr(dsc_dict, "dict");
|
||||||
uint8_t* data = dict_getBytes(dsc_dict_, "data");
|
uint8_t* data = pikaDict_getBytes(dsc_dict_, "data");
|
||||||
unsigned char wtmp[4] = {'0'};
|
unsigned char wtmp[4] = {'0'};
|
||||||
unsigned char htmp[4] = {'0'};
|
unsigned char htmp[4] = {'0'};
|
||||||
memcpy(&wtmp, data + 16, 4);
|
memcpy(&wtmp, data + 16, 4);
|
||||||
@ -443,7 +443,7 @@ void pika_lvgl_img_dsc_t___init__(PikaObj* self, PikaObj* dsc_dict) {
|
|||||||
int h = ((int)(unsigned char)htmp[2]) * 256 + (int)(unsigned char)htmp[3];
|
int h = ((int)(unsigned char)htmp[2]) * 256 + (int)(unsigned char)htmp[3];
|
||||||
lv_img_dsc_t img_dsc = {
|
lv_img_dsc_t img_dsc = {
|
||||||
.data = data,
|
.data = data,
|
||||||
.data_size = dict_getInt(dsc_dict_, "data_size"),
|
.data_size = pikaDict_getInt(dsc_dict_, "data_size"),
|
||||||
.header =
|
.header =
|
||||||
{
|
{
|
||||||
.always_zero = 0,
|
.always_zero = 0,
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
PikaObj* pika_lv_event_listener_g;
|
PikaObj* pika_lv_event_listener_g;
|
||||||
Args* pika_lv_id_register_g;
|
Args* pika_lv_id_register_g;
|
||||||
|
|
||||||
#if !PIKASCRIPT_VERSION_REQUIRE_MINIMUN(1, 11, 5)
|
#if !PIKASCRIPT_VERSION_REQUIRE_MINIMUN(1, 11, 7)
|
||||||
#error "pikascript version must be greater than 1.11.5"
|
#error "pikascript version must be greater than 1.11.7"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void pika_lvgl_STATE___init__(PikaObj* self) {
|
void pika_lvgl_STATE___init__(PikaObj* self) {
|
||||||
@ -195,7 +195,7 @@ void pika_lvgl_PALETTE___init__(PikaObj* self) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PikaObj* pika_lvgl_scr_act(PikaObj* self) {
|
PikaObj* pika_lvgl_scr_act(PikaObj* self) {
|
||||||
PikaObj* new_obj = newNormalObj(New_TinyObj);
|
PikaObj* new_obj = newNormalObj(New_pika_lvgl_lv_obj);
|
||||||
lv_obj_t* lv_obj = lv_scr_act();
|
lv_obj_t* lv_obj = lv_scr_act();
|
||||||
obj_setPtr(new_obj, "lv_obj", lv_obj);
|
obj_setPtr(new_obj, "lv_obj", lv_obj);
|
||||||
return new_obj;
|
return new_obj;
|
||||||
@ -215,8 +215,8 @@ void pika_lvgl_obj___init__(PikaObj* self, PikaTuple* parent) {
|
|||||||
class_defineConstructor(self, "FLAG", "", pika_lvgl_flag_tMethod);
|
class_defineConstructor(self, "FLAG", "", pika_lvgl_flag_tMethod);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tuple_getSize(parent) == 1) {
|
if (pikaTuple_getSize(parent) == 1) {
|
||||||
parent_obj = tuple_getPtr(parent, 0);
|
parent_obj = pikaTuple_getPtr(parent, 0);
|
||||||
lv_obj_t* lv_parent = obj_getPtr(parent_obj, "lv_obj");
|
lv_obj_t* lv_parent = obj_getPtr(parent_obj, "lv_obj");
|
||||||
lv_obj_t* lv_obj = lv_obj_create(lv_parent);
|
lv_obj_t* lv_obj = lv_obj_create(lv_parent);
|
||||||
obj_setPtr(self, "lv_obj", lv_obj);
|
obj_setPtr(self, "lv_obj", lv_obj);
|
||||||
|
@ -389,6 +389,7 @@ class lv_obj:
|
|||||||
|
|
||||||
def set_id(self, id: str): ...
|
def set_id(self, id: str): ...
|
||||||
def get_id(self) -> str: ...
|
def get_id(self) -> str: ...
|
||||||
|
def clean(self): ...
|
||||||
|
|
||||||
|
|
||||||
class indev_t:
|
class indev_t:
|
||||||
|
@ -328,4 +328,9 @@ void pika_lvgl_lv_obj_set_flex_grow(PikaObj *self, int value){
|
|||||||
lv_obj_set_flex_grow(lv_obj, value);
|
lv_obj_set_flex_grow(lv_obj, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pika_lvgl_lv_obj_clean(PikaObj *self){
|
||||||
|
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
|
||||||
|
lv_obj_clean(lv_obj);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -244,7 +244,8 @@ releases = [
|
|||||||
"v0.3.2 ce221cf875ac5c533ceff3905313a8ef2906df75",
|
"v0.3.2 ce221cf875ac5c533ceff3905313a8ef2906df75",
|
||||||
"v0.3.3 556b3cd6eb8fa1c100f29bd8556ee48a0a60b055",
|
"v0.3.3 556b3cd6eb8fa1c100f29bd8556ee48a0a60b055",
|
||||||
"v0.3.4 fc7871f6ae32e6fd16c9e16587d02f8b93af1b5d",
|
"v0.3.4 fc7871f6ae32e6fd16c9e16587d02f8b93af1b5d",
|
||||||
"v0.4.0 e6a839810a5a98dd36a6436259a05ab3e9b8c6c0"
|
"v0.4.0 e6a839810a5a98dd36a6436259a05ab3e9b8c6c0",
|
||||||
|
"v0.4.1 6f5c4bfae50fc5ae347609e58650f2d185171f9f"
|
||||||
]
|
]
|
||||||
|
|
||||||
[[packages]]
|
[[packages]]
|
||||||
@ -410,15 +411,11 @@ releases = [
|
|||||||
|
|
||||||
[[packages]]
|
[[packages]]
|
||||||
name = "mqtt"
|
name = "mqtt"
|
||||||
releases = [
|
releases = [ "v0.0.1 04a174a7d3e02d8861124214f5a3551eaab2bfee" ]
|
||||||
"v0.0.1 04a174a7d3e02d8861124214f5a3551eaab2bfee",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[packages]]
|
[[packages]]
|
||||||
name = "requests"
|
name = "requests"
|
||||||
releases = [
|
releases = [ "v0.0.1 04a174a7d3e02d8861124214f5a3551eaab2bfee" ]
|
||||||
"v0.0.1 04a174a7d3e02d8861124214f5a3551eaab2bfee",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[packages]]
|
[[packages]]
|
||||||
name = "hashlib"
|
name = "hashlib"
|
||||||
@ -429,7 +426,4 @@ releases = [
|
|||||||
|
|
||||||
[[packages]]
|
[[packages]]
|
||||||
name = "hmac"
|
name = "hmac"
|
||||||
releases = [
|
releases = [ "v1.0.0 ca8fe36d68be16722317860394fdf78c620e3e2d" ]
|
||||||
"v1.0.0 ca8fe36d68be16722317860394fdf78c620e3e2d"
|
|
||||||
]
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user