diff --git a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h index 5d7cb5ed9..425bb7da1 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h +++ b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h @@ -876,7 +876,7 @@ const be_ntv_func_def_t lv_dropdown_func[] = { { "get_options", { (const void*) &lv_dropdown_get_options, "s", "(lv.lv_obj)" } }, { "get_selected", { (const void*) &lv_dropdown_get_selected, "i", "(lv.lv_obj)" } }, { "get_selected_highlight", { (const void*) &lv_dropdown_get_selected_highlight, "b", "(lv.lv_obj)" } }, - { "get_selected_str", { (const void*) &lv_dropdown_get_selected_str, "", "(lv.lv_obj)si" } }, + { "get_selected_str", { (const void*) &lv_dropdown_get_selected_str, "", "(lv.lv_obj)ci" } }, { "get_symbol", { (const void*) &lv_dropdown_get_symbol, "s", "(lv.lv_obj)" } }, { "get_text", { (const void*) &lv_dropdown_get_text, "s", "(lv.lv_obj)" } }, { "is_open", { (const void*) &lv_dropdown_is_open, "b", "(lv.lv_obj)" } }, @@ -929,7 +929,7 @@ const be_ntv_func_def_t lv_roller_func[] = { { "get_option_cnt", { (const void*) &lv_roller_get_option_cnt, "i", "(lv.lv_obj)" } }, { "get_options", { (const void*) &lv_roller_get_options, "s", "(lv.lv_obj)" } }, { "get_selected", { (const void*) &lv_roller_get_selected, "i", "(lv.lv_obj)" } }, - { "get_selected_str", { (const void*) &lv_roller_get_selected_str, "", "(lv.lv_obj)si" } }, + { "get_selected_str", { (const void*) &lv_roller_get_selected_str, "", "(lv.lv_obj)ci" } }, { "set_options", { (const void*) &lv_roller_set_options, "", "(lv.lv_obj)s(lv.lv_roller_mode)" } }, { "set_selected", { (const void*) &lv_roller_set_selected, "", "(lv.lv_obj)ii" } }, { "set_visible_row_count", { (const void*) &lv_roller_set_visible_row_count, "", "(lv.lv_obj)i" } }, diff --git a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py index 4890009c4..e3df18958 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py +++ b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py @@ -35,9 +35,10 @@ return_types = { "int32_t": "i", "void *": ".", "const void *": ".", - "char *": "s", + "char *": "c", "uint8_t *": "c", "const char *": "s", + "retchar *": "s", "constchar *": "s", # special construct "lv_obj_user_data_t": "i", @@ -245,6 +246,7 @@ with open(lv_widgets_file) as f: l_raw = re.sub('static ', '', l_raw) l_raw = re.sub('inline ', '', l_raw) l_raw = re.sub('const\s+char\s*\*', 'constchar *', l_raw) + l_raw = re.sub('^char\s*\*', 'retchar *', l_raw) # special case for returning a char* l_raw = re.sub('const ', '', l_raw) l_raw = re.sub('struct ', '', l_raw) if (len(l_raw) == 0): continue