arch(driver): new driver architecture with new color format support

This commit is contained in:
Gabor Kiss-Vamosi
2023-02-20 20:50:58 +01:00
parent df789ed3c7
commit 124f9b0f9f
425 changed files with 25232 additions and 24168 deletions

View File

@@ -29,7 +29,7 @@ void lv_example_dropdown_1(void)
"Nuts");
lv_obj_align(dd, LV_ALIGN_TOP_MID, 0, 20);
lv_obj_add_event_cb(dd, event_handler, LV_EVENT_ALL, NULL);
lv_obj_add_event(dd, event_handler, LV_EVENT_ALL, NULL);
}
#endif

View File

@@ -1,6 +1,6 @@
def event_handler(e):
code = e.get_code()
obj = e.get_target()
obj = e.get_target_obj()
if code == lv.EVENT.VALUE_CHANGED:
option = " "*10 # should be large enough to store the option
obj.get_selected_str(option, len(option))
@@ -22,5 +22,5 @@ dd.set_options("\n".join([
"Nuts"]))
dd.align(lv.ALIGN.TOP_MID, 0, 20)
dd.add_event_cb(event_handler, lv.EVENT.ALL, None)
dd.add_event(event_handler, lv.EVENT.ALL, None)

View File

@@ -37,7 +37,7 @@ void lv_example_dropdown_3(void)
/*In a menu we don't need to show the last clicked item*/
lv_dropdown_set_selected_highlight(dropdown, false);
lv_obj_add_event_cb(dropdown, event_cb, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_add_event(dropdown, event_cb, LV_EVENT_VALUE_CHANGED, NULL);
}
#endif

View File

@@ -12,7 +12,7 @@ img_caret_down_argb = lv.img_dsc_t({
})
def event_cb(e):
dropdown = e.get_target()
dropdown = e.get_target_obj()
option = " "*64 # should be large enough to store the option
dropdown.get_selected_str(option, len(option))
print(option.strip() +" is selected")
@@ -42,5 +42,5 @@ dropdown.set_style_transform_angle(1800, lv.PART.INDICATOR | lv.STATE.CHECKED)
# In a menu we don't need to show the last clicked item
dropdown.set_selected_highlight(False)
dropdown.add_event_cb(event_cb, lv.EVENT.VALUE_CHANGED, None)
dropdown.add_event(event_cb, lv.EVENT.VALUE_CHANGED, None)