Просмотр исходного кода

update: 适配到lvgl8, win32输出测试图片正常

Wendal Chen 4 лет назад
Родитель
Сommit
cdd3f96995
100 измененных файлов с 16083 добавлено и 9986 удалено
  1. 16 17
      components/lvgl/binding/luat_lib_lvgl.c
  2. 0 58
      components/lvgl/binding/luat_lib_lvgl7.c
  3. 89 0
      components/lvgl/binding/luat_lib_lvgl8.c
  4. 0 6
      components/lvgl/gen/luat_lv_enum.c
  5. 227 328
      components/lvgl/gen/luat_lv_enum.h
  6. 577 597
      components/lvgl/gen/luat_lv_gen.h
  7. 36 55
      components/lvgl/gen/lv_core/luat_lv_disp.c
  8. 27 19
      components/lvgl/gen/lv_core/luat_lv_group.c
  9. 0 218
      components/lvgl/gen/lv_core/luat_lv_indev.c
  10. 31 0
      components/lvgl/gen/lv_core/luat_lv_indev_scroll.c
  11. 1998 2089
      components/lvgl/gen/lv_core/luat_lv_obj.c
  12. 22 0
      components/lvgl/gen/lv_core/luat_lv_obj_draw.c
  13. 74 0
      components/lvgl/gen/lv_core/luat_lv_obj_scroll.c
  14. 0 80
      components/lvgl/gen/lv_core/luat_lv_style.c
  15. 83 0
      components/lvgl/gen/lv_core/luat_lv_theme.c
  16. 61 28
      components/lvgl/gen/lv_draw/luat_lv_draw.c
  17. 0 98
      components/lvgl/gen/lv_draw/luat_lv_img_buf.c
  18. 0 22
      components/lvgl/gen/lv_draw/luat_lv_img_cache.c
  19. 0 122
      components/lvgl/gen/lv_draw/luat_lv_img_decoder.c
  20. 9 0
      components/lvgl/gen/lv_font/luat_lv_font.c
  21. 47 69
      components/lvgl/gen/lv_misc/luat_lv_anim.c
  22. 60 0
      components/lvgl/gen/lv_misc/luat_lv_area.c
  23. 0 19
      components/lvgl/gen/lv_misc/luat_lv_async.c
  24. 49 0
      components/lvgl/gen/lv_misc/luat_lv_color.c
  25. 0 45
      components/lvgl/gen/lv_misc/luat_lv_debug.c
  26. 0 253
      components/lvgl/gen/lv_misc/luat_lv_fs.c
  27. 0 14
      components/lvgl/gen/lv_misc/luat_lv_log.c
  28. 0 60
      components/lvgl/gen/lv_misc/luat_lv_mem.c
  29. 964 0
      components/lvgl/gen/lv_misc/luat_lv_style.c
  30. 0 118
      components/lvgl/gen/lv_misc/luat_lv_task.c
  31. 39 0
      components/lvgl/gen/lv_misc/luat_lv_txt.c
  32. 0 186
      components/lvgl/gen/lv_themes/luat_lv_theme.c
  33. 44 74
      components/lvgl/gen/lv_widgets/luat_lv_arc.c
  34. 44 64
      components/lvgl/gen/lv_widgets/luat_lv_bar.c
  35. 3 140
      components/lvgl/gen/lv_widgets/luat_lv_btn.c
  36. 48 107
      components/lvgl/gen/lv_widgets/luat_lv_btnmatrix.c
  37. 0 97
      components/lvgl/gen/lv_widgets/luat_lv_calendar.c
  38. 15 17
      components/lvgl/gen/lv_widgets/luat_lv_canvas.c
  39. 0 376
      components/lvgl/gen/lv_widgets/luat_lv_chart.c
  40. 12 69
      components/lvgl/gen/lv_widgets/luat_lv_checkbox.c
  41. 0 107
      components/lvgl/gen/lv_widgets/luat_lv_cont.c
  42. 0 192
      components/lvgl/gen/lv_widgets/luat_lv_cpicker.c
  43. 88 98
      components/lvgl/gen/lv_widgets/luat_lv_dropdown.c
  44. 0 198
      components/lvgl/gen/lv_widgets/luat_lv_gauge.c
  45. 61 90
      components/lvgl/gen/lv_widgets/luat_lv_img.c
  46. 0 84
      components/lvgl/gen/lv_widgets/luat_lv_imgbtn.c
  47. 0 74
      components/lvgl/gen/lv_widgets/luat_lv_keyboard.c
  48. 59 117
      components/lvgl/gen/lv_widgets/luat_lv_label.c
  49. 0 60
      components/lvgl/gen/lv_widgets/luat_lv_led.c
  50. 9 29
      components/lvgl/gen/lv_widgets/luat_lv_line.c
  51. 0 151
      components/lvgl/gen/lv_widgets/luat_lv_linemeter.c
  52. 0 260
      components/lvgl/gen/lv_widgets/luat_lv_list.c
  53. 0 121
      components/lvgl/gen/lv_widgets/luat_lv_msgbox.c
  54. 0 47
      components/lvgl/gen/lv_widgets/luat_lv_objmask.c
  55. 0 342
      components/lvgl/gen/lv_widgets/luat_lv_page.c
  56. 27 86
      components/lvgl/gen/lv_widgets/luat_lv_roller.c
  57. 46 66
      components/lvgl/gen/lv_widgets/luat_lv_slider.c
  58. 0 135
      components/lvgl/gen/lv_widgets/luat_lv_spinbox.c
  59. 0 93
      components/lvgl/gen/lv_widgets/luat_lv_spinner.c
  60. 3 62
      components/lvgl/gen/lv_widgets/luat_lv_switch.c
  61. 52 113
      components/lvgl/gen/lv_widgets/luat_lv_table.c
  62. 0 125
      components/lvgl/gen/lv_widgets/luat_lv_tabview.c
  63. 117 213
      components/lvgl/gen/lv_widgets/luat_lv_textarea.c
  64. 0 85
      components/lvgl/gen/lv_widgets/luat_lv_tileview.c
  65. 0 267
      components/lvgl/gen/lv_widgets/luat_lv_win.c
  66. 30 10
      components/lvgl/genapi.py
  67. 308 561
      components/lvgl/lv_conf.h
  68. 50 61
      components/lvgl/lvgl.h
  69. 0 13
      components/lvgl/src/CMakeLists.txt
  70. 20 0
      components/lvgl/src/core/lv_core.mk
  71. 71 57
      components/lvgl/src/core/lv_disp.c
  72. 41 22
      components/lvgl/src/core/lv_disp.h
  73. 419 0
      components/lvgl/src/core/lv_event.c
  74. 311 0
      components/lvgl/src/core/lv_event.h
  75. 98 191
      components/lvgl/src/core/lv_group.c
  76. 67 69
      components/lvgl/src/core/lv_group.h
  77. 1110 0
      components/lvgl/src/core/lv_indev.c
  78. 31 42
      components/lvgl/src/core/lv_indev.h
  79. 642 0
      components/lvgl/src/core/lv_indev_scroll.c
  80. 65 0
      components/lvgl/src/core/lv_indev_scroll.h
  81. 791 0
      components/lvgl/src/core/lv_obj.c
  82. 387 0
      components/lvgl/src/core/lv_obj.h
  83. 197 0
      components/lvgl/src/core/lv_obj_class.c
  84. 93 0
      components/lvgl/src/core/lv_obj_class.h
  85. 365 0
      components/lvgl/src/core/lv_obj_draw.c
  86. 145 0
      components/lvgl/src/core/lv_obj_draw.h
  87. 980 0
      components/lvgl/src/core/lv_obj_pos.c
  88. 386 0
      components/lvgl/src/core/lv_obj_pos.h
  89. 678 0
      components/lvgl/src/core/lv_obj_scroll.c
  90. 277 0
      components/lvgl/src/core/lv_obj_scroll.h
  91. 811 0
      components/lvgl/src/core/lv_obj_style.c
  92. 231 0
      components/lvgl/src/core/lv_obj_style.h
  93. 713 0
      components/lvgl/src/core/lv_obj_style_gen.c
  94. 623 0
      components/lvgl/src/core/lv_obj_style_gen.h
  95. 438 0
      components/lvgl/src/core/lv_obj_tree.c
  96. 163 0
      components/lvgl/src/core/lv_obj_tree.h
  97. 267 295
      components/lvgl/src/core/lv_refr.c
  98. 5 5
      components/lvgl/src/core/lv_refr.h
  99. 118 0
      components/lvgl/src/core/lv_theme.c
  100. 115 0
      components/lvgl/src/core/lv_theme.h

+ 16 - 17
components/lvgl/binding/luat_lib_lvgl.c

@@ -46,7 +46,6 @@ LUAT_LV_REFR_RLT
 
 LUAT_LV_STYLE_RLT
 LUAT_LV_DRAW_RLT
-LUAT_LV_IMG_BUF_RLT
 LUAT_LV_ANIM_RLT
 LUAT_LV_AREA_RLT
 LUAT_LV_COLOR_RLT
@@ -56,37 +55,37 @@ LUAT_LV_ARC_RLT
 LUAT_LV_BAR_RLT
 LUAT_LV_BTN_RLT
 LUAT_LV_BTNMATRIX_RLT
-LUAT_LV_CALENDAR_RLT
+//LUAT_LV_CALENDAR_RLT
 LUAT_LV_CANVAS_RLT
-LUAT_LV_CHART_RLT
+//LUAT_LV_CHART_RLT
 LUAT_LV_CHECKBOX_RLT
-LUAT_LV_CONT_RLT
-LUAT_LV_CPICKER_RLT
+//LUAT_LV_CONT_RLT
+//LUAT_LV_CPICKER_RLT
 LUAT_LV_DROPDOWN_RLT
-LUAT_LV_GAUGE_RLT
+//LUAT_LV_GAUGE_RLT
 // 需要实现图片解码器才能启用LUAT_LV_IMG_RLT和LUAT_LV_IMGBTN_RLT
 // 另外还有文件系统
 //LUAT_LV_IMG_RLT
 //LUAT_LV_IMGBTN_RLT
-LUAT_LV_KEYBOARD_RLT
+//LUAT_LV_KEYBOARD_RLT
 LUAT_LV_LABEL_RLT
-LUAT_LV_LED_RLT
+//LUAT_LV_LED_RLT
 LUAT_LV_LINE_RLT
 
-LUAT_LV_LIST_RLT
-LUAT_LV_MSGBOX_RLT
-LUAT_LV_OBJMASK_RLT
-LUAT_LV_PAGE_RLT
+//LUAT_LV_LIST_RLT
+//LUAT_LV_MSGBOX_RLT
+//LUAT_LV_OBJMASK_RLT
+//LUAT_LV_PAGE_RLT
 LUAT_LV_ROLLER_RLT
 LUAT_LV_SLIDER_RLT
-LUAT_LV_SPINBOX_RLT
-LUAT_LV_SPINNER_RLT
+//LUAT_LV_SPINBOX_RLT
+//LUAT_LV_SPINNER_RLT
 LUAT_LV_SWITCH_RLT
 LUAT_LV_TABLE_RLT
-LUAT_LV_TABVIEW_RLT
+//LUAT_LV_TABVIEW_RLT
 LUAT_LV_TEXTAREA_RLT
-LUAT_LV_TILEVIEW_RLT
-LUAT_LV_WIN_RLT
+//LUAT_LV_TILEVIEW_RLT
+//LUAT_LV_WIN_RLT
 
 // 常量
 LUAT_LV_ENMU_RLT

+ 0 - 58
components/lvgl/binding/luat_lib_lvgl7.c

@@ -1,58 +0,0 @@
-
-#include "luat_base.h"
-#include "luat_lvgl.h"
-#include "luat_malloc.h"
-#include "luat_zbuff.h"
-
-static lv_disp_t* my_disp = NULL;
-static lv_disp_buf_t disp_buff = {0};
-
-static void disp_flush(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) {
-    //-----
-    int32_t x;
-    int32_t y;
-    for(y = area->y1; y <= area->y2; y++) {
-        for(x = area->x1; x <= area->x2; x++) {
-            /* Put a pixel to the display. For example: */
-            /* put_px(x, y, *color_p)*/
-            color_p++;
-        }
-    }
-    //----
-    //LLOGD("CALL disp_flush (%d, %d, %d, %d)", area->x1, area->y1, area->x2, area->y2);
-    lv_disp_flush_ready(disp_drv);
-}
-
-
-int luat_lv_init(lua_State *L) {
-    if (my_disp != NULL) {
-        lua_pushboolean(L, 0);
-        return 1;
-    }
-    lv_color_t *fbuffer = NULL; 
-    size_t fbuff_size = LV_HOR_RES_MAX * 10;
-    if (lua_isuserdata(L, 1)) {
-        luat_zbuff *zbuff = tozbuff(L);
-        fbuffer = (lv_color_t *)zbuff->addr;
-        fbuff_size = zbuff->len / sizeof(lv_color_t);
-    }
-    else {
-        fbuffer = luat_heap_malloc(fbuff_size * sizeof(lv_color_t));
-    }
-    lv_disp_buf_init(&disp_buff, fbuffer, NULL, fbuff_size);
-
-    lv_disp_drv_t disp_drv;
-    lv_disp_drv_init(&disp_drv);
-
-    disp_drv.flush_cb = disp_flush;
-
-    disp_drv.hor_res = 480;
-    disp_drv.ver_res = 320;
-    disp_drv.buffer = &disp_buff;
-    //LLOGD(">>%s %d", __func__, __LINE__);
-    my_disp = lv_disp_drv_register(&disp_drv);
-    //LLOGD(">>%s %d", __func__, __LINE__);
-    lua_pushboolean(L, my_disp != NULL ? 1 : 0);
-    //LLOGD(">>%s %d", __func__, __LINE__);
-    return 1;
-}

+ 89 - 0
components/lvgl/binding/luat_lib_lvgl8.c

@@ -0,0 +1,89 @@
+
+#include "luat_base.h"
+#include "luat_lvgl.h"
+#include "luat_malloc.h"
+#include "luat_zbuff.h"
+
+// #ifdef LUA_USE_WINDOWS
+// #include "libbmp.h"
+// #endif
+
+static lv_disp_t* my_disp = NULL;
+static lv_disp_draw_buf_t my_disp_buff = {0};
+static lv_disp_drv_t my_disp_drv;
+
+static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) {
+    //-----
+    int32_t x;
+    int32_t y;
+    // #ifdef LUA_USE_WINDOWS
+    // bmp_img img;
+	// bmp_img_init_df (&img, disp_drv->hor_res, disp_drv->ver_res);
+    // for(y = area->y1; y <= area->y2; y++) {
+    //     for(x = area->x1; x <= area->x2; x++) {
+    //         /* Put a pixel to the display. For example: */
+    //         /* put_px(x, y, *color_p)*/
+    //         bmp_pixel_init(&img.img_pixels[y][x], color_p->ch.red, color_p->ch.green, color_p->ch.blue);
+    //         color_p++;
+    //     }
+    // }
+    // bmp_img_write(&img, "test.bmp");
+    // bmp_img_free (&img);
+    // #else
+    // for(y = area->y1; y <= area->y2; y++) {
+    //     for(x = area->x1; x <= area->x2; x++) {
+    //         /* Put a pixel to the display. For example: */
+    //         /* put_px(x, y, *color_p)*/
+    //         color_p++;
+    //     }
+    // }
+    // #endif
+    // ----
+    //LLOGD("CALL disp_flush (%d, %d, %d, %d)", area->x1, area->y1, area->x2, area->y2);
+    lv_disp_flush_ready(disp_drv);
+}
+
+
+int luat_lv_init(lua_State *L) {
+    if (my_disp != NULL) {
+        lua_pushboolean(L, 0);
+        return 1;
+    }
+    lv_color_t *fbuffer = NULL; 
+    size_t fbuff_size = 0;
+
+    int w = luaL_optinteger(L, 1, 480);
+    int h = luaL_optinteger(L, 2, 320);
+
+    #ifdef LUA_USE_WINDOWS
+    fbuff_size = w * h;
+    #else
+    fbuff_size = w * 10;
+    #endif
+
+    LLOGD("w %d h %d buff %d", w, h, fbuff_size);
+
+    if (lua_isuserdata(L, 3)) {
+        luat_zbuff *zbuff = tozbuff(L);
+        fbuffer = (lv_color_t *)zbuff->addr;
+        fbuff_size = zbuff->len / sizeof(lv_color_t);
+    }
+    else {
+        fbuffer = luat_heap_malloc(fbuff_size * sizeof(lv_color_t));
+    }
+    lv_disp_draw_buf_init(&my_disp_buff, fbuffer, NULL, fbuff_size);
+
+    lv_disp_drv_init(&my_disp_drv);
+
+    my_disp_drv.flush_cb = disp_flush;
+
+    my_disp_drv.hor_res = w;
+    my_disp_drv.ver_res = h;
+    my_disp_drv.draw_buf = &my_disp_buff;
+    //LLOGD(">>%s %d", __func__, __LINE__);
+    my_disp = lv_disp_drv_register(&my_disp_drv);
+    //LLOGD(">>%s %d", __func__, __LINE__);
+    lua_pushboolean(L, my_disp != NULL ? 1 : 0);
+    //LLOGD(">>%s %d", __func__, __LINE__);
+    return 1;
+}

+ 0 - 6
components/lvgl/gen/luat_lv_enum.c

@@ -1,6 +0,0 @@
-
-#include "luat_lv_enum.h"
-
-int test_luat_lv_enum(void) {
-    return 0;
-}

+ 227 - 328
components/lvgl/gen/luat_lv_enum.h

@@ -19,78 +19,88 @@
     {"OPA_90", NULL, 229},\
     {"OPA_100", NULL, 255},\
     {"OPA_COVER", NULL, 255},\
-    {"ALIGN_CENTER", NULL, 0},\
-    {"ALIGN_IN_TOP_LEFT", NULL, 1},\
-    {"ALIGN_IN_TOP_MID", NULL, 2},\
-    {"ALIGN_IN_TOP_RIGHT", NULL, 3},\
-    {"ALIGN_IN_BOTTOM_LEFT", NULL, 4},\
-    {"ALIGN_IN_BOTTOM_MID", NULL, 5},\
-    {"ALIGN_IN_BOTTOM_RIGHT", NULL, 6},\
-    {"ALIGN_IN_LEFT_MID", NULL, 7},\
-    {"ALIGN_IN_RIGHT_MID", NULL, 8},\
-    {"ALIGN_OUT_TOP_LEFT", NULL, 9},\
-    {"ALIGN_OUT_TOP_MID", NULL, 10},\
-    {"ALIGN_OUT_TOP_RIGHT", NULL, 11},\
-    {"ALIGN_OUT_BOTTOM_LEFT", NULL, 12},\
-    {"ALIGN_OUT_BOTTOM_MID", NULL, 13},\
-    {"ALIGN_OUT_BOTTOM_RIGHT", NULL, 14},\
-    {"ALIGN_OUT_LEFT_TOP", NULL, 15},\
-    {"ALIGN_OUT_LEFT_MID", NULL, 16},\
-    {"ALIGN_OUT_LEFT_BOTTOM", NULL, 17},\
-    {"ALIGN_OUT_RIGHT_TOP", NULL, 18},\
-    {"ALIGN_OUT_RIGHT_MID", NULL, 19},\
-    {"ALIGN_OUT_RIGHT_BOTTOM", NULL, 20},\
-    {"TASK_PRIO_OFF", NULL, 0},\
-    {"TASK_PRIO_LOWEST", NULL, 1},\
-    {"TASK_PRIO_LOW", NULL, 2},\
-    {"TASK_PRIO_MID", NULL, 3},\
-    {"TASK_PRIO_HIGH", NULL, 4},\
-    {"TASK_PRIO_HIGHEST", NULL, 5},\
+    {"PALETTE_RED", NULL, 0},\
+    {"PALETTE_PINK", NULL, 1},\
+    {"PALETTE_PURPLE", NULL, 2},\
+    {"PALETTE_DEEP_PURPLE", NULL, 3},\
+    {"PALETTE_INDIGO", NULL, 4},\
+    {"PALETTE_BLUE", NULL, 5},\
+    {"PALETTE_LIGHT_BLUE", NULL, 6},\
+    {"PALETTE_CYAN", NULL, 7},\
+    {"PALETTE_TEAL", NULL, 8},\
+    {"PALETTE_GREEN", NULL, 9},\
+    {"PALETTE_LIGHT_GREEN", NULL, 10},\
+    {"PALETTE_LIME", NULL, 11},\
+    {"PALETTE_YELLOW", NULL, 12},\
+    {"PALETTE_AMBER", NULL, 13},\
+    {"PALETTE_ORANGE", NULL, 14},\
+    {"PALETTE_DEEP_ORANGE", NULL, 15},\
+    {"PALETTE_BROWN", NULL, 16},\
+    {"PALETTE_BLUE_GREY", NULL, 17},\
+    {"PALETTE_GREY", NULL, 18},\
+    {"PALETTE_NONE", NULL, 255},\
+    {"ALIGN_DEFAULT", NULL, 0},\
+    {"ALIGN_TOP_LEFT", NULL, 1},\
+    {"ALIGN_TOP_MID", NULL, 2},\
+    {"ALIGN_TOP_RIGHT", NULL, 3},\
+    {"ALIGN_BOTTOM_LEFT", NULL, 4},\
+    {"ALIGN_BOTTOM_MID", NULL, 5},\
+    {"ALIGN_BOTTOM_RIGHT", NULL, 6},\
+    {"ALIGN_LEFT_MID", NULL, 7},\
+    {"ALIGN_RIGHT_MID", NULL, 8},\
+    {"ALIGN_CENTER", NULL, 9},\
+    {"ALIGN_OUT_TOP_LEFT", NULL, 10},\
+    {"ALIGN_OUT_TOP_MID", NULL, 11},\
+    {"ALIGN_OUT_TOP_RIGHT", NULL, 12},\
+    {"ALIGN_OUT_BOTTOM_LEFT", NULL, 13},\
+    {"ALIGN_OUT_BOTTOM_MID", NULL, 14},\
+    {"ALIGN_OUT_BOTTOM_RIGHT", NULL, 15},\
+    {"ALIGN_OUT_LEFT_TOP", NULL, 16},\
+    {"ALIGN_OUT_LEFT_MID", NULL, 17},\
+    {"ALIGN_OUT_LEFT_BOTTOM", NULL, 18},\
+    {"ALIGN_OUT_RIGHT_TOP", NULL, 19},\
+    {"ALIGN_OUT_RIGHT_MID", NULL, 20},\
+    {"ALIGN_OUT_RIGHT_BOTTOM", NULL, 21},\
+    {"DIR_NONE", NULL, 0},\
     {"DISP_ROT_NONE", NULL, 0},\
     {"DISP_ROT_90", NULL, 1},\
     {"DISP_ROT_180", NULL, 2},\
     {"DISP_ROT_270", NULL, 3},\
-    {"DISP_SIZE_SMALL", NULL, 0},\
-    {"DISP_SIZE_MEDIUM", NULL, 1},\
-    {"DISP_SIZE_LARGE", NULL, 2},\
-    {"DISP_SIZE_EXTRA_LARGE", NULL, 3},\
     {"INDEV_TYPE_NONE", NULL, 0},\
     {"INDEV_TYPE_POINTER", NULL, 1},\
     {"INDEV_TYPE_KEYPAD", NULL, 2},\
     {"INDEV_TYPE_BUTTON", NULL, 3},\
     {"INDEV_TYPE_ENCODER", NULL, 4},\
-    {"INDEV_STATE_REL", NULL, 0},\
-    {"INDEV_STATE_PR", NULL, 1},\
-    {"DRAG_DIR_HOR", NULL, 1},\
-    {"DRAG_DIR_VER", NULL, 2},\
-    {"DRAG_DIR_BOTH", NULL, 3},\
-    {"DRAG_DIR_ONE", NULL, 4},\
-    {"GESTURE_DIR_TOP", NULL, 0},\
-    {"GESTURE_DIR_BOTTOM", NULL, 1},\
-    {"GESTURE_DIR_LEFT", NULL, 2},\
-    {"GESTURE_DIR_RIGHT", NULL, 3},\
+    {"INDEV_STATE_RELEASED", NULL, 0},\
+    {"INDEV_STATE_PRESSED", NULL, 1},\
     {"FONT_SUBPX_NONE", NULL, 0},\
     {"FONT_SUBPX_HOR", NULL, 1},\
     {"FONT_SUBPX_VER", NULL, 2},\
     {"FONT_SUBPX_BOTH", NULL, 3},\
     {"ANIM_OFF", NULL, 0},\
     {"ANIM_ON", NULL, 1},\
-    {"DRAW_MASK_RES_TRANSP", NULL, 0},\
-    {"DRAW_MASK_RES_FULL_COVER", NULL, 1},\
-    {"DRAW_MASK_RES_CHANGED", NULL, 2},\
-    {"DRAW_MASK_RES_UNKNOWN", NULL, 3},\
-    {"DRAW_MASK_TYPE_LINE", NULL, 0},\
-    {"DRAW_MASK_TYPE_ANGLE", NULL, 1},\
-    {"DRAW_MASK_TYPE_RADIUS", NULL, 2},\
-    {"DRAW_MASK_TYPE_FADE", NULL, 3},\
-    {"DRAW_MASK_TYPE_MAP", NULL, 4},\
-    {"DRAW_MASK_LINE_SIDE_LEFT", NULL, 0},\
-    {"DRAW_MASK_LINE_SIDE_RIGHT", NULL, 1},\
-    {"DRAW_MASK_LINE_SIDE_TOP", NULL, 2},\
-    {"DRAW_MASK_LINE_SIDE_BOTTOM", NULL, 3},\
+    {"TEXT_FLAG_NONE", NULL, 0},\
+    {"TEXT_FLAG_RECOLOR", NULL, 1},\
+    {"TEXT_FLAG_EXPAND", NULL, 2},\
+    {"TEXT_FLAG_FIT", NULL, 4},\
+    {"TEXT_CMD_STATE_WAIT", NULL, 0},\
+    {"TEXT_CMD_STATE_PAR", NULL, 1},\
+    {"TEXT_CMD_STATE_IN", NULL, 2},\
+    {"TEXT_ALIGN_AUTO", NULL, 0},\
+    {"TEXT_ALIGN_LEFT", NULL, 1},\
+    {"TEXT_ALIGN_CENTER", NULL, 2},\
+    {"TEXT_ALIGN_RIGHT", NULL, 3},\
+    {"BASE_DIR_LTR", NULL, 0},\
+    {"BASE_DIR_RTL", NULL, 1},\
+    {"BASE_DIR_AUTO", NULL, 2},\
+    {"BASE_DIR_NEUTRAL", NULL, 32},\
+    {"BASE_DIR_WEAK", NULL, 33},\
     {"BLEND_MODE_NORMAL", NULL, 0},\
     {"BLEND_MODE_ADDITIVE", NULL, 1},\
     {"BLEND_MODE_SUBTRACTIVE", NULL, 2},\
+    {"TEXT_DECOR_NONE", NULL, 0},\
+    {"TEXT_DECOR_UNDERLINE", NULL, 1},\
+    {"TEXT_DECOR_STRIKETHROUGH", NULL, 2},\
     {"BORDER_SIDE_NONE", NULL, 0},\
     {"BORDER_SIDE_BOTTOM", NULL, 1},\
     {"BORDER_SIDE_TOP", NULL, 2},\
@@ -101,24 +111,80 @@
     {"GRAD_DIR_NONE", NULL, 0},\
     {"GRAD_DIR_VER", NULL, 1},\
     {"GRAD_DIR_HOR", NULL, 2},\
-    {"TEXT_DECOR_NONE", NULL, 0},\
-    {"TEXT_DECOR_UNDERLINE", NULL, 1},\
-    {"TEXT_DECOR_STRIKETHROUGH", NULL, 2},\
-    {"BIDI_DIR_LTR", NULL, 0},\
-    {"BIDI_DIR_RTL", NULL, 1},\
-    {"BIDI_DIR_AUTO", NULL, 2},\
-    {"BIDI_DIR_INHERIT", NULL, 3},\
-    {"BIDI_DIR_NEUTRAL", NULL, 32},\
-    {"BIDI_DIR_WEAK", NULL, 33},\
-    {"TXT_FLAG_NONE", NULL, 0},\
-    {"TXT_FLAG_RECOLOR", NULL, 1},\
-    {"TXT_FLAG_EXPAND", NULL, 2},\
-    {"TXT_FLAG_CENTER", NULL, 4},\
-    {"TXT_FLAG_RIGHT", NULL, 8},\
-    {"TXT_FLAG_FIT", NULL, 16},\
-    {"TXT_CMD_STATE_WAIT", NULL, 0},\
-    {"TXT_CMD_STATE_PAR", NULL, 1},\
-    {"TXT_CMD_STATE_IN", NULL, 2},\
+    {"STYLE_PROP_INV", NULL, 0},\
+    {"STYLE_BG_COLOR", NULL, 32},\
+    {"STYLE_BG_OPA", NULL, 33},\
+    {"STYLE_BG_GRAD_COLOR", NULL, 34},\
+    {"STYLE_BG_GRAD_DIR", NULL, 35},\
+    {"STYLE_BG_MAIN_STOP", NULL, 36},\
+    {"STYLE_BG_GRAD_STOP", NULL, 37},\
+    {"STYLE_BG_IMG_SRC", NULL, 38},\
+    {"STYLE_BG_IMG_OPA", NULL, 39},\
+    {"STYLE_BG_IMG_RECOLOR", NULL, 40},\
+    {"STYLE_BG_IMG_RECOLOR_OPA", NULL, 41},\
+    {"STYLE_BG_IMG_TILED", NULL, 42},\
+    {"STYLE_BORDER_COLOR", NULL, 48},\
+    {"STYLE_BORDER_OPA", NULL, 49},\
+    {"STYLE_BORDER_SIDE", NULL, 51},\
+    {"STYLE_BORDER_POST", NULL, 52},\
+    {"STYLE_OUTLINE_COLOR", NULL, 59},\
+    {"STYLE_SHADOW_COLOR", NULL, 68},\
+    {"STYLE_IMG_OPA", NULL, 70},\
+    {"STYLE_IMG_RECOLOR", NULL, 71},\
+    {"STYLE_IMG_RECOLOR_OPA", NULL, 72},\
+    {"STYLE_LINE_DASH_WIDTH", NULL, 74},\
+    {"STYLE_LINE_DASH_GAP", NULL, 75},\
+    {"STYLE_LINE_ROUNDED", NULL, 76},\
+    {"STYLE_LINE_COLOR", NULL, 77},\
+    {"STYLE_LINE_OPA", NULL, 78},\
+    {"STYLE_ARC_ROUNDED", NULL, 81},\
+    {"STYLE_ARC_COLOR", NULL, 82},\
+    {"STYLE_ARC_OPA", NULL, 83},\
+    {"STYLE_ARC_IMG_SRC", NULL, 84},\
+    {"STYLE_RADIUS", NULL, 96},\
+    {"STYLE_CLIP_CORNER", NULL, 97},\
+    {"STYLE_COLOR_FILTER_DSC", NULL, 99},\
+    {"STYLE_COLOR_FILTER_OPA", NULL, 100},\
+    {"STYLE_ANIM_TIME", NULL, 101},\
+    {"STYLE_ANIM_SPEED", NULL, 102},\
+    {"STYLE_TRANSITION", NULL, 103},\
+    {"STYLE_BLEND_MODE", NULL, 104},\
+    {"STYLE_PROP_ANY", NULL, 65535},\
+    {"STATE_DEFAULT", NULL, 0},\
+    {"STATE_CHECKED", NULL, 1},\
+    {"STATE_FOCUSED", NULL, 2},\
+    {"STATE_FOCUS_KEY", NULL, 4},\
+    {"STATE_EDITED", NULL, 8},\
+    {"STATE_HOVERED", NULL, 16},\
+    {"STATE_PRESSED", NULL, 32},\
+    {"STATE_SCROLLED", NULL, 64},\
+    {"STATE_DISABLED", NULL, 128},\
+    {"STATE_USER_1", NULL, 4096},\
+    {"STATE_USER_2", NULL, 8192},\
+    {"STATE_USER_3", NULL, 16384},\
+    {"STATE_USER_4", NULL, 32768},\
+    {"STATE_ANY", NULL, 65535},\
+    {"PART_MAIN", NULL, 0},\
+    {"PART_SCROLLBAR", NULL, 65536},\
+    {"PART_INDICATOR", NULL, 131072},\
+    {"PART_KNOB", NULL, 196608},\
+    {"PART_SELECTED", NULL, 262144},\
+    {"PART_ITEMS", NULL, 327680},\
+    {"PART_TICKS", NULL, 393216},\
+    {"PART_CURSOR", NULL, 458752},\
+    {"PART_CUSTOM_FIRST", NULL, 524288},\
+    {"PART_ANY", NULL, 983040},\
+    {"OBJ_TREE_WALK_NEXT", NULL, 0},\
+    {"OBJ_TREE_WALK_SKIP_CHILDREN", NULL, 1},\
+    {"OBJ_TREE_WALK_END", NULL, 2},\
+    {"SCROLLBAR_MODE_OFF", NULL, 0},\
+    {"SCROLLBAR_MODE_ON", NULL, 1},\
+    {"SCROLLBAR_MODE_ACTIVE", NULL, 2},\
+    {"SCROLLBAR_MODE_AUTO", NULL, 3},\
+    {"SCROLL_SNAP_NONE", NULL, 0},\
+    {"SCROLL_SNAP_START", NULL, 1},\
+    {"SCROLL_SNAP_END", NULL, 2},\
+    {"SCROLL_SNAP_CENTER", NULL, 3},\
     {"IMG_CF_UNKNOWN", NULL, 0},\
     {"IMG_CF_RAW", NULL, 1},\
     {"IMG_CF_RAW_ALPHA", NULL, 2},\
@@ -166,92 +232,74 @@
     {"FS_RES_UNKNOWN", NULL, 12},\
     {"FS_MODE_WR", NULL, 1},\
     {"FS_MODE_RD", NULL, 2},\
+    {"FS_SEEK_SET", NULL, 0},\
+    {"FS_SEEK_CUR", NULL, 1},\
+    {"FS_SEEK_END", NULL, 2},\
     {"IMG_SRC_VARIABLE", NULL, 0},\
     {"IMG_SRC_FILE", NULL, 1},\
     {"IMG_SRC_SYMBOL", NULL, 2},\
     {"IMG_SRC_UNKNOWN", NULL, 3},\
-    {"DESIGN_DRAW_MAIN", NULL, 0},\
-    {"DESIGN_DRAW_POST", NULL, 1},\
-    {"DESIGN_COVER_CHK", NULL, 2},\
-    {"DESIGN_RES_OK", NULL, 0},\
-    {"DESIGN_RES_COVER", NULL, 1},\
-    {"DESIGN_RES_NOT_COVER", NULL, 2},\
-    {"DESIGN_RES_MASKED", NULL, 3},\
-    {"EVENT_PRESSED", NULL, 0},\
-    {"EVENT_PRESSING", NULL, 1},\
-    {"EVENT_PRESS_LOST", NULL, 2},\
-    {"EVENT_SHORT_CLICKED", NULL, 3},\
-    {"EVENT_LONG_PRESSED", NULL, 4},\
-    {"EVENT_LONG_PRESSED_REPEAT", NULL, 5},\
-    {"EVENT_CLICKED", NULL, 6},\
-    {"EVENT_RELEASED", NULL, 7},\
-    {"EVENT_DRAG_BEGIN", NULL, 8},\
-    {"EVENT_DRAG_END", NULL, 9},\
-    {"EVENT_DRAG_THROW_BEGIN", NULL, 10},\
-    {"EVENT_GESTURE", NULL, 11},\
-    {"EVENT_KEY", NULL, 12},\
-    {"EVENT_FOCUSED", NULL, 13},\
-    {"EVENT_DEFOCUSED", NULL, 14},\
-    {"EVENT_LEAVE", NULL, 15},\
-    {"EVENT_VALUE_CHANGED", NULL, 16},\
-    {"EVENT_INSERT", NULL, 17},\
-    {"EVENT_REFRESH", NULL, 18},\
-    {"EVENT_APPLY", NULL, 19},\
-    {"EVENT_CANCEL", NULL, 20},\
-    {"EVENT_DELETE", NULL, 21},\
-    {"SIGNAL_CLEANUP", NULL, 0},\
-    {"SIGNAL_CHILD_CHG", NULL, 1},\
-    {"SIGNAL_COORD_CHG", NULL, 2},\
-    {"SIGNAL_PARENT_SIZE_CHG", NULL, 3},\
-    {"SIGNAL_STYLE_CHG", NULL, 4},\
-    {"SIGNAL_BASE_DIR_CHG", NULL, 5},\
-    {"SIGNAL_REFR_EXT_DRAW_PAD", NULL, 6},\
-    {"SIGNAL_GET_TYPE", NULL, 7},\
-    {"SIGNAL_GET_STYLE", NULL, 8},\
-    {"SIGNAL_GET_STATE_DSC", NULL, 9},\
-    {"SIGNAL_HIT_TEST", NULL, 10},\
-    {"SIGNAL_PRESSED", NULL, 11},\
-    {"SIGNAL_PRESSING", NULL, 12},\
-    {"SIGNAL_PRESS_LOST", NULL, 13},\
-    {"SIGNAL_RELEASED", NULL, 14},\
-    {"SIGNAL_LONG_PRESS", NULL, 15},\
-    {"SIGNAL_LONG_PRESS_REP", NULL, 16},\
-    {"SIGNAL_DRAG_BEGIN", NULL, 17},\
-    {"SIGNAL_DRAG_THROW_BEGIN", NULL, 18},\
-    {"SIGNAL_DRAG_END", NULL, 19},\
-    {"SIGNAL_GESTURE", NULL, 20},\
-    {"SIGNAL_LEAVE", NULL, 21},\
-    {"SIGNAL_FOCUS", NULL, 22},\
-    {"SIGNAL_DEFOCUS", NULL, 23},\
-    {"SIGNAL_CONTROL", NULL, 24},\
-    {"SIGNAL_GET_EDITABLE", NULL, 25},\
-    {"PROTECT_NONE", NULL, 0},\
-    {"PROTECT_CHILD_CHG", NULL, 1},\
-    {"PROTECT_PARENT", NULL, 2},\
-    {"PROTECT_POS", NULL, 4},\
-    {"PROTECT_FOLLOW", NULL, 8},\
-    {"PROTECT_PRESS_LOST", NULL, 16},\
-    {"PROTECT_CLICK_FOCUS", NULL, 32},\
-    {"PROTECT_EVENT_TO_DISABLED", NULL, 64},\
-    {"STATE_DEFAULT", NULL, 0},\
-    {"STATE_CHECKED", NULL, 1},\
-    {"STATE_FOCUSED", NULL, 2},\
-    {"STATE_EDITED", NULL, 4},\
-    {"STATE_HOVERED", NULL, 8},\
-    {"STATE_PRESSED", NULL, 16},\
-    {"STATE_DISABLED", NULL, 32},\
-    {"OBJ_PART_MAIN", NULL, 0},\
-    {"OBJ_PART_ALL", NULL, 255},\
-    {"SCR_LOAD_ANIM_NONE", NULL, 0},\
-    {"SCR_LOAD_ANIM_OVER_LEFT", NULL, 1},\
-    {"SCR_LOAD_ANIM_OVER_RIGHT", NULL, 2},\
-    {"SCR_LOAD_ANIM_OVER_TOP", NULL, 3},\
-    {"SCR_LOAD_ANIM_OVER_BOTTOM", NULL, 4},\
-    {"SCR_LOAD_ANIM_MOVE_LEFT", NULL, 5},\
-    {"SCR_LOAD_ANIM_MOVE_RIGHT", NULL, 6},\
-    {"SCR_LOAD_ANIM_MOVE_TOP", NULL, 7},\
-    {"SCR_LOAD_ANIM_MOVE_BOTTOM", NULL, 8},\
-    {"SCR_LOAD_ANIM_FADE_ON", NULL, 9},\
+    {"DRAW_MASK_RES_TRANSP", NULL, 0},\
+    {"DRAW_MASK_RES_FULL_COVER", NULL, 1},\
+    {"DRAW_MASK_RES_CHANGED", NULL, 2},\
+    {"DRAW_MASK_RES_UNKNOWN", NULL, 3},\
+    {"DRAW_MASK_TYPE_LINE", NULL, 0},\
+    {"DRAW_MASK_TYPE_ANGLE", NULL, 1},\
+    {"DRAW_MASK_TYPE_RADIUS", NULL, 2},\
+    {"DRAW_MASK_TYPE_FADE", NULL, 3},\
+    {"DRAW_MASK_TYPE_MAP", NULL, 4},\
+    {"DRAW_MASK_LINE_SIDE_LEFT", NULL, 0},\
+    {"DRAW_MASK_LINE_SIDE_RIGHT", NULL, 1},\
+    {"DRAW_MASK_LINE_SIDE_TOP", NULL, 2},\
+    {"DRAW_MASK_LINE_SIDE_BOTTOM", NULL, 3},\
+    {"COVER_RES_COVER", NULL, 0},\
+    {"COVER_RES_NOT_COVER", NULL, 1},\
+    {"COVER_RES_MASKED", NULL, 2},\
+    {"OBJ_CLASS_EDITABLE_INHERIT", NULL, 0},\
+    {"OBJ_CLASS_EDITABLE_TRUE", NULL, 1},\
+    {"OBJ_CLASS_EDITABLE_FALSE", NULL, 2},\
+    {"OBJ_CLASS_GROUP_DEF_INHERIT", NULL, 0},\
+    {"OBJ_CLASS_GROUP_DEF_TRUE", NULL, 1},\
+    {"OBJ_CLASS_GROUP_DEF_FALSE", NULL, 2},\
+    {"EVENT_ALL", NULL, 0},\
+    {"EVENT_PRESSED", NULL, 1},\
+    {"EVENT_PRESSING", NULL, 2},\
+    {"EVENT_PRESS_LOST", NULL, 3},\
+    {"EVENT_SHORT_CLICKED", NULL, 4},\
+    {"EVENT_LONG_PRESSED", NULL, 5},\
+    {"EVENT_LONG_PRESSED_REPEAT", NULL, 6},\
+    {"EVENT_CLICKED", NULL, 7},\
+    {"EVENT_RELEASED", NULL, 8},\
+    {"EVENT_SCROLL_BEGIN", NULL, 9},\
+    {"EVENT_SCROLL_END", NULL, 10},\
+    {"EVENT_SCROLL", NULL, 11},\
+    {"EVENT_GESTURE", NULL, 12},\
+    {"EVENT_KEY", NULL, 13},\
+    {"EVENT_FOCUSED", NULL, 14},\
+    {"EVENT_DEFOCUSED", NULL, 15},\
+    {"EVENT_LEAVE", NULL, 16},\
+    {"EVENT_HIT_TEST", NULL, 17},\
+    {"EVENT_COVER_CHECK", NULL, 18},\
+    {"EVENT_REFR_EXT_DRAW_SIZE", NULL, 19},\
+    {"EVENT_DRAW_MAIN_BEGIN", NULL, 20},\
+    {"EVENT_DRAW_MAIN", NULL, 21},\
+    {"EVENT_DRAW_MAIN_END", NULL, 22},\
+    {"EVENT_DRAW_POST_BEGIN", NULL, 23},\
+    {"EVENT_DRAW_POST", NULL, 24},\
+    {"EVENT_DRAW_POST_END", NULL, 25},\
+    {"EVENT_DRAW_PART_BEGIN", NULL, 26},\
+    {"EVENT_DRAW_PART_END", NULL, 27},\
+    {"EVENT_VALUE_CHANGED", NULL, 28},\
+    {"EVENT_INSERT", NULL, 29},\
+    {"EVENT_REFRESH", NULL, 30},\
+    {"EVENT_READY", NULL, 31},\
+    {"EVENT_CANCEL", NULL, 32},\
+    {"EVENT_DELETE", NULL, 33},\
+    {"EVENT_CHILD_CHANGED", NULL, 34},\
+    {"EVENT_SIZE_CHANGED", NULL, 35},\
+    {"EVENT_STYLE_CHANGED", NULL, 36},\
+    {"EVENT_LAYOUT_CHANGED", NULL, 37},\
+    {"EVENT_GET_SELF_SIZE", NULL, 38},\
     {"KEY_UP", NULL, 17},\
     {"KEY_DOWN", NULL, 18},\
     {"KEY_RIGHT", NULL, 19},\
@@ -266,6 +314,16 @@
     {"KEY_END", NULL, 3},\
     {"GROUP_REFOCUS_POLICY_NEXT", NULL, 0},\
     {"GROUP_REFOCUS_POLICY_PREV", NULL, 1},\
+    {"SCR_LOAD_ANIM_NONE", NULL, 0},\
+    {"SCR_LOAD_ANIM_OVER_LEFT", NULL, 1},\
+    {"SCR_LOAD_ANIM_OVER_RIGHT", NULL, 2},\
+    {"SCR_LOAD_ANIM_OVER_TOP", NULL, 3},\
+    {"SCR_LOAD_ANIM_OVER_BOTTOM", NULL, 4},\
+    {"SCR_LOAD_ANIM_MOVE_LEFT", NULL, 5},\
+    {"SCR_LOAD_ANIM_MOVE_RIGHT", NULL, 6},\
+    {"SCR_LOAD_ANIM_MOVE_TOP", NULL, 7},\
+    {"SCR_LOAD_ANIM_MOVE_BOTTOM", NULL, 8},\
+    {"SCR_LOAD_ANIM_FADE_ON", NULL, 9},\
     {"FONT_FMT_TXT_CMAP_FORMAT0_FULL", NULL, 0},\
     {"FONT_FMT_TXT_CMAP_SPARSE_FULL", NULL, 1},\
     {"FONT_FMT_TXT_CMAP_FORMAT0_TINY", NULL, 2},\
@@ -273,187 +331,28 @@
     {"FONT_FMT_TXT_PLAIN", NULL, 0},\
     {"FONT_FMT_TXT_COMPRESSED", NULL, 1},\
     {"FONT_FMT_TXT_COMPRESSED_NO_PREFILTER", NULL, 1},\
-    {"THEME_NONE", NULL, 0},\
-    {"THEME_SCR", NULL, 1},\
-    {"THEME_OBJ", NULL, 2},\
-    {"THEME_ARC", NULL, 3},\
-    {"THEME_BAR", NULL, 4},\
-    {"THEME_BTN", NULL, 5},\
-    {"THEME_BTNMATRIX", NULL, 6},\
-    {"THEME_CALENDAR", NULL, 7},\
-    {"THEME_CANVAS", NULL, 8},\
-    {"THEME_CHECKBOX", NULL, 9},\
-    {"THEME_CHART", NULL, 10},\
-    {"THEME_CONT", NULL, 11},\
-    {"THEME_CPICKER", NULL, 12},\
-    {"THEME_DROPDOWN", NULL, 13},\
-    {"THEME_GAUGE", NULL, 14},\
-    {"THEME_IMAGE", NULL, 15},\
-    {"THEME_IMGBTN", NULL, 16},\
-    {"THEME_KEYBOARD", NULL, 17},\
-    {"THEME_LABEL", NULL, 18},\
-    {"THEME_LED", NULL, 19},\
-    {"THEME_LINE", NULL, 20},\
-    {"THEME_LIST", NULL, 21},\
-    {"THEME_LIST_BTN", NULL, 22},\
-    {"THEME_LINEMETER", NULL, 23},\
-    {"THEME_MSGBOX", NULL, 24},\
-    {"THEME_MSGBOX_BTNS", NULL, 25},\
-    {"THEME_OBJMASK", NULL, 26},\
-    {"THEME_PAGE", NULL, 27},\
-    {"THEME_ROLLER", NULL, 28},\
-    {"THEME_SLIDER", NULL, 29},\
-    {"THEME_SPINBOX", NULL, 30},\
-    {"THEME_SPINBOX_BTN", NULL, 31},\
-    {"THEME_SPINNER", NULL, 32},\
-    {"THEME_SWITCH", NULL, 33},\
-    {"THEME_TABLE", NULL, 34},\
-    {"THEME_TABVIEW", NULL, 35},\
-    {"THEME_TABVIEW_PAGE", NULL, 36},\
-    {"THEME_TEXTAREA", NULL, 37},\
-    {"THEME_TILEVIEW", NULL, 38},\
-    {"THEME_WIN", NULL, 39},\
-    {"THEME_WIN_BTN", NULL, 40},\
-    {"THEME_MATERIAL_FLAG_DARK", NULL, 1},\
-    {"THEME_MATERIAL_FLAG_LIGHT", NULL, 2},\
-    {"THEME_MATERIAL_FLAG_NO_TRANSITION", NULL, 16},\
-    {"THEME_MATERIAL_FLAG_NO_FOCUS", NULL, 32},\
-    {"ARC_TYPE_NORMAL", NULL, 0},\
-    {"ARC_TYPE_SYMMETRIC", NULL, 1},\
-    {"ARC_TYPE_REVERSE", NULL, 2},\
-    {"ARC_PART_INDIC", NULL, 0},\
-    {"ARC_PART_KNOB", NULL, 1},\
-    {"LAYOUT_OFF", NULL, 0},\
-    {"LAYOUT_CENTER", NULL, 1},\
-    {"LAYOUT_COLUMN_LEFT", NULL, 2},\
-    {"LAYOUT_COLUMN_MID", NULL, 3},\
-    {"LAYOUT_COLUMN_RIGHT", NULL, 4},\
-    {"LAYOUT_ROW_TOP", NULL, 5},\
-    {"LAYOUT_ROW_MID", NULL, 6},\
-    {"LAYOUT_ROW_BOTTOM", NULL, 7},\
-    {"LAYOUT_PRETTY_TOP", NULL, 8},\
-    {"LAYOUT_PRETTY_MID", NULL, 9},\
-    {"LAYOUT_PRETTY_BOTTOM", NULL, 10},\
-    {"LAYOUT_GRID", NULL, 11},\
-    {"FIT_NONE", NULL, 0},\
-    {"FIT_TIGHT", NULL, 1},\
-    {"FIT_PARENT", NULL, 2},\
-    {"FIT_MAX", NULL, 3},\
-    {"BTN_STATE_RELEASED", NULL, 0},\
-    {"BTN_STATE_PRESSED", NULL, 1},\
-    {"BTN_STATE_DISABLED", NULL, 2},\
-    {"BTN_STATE_CHECKED_RELEASED", NULL, 3},\
-    {"BTN_STATE_CHECKED_PRESSED", NULL, 4},\
-    {"BTN_STATE_CHECKED_DISABLED", NULL, 5},\
-    {"LABEL_LONG_EXPAND", NULL, 0},\
-    {"LABEL_LONG_BREAK", NULL, 1},\
-    {"LABEL_LONG_DOT", NULL, 2},\
-    {"LABEL_LONG_SROLL", NULL, 3},\
-    {"LABEL_LONG_SROLL_CIRC", NULL, 4},\
-    {"LABEL_LONG_CROP", NULL, 5},\
-    {"LABEL_ALIGN_LEFT", NULL, 0},\
-    {"LABEL_ALIGN_CENTER", NULL, 1},\
-    {"LABEL_ALIGN_RIGHT", NULL, 2},\
-    {"LABEL_ALIGN_AUTO", NULL, 3},\
-    {"LABEL_PART_MAIN", NULL, 0},\
-    {"BAR_TYPE_NORMAL", NULL, 0},\
-    {"BAR_TYPE_SYMMETRICAL", NULL, 1},\
-    {"BAR_TYPE_CUSTOM", NULL, 2},\
-    {"BAR_PART_BG", NULL, 0},\
-    {"BAR_PART_INDIC", NULL, 1},\
+    {"ARC_MODE_NORMAL", NULL, 0},\
+    {"ARC_MODE_SYMMETRICAL", NULL, 1},\
+    {"ARC_MODE_REVERSE", NULL, 2},\
+    {"LABEL_LONG_WRAP", NULL, 0},\
+    {"LABEL_LONG_DOT", NULL, 1},\
+    {"LABEL_LONG_SCROLL", NULL, 2},\
+    {"LABEL_LONG_SCROLL_CIRCULAR", NULL, 3},\
+    {"LABEL_LONG_CLIP", NULL, 4},\
+    {"BAR_MODE_NORMAL", NULL, 0},\
+    {"BAR_MODE_SYMMETRICAL", NULL, 1},\
+    {"BAR_MODE_RANGE", NULL, 2},\
     {"BTNMATRIX_CTRL_HIDDEN", NULL, 8},\
     {"BTNMATRIX_CTRL_NO_REPEAT", NULL, 16},\
     {"BTNMATRIX_CTRL_DISABLED", NULL, 32},\
     {"BTNMATRIX_CTRL_CHECKABLE", NULL, 64},\
-    {"BTNMATRIX_CTRL_CHECK_STATE", NULL, 128},\
+    {"BTNMATRIX_CTRL_CHECKED", NULL, 128},\
     {"BTNMATRIX_CTRL_CLICK_TRIG", NULL, 256},\
-    {"BTNMATRIX_PART_BG", NULL, 0},\
-    {"BTNMATRIX_PART_BTN", NULL, 1},\
-    {"CALENDAR_PART_BG", NULL, 0},\
-    {"CALENDAR_PART_HEADER", NULL, 1},\
-    {"CALENDAR_PART_DAY_NAMES", NULL, 2},\
-    {"CALENDAR_PART_DATE", NULL, 3},\
-    {"IMG_PART_MAIN", NULL, 0},\
-    {"CANVAS_PART_MAIN", NULL, 0},\
-    {"LINE_PART_MAIN", NULL, 0},\
-    {"CHART_TYPE_NONE", NULL, 0},\
-    {"CHART_TYPE_LINE", NULL, 1},\
-    {"CHART_TYPE_COLUMN", NULL, 2},\
-    {"CHART_UPDATE_MODE_SHIFT", NULL, 0},\
-    {"CHART_UPDATE_MODE_CIRCULAR", NULL, 1},\
-    {"CHART_AXIS_PRIMARY_Y", NULL, 0},\
-    {"CHART_AXIS_SECONDARY_Y", NULL, 1},\
-    {"CHART_CURSOR_NONE", NULL, 0},\
-    {"CHART_CURSOR_RIGHT", NULL, 1},\
-    {"CHART_CURSOR_UP", NULL, 2},\
-    {"CHART_CURSOR_LEFT", NULL, 4},\
-    {"CHART_CURSOR_DOWN", NULL, 8},\
-    {"CHART_AXIS_SKIP_LAST_TICK", NULL, 0},\
-    {"CHART_AXIS_DRAW_LAST_TICK", NULL, 1},\
-    {"CHART_AXIS_INVERSE_LABELS_ORDER", NULL, 2},\
-    {"CHART_PART_SERIES", NULL, 0},\
-    {"CHART_PART_CURSOR", NULL, 1},\
-    {"CPICKER_TYPE_RECT", NULL, 0},\
-    {"CPICKER_TYPE_DISC", NULL, 1},\
-    {"CPICKER_COLOR_MODE_HUE", NULL, 0},\
-    {"CPICKER_COLOR_MODE_SATURATION", NULL, 1},\
-    {"CPICKER_COLOR_MODE_VALUE", NULL, 2},\
-    {"SCROLLBAR_MODE_OFF", NULL, 0},\
-    {"SCROLLBAR_MODE_ON", NULL, 1},\
-    {"SCROLLBAR_MODE_DRAG", NULL, 2},\
-    {"SCROLLBAR_MODE_AUTO", NULL, 3},\
-    {"SCROLLBAR_MODE_HIDE", NULL, 4},\
-    {"SCROLLBAR_MODE_UNHIDE", NULL, 8},\
-    {"PAGE_EDGE_LEFT", NULL, 1},\
-    {"PAGE_EDGE_TOP", NULL, 2},\
-    {"PAGE_EDGE_RIGHT", NULL, 4},\
-    {"PAGE_EDGE_BOTTOM", NULL, 8},\
-    {"PAGE_PART_EDGE_FLASH", NULL, 0},\
-    {"DROPDOWN_DIR_DOWN", NULL, 0},\
-    {"DROPDOWN_DIR_UP", NULL, 1},\
-    {"DROPDOWN_DIR_LEFT", NULL, 2},\
-    {"DROPDOWN_DIR_RIGHT", NULL, 3},\
-    {"DROPDOWN_PART_SCROLLBAR", NULL, 0},\
-    {"DROPDOWN_PART_SELECTED", NULL, 1},\
-    {"LINEMETER_PART_MAIN", NULL, 0},\
-    {"GAUGE_PART_NEEDLE", NULL, 0},\
-    {"KEYBOARD_MODE_TEXT_LOWER", NULL, 0},\
-    {"KEYBOARD_MODE_TEXT_UPPER", NULL, 1},\
-    {"KEYBOARD_MODE_SPECIAL", NULL, 2},\
-    {"KEYBOARD_MODE_NUM", NULL, 3},\
-    {"KEYBOARD_PART_BG", NULL, 0},\
-    {"KEYBOARD_PART_BTN", NULL, 1},\
-    {"MSGBOX_PART_BTN", NULL, 0},\
-    {"OBJMASK_PART_MAIN", NULL, 0},\
+    {"BTNMATRIX_CTRL_RECOLOR", NULL, 4096},\
+    {"BTNMATRIX_CTRL_CUSTOM_1", NULL, 16384},\
+    {"BTNMATRIX_CTRL_CUSTOM_2", NULL, 32768},\
     {"ROLLER_MODE_NORMAL", NULL, 0},\
     {"ROLLER_MODE_INFINITE", NULL, 1},\
-    {"SLIDER_TYPE_NORMAL", NULL, 0},\
-    {"SLIDER_TYPE_SYMMETRICAL", NULL, 1},\
-    {"SLIDER_TYPE_RANGE", NULL, 2},\
-    {"SLIDER_PART_BG", NULL, 0},\
-    {"SLIDER_PART_INDIC", NULL, 1},\
-    {"SLIDER_PART_KNOB", NULL, 2},\
-    {"TEXTAREA_PART_PLACEHOLDER", NULL, 0},\
-    {"SPINNER_TYPE_SPINNING_ARC", NULL, 0},\
-    {"SPINNER_TYPE_FILLSPIN_ARC", NULL, 1},\
-    {"SPINNER_TYPE_CONSTANT_ARC", NULL, 2},\
-    {"SPINNER_DIR_FORWARD", NULL, 0},\
-    {"SPINNER_DIR_BACKWARD", NULL, 1},\
-    {"TABLE_PART_BG", NULL, 0},\
-    {"TABLE_PART_CELL1", NULL, 1},\
-    {"TABLE_PART_CELL2", NULL, 2},\
-    {"TABLE_PART_CELL3", NULL, 3},\
-    {"TABLE_PART_CELL4", NULL, 4},\
-    {"WIN_PART_CONTENT_SCROLLABLE", NULL, 1},\
-    {"WIN_PART_SCROLLBAR", NULL, 2},\
-    {"TABVIEW_TAB_POS_NONE", NULL, 0},\
-    {"TABVIEW_TAB_POS_TOP", NULL, 1},\
-    {"TABVIEW_TAB_POS_BOTTOM", NULL, 2},\
-    {"TABVIEW_TAB_POS_LEFT", NULL, 3},\
-    {"TABVIEW_TAB_POS_RIGHT", NULL, 4},\
-    {"TABVIEW_PART_TAB_BG", NULL, 0},\
-    {"TABVIEW_PART_TAB_BTN", NULL, 1},\
-    {"TABVIEW_PART_INDIC", NULL, 2},\
 
 
 #endif

Разница между файлами не показана из-за своего большого размера
+ 577 - 597
components/lvgl/gen/luat_lv_gen.h


+ 36 - 55
components/lvgl/gen/lv_core/luat_lv_disp.c

@@ -12,14 +12,14 @@ int luat_lv_disp_drv_init(lua_State *L) {
     return 0;
 }
 
-//  void lv_disp_buf_init(lv_disp_buf_t* disp_buf, void* buf1, void* buf2, uint32_t size_in_px_cnt)
-int luat_lv_disp_buf_init(lua_State *L) {
-    LV_DEBUG("CALL lv_disp_buf_init");
-    lv_disp_buf_t* disp_buf = (lv_disp_buf_t*)lua_touserdata(L, 1);
+//  void lv_disp_draw_buf_init(lv_disp_draw_buf_t* draw_buf, void* buf1, void* buf2, uint32_t size_in_px_cnt)
+int luat_lv_disp_draw_buf_init(lua_State *L) {
+    LV_DEBUG("CALL lv_disp_draw_buf_init");
+    lv_disp_draw_buf_t* draw_buf = (lv_disp_draw_buf_t*)lua_touserdata(L, 1);
     void* buf1 = (void*)lua_touserdata(L, 2);
     void* buf2 = (void*)lua_touserdata(L, 3);
     uint32_t size_in_px_cnt = (uint32_t)luaL_checkinteger(L, 4);
-    lv_disp_buf_init(disp_buf ,buf1 ,buf2 ,size_in_px_cnt);
+    lv_disp_draw_buf_init(draw_buf ,buf1 ,buf2 ,size_in_px_cnt);
     return 0;
 }
 
@@ -107,16 +107,6 @@ int luat_lv_disp_get_dpi(lua_State *L) {
     return 1;
 }
 
-//  lv_disp_size_t lv_disp_get_size_category(lv_disp_t* disp)
-int luat_lv_disp_get_size_category(lua_State *L) {
-    LV_DEBUG("CALL lv_disp_get_size_category");
-    lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
-    lv_disp_size_t ret;
-    ret = lv_disp_get_size_category(disp);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
 //  void lv_disp_set_rotation(lv_disp_t* disp, lv_disp_rot_t rotation)
 int luat_lv_disp_set_rotation(lua_State *L) {
     LV_DEBUG("CALL lv_disp_set_rotation");
@@ -164,46 +154,16 @@ int luat_lv_disp_get_next(lua_State *L) {
     return 1;
 }
 
-//  lv_disp_buf_t* lv_disp_get_buf(lv_disp_t* disp)
-int luat_lv_disp_get_buf(lua_State *L) {
-    LV_DEBUG("CALL lv_disp_get_buf");
+//  lv_disp_draw_buf_t* lv_disp_get_draw_buf(lv_disp_t* disp)
+int luat_lv_disp_get_draw_buf(lua_State *L) {
+    LV_DEBUG("CALL lv_disp_get_draw_buf");
     lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
-    lv_disp_buf_t* ret = NULL;
-    ret = lv_disp_get_buf(disp);
+    lv_disp_draw_buf_t* ret = NULL;
+    ret = lv_disp_get_draw_buf(disp);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  uint16_t lv_disp_get_inv_buf_size(lv_disp_t* disp)
-int luat_lv_disp_get_inv_buf_size(lua_State *L) {
-    LV_DEBUG("CALL lv_disp_get_inv_buf_size");
-    lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_disp_get_inv_buf_size(disp);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_disp_is_double_buf(lv_disp_t* disp)
-int luat_lv_disp_is_double_buf(lua_State *L) {
-    LV_DEBUG("CALL lv_disp_is_double_buf");
-    lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_disp_is_double_buf(disp);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_disp_is_true_double_buf(lv_disp_t* disp)
-int luat_lv_disp_is_true_double_buf(lua_State *L) {
-    LV_DEBUG("CALL lv_disp_is_true_double_buf");
-    lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_disp_is_true_double_buf(disp);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
 //  lv_obj_t* lv_disp_get_scr_act(lv_disp_t* disp)
 int luat_lv_disp_get_scr_act(lua_State *L) {
     LV_DEBUG("CALL lv_disp_get_scr_act");
@@ -252,15 +212,25 @@ int luat_lv_disp_get_layer_sys(lua_State *L) {
     return 1;
 }
 
-//  void lv_disp_assign_screen(lv_disp_t* disp, lv_obj_t* scr)
-int luat_lv_disp_assign_screen(lua_State *L) {
-    LV_DEBUG("CALL lv_disp_assign_screen");
+//  void lv_disp_set_theme(lv_disp_t* disp, lv_theme_t* th)
+int luat_lv_disp_set_theme(lua_State *L) {
+    LV_DEBUG("CALL lv_disp_set_theme");
     lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
-    lv_obj_t* scr = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_disp_assign_screen(disp ,scr);
+    lv_theme_t* th = (lv_theme_t*)lua_touserdata(L, 2);
+    lv_disp_set_theme(disp ,th);
     return 0;
 }
 
+//  lv_theme_t* lv_disp_get_theme(lv_disp_t* disp)
+int luat_lv_disp_get_theme(lua_State *L) {
+    LV_DEBUG("CALL lv_disp_get_theme");
+    lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
+    lv_theme_t* ret = NULL;
+    ret = lv_disp_get_theme(disp);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
 //  void lv_disp_set_bg_color(lv_disp_t* disp, lv_color_t color)
 int luat_lv_disp_set_bg_color(lua_State *L) {
     LV_DEBUG("CALL lv_disp_set_bg_color");
@@ -315,3 +285,14 @@ int luat_lv_disp_clean_dcache(lua_State *L) {
     return 0;
 }
 
+//  lv_coord_t lv_disp_dpx(lv_disp_t* disp, lv_coord_t n)
+int luat_lv_disp_dpx(lua_State *L) {
+    LV_DEBUG("CALL lv_disp_dpx");
+    lv_disp_t* disp = (lv_disp_t*)lua_touserdata(L, 1);
+    lv_coord_t n = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_disp_dpx(disp ,n);
+    lua_pushinteger(L, ret);
+    return 1;
+}
+

+ 27 - 19
components/lvgl/gen/lv_core/luat_lv_group.c

@@ -21,6 +21,23 @@ int luat_lv_group_del(lua_State *L) {
     return 0;
 }
 
+//  void lv_group_set_default(lv_group_t* group)
+int luat_lv_group_set_default(lua_State *L) {
+    LV_DEBUG("CALL lv_group_set_default");
+    lv_group_t* group = (lv_group_t*)lua_touserdata(L, 1);
+    lv_group_set_default(group);
+    return 0;
+}
+
+//  lv_group_t* lv_group_get_default()
+int luat_lv_group_get_default(lua_State *L) {
+    LV_DEBUG("CALL lv_group_get_default");
+    lv_group_t* ret = NULL;
+    ret = lv_group_get_default();
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
 //  void lv_group_add_obj(lv_group_t* group, lv_obj_t* obj)
 int luat_lv_group_add_obj(lua_State *L) {
     LV_DEBUG("CALL lv_group_add_obj");
@@ -110,15 +127,6 @@ int luat_lv_group_set_editing(lua_State *L) {
     return 0;
 }
 
-//  void lv_group_set_click_focus(lv_group_t* group, bool en)
-int luat_lv_group_set_click_focus(lua_State *L) {
-    LV_DEBUG("CALL lv_group_set_click_focus");
-    lv_group_t* group = (lv_group_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_group_set_click_focus(group ,en);
-    return 0;
-}
-
 //  void lv_group_set_wrap(lv_group_t* group, bool en)
 int luat_lv_group_set_wrap(lua_State *L) {
     LV_DEBUG("CALL lv_group_set_wrap");
@@ -148,16 +156,6 @@ int luat_lv_group_get_editing(lua_State *L) {
     return 1;
 }
 
-//  bool lv_group_get_click_focus(lv_group_t* group)
-int luat_lv_group_get_click_focus(lua_State *L) {
-    LV_DEBUG("CALL lv_group_get_click_focus");
-    lv_group_t* group = (lv_group_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_group_get_click_focus(group);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
 //  bool lv_group_get_wrap(lv_group_t* group)
 int luat_lv_group_get_wrap(lua_State *L) {
     LV_DEBUG("CALL lv_group_get_wrap");
@@ -168,3 +166,13 @@ int luat_lv_group_get_wrap(lua_State *L) {
     return 1;
 }
 
+//  uint32_t lv_group_get_obj_count(lv_group_t* group)
+int luat_lv_group_get_obj_count(lua_State *L) {
+    LV_DEBUG("CALL lv_group_get_obj_count");
+    lv_group_t* group = (lv_group_t*)lua_touserdata(L, 1);
+    uint32_t ret;
+    ret = lv_group_get_obj_count(group);
+    lua_pushinteger(L, ret);
+    return 1;
+}
+

+ 0 - 218
components/lvgl/gen/lv_core/luat_lv_indev.c

@@ -1,218 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  void lv_indev_drv_init(lv_indev_drv_t* driver)
-int luat_lv_indev_drv_init(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_drv_init");
-    lv_indev_drv_t* driver = (lv_indev_drv_t*)lua_touserdata(L, 1);
-    lv_indev_drv_init(driver);
-    return 0;
-}
-
-//  lv_indev_t* lv_indev_drv_register(lv_indev_drv_t* driver)
-int luat_lv_indev_drv_register(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_drv_register");
-    lv_indev_drv_t* driver = (lv_indev_drv_t*)lua_touserdata(L, 1);
-    lv_indev_t* ret = NULL;
-    ret = lv_indev_drv_register(driver);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_indev_drv_update(lv_indev_t* indev, lv_indev_drv_t* new_drv)
-int luat_lv_indev_drv_update(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_drv_update");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_indev_drv_t* new_drv = (lv_indev_drv_t*)lua_touserdata(L, 2);
-    lv_indev_drv_update(indev ,new_drv);
-    return 0;
-}
-
-//  lv_indev_t* lv_indev_get_next(lv_indev_t* indev)
-int luat_lv_indev_get_next(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_next");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_indev_t* ret = NULL;
-    ret = lv_indev_get_next(indev);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_indev_t* lv_indev_get_act()
-int luat_lv_indev_get_act(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_act");
-    lv_indev_t* ret = NULL;
-    ret = lv_indev_get_act();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_indev_type_t lv_indev_get_type(lv_indev_t* indev)
-int luat_lv_indev_get_type(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_type");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_indev_type_t ret;
-    ret = lv_indev_get_type(indev);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_indev_reset(lv_indev_t* indev, lv_obj_t* obj)
-int luat_lv_indev_reset(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_reset");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_indev_reset(indev ,obj);
-    return 0;
-}
-
-//  void lv_indev_reset_long_press(lv_indev_t* indev)
-int luat_lv_indev_reset_long_press(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_reset_long_press");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_indev_reset_long_press(indev);
-    return 0;
-}
-
-//  void lv_indev_enable(lv_indev_t* indev, bool en)
-int luat_lv_indev_enable(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_enable");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_indev_enable(indev ,en);
-    return 0;
-}
-
-//  void lv_indev_set_cursor(lv_indev_t* indev, lv_obj_t* cur_obj)
-int luat_lv_indev_set_cursor(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_set_cursor");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_obj_t* cur_obj = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_indev_set_cursor(indev ,cur_obj);
-    return 0;
-}
-
-//  void lv_indev_set_group(lv_indev_t* indev, lv_group_t* group)
-int luat_lv_indev_set_group(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_set_group");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_group_t* group = (lv_group_t*)lua_touserdata(L, 2);
-    lv_indev_set_group(indev ,group);
-    return 0;
-}
-
-//  void lv_indev_get_point(lv_indev_t* indev, lv_point_t* point)
-int luat_lv_indev_get_point(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_point");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_point_t point = {0};
-    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lv_indev_get_point(indev ,&point);
-    return 0;
-}
-
-//  lv_gesture_dir_t lv_indev_get_gesture_dir(lv_indev_t* indev)
-int luat_lv_indev_get_gesture_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_gesture_dir");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_gesture_dir_t ret;
-    ret = lv_indev_get_gesture_dir(indev);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint32_t lv_indev_get_key(lv_indev_t* indev)
-int luat_lv_indev_get_key(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_key");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    uint32_t ret;
-    ret = lv_indev_get_key(indev);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_indev_is_dragging(lv_indev_t* indev)
-int luat_lv_indev_is_dragging(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_is_dragging");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_indev_is_dragging(indev);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  void lv_indev_get_vect(lv_indev_t* indev, lv_point_t* point)
-int luat_lv_indev_get_vect(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_vect");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_point_t point = {0};
-    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lv_indev_get_vect(indev ,&point);
-    return 0;
-}
-
-//  lv_res_t lv_indev_finish_drag(lv_indev_t* indev)
-int luat_lv_indev_finish_drag(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_finish_drag");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_res_t ret;
-    ret = lv_indev_finish_drag(indev);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  void lv_indev_wait_release(lv_indev_t* indev)
-int luat_lv_indev_wait_release(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_wait_release");
-    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
-    lv_indev_wait_release(indev);
-    return 0;
-}
-
-//  lv_obj_t* lv_indev_get_obj_act()
-int luat_lv_indev_get_obj_act(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_obj_act");
-    lv_obj_t* ret = NULL;
-    ret = lv_indev_get_obj_act();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_indev_search_obj(lv_obj_t* obj, lv_point_t* point)
-int luat_lv_indev_search_obj(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_search_obj");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_point_t point = {0};
-    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lv_obj_t* ret = NULL;
-    ret = lv_indev_search_obj(obj ,&point);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_task_t* lv_indev_get_read_task(lv_disp_t* indev)
-int luat_lv_indev_get_read_task(lua_State *L) {
-    LV_DEBUG("CALL lv_indev_get_read_task");
-    lv_disp_t* indev = (lv_disp_t*)lua_touserdata(L, 1);
-    lv_task_t* ret = NULL;
-    ret = lv_indev_get_read_task(indev);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-

+ 31 - 0
components/lvgl/gen/lv_core/luat_lv_indev_scroll.c

@@ -0,0 +1,31 @@
+

+#include "luat_base.h"
+#include "lvgl.h"
+#include "luat_lvgl.h"
+
+
+//  lv_coord_t lv_indev_scroll_throw_predict(lv_indev_t* indev, lv_dir_t dir)
+int luat_lv_indev_scroll_throw_predict(lua_State *L) {
+    LV_DEBUG("CALL lv_indev_scroll_throw_predict");
+    lv_indev_t* indev = (lv_indev_t*)lua_touserdata(L, 1);
+    lv_dir_t dir = (lv_dir_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_indev_scroll_throw_predict(indev ,dir);
+    lua_pushinteger(L, ret);
+    return 1;
+}
+
+//  void lv_indev_scroll_get_snap_dist(lv_obj_t* obj, lv_point_t* p)
+int luat_lv_indev_scroll_get_snap_dist(lua_State *L) {
+    LV_DEBUG("CALL lv_indev_scroll_get_snap_dist");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lua_pushvalue(L, 2);
+    lv_point_t p = {0};
+    lua_geti(L, -1, 1); p.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); p.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_indev_scroll_get_snap_dist(obj ,&p);
+    return 0;
+}
+

+ 1998 - 2089
components/lvgl/gen/lv_core/luat_lv_obj.c

@@ -4,26 +4,20 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_obj_create(lv_obj_t* parent, lv_obj_t* copy)
-int luat_lv_obj_create(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_create");
-    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_obj_create(parent ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_res_t lv_obj_del(lv_obj_t* obj)
+//  void lv_obj_del(lv_obj_t* obj)
 int luat_lv_obj_del(lua_State *L) {
     LV_DEBUG("CALL lv_obj_del");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_res_t ret;
-    ret = lv_obj_del(obj);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
+    lv_obj_del(obj);
+    return 0;
+}
+
+//  void lv_obj_clean(lv_obj_t* obj)
+int luat_lv_obj_clean(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_clean");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_clean(obj);
+    return 0;
 }
 
 //  void lv_obj_del_async(lv_obj_t* obj)
@@ -34,88 +28,100 @@ int luat_lv_obj_del_async(lua_State *L) {
     return 0;
 }
 
-//  void lv_obj_clean(lv_obj_t* obj)
-int luat_lv_obj_clean(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_clean");
+//  void lv_obj_set_parent(lv_obj_t* obj, lv_obj_t* parent)
+int luat_lv_obj_set_parent(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_parent");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_clean(obj);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_set_parent(obj ,parent);
     return 0;
 }
 
-//  void lv_obj_invalidate_area(lv_obj_t* obj, lv_area_t* area)
-int luat_lv_obj_invalidate_area(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_invalidate_area");
+//  void lv_obj_move_foreground(lv_obj_t* obj)
+int luat_lv_obj_move_foreground(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_move_foreground");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_area_t area = {0};
-    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lv_obj_invalidate_area(obj ,&area);
+    lv_obj_move_foreground(obj);
     return 0;
 }
 
-//  void lv_obj_invalidate(lv_obj_t* obj)
-int luat_lv_obj_invalidate(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_invalidate");
+//  void lv_obj_move_background(lv_obj_t* obj)
+int luat_lv_obj_move_background(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_move_background");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_invalidate(obj);
+    lv_obj_move_background(obj);
     return 0;
 }
 
-//  bool lv_obj_area_is_visible(lv_obj_t* obj, lv_area_t* area)
-int luat_lv_obj_area_is_visible(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_area_is_visible");
+//  lv_obj_t* lv_obj_get_screen(lv_obj_t* obj)
+int luat_lv_obj_get_screen(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_screen");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_area_t area = {0};
-    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
+    lv_obj_t* ret = NULL;
+    ret = lv_obj_get_screen(obj);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
 
-    bool ret;
-    ret = lv_obj_area_is_visible(obj ,&area);
-    lua_pushboolean(L, ret);
+//  lv_disp_t* lv_obj_get_disp(lv_obj_t* obj)
+int luat_lv_obj_get_disp(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_disp");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_disp_t* ret = NULL;
+    ret = lv_obj_get_disp(obj);
+    lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  bool lv_obj_is_visible(lv_obj_t* obj)
-int luat_lv_obj_is_visible(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_is_visible");
+//  lv_obj_t* lv_obj_get_parent(lv_obj_t* obj)
+int luat_lv_obj_get_parent(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_parent");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_is_visible(obj);
-    lua_pushboolean(L, ret);
+    lv_obj_t* ret = NULL;
+    ret = lv_obj_get_parent(obj);
+    lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_parent(lv_obj_t* obj, lv_obj_t* parent)
-int luat_lv_obj_set_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_parent");
+//  lv_obj_t* lv_obj_get_child(lv_obj_t* obj, int32_t id)
+int luat_lv_obj_get_child(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_child");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_set_parent(obj ,parent);
-    return 0;
+    int32_t id = (int32_t)luaL_checkinteger(L, 2);
+    lv_obj_t* ret = NULL;
+    ret = lv_obj_get_child(obj ,id);
+    lua_pushlightuserdata(L, ret);
+    return 1;
 }
 
-//  void lv_obj_move_foreground(lv_obj_t* obj)
-int luat_lv_obj_move_foreground(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_move_foreground");
+//  uint32_t lv_obj_get_child_cnt(lv_obj_t* obj)
+int luat_lv_obj_get_child_cnt(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_child_cnt");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_move_foreground(obj);
-    return 0;
+    uint32_t ret;
+    ret = lv_obj_get_child_cnt(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_move_background(lv_obj_t* obj)
-int luat_lv_obj_move_background(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_move_background");
+//  uint32_t lv_obj_get_child_id(lv_obj_t* obj)
+int luat_lv_obj_get_child_id(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_child_id");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_move_background(obj);
+    uint32_t ret;
+    ret = lv_obj_get_child_id(obj);
+    lua_pushinteger(L, ret);
+    return 1;
+}
+
+//  void lv_obj_tree_walk(lv_obj_t* start_obj, lv_obj_tree_walk_cb_t cb, void* user_data)
+int luat_lv_obj_tree_walk(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_tree_walk");
+    lv_obj_t* start_obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_tree_walk_cb_t cb;
+    // miss arg convert
+    void* user_data = (void*)lua_touserdata(L, 3);
+    lv_obj_tree_walk(start_obj ,cb ,user_data);
     return 0;
 }
 
@@ -157,6 +163,16 @@ int luat_lv_obj_set_size(lua_State *L) {
     return 0;
 }
 
+//  bool lv_obj_refr_size(lv_obj_t* obj)
+int luat_lv_obj_refr_size(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_refr_size");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    bool ret;
+    ret = lv_obj_refr_size(obj);
+    lua_pushboolean(L, ret);
+    return 1;
+}
+
 //  void lv_obj_set_width(lv_obj_t* obj, lv_coord_t w)
 int luat_lv_obj_set_width(lua_State *L) {
     LV_DEBUG("CALL lv_obj_set_width");
@@ -175,3117 +191,3010 @@ int luat_lv_obj_set_height(lua_State *L) {
     return 0;
 }
 
-//  void lv_obj_set_width_fit(lv_obj_t* obj, lv_coord_t w)
-int luat_lv_obj_set_width_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_width_fit");
+//  void lv_obj_set_content_width(lv_obj_t* obj, lv_coord_t w)
+int luat_lv_obj_set_content_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_content_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_obj_set_width_fit(obj ,w);
+    lv_obj_set_content_width(obj ,w);
     return 0;
 }
 
-//  void lv_obj_set_height_fit(lv_obj_t* obj, lv_coord_t h)
-int luat_lv_obj_set_height_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_height_fit");
+//  void lv_obj_set_content_height(lv_obj_t* obj, lv_coord_t h)
+int luat_lv_obj_set_content_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_content_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_obj_set_height_fit(obj ,h);
+    lv_obj_set_content_height(obj ,h);
     return 0;
 }
 
-//  void lv_obj_set_width_margin(lv_obj_t* obj, lv_coord_t w)
-int luat_lv_obj_set_width_margin(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_width_margin");
+//  void lv_obj_set_layout(lv_obj_t* obj, uint32_t layout)
+int luat_lv_obj_set_layout(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_layout");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_obj_set_width_margin(obj ,w);
+    uint32_t layout = (uint32_t)luaL_checkinteger(L, 2);
+    lv_obj_set_layout(obj ,layout);
     return 0;
 }
 
-//  void lv_obj_set_height_margin(lv_obj_t* obj, lv_coord_t h)
-int luat_lv_obj_set_height_margin(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_height_margin");
+//  bool lv_obj_is_layout_positioned(lv_obj_t* obj)
+int luat_lv_obj_is_layout_positioned(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_is_layout_positioned");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_obj_set_height_margin(obj ,h);
+    bool ret;
+    ret = lv_obj_is_layout_positioned(obj);
+    lua_pushboolean(L, ret);
+    return 1;
+}
+
+//  void lv_obj_mark_layout_as_dirty(lv_obj_t* obj)
+int luat_lv_obj_mark_layout_as_dirty(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_mark_layout_as_dirty");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_mark_layout_as_dirty(obj);
     return 0;
 }
 
-//  void lv_obj_align(lv_obj_t* obj, lv_obj_t* base, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs)
-int luat_lv_obj_align(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_align");
+//  void lv_obj_update_layout(lv_obj_t* obj)
+int luat_lv_obj_update_layout(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_update_layout");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
-    lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_coord_t y_ofs = (lv_coord_t)luaL_checkinteger(L, 5);
-    lv_obj_align(obj ,base ,align ,x_ofs ,y_ofs);
+    lv_obj_update_layout(obj);
     return 0;
 }
 
-//  void lv_obj_align_x(lv_obj_t* obj, lv_obj_t* base, lv_align_t align, lv_coord_t x_ofs)
-int luat_lv_obj_align_x(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_align_x");
+//  void lv_obj_set_align(lv_obj_t* obj, lv_align_t align)
+int luat_lv_obj_set_align(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_align");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
-    lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_obj_align_x(obj ,base ,align ,x_ofs);
+    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 2);
+    lv_obj_set_align(obj ,align);
     return 0;
 }
 
-//  void lv_obj_align_y(lv_obj_t* obj, lv_obj_t* base, lv_align_t align, lv_coord_t y_ofs)
-int luat_lv_obj_align_y(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_align_y");
+//  void lv_obj_align(lv_obj_t* obj, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs)
+int luat_lv_obj_align(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_align");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
+    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 2);
+    lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 3);
     lv_coord_t y_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_obj_align_y(obj ,base ,align ,y_ofs);
+    lv_obj_align(obj ,align ,x_ofs ,y_ofs);
     return 0;
 }
 
-//  void lv_obj_align_mid(lv_obj_t* obj, lv_obj_t* base, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs)
-int luat_lv_obj_align_mid(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_align_mid");
+//  void lv_obj_align_to(lv_obj_t* obj, lv_obj_t* base, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs)
+int luat_lv_obj_align_to(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_align_to");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
     lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
     lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
     lv_coord_t y_ofs = (lv_coord_t)luaL_checkinteger(L, 5);
-    lv_obj_align_mid(obj ,base ,align ,x_ofs ,y_ofs);
+    lv_obj_align_to(obj ,base ,align ,x_ofs ,y_ofs);
     return 0;
 }
 
-//  void lv_obj_align_mid_x(lv_obj_t* obj, lv_obj_t* base, lv_align_t align, lv_coord_t x_ofs)
-int luat_lv_obj_align_mid_x(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_align_mid_x");
+//  void lv_obj_center(lv_obj_t* obj)
+int luat_lv_obj_center(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_center");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
-    lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_obj_align_mid_x(obj ,base ,align ,x_ofs);
+    lv_obj_center(obj);
     return 0;
 }
 
-//  void lv_obj_align_mid_y(lv_obj_t* obj, lv_obj_t* base, lv_align_t align, lv_coord_t y_ofs)
-int luat_lv_obj_align_mid_y(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_align_mid_y");
+//  void lv_obj_get_coords(lv_obj_t* obj, lv_area_t* coords)
+int luat_lv_obj_get_coords(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_coords");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
-    lv_coord_t y_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_obj_align_mid_y(obj ,base ,align ,y_ofs);
+    lua_pushvalue(L, 2);
+    lv_area_t coords = {0};
+    lua_geti(L, -1, 1); coords.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); coords.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); coords.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); coords.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_obj_get_coords(obj ,&coords);
     return 0;
 }
 
-//  void lv_obj_realign(lv_obj_t* obj)
-int luat_lv_obj_realign(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_realign");
+//  lv_coord_t lv_obj_get_x(lv_obj_t* obj)
+int luat_lv_obj_get_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_realign(obj);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_x(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_set_auto_realign(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_auto_realign(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_auto_realign");
+//  lv_coord_t lv_obj_get_x2(lv_obj_t* obj)
+int luat_lv_obj_get_x2(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_x2");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_auto_realign(obj ,en);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_x2(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_set_ext_click_area(lv_obj_t* obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom)
-int luat_lv_obj_set_ext_click_area(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_ext_click_area");
+//  lv_coord_t lv_obj_get_y(lv_obj_t* obj)
+int luat_lv_obj_get_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t left = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t right = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_coord_t top = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_coord_t bottom = (lv_coord_t)luaL_checkinteger(L, 5);
-    lv_obj_set_ext_click_area(obj ,left ,right ,top ,bottom);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_y(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_add_style(lv_obj_t* obj, uint8_t part, lv_style_t* style)
-int luat_lv_obj_add_style(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_add_style");
+//  lv_coord_t lv_obj_get_y2(lv_obj_t* obj)
+int luat_lv_obj_get_y2(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_y2");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 3);
-    lv_obj_add_style(obj ,part ,style);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_y2(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_remove_style(lv_obj_t* obj, uint8_t part, lv_style_t* style)
-int luat_lv_obj_remove_style(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_remove_style");
+//  lv_coord_t lv_obj_get_width(lv_obj_t* obj)
+int luat_lv_obj_get_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 3);
-    lv_obj_remove_style(obj ,part ,style);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_width(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_clean_style_list(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_clean_style_list(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_clean_style_list");
+//  lv_coord_t lv_obj_get_height(lv_obj_t* obj)
+int luat_lv_obj_get_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_obj_clean_style_list(obj ,part);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_height(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_reset_style_list(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_reset_style_list(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_reset_style_list");
+//  lv_coord_t lv_obj_get_content_width(lv_obj_t* obj)
+int luat_lv_obj_get_content_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_content_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_obj_reset_style_list(obj ,part);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_content_width(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_refresh_style(lv_obj_t* obj, uint8_t part, lv_style_property_t prop)
-int luat_lv_obj_refresh_style(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_refresh_style");
+//  lv_coord_t lv_obj_get_content_height(lv_obj_t* obj)
+int luat_lv_obj_get_content_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_content_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_property_t prop = (lv_style_property_t)luaL_checkinteger(L, 3);
-    lv_obj_refresh_style(obj ,part ,prop);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_content_height(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_report_style_mod(lv_style_t* style)
-int luat_lv_obj_report_style_mod(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_report_style_mod");
-    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
-    lv_obj_report_style_mod(style);
+//  void lv_obj_get_content_coords(lv_obj_t* obj, lv_area_t* area)
+int luat_lv_obj_get_content_coords(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_content_coords");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lua_pushvalue(L, 2);
+    lv_area_t area = {0};
+    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_obj_get_content_coords(obj ,&area);
     return 0;
 }
 
-//  bool lv_obj_remove_style_local_prop(lv_obj_t* obj, uint8_t part, lv_style_property_t prop)
-int luat_lv_obj_remove_style_local_prop(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_remove_style_local_prop");
+//  lv_coord_t lv_obj_get_self_width(lv_obj_t* obj)
+int luat_lv_obj_get_self_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_self_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_property_t prop = (lv_style_property_t)luaL_checkinteger(L, 3);
-    bool ret;
-    ret = lv_obj_remove_style_local_prop(obj ,part ,prop);
-    lua_pushboolean(L, ret);
+    lv_coord_t ret;
+    ret = lv_obj_get_self_width(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_hidden(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_hidden(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_hidden");
+//  lv_coord_t lv_obj_get_self_height(lv_obj_t* obj)
+int luat_lv_obj_get_self_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_self_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_hidden(obj ,en);
-    return 0;
+    lv_coord_t ret;
+    ret = lv_obj_get_self_height(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void lv_obj_set_adv_hittest(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_adv_hittest(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_adv_hittest");
+//  bool lv_obj_refresh_self_size(lv_obj_t* obj)
+int luat_lv_obj_refresh_self_size(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_refresh_self_size");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_adv_hittest(obj ,en);
-    return 0;
+    bool ret;
+    ret = lv_obj_refresh_self_size(obj);
+    lua_pushboolean(L, ret);
+    return 1;
 }
 
-//  void lv_obj_set_click(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_click(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_click");
+//  void lv_obj_refr_pos(lv_obj_t* obj)
+int luat_lv_obj_refr_pos(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_refr_pos");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_click(obj ,en);
+    lv_obj_refr_pos(obj);
     return 0;
 }
 
-//  void lv_obj_set_top(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_top(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_top");
+//  void lv_obj_move_to(lv_obj_t* obj, lv_coord_t x, lv_coord_t y)
+int luat_lv_obj_move_to(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_move_to");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_top(obj ,en);
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_obj_move_to(obj ,x ,y);
     return 0;
 }
 
-//  void lv_obj_set_drag(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_drag(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_drag");
+//  void lv_obj_move_children_by(lv_obj_t* obj, lv_coord_t x_diff, lv_coord_t y_diff, bool ignore_floating)
+int luat_lv_obj_move_children_by(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_move_children_by");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_drag(obj ,en);
+    lv_coord_t x_diff = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y_diff = (lv_coord_t)luaL_checkinteger(L, 3);
+    bool ignore_floating = (bool)lua_toboolean(L, 4);
+    lv_obj_move_children_by(obj ,x_diff ,y_diff ,ignore_floating);
     return 0;
 }
 
-//  void lv_obj_set_drag_dir(lv_obj_t* obj, lv_drag_dir_t drag_dir)
-int luat_lv_obj_set_drag_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_drag_dir");
+//  void lv_obj_invalidate_area(lv_obj_t* obj, lv_area_t* area)
+int luat_lv_obj_invalidate_area(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_invalidate_area");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_drag_dir_t drag_dir = (lv_drag_dir_t)luaL_checkinteger(L, 2);
-    lv_obj_set_drag_dir(obj ,drag_dir);
+    lua_pushvalue(L, 2);
+    lv_area_t area = {0};
+    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_obj_invalidate_area(obj ,&area);
     return 0;
 }
 
-//  void lv_obj_set_drag_throw(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_drag_throw(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_drag_throw");
+//  void lv_obj_invalidate(lv_obj_t* obj)
+int luat_lv_obj_invalidate(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_invalidate");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_drag_throw(obj ,en);
+    lv_obj_invalidate(obj);
     return 0;
 }
 
-//  void lv_obj_set_drag_parent(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_drag_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_drag_parent");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_drag_parent(obj ,en);
-    return 0;
-}
-
-//  void lv_obj_set_focus_parent(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_focus_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_focus_parent");
+//  bool lv_obj_area_is_visible(lv_obj_t* obj, lv_area_t* area)
+int luat_lv_obj_area_is_visible(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_area_is_visible");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_focus_parent(obj ,en);
-    return 0;
+    lua_pushvalue(L, 2);
+    lv_area_t area = {0};
+    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    bool ret;
+    ret = lv_obj_area_is_visible(obj ,&area);
+    lua_pushboolean(L, ret);
+    return 1;
 }
 
-//  void lv_obj_set_gesture_parent(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_gesture_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_gesture_parent");
+//  bool lv_obj_is_visible(lv_obj_t* obj)
+int luat_lv_obj_is_visible(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_is_visible");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_gesture_parent(obj ,en);
-    return 0;
+    bool ret;
+    ret = lv_obj_is_visible(obj);
+    lua_pushboolean(L, ret);
+    return 1;
 }
 
-//  void lv_obj_set_parent_event(lv_obj_t* obj, bool en)
-int luat_lv_obj_set_parent_event(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_parent_event");
+//  void lv_obj_set_ext_click_area(lv_obj_t* obj, lv_coord_t size)
+int luat_lv_obj_set_ext_click_area(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_ext_click_area");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_obj_set_parent_event(obj ,en);
+    lv_coord_t size = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_obj_set_ext_click_area(obj ,size);
     return 0;
 }
 
-//  void lv_obj_set_base_dir(lv_obj_t* obj, lv_bidi_dir_t dir)
-int luat_lv_obj_set_base_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_base_dir");
+//  void lv_obj_get_click_area(lv_obj_t* obj, lv_area_t* area)
+int luat_lv_obj_get_click_area(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_click_area");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_bidi_dir_t dir = (lv_bidi_dir_t)luaL_checkinteger(L, 2);
-    lv_obj_set_base_dir(obj ,dir);
+    lua_pushvalue(L, 2);
+    lv_area_t area = {0};
+    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_obj_get_click_area(obj ,&area);
     return 0;
 }
 
-//  void lv_obj_add_protect(lv_obj_t* obj, uint8_t prot)
-int luat_lv_obj_add_protect(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_add_protect");
+//  bool lv_obj_hit_test(lv_obj_t* obj, lv_point_t* point)
+int luat_lv_obj_hit_test(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_hit_test");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t prot = (uint8_t)luaL_checkinteger(L, 2);
-    lv_obj_add_protect(obj ,prot);
-    return 0;
+    lua_pushvalue(L, 2);
+    lv_point_t point = {0};
+    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    bool ret;
+    ret = lv_obj_hit_test(obj ,&point);
+    lua_pushboolean(L, ret);
+    return 1;
 }
 
-//  void lv_obj_clear_protect(lv_obj_t* obj, uint8_t prot)
-int luat_lv_obj_clear_protect(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_clear_protect");
+//  void lv_obj_set_scrollbar_mode(lv_obj_t* obj, lv_scrollbar_mode_t mode)
+int luat_lv_obj_set_scrollbar_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_scrollbar_mode");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t prot = (uint8_t)luaL_checkinteger(L, 2);
-    lv_obj_clear_protect(obj ,prot);
+    lv_scrollbar_mode_t mode = (lv_scrollbar_mode_t)luaL_checkinteger(L, 2);
+    lv_obj_set_scrollbar_mode(obj ,mode);
     return 0;
 }
 
-//  void lv_obj_set_state(lv_obj_t* obj, lv_state_t state)
-int luat_lv_obj_set_state(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_state");
+//  void lv_obj_set_scroll_dir(lv_obj_t* obj, lv_dir_t dir)
+int luat_lv_obj_set_scroll_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_scroll_dir");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 2);
-    lv_obj_set_state(obj ,state);
+    lv_dir_t dir = (lv_dir_t)luaL_checkinteger(L, 2);
+    lv_obj_set_scroll_dir(obj ,dir);
     return 0;
 }
 
-//  void lv_obj_add_state(lv_obj_t* obj, lv_state_t state)
-int luat_lv_obj_add_state(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_add_state");
+//  void lv_obj_set_scroll_snap_x(lv_obj_t* obj, lv_scroll_snap_t align)
+int luat_lv_obj_set_scroll_snap_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_scroll_snap_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 2);
-    lv_obj_add_state(obj ,state);
+    lv_scroll_snap_t align = (lv_scroll_snap_t)luaL_checkinteger(L, 2);
+    lv_obj_set_scroll_snap_x(obj ,align);
     return 0;
 }
 
-//  void lv_obj_clear_state(lv_obj_t* obj, lv_state_t state)
-int luat_lv_obj_clear_state(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_clear_state");
+//  void lv_obj_set_scroll_snap_y(lv_obj_t* obj, lv_scroll_snap_t align)
+int luat_lv_obj_set_scroll_snap_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_scroll_snap_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 2);
-    lv_obj_clear_state(obj ,state);
+    lv_scroll_snap_t align = (lv_scroll_snap_t)luaL_checkinteger(L, 2);
+    lv_obj_set_scroll_snap_y(obj ,align);
     return 0;
 }
 
-//  void lv_obj_finish_transitions(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_finish_transitions(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_finish_transitions");
+//  lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(lv_obj_t* obj)
+int luat_lv_obj_get_scrollbar_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scrollbar_mode");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_obj_finish_transitions(obj ,part);
-    return 0;
+    lv_scrollbar_mode_t ret;
+    ret = lv_obj_get_scrollbar_mode(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void* lv_obj_allocate_ext_attr(lv_obj_t* obj, uint16_t ext_size)
-int luat_lv_obj_allocate_ext_attr(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_allocate_ext_attr");
+//  lv_dir_t lv_obj_get_scroll_dir(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_dir");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ext_size = (uint16_t)luaL_checkinteger(L, 2);
-    void* ret = NULL;
-    ret = lv_obj_allocate_ext_attr(obj ,ext_size);
-    lua_pushlightuserdata(L, ret);
+    lv_dir_t ret;
+    ret = lv_obj_get_scroll_dir(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_refresh_ext_draw_pad(lv_obj_t* obj)
-int luat_lv_obj_refresh_ext_draw_pad(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_refresh_ext_draw_pad");
+//  lv_scroll_snap_t lv_obj_get_scroll_snap_x(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_snap_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_snap_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_refresh_ext_draw_pad(obj);
-    return 0;
+    lv_scroll_snap_t ret;
+    ret = lv_obj_get_scroll_snap_x(obj);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_obj_t* lv_obj_get_screen(lv_obj_t* obj)
-int luat_lv_obj_get_screen(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_screen");
+//  lv_scroll_snap_t lv_obj_get_scroll_snap_y(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_snap_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_snap_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_obj_get_screen(obj);
-    lua_pushlightuserdata(L, ret);
+    lv_scroll_snap_t ret;
+    ret = lv_obj_get_scroll_snap_y(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_disp_t* lv_obj_get_disp(lv_obj_t* obj)
-int luat_lv_obj_get_disp(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_disp");
+//  lv_coord_t lv_obj_get_scroll_x(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_disp_t* ret = NULL;
-    ret = lv_obj_get_disp(obj);
-    lua_pushlightuserdata(L, ret);
+    lv_coord_t ret;
+    ret = lv_obj_get_scroll_x(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_obj_t* lv_obj_get_parent(lv_obj_t* obj)
-int luat_lv_obj_get_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_parent");
+//  lv_coord_t lv_obj_get_scroll_y(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_obj_get_parent(obj);
-    lua_pushlightuserdata(L, ret);
+    lv_coord_t ret;
+    ret = lv_obj_get_scroll_y(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_obj_t* lv_obj_get_child(lv_obj_t* obj, lv_obj_t* child)
-int luat_lv_obj_get_child(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_child");
+//  lv_coord_t lv_obj_get_scroll_top(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_top(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_top");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* child = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_obj_get_child(obj ,child);
-    lua_pushlightuserdata(L, ret);
+    lv_coord_t ret;
+    ret = lv_obj_get_scroll_top(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_obj_t* lv_obj_get_child_back(lv_obj_t* obj, lv_obj_t* child)
-int luat_lv_obj_get_child_back(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_child_back");
+//  lv_coord_t lv_obj_get_scroll_bottom(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_bottom(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_bottom");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* child = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_obj_get_child_back(obj ,child);
-    lua_pushlightuserdata(L, ret);
+    lv_coord_t ret;
+    ret = lv_obj_get_scroll_bottom(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_obj_count_children(lv_obj_t* obj)
-int luat_lv_obj_count_children(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_count_children");
+//  lv_coord_t lv_obj_get_scroll_left(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_left(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_left");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_obj_count_children(obj);
+    lv_coord_t ret;
+    ret = lv_obj_get_scroll_left(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_obj_count_children_recursive(lv_obj_t* obj)
-int luat_lv_obj_count_children_recursive(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_count_children_recursive");
+//  lv_coord_t lv_obj_get_scroll_right(lv_obj_t* obj)
+int luat_lv_obj_get_scroll_right(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_right");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_obj_count_children_recursive(obj);
+    lv_coord_t ret;
+    ret = lv_obj_get_scroll_right(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_get_coords(lv_obj_t* obj, lv_area_t* cords_p)
-int luat_lv_obj_get_coords(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_coords");
+//  void lv_obj_get_scroll_end(lv_obj_t* obj, lv_point_t* end)
+int luat_lv_obj_get_scroll_end(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scroll_end");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lua_pushvalue(L, 2);
-    lv_area_t cords_p = {0};
-    lua_geti(L, -1, 1); cords_p.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); cords_p.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 3); cords_p.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 4); cords_p.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lv_point_t end = {0};
+    lua_geti(L, -1, 1); end.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); end.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
     lua_pop(L, 1);
 
-    lv_obj_get_coords(obj ,&cords_p);
+    lv_obj_get_scroll_end(obj ,&end);
     return 0;
 }
 
-//  void lv_obj_get_inner_coords(lv_obj_t* obj, lv_area_t* coords_p)
-int luat_lv_obj_get_inner_coords(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_inner_coords");
+//  void lv_obj_scroll_by(lv_obj_t* obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_by(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_by");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_area_t coords_p = {0};
-    lua_geti(L, -1, 1); coords_p.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); coords_p.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 3); coords_p.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 4); coords_p.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 4);
+    lv_obj_scroll_by(obj ,x ,y ,anim_en);
+    return 0;
+}
 
-    lv_obj_get_inner_coords(obj ,&coords_p);
+//  void lv_obj_scroll_to(lv_obj_t* obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 4);
+    lv_obj_scroll_to(obj ,x ,y ,anim_en);
     return 0;
 }
 
-//  lv_coord_t lv_obj_get_x(lv_obj_t* obj)
-int luat_lv_obj_get_x(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_x");
+//  void lv_obj_scroll_to_x(lv_obj_t* obj, lv_coord_t x, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_x(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 3);
+    lv_obj_scroll_to_x(obj ,x ,anim_en);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_y(lv_obj_t* obj)
-int luat_lv_obj_get_y(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_y");
+//  void lv_obj_scroll_to_y(lv_obj_t* obj, lv_coord_t y, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_y(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 3);
+    lv_obj_scroll_to_y(obj ,y ,anim_en);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_width(lv_obj_t* obj)
-int luat_lv_obj_get_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_width");
+//  void lv_obj_scroll_to_view(lv_obj_t* obj, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_view(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_view");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_width(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 2);
+    lv_obj_scroll_to_view(obj ,anim_en);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_height(lv_obj_t* obj)
-int luat_lv_obj_get_height(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_height");
+//  void lv_obj_scroll_to_view_recursive(lv_obj_t* obj, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_view_recursive(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_view_recursive");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_height(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 2);
+    lv_obj_scroll_to_view_recursive(obj ,anim_en);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_width_fit(lv_obj_t* obj)
-int luat_lv_obj_get_width_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_width_fit");
+//  bool lv_obj_is_scrolling(lv_obj_t* obj)
+int luat_lv_obj_is_scrolling(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_is_scrolling");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_width_fit(obj);
-    lua_pushinteger(L, ret);
+    bool ret;
+    ret = lv_obj_is_scrolling(obj);
+    lua_pushboolean(L, ret);
     return 1;
 }
 
-//  lv_coord_t lv_obj_get_height_fit(lv_obj_t* obj)
-int luat_lv_obj_get_height_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_height_fit");
+//  void lv_obj_update_snap(lv_obj_t* obj, lv_anim_enable_t anim_en)
+int luat_lv_obj_update_snap(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_update_snap");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_height_fit(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 2);
+    lv_obj_update_snap(obj ,anim_en);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_height_margin(lv_obj_t* obj)
-int luat_lv_obj_get_height_margin(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_height_margin");
+//  void lv_obj_get_scrollbar_area(lv_obj_t* obj, lv_area_t* hor, lv_area_t* ver)
+int luat_lv_obj_get_scrollbar_area(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_scrollbar_area");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_height_margin(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lua_pushvalue(L, 2);
+    lv_area_t hor = {0};
+    lua_geti(L, -1, 1); hor.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); hor.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); hor.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); hor.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lua_pushvalue(L, 3);
+    lv_area_t ver = {0};
+    lua_geti(L, -1, 1); ver.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); ver.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); ver.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); ver.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_obj_get_scrollbar_area(obj ,&hor ,&ver);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_width_margin(lv_obj_t* obj)
-int luat_lv_obj_get_width_margin(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_width_margin");
+//  void lv_obj_scrollbar_invalidate(lv_obj_t* obj)
+int luat_lv_obj_scrollbar_invalidate(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scrollbar_invalidate");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_width_margin(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_obj_scrollbar_invalidate(obj);
+    return 0;
+}
+
+//  void lv_obj_add_style(lv_obj_t* obj, lv_style_t* style, lv_style_selector_t selector)
+int luat_lv_obj_add_style(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_add_style");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_add_style(obj ,style ,selector);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_width_grid(lv_obj_t* obj, uint8_t div, uint8_t span)
-int luat_lv_obj_get_width_grid(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_width_grid");
+//  void lv_obj_remove_style(lv_obj_t* obj, lv_style_t* style, lv_style_selector_t selector)
+int luat_lv_obj_remove_style(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_remove_style");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t div = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t span = (uint8_t)luaL_checkinteger(L, 3);
-    lv_coord_t ret;
-    ret = lv_obj_get_width_grid(obj ,div ,span);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_remove_style(obj ,style ,selector);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_height_grid(lv_obj_t* obj, uint8_t div, uint8_t span)
-int luat_lv_obj_get_height_grid(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_height_grid");
+//  void lv_obj_remove_style_all(lv_obj_t* obj)
+int luat_lv_obj_remove_style_all(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_remove_style_all");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t div = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t span = (uint8_t)luaL_checkinteger(L, 3);
-    lv_coord_t ret;
-    ret = lv_obj_get_height_grid(obj ,div ,span);
+    lv_obj_remove_style_all(obj);
+    return 0;
+}
+
+//  void lv_obj_report_style_change(lv_style_t* style)
+int luat_lv_obj_report_style_change(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_report_style_change");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_obj_report_style_change(style);
+    return 0;
+}
+
+//  void lv_obj_refresh_style(lv_obj_t* obj, lv_part_t part, lv_style_prop_t prop)
+int luat_lv_obj_refresh_style(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_refresh_style");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_part_t part = (lv_part_t)luaL_checkinteger(L, 2);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 3);
+    lv_obj_refresh_style(obj ,part ,prop);
+    return 0;
+}
+
+//  void lv_obj_enable_style_refresh(bool en)
+int luat_lv_obj_enable_style_refresh(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_enable_style_refresh");
+    bool en = (bool)lua_toboolean(L, 1);
+    lv_obj_enable_style_refresh(en);
+    return 0;
+}
+
+//  lv_style_value_t lv_obj_get_style_prop(lv_obj_t* obj, lv_part_t part, lv_style_prop_t prop)
+int luat_lv_obj_get_style_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_prop");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_part_t part = (lv_part_t)luaL_checkinteger(L, 2);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 3);
+    lv_style_value_t ret;
+    ret = lv_obj_get_style_prop(obj ,part ,prop);
+    return 0;
+}
+
+//  void lv_obj_set_local_style_prop(lv_obj_t* obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_local_style_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_local_style_prop");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 2);
+    lv_style_value_t value;
+    // miss arg convert
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 4);
+    lv_obj_set_local_style_prop(obj ,prop ,value ,selector);
+    return 0;
+}
+
+//  lv_res_t lv_obj_get_local_style_prop(lv_obj_t* obj, lv_style_prop_t prop, lv_style_value_t* value, lv_style_selector_t selector)
+int luat_lv_obj_get_local_style_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_local_style_prop");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 2);
+    lv_style_value_t* value = (lv_style_value_t*)lua_touserdata(L, 3);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 4);
+    lv_res_t ret;
+    ret = lv_obj_get_local_style_prop(obj ,prop ,value ,selector);
+    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
     lua_pushinteger(L, ret);
-    return 1;
+    return 2;
 }
 
-//  bool lv_obj_get_auto_realign(lv_obj_t* obj)
-int luat_lv_obj_get_auto_realign(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_auto_realign");
+//  bool lv_obj_remove_local_style_prop(lv_obj_t* obj, lv_style_prop_t prop, lv_style_selector_t selector)
+int luat_lv_obj_remove_local_style_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_remove_local_style_prop");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
     bool ret;
-    ret = lv_obj_get_auto_realign(obj);
+    ret = lv_obj_remove_local_style_prop(obj ,prop ,selector);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  lv_coord_t lv_obj_get_ext_click_pad_left(lv_obj_t* obj)
-int luat_lv_obj_get_ext_click_pad_left(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_ext_click_pad_left");
+//  void lv_obj_fade_in(lv_obj_t* obj, uint32_t time, uint32_t delay)
+int luat_lv_obj_fade_in(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_fade_in");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_ext_click_pad_left(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    uint32_t time = (uint32_t)luaL_checkinteger(L, 2);
+    uint32_t delay = (uint32_t)luaL_checkinteger(L, 3);
+    lv_obj_fade_in(obj ,time ,delay);
+    return 0;
 }
 
-//  lv_coord_t lv_obj_get_ext_click_pad_right(lv_obj_t* obj)
-int luat_lv_obj_get_ext_click_pad_right(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_ext_click_pad_right");
+//  void lv_obj_fade_out(lv_obj_t* obj, uint32_t time, uint32_t delay)
+int luat_lv_obj_fade_out(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_fade_out");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_ext_click_pad_right(obj);
+    uint32_t time = (uint32_t)luaL_checkinteger(L, 2);
+    uint32_t delay = (uint32_t)luaL_checkinteger(L, 3);
+    lv_obj_fade_out(obj ,time ,delay);
+    return 0;
+}
+
+//  lv_state_t lv_obj_style_get_selector_state(lv_style_selector_t selector)
+int luat_lv_obj_style_get_selector_state(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_style_get_selector_state");
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 1);
+    lv_state_t ret;
+    ret = lv_obj_style_get_selector_state(selector);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_coord_t lv_obj_get_ext_click_pad_top(lv_obj_t* obj)
-int luat_lv_obj_get_ext_click_pad_top(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_ext_click_pad_top");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_obj_get_ext_click_pad_top(obj);
+//  lv_part_t lv_obj_style_get_selector_part(lv_style_selector_t selector)
+int luat_lv_obj_style_get_selector_part(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_style_get_selector_part");
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 1);
+    lv_part_t ret;
+    ret = lv_obj_style_get_selector_part(selector);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_coord_t lv_obj_get_ext_click_pad_bottom(lv_obj_t* obj)
-int luat_lv_obj_get_ext_click_pad_bottom(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_ext_click_pad_bottom");
+//  lv_coord_t lv_obj_get_style_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_coord_t ret;
-    ret = lv_obj_get_ext_click_pad_bottom(obj);
+    ret = lv_obj_get_style_width(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_coord_t lv_obj_get_ext_draw_pad(lv_obj_t* obj)
-int luat_lv_obj_get_ext_draw_pad(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_ext_draw_pad");
+//  lv_coord_t lv_obj_get_style_min_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_min_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_min_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_coord_t ret;
-    ret = lv_obj_get_ext_draw_pad(obj);
+    ret = lv_obj_get_style_min_width(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_style_list_t* lv_obj_get_style_list(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_list(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_list");
+//  lv_coord_t lv_obj_get_style_max_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_max_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_max_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_list_t* ret = NULL;
-    ret = lv_obj_get_style_list(obj ,part);
-    lua_pushlightuserdata(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_max_width(obj ,part);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_style_t* lv_obj_get_local_style(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_local_style(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_local_style");
+//  lv_coord_t lv_obj_get_style_height(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_t* ret = NULL;
-    ret = lv_obj_get_local_style(obj ,part);
-    lua_pushlightuserdata(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_height(obj ,part);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_radius(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_radius(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_radius");
+//  lv_coord_t lv_obj_get_style_min_height(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_min_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_min_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_radius(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_min_height(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_radius(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_radius(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_radius");
+//  lv_coord_t lv_obj_get_style_max_height(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_max_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_max_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_radius(obj ,part ,state ,value);
-    return 0;
-}
-
-//  bool lv_obj_get_style_clip_corner(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_clip_corner(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_clip_corner");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_obj_get_style_clip_corner(obj ,part);
-    lua_pushboolean(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_max_height(obj ,part);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_clip_corner(lv_obj_t* obj, uint8_t part, lv_state_t state, bool value)
-int luat_lv_obj_set_style_local_clip_corner(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_clip_corner");
+//  lv_coord_t lv_obj_get_style_x(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    bool value = (bool)lua_toboolean(L, 4);
-    lv_obj_set_style_local_clip_corner(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_x(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_size(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_size(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_size");
+//  lv_coord_t lv_obj_get_style_y(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_size(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_y(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_size(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_size(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_size");
+//  lv_align_t lv_obj_get_style_align(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_align(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_align");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_size(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_align_t ret;
+    ret = lv_obj_get_style_align(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_transform_width(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_transform_width(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_transform_width(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_transform_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_transform_width(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_obj_set_style_local_transform_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transform_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transform_width");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transform_width(obj ,part ,state ,value);
-    return 0;
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_transform_height(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_transform_height(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_transform_height(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_transform_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_transform_height(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_transform_height(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transform_height(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transform_height");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transform_height(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_transform_angle(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transform_angle(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transform_angle");
+//  lv_coord_t lv_obj_get_style_translate_x(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_translate_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_translate_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transform_angle(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_translate_x(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_transform_angle(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transform_angle(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transform_angle");
+//  lv_coord_t lv_obj_get_style_translate_y(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_translate_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_translate_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transform_angle(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_translate_y(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_transform_zoom(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_transform_zoom(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_transform_zoom(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_transform_zoom");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_transform_zoom(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_transform_zoom(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transform_zoom(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transform_zoom");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transform_zoom(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_opa_t lv_obj_get_style_opa_scale(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_opa_scale(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_opa_scale");
+//  lv_coord_t lv_obj_get_style_transform_angle(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_transform_angle(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_transform_angle");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_opa_scale(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_transform_angle(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_opa_scale(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_opa_scale(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_opa_scale");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_opa_scale(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_pad_top(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_pad_top(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_pad_top(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_pad_top");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_pad_top(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pad_top(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_top(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_top");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_top(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_pad_bottom(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_pad_bottom(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_pad_bottom(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_pad_bottom");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_pad_bottom(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pad_bottom(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_bottom(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_bottom");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_bottom(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_pad_left(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_pad_left(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_pad_left(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_pad_left");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_pad_left(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pad_left(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_left(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_left");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_left(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_pad_right(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_pad_right(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_pad_right(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_pad_right");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_pad_right(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pad_right(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_right(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_right");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_right(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_pad_inner(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_pad_inner(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_pad_inner");
+//  lv_coord_t lv_obj_get_style_pad_row(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_pad_row(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_pad_row");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_pad_inner(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_pad_row(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pad_inner(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_inner(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_inner");
+//  lv_coord_t lv_obj_get_style_pad_column(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_pad_column(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_pad_column");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_inner(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_pad_column(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_margin_top(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_margin_top(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_margin_top");
+//  lv_coord_t lv_obj_get_style_radius(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_radius(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_radius");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_margin_top(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_radius(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_margin_top(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_margin_top(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_margin_top");
+//  bool lv_obj_get_style_clip_corner(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_clip_corner(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_clip_corner");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_margin_top(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    bool ret;
+    ret = lv_obj_get_style_clip_corner(obj ,part);
+    lua_pushboolean(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_margin_bottom(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_margin_bottom(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_margin_bottom");
+//  lv_opa_t lv_obj_get_style_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_margin_bottom(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_margin_bottom(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_margin_bottom(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_margin_bottom");
+//  lv_color_filter_dsc_t* lv_obj_get_style_color_filter_dsc(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_color_filter_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_color_filter_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_margin_bottom(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_filter_dsc_t* ret = NULL;
+    ret = lv_obj_get_style_color_filter_dsc(obj ,part);
+    lua_pushlightuserdata(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_margin_left(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_margin_left(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_margin_left");
+//  lv_opa_t lv_obj_get_style_color_filter_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_color_filter_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_color_filter_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_margin_left(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_color_filter_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_margin_left(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_margin_left(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_margin_left");
+//  uint32_t lv_obj_get_style_anim_time(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_anim_time(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_anim_time");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_margin_left(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    uint32_t ret;
+    ret = lv_obj_get_style_anim_time(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_margin_right(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_margin_right(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_margin_right");
+//  uint32_t lv_obj_get_style_anim_speed(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_anim_speed(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_anim_speed");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_margin_right(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    uint32_t ret;
+    ret = lv_obj_get_style_anim_speed(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_margin_right(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_margin_right(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_margin_right");
+//  lv_style_transition_dsc_t* lv_obj_get_style_transition(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_transition(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_transition");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_margin_right(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_style_transition_dsc_t* ret = NULL;
+    ret = lv_obj_get_style_transition(obj ,part);
+    lua_pushlightuserdata(L, ret);
+    return 1;
 }
 
-//  lv_blend_mode_t lv_obj_get_style_bg_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_bg_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_bg_blend_mode");
+//  lv_blend_mode_t lv_obj_get_style_blend_mode(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_blend_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_blend_mode");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_blend_mode_t ret;
-    ret = lv_obj_get_style_bg_blend_mode(obj ,part);
+    ret = lv_obj_get_style_blend_mode(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_bg_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_bg_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_bg_blend_mode");
+//  uint16_t lv_obj_get_style_layout(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_layout(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_layout");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_bg_blend_mode(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    uint16_t ret;
+    ret = lv_obj_get_style_layout(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_bg_main_stop(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_bg_main_stop(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_bg_main_stop");
+//  lv_base_dir_t lv_obj_get_style_base_dir(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_base_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_base_dir");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_bg_main_stop(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_base_dir_t ret;
+    ret = lv_obj_get_style_base_dir(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_bg_main_stop(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_bg_main_stop(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_bg_main_stop");
+//  lv_color_t lv_obj_get_style_bg_color(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_bg_main_stop(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_bg_color(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_bg_grad_stop(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_bg_grad_stop(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_bg_grad_stop");
+//  lv_color_t lv_obj_get_style_bg_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_bg_grad_stop(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_bg_color_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+
+//  lv_opa_t lv_obj_get_style_bg_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_opa");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_bg_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_bg_grad_stop(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_bg_grad_stop(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_bg_grad_stop");
+//  lv_color_t lv_obj_get_style_bg_grad_color(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_grad_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_grad_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_bg_grad_stop(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_bg_grad_color(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+
+//  lv_color_t lv_obj_get_style_bg_grad_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_grad_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_grad_color_filtered");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_bg_grad_color_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_grad_dir_t lv_obj_get_style_bg_grad_dir(lv_obj_t* obj, uint8_t part)
+//  lv_grad_dir_t lv_obj_get_style_bg_grad_dir(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_bg_grad_dir(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_bg_grad_dir");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_grad_dir_t ret;
     ret = lv_obj_get_style_bg_grad_dir(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_bg_grad_dir(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_grad_dir_t value)
-int luat_lv_obj_set_style_local_bg_grad_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_bg_grad_dir");
+//  lv_coord_t lv_obj_get_style_bg_main_stop(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_main_stop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_main_stop");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_grad_dir_t value = (lv_grad_dir_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_bg_grad_dir(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_bg_main_stop(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_color_t lv_obj_get_style_bg_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_bg_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_bg_color");
+//  lv_coord_t lv_obj_get_style_bg_grad_stop(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_grad_stop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_grad_stop");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_bg_color(obj ,part);
-    lua_pushinteger(L, ret.full);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_bg_grad_stop(obj ,part);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_bg_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_bg_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_bg_color");
+//  void* lv_obj_get_style_bg_img_src(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_img_src(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_img_src");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_bg_color(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    void* ret = NULL;
+    ret = lv_obj_get_style_bg_img_src(obj ,part);
+    lua_pushlightuserdata(L, ret);
+    return 1;
 }
 
-//  lv_color_t lv_obj_get_style_bg_grad_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_bg_grad_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_bg_grad_color");
+//  lv_opa_t lv_obj_get_style_bg_img_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_img_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_img_opa");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_bg_img_opa(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
+}
+
+//  lv_color_t lv_obj_get_style_bg_img_recolor(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_img_recolor(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_img_recolor");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_color_t ret;
-    ret = lv_obj_get_style_bg_grad_color(obj ,part);
+    ret = lv_obj_get_style_bg_img_recolor(obj ,part);
     lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_bg_grad_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_bg_grad_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_bg_grad_color");
+//  lv_color_t lv_obj_get_style_bg_img_recolor_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_img_recolor_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_img_recolor_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_bg_grad_color(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_bg_img_recolor_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_opa_t lv_obj_get_style_bg_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_bg_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_bg_opa");
+//  lv_opa_t lv_obj_get_style_bg_img_recolor_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_img_recolor_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_img_recolor_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_opa_t ret;
-    ret = lv_obj_get_style_bg_opa(obj ,part);
+    ret = lv_obj_get_style_bg_img_recolor_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_bg_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_bg_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_bg_opa");
+//  bool lv_obj_get_style_bg_img_tiled(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_bg_img_tiled(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_bg_img_tiled");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_bg_opa(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    bool ret;
+    ret = lv_obj_get_style_bg_img_tiled(obj ,part);
+    lua_pushboolean(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_border_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_border_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_border_width");
+//  lv_color_t lv_obj_get_style_border_color(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_border_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_border_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_border_width(obj ,part);
-    lua_pushinteger(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_border_color(obj ,part);
+    lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_border_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_border_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_border_width");
+//  lv_color_t lv_obj_get_style_border_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_border_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_border_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_border_width(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_border_color_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_border_side_t lv_obj_get_style_border_side(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_border_side(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_border_side");
+//  lv_opa_t lv_obj_get_style_border_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_border_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_border_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_border_side_t ret;
-    ret = lv_obj_get_style_border_side(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_border_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_border_side(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_border_side_t value)
-int luat_lv_obj_set_style_local_border_side(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_border_side");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_border_side_t value = (lv_border_side_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_border_side(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_blend_mode_t lv_obj_get_style_border_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_border_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_border_blend_mode");
+//  lv_coord_t lv_obj_get_style_border_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_border_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_border_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_border_blend_mode(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_border_width(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_border_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_border_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_border_blend_mode");
+//  lv_border_side_t lv_obj_get_style_border_side(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_border_side(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_border_side");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_border_blend_mode(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_border_side_t ret;
+    ret = lv_obj_get_style_border_side(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  bool lv_obj_get_style_border_post(lv_obj_t* obj, uint8_t part)
+//  bool lv_obj_get_style_border_post(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_border_post(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_border_post");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     bool ret;
     ret = lv_obj_get_style_border_post(obj ,part);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_border_post(lv_obj_t* obj, uint8_t part, lv_state_t state, bool value)
-int luat_lv_obj_set_style_local_border_post(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_border_post");
+//  lv_color_t lv_obj_get_style_text_color(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    bool value = (bool)lua_toboolean(L, 4);
-    lv_obj_set_style_local_border_post(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_text_color(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_color_t lv_obj_get_style_border_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_border_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_border_color");
+//  lv_color_t lv_obj_get_style_text_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_color_t ret;
-    ret = lv_obj_get_style_border_color(obj ,part);
+    ret = lv_obj_get_style_text_color_filtered(obj ,part);
     lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_border_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_border_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_border_color");
+//  lv_opa_t lv_obj_get_style_text_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_border_color(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_text_opa(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_opa_t lv_obj_get_style_border_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_border_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_border_opa");
+//  lv_font_t* lv_obj_get_style_text_font(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_font(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_font");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_border_opa(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_font_t* ret = NULL;
+    ret = lv_obj_get_style_text_font(obj ,part);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
+//  lv_coord_t lv_obj_get_style_text_letter_space(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_letter_space(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_letter_space");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_text_letter_space(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_border_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_border_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_border_opa");
+//  lv_coord_t lv_obj_get_style_text_line_space(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_line_space(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_line_space");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_border_opa(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_text_line_space(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_outline_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_outline_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_outline_width");
+//  lv_text_decor_t lv_obj_get_style_text_decor(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_decor(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_decor");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_outline_width(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_text_decor_t ret;
+    ret = lv_obj_get_style_text_decor(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_outline_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_outline_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_outline_width");
+//  lv_text_align_t lv_obj_get_style_text_align(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_text_align(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_text_align");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_outline_width(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_text_align_t ret;
+    ret = lv_obj_get_style_text_align(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_outline_pad(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_outline_pad(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_outline_pad");
+//  lv_opa_t lv_obj_get_style_img_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_img_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_img_opa");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_img_opa(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
+}
+
+//  lv_color_t lv_obj_get_style_img_recolor(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_img_recolor(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_img_recolor");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_outline_pad(obj ,part);
-    lua_pushinteger(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_img_recolor(obj ,part);
+    lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_outline_pad(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_outline_pad(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_outline_pad");
+//  lv_color_t lv_obj_get_style_img_recolor_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_img_recolor_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_img_recolor_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_outline_pad(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_img_recolor_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_blend_mode_t lv_obj_get_style_outline_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_outline_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_outline_blend_mode");
+//  lv_opa_t lv_obj_get_style_img_recolor_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_img_recolor_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_img_recolor_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_outline_blend_mode(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_img_recolor_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_outline_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_outline_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_outline_blend_mode");
+//  lv_coord_t lv_obj_get_style_outline_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_outline_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_outline_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_outline_blend_mode(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_outline_width(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_color_t lv_obj_get_style_outline_color(lv_obj_t* obj, uint8_t part)
+//  lv_color_t lv_obj_get_style_outline_color(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_outline_color(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_outline_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_color_t ret;
     ret = lv_obj_get_style_outline_color(obj ,part);
     lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_outline_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_outline_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_outline_color");
+//  lv_color_t lv_obj_get_style_outline_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_outline_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_outline_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_outline_color(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_outline_color_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_opa_t lv_obj_get_style_outline_opa(lv_obj_t* obj, uint8_t part)
+//  lv_opa_t lv_obj_get_style_outline_opa(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_outline_opa(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_outline_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_opa_t ret;
     ret = lv_obj_get_style_outline_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_outline_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_outline_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_outline_opa");
+//  lv_coord_t lv_obj_get_style_outline_pad(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_outline_pad(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_outline_pad");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_outline_opa(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_outline_pad(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_style_int_t lv_obj_get_style_shadow_width(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_shadow_width(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_shadow_width(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_shadow_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_shadow_width(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_shadow_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_shadow_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_shadow_width");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_shadow_width(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_shadow_ofs_x(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_shadow_ofs_x(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_shadow_ofs_x(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_shadow_ofs_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_shadow_ofs_x(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_shadow_ofs_x(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_shadow_ofs_x(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_shadow_ofs_x");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_shadow_ofs_x(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_shadow_ofs_y(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_shadow_ofs_y(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_shadow_ofs_y(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_shadow_ofs_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_shadow_ofs_y(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_shadow_ofs_y(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_shadow_ofs_y(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_shadow_ofs_y");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_shadow_ofs_y(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_style_int_t lv_obj_get_style_shadow_spread(lv_obj_t* obj, uint8_t part)
+//  lv_coord_t lv_obj_get_style_shadow_spread(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_shadow_spread(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_shadow_spread");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
     ret = lv_obj_get_style_shadow_spread(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_shadow_spread(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_shadow_spread(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_shadow_spread");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_shadow_spread(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_blend_mode_t lv_obj_get_style_shadow_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_shadow_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_shadow_blend_mode");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_shadow_blend_mode(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_obj_set_style_local_shadow_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_shadow_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_shadow_blend_mode");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_shadow_blend_mode(obj ,part ,state ,value);
-    return 0;
-}
-
-//  lv_color_t lv_obj_get_style_shadow_color(lv_obj_t* obj, uint8_t part)
+//  lv_color_t lv_obj_get_style_shadow_color(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_shadow_color(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_shadow_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_color_t ret;
     ret = lv_obj_get_style_shadow_color(obj ,part);
     lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_shadow_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_shadow_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_shadow_color");
+//  lv_color_t lv_obj_get_style_shadow_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_shadow_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_shadow_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_shadow_color(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_shadow_color_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_opa_t lv_obj_get_style_shadow_opa(lv_obj_t* obj, uint8_t part)
+//  lv_opa_t lv_obj_get_style_shadow_opa(lv_obj_t* obj, uint32_t part)
 int luat_lv_obj_get_style_shadow_opa(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_style_shadow_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_opa_t ret;
     ret = lv_obj_get_style_shadow_opa(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_shadow_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_shadow_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_shadow_opa");
+//  lv_coord_t lv_obj_get_style_line_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_line_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_line_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_shadow_opa(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_line_width(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  bool lv_obj_get_style_pattern_repeat(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_pattern_repeat(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_pattern_repeat");
+//  lv_coord_t lv_obj_get_style_line_dash_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_line_dash_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_line_dash_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_obj_get_style_pattern_repeat(obj ,part);
-    lua_pushboolean(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_line_dash_width(obj ,part);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pattern_repeat(lv_obj_t* obj, uint8_t part, lv_state_t state, bool value)
-int luat_lv_obj_set_style_local_pattern_repeat(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pattern_repeat");
+//  lv_coord_t lv_obj_get_style_line_dash_gap(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_line_dash_gap(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_line_dash_gap");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    bool value = (bool)lua_toboolean(L, 4);
-    lv_obj_set_style_local_pattern_repeat(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_line_dash_gap(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_blend_mode_t lv_obj_get_style_pattern_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_pattern_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_pattern_blend_mode");
+//  lv_coord_t lv_obj_get_style_line_rounded(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_line_rounded(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_line_rounded");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_pattern_blend_mode(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_line_rounded(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pattern_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_pattern_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pattern_blend_mode");
+//  lv_color_t lv_obj_get_style_line_color(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_line_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_line_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pattern_blend_mode(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_line_color(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
 }
 
-//  lv_color_t lv_obj_get_style_pattern_recolor(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_pattern_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_pattern_recolor");
+//  lv_color_t lv_obj_get_style_line_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_line_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_line_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     lv_color_t ret;
-    ret = lv_obj_get_style_pattern_recolor(obj ,part);
+    ret = lv_obj_get_style_line_color_filtered(obj ,part);
     lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pattern_recolor(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_pattern_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pattern_recolor");
+//  lv_opa_t lv_obj_get_style_line_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_line_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_line_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pattern_recolor(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_line_opa(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_opa_t lv_obj_get_style_pattern_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_pattern_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_pattern_opa");
+//  lv_coord_t lv_obj_get_style_arc_width(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_arc_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_arc_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_pattern_opa(obj ,part);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_arc_width(obj ,part);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pattern_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_pattern_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pattern_opa");
+//  lv_coord_t lv_obj_get_style_arc_rounded(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_arc_rounded(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_arc_rounded");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pattern_opa(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_get_style_arc_rounded(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  lv_opa_t lv_obj_get_style_pattern_recolor_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_pattern_recolor_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_pattern_recolor_opa");
+//  lv_color_t lv_obj_get_style_arc_color(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_arc_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_arc_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_pattern_recolor_opa(obj ,part);
-    lua_pushinteger(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_arc_color(obj ,part);
+    lua_pushinteger(L, ret.full);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pattern_recolor_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_pattern_recolor_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pattern_recolor_opa");
+//  lv_color_t lv_obj_get_style_arc_color_filtered(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_arc_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_arc_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pattern_recolor_opa(obj ,part ,state ,value);
-    return 0;
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_obj_get_style_arc_color_filtered(obj ,part);
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+
+//  lv_opa_t lv_obj_get_style_arc_opa(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_arc_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_arc_opa");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_opa_t ret;
+    ret = lv_obj_get_style_arc_opa(obj ,part);
+    lua_pushinteger(L, ret);
+    return 1;
 }
 
-//  void* lv_obj_get_style_pattern_image(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_pattern_image(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_pattern_image");
+//  void* lv_obj_get_style_arc_img_src(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_get_style_arc_img_src(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_style_arc_img_src");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
     void* ret = NULL;
-    ret = lv_obj_get_style_pattern_image(obj ,part);
+    ret = lv_obj_get_style_arc_img_src(obj ,part);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_obj_set_style_local_pattern_image(lv_obj_t* obj, uint8_t part, lv_state_t state, void* value)
-int luat_lv_obj_set_style_local_pattern_image(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pattern_image");
+//  void lv_obj_set_style_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    void* value = (void*)lua_touserdata(L, 4);
-    lv_obj_set_style_local_pattern_image(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_width(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_value_letter_space(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_letter_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_letter_space");
+//  void lv_obj_set_style_min_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_min_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_min_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_value_letter_space(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_min_width(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_letter_space(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_value_letter_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_letter_space");
+//  void lv_obj_set_style_max_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_max_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_max_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_letter_space(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_max_width(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_value_line_space(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_line_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_line_space");
+//  void lv_obj_set_style_height(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_value_line_space(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_height(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_line_space(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_value_line_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_line_space");
+//  void lv_obj_set_style_min_height(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_min_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_min_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_line_space(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_min_height(obj ,value ,selector);
     return 0;
 }
 
-//  lv_blend_mode_t lv_obj_get_style_value_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_blend_mode");
+//  void lv_obj_set_style_max_height(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_max_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_max_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_value_blend_mode(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_max_height(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_value_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_blend_mode");
+//  void lv_obj_set_style_x(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_blend_mode(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_x(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_value_ofs_x(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_ofs_x(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_ofs_x");
+//  void lv_obj_set_style_y(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_value_ofs_x(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_y(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_ofs_x(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_value_ofs_x(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_ofs_x");
+//  void lv_obj_set_style_align(lv_obj_t* obj, lv_align_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_align(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_align");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_ofs_x(obj ,part ,state ,value);
+    lv_align_t value = (lv_align_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_align(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_value_ofs_y(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_ofs_y(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_ofs_y");
+//  void lv_obj_set_style_transform_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_transform_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_transform_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_value_ofs_y(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_transform_width(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_ofs_y(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_value_ofs_y(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_ofs_y");
+//  void lv_obj_set_style_transform_height(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_transform_height(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_transform_height");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_ofs_y(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_transform_height(obj ,value ,selector);
     return 0;
 }
 
-//  lv_align_t lv_obj_get_style_value_align(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_align(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_align");
+//  void lv_obj_set_style_translate_x(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_translate_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_translate_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_align_t ret;
-    ret = lv_obj_get_style_value_align(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_translate_x(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_align(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_align_t value)
-int luat_lv_obj_set_style_local_value_align(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_align");
+//  void lv_obj_set_style_translate_y(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_translate_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_translate_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_align_t value = (lv_align_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_align(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_translate_y(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_value_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_color");
+//  void lv_obj_set_style_transform_zoom(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_transform_zoom(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_transform_zoom");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_value_color(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_transform_zoom(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_value_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_color");
+//  void lv_obj_set_style_transform_angle(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_transform_angle(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_transform_angle");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_color(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_transform_angle(obj ,value ,selector);
     return 0;
 }
 
-//  lv_opa_t lv_obj_get_style_value_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_opa");
+//  void lv_obj_set_style_pad_top(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_top(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_top");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_value_opa(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_top(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_value_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_opa");
+//  void lv_obj_set_style_pad_bottom(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_bottom(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_bottom");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_value_opa(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_bottom(obj ,value ,selector);
     return 0;
 }
 
-//  lv_font_t* lv_obj_get_style_value_font(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_font(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_font");
+//  void lv_obj_set_style_pad_left(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_left(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_left");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_font_t* ret = NULL;
-    ret = lv_obj_get_style_value_font(obj ,part);
-    lua_pushlightuserdata(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_left(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_font(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_font_t* value)
-int luat_lv_obj_set_style_local_value_font(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_font");
+//  void lv_obj_set_style_pad_right(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_right(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_right");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_font_t* value = (lv_font_t*)lua_touserdata(L, 4);
-    lv_obj_set_style_local_value_font(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_right(obj ,value ,selector);
     return 0;
 }
 
-//  char* lv_obj_get_style_value_str(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_value_str(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_value_str");
+//  void lv_obj_set_style_pad_row(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_row(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_row");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    char* ret = NULL;
-    ret = lv_obj_get_style_value_str(obj ,part);
-    lua_pushstring(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_row(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_value_str(lv_obj_t* obj, uint8_t part, lv_state_t state, char* value)
-int luat_lv_obj_set_style_local_value_str(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_value_str");
+//  void lv_obj_set_style_pad_column(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_column(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_column");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    char* value = (char*)luaL_checkstring(L, 4);
-    lv_obj_set_style_local_value_str(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_column(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_text_letter_space(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_letter_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_letter_space");
+//  void lv_obj_set_style_radius(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_radius(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_radius");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_text_letter_space(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_radius(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_letter_space(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_text_letter_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_letter_space");
+//  void lv_obj_set_style_clip_corner(lv_obj_t* obj, bool value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_clip_corner(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_clip_corner");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_letter_space(obj ,part ,state ,value);
+    bool value = (bool)lua_toboolean(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_clip_corner(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_text_line_space(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_line_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_line_space");
+//  void lv_obj_set_style_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_text_line_space(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_opa(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_line_space(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_text_line_space(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_line_space");
+//  void lv_obj_set_style_color_filter_dsc(lv_obj_t* obj, lv_color_filter_dsc_t* value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_color_filter_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_color_filter_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_line_space(obj ,part ,state ,value);
+    lv_color_filter_dsc_t* value = (lv_color_filter_dsc_t*)lua_touserdata(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_color_filter_dsc(obj ,value ,selector);
     return 0;
 }
 
-//  lv_text_decor_t lv_obj_get_style_text_decor(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_decor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_decor");
+//  void lv_obj_set_style_color_filter_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_color_filter_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_color_filter_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_text_decor_t ret;
-    ret = lv_obj_get_style_text_decor(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_color_filter_opa(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_decor(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_text_decor_t value)
-int luat_lv_obj_set_style_local_text_decor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_decor");
+//  void lv_obj_set_style_anim_time(lv_obj_t* obj, uint32_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_anim_time(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_anim_time");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_text_decor_t value = (lv_text_decor_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_decor(obj ,part ,state ,value);
+    uint32_t value = (uint32_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_anim_time(obj ,value ,selector);
     return 0;
 }
 
-//  lv_blend_mode_t lv_obj_get_style_text_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_blend_mode");
+//  void lv_obj_set_style_anim_speed(lv_obj_t* obj, uint32_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_anim_speed(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_anim_speed");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_text_blend_mode(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    uint32_t value = (uint32_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_anim_speed(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_text_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_blend_mode");
+//  void lv_obj_set_style_transition(lv_obj_t* obj, lv_style_transition_dsc_t* value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_transition(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_transition");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_blend_mode(obj ,part ,state ,value);
+    lv_style_transition_dsc_t* value = (lv_style_transition_dsc_t*)lua_touserdata(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_transition(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_text_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_color");
+//  void lv_obj_set_style_blend_mode(lv_obj_t* obj, lv_blend_mode_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_blend_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_blend_mode");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_text_color(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_blend_mode(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_text_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_color");
+//  void lv_obj_set_style_layout(lv_obj_t* obj, uint16_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_layout(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_layout");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_color(obj ,part ,state ,value);
+    uint16_t value = (uint16_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_layout(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_text_sel_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_sel_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_sel_color");
+//  void lv_obj_set_style_base_dir(lv_obj_t* obj, lv_base_dir_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_base_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_base_dir");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_text_sel_color(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    lv_base_dir_t value = (lv_base_dir_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_base_dir(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_sel_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_text_sel_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_sel_color");
+//  void lv_obj_set_style_bg_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
     lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_sel_color(obj ,part ,state ,value);
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_color(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_text_sel_bg_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_sel_bg_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_sel_bg_color");
+//  void lv_obj_set_style_bg_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_text_sel_bg_color(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_color_filtered(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_sel_bg_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_text_sel_bg_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_sel_bg_color");
+//  void lv_obj_set_style_bg_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_opa");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_opa(obj ,value ,selector);
+    return 0;
+}
+
+//  void lv_obj_set_style_bg_grad_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_grad_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_grad_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
     lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_sel_bg_color(obj ,part ,state ,value);
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_grad_color(obj ,value ,selector);
     return 0;
 }
 
-//  lv_opa_t lv_obj_get_style_text_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_opa");
+//  void lv_obj_set_style_bg_grad_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_grad_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_grad_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_text_opa(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_grad_color_filtered(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_text_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_opa");
+//  void lv_obj_set_style_bg_grad_dir(lv_obj_t* obj, lv_grad_dir_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_grad_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_grad_dir");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_text_opa(obj ,part ,state ,value);
+    lv_grad_dir_t value = (lv_grad_dir_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_grad_dir(obj ,value ,selector);
     return 0;
 }
 
-//  lv_font_t* lv_obj_get_style_text_font(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_text_font(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_text_font");
+//  void lv_obj_set_style_bg_main_stop(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_main_stop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_main_stop");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_font_t* ret = NULL;
-    ret = lv_obj_get_style_text_font(obj ,part);
-    lua_pushlightuserdata(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_main_stop(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_text_font(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_font_t* value)
-int luat_lv_obj_set_style_local_text_font(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_text_font");
+//  void lv_obj_set_style_bg_grad_stop(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_grad_stop(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_grad_stop");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_font_t* value = (lv_font_t*)lua_touserdata(L, 4);
-    lv_obj_set_style_local_text_font(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_grad_stop(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_line_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_line_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_line_width");
+//  void lv_obj_set_style_bg_img_src(lv_obj_t* obj, void* value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_img_src(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_img_src");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_line_width(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    void* value = (void*)lua_touserdata(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_img_src(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_line_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_line_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_line_width");
+//  void lv_obj_set_style_bg_img_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_img_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_img_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_line_width(obj ,part ,state ,value);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_img_opa(obj ,value ,selector);
     return 0;
 }
 
-//  lv_blend_mode_t lv_obj_get_style_line_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_line_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_line_blend_mode");
+//  void lv_obj_set_style_bg_img_recolor(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_img_recolor(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_img_recolor");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_line_blend_mode(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_img_recolor(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_line_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_line_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_line_blend_mode");
+//  void lv_obj_set_style_bg_img_recolor_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_img_recolor_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_img_recolor_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_line_blend_mode(obj ,part ,state ,value);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_img_recolor_filtered(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_line_dash_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_line_dash_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_line_dash_width");
+//  void lv_obj_set_style_bg_img_recolor_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_img_recolor_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_img_recolor_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_line_dash_width(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_img_recolor_opa(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_line_dash_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_line_dash_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_line_dash_width");
+//  void lv_obj_set_style_bg_img_tiled(lv_obj_t* obj, bool value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_bg_img_tiled(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_bg_img_tiled");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_line_dash_width(obj ,part ,state ,value);
+    bool value = (bool)lua_toboolean(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_bg_img_tiled(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_line_dash_gap(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_line_dash_gap(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_line_dash_gap");
+//  void lv_obj_set_style_border_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_border_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_border_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_line_dash_gap(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_border_color(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_line_dash_gap(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_line_dash_gap(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_line_dash_gap");
+//  void lv_obj_set_style_border_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_border_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_border_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_line_dash_gap(obj ,part ,state ,value);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_border_color_filtered(obj ,value ,selector);
     return 0;
 }
 
-//  bool lv_obj_get_style_line_rounded(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_line_rounded(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_line_rounded");
+//  void lv_obj_set_style_border_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_border_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_border_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_obj_get_style_line_rounded(obj ,part);
-    lua_pushboolean(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_border_opa(obj ,value ,selector);
+    return 0;
+}
+
+//  void lv_obj_set_style_border_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_border_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_border_width");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_border_width(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_line_rounded(lv_obj_t* obj, uint8_t part, lv_state_t state, bool value)
-int luat_lv_obj_set_style_local_line_rounded(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_line_rounded");
+//  void lv_obj_set_style_border_side(lv_obj_t* obj, lv_border_side_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_border_side(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_border_side");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    bool value = (bool)lua_toboolean(L, 4);
-    lv_obj_set_style_local_line_rounded(obj ,part ,state ,value);
+    lv_border_side_t value = (lv_border_side_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_border_side(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_line_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_line_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_line_color");
+//  void lv_obj_set_style_border_post(lv_obj_t* obj, bool value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_border_post(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_border_post");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_line_color(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    bool value = (bool)lua_toboolean(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_border_post(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_line_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_line_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_line_color");
+//  void lv_obj_set_style_text_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
     lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_line_color(obj ,part ,state ,value);
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_color(obj ,value ,selector);
     return 0;
 }
 
-//  lv_opa_t lv_obj_get_style_line_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_line_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_line_opa");
+//  void lv_obj_set_style_text_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_line_opa(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_color_filtered(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_line_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_line_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_line_opa");
+//  void lv_obj_set_style_text_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_line_opa(obj ,part ,state ,value);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_opa(obj ,value ,selector);
     return 0;
 }
 
-//  lv_blend_mode_t lv_obj_get_style_image_blend_mode(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_image_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_image_blend_mode");
+//  void lv_obj_set_style_text_font(lv_obj_t* obj, lv_font_t* value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_font(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_font");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_blend_mode_t ret;
-    ret = lv_obj_get_style_image_blend_mode(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_font_t* value = (lv_font_t*)lua_touserdata(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_font(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_image_blend_mode(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_blend_mode_t value)
-int luat_lv_obj_set_style_local_image_blend_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_image_blend_mode");
+//  void lv_obj_set_style_text_letter_space(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_letter_space(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_letter_space");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_image_blend_mode(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_letter_space(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_image_recolor(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_image_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_image_recolor");
+//  void lv_obj_set_style_text_line_space(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_line_space(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_line_space");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_image_recolor(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_line_space(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_image_recolor(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_image_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_image_recolor");
+//  void lv_obj_set_style_text_decor(lv_obj_t* obj, lv_text_decor_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_decor(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_decor");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_image_recolor(obj ,part ,state ,value);
+    lv_text_decor_t value = (lv_text_decor_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_decor(obj ,value ,selector);
     return 0;
 }
 
-//  lv_opa_t lv_obj_get_style_image_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_image_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_image_opa");
+//  void lv_obj_set_style_text_align(lv_obj_t* obj, lv_text_align_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_text_align(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_text_align");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_image_opa(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_text_align_t value = (lv_text_align_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_text_align(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_image_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_image_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_image_opa");
+//  void lv_obj_set_style_img_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_img_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_img_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_image_opa(obj ,part ,state ,value);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_img_opa(obj ,value ,selector);
     return 0;
 }
 
-//  lv_opa_t lv_obj_get_style_image_recolor_opa(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_image_recolor_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_image_recolor_opa");
+//  void lv_obj_set_style_img_recolor(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_img_recolor(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_img_recolor");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_opa_t ret;
-    ret = lv_obj_get_style_image_recolor_opa(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_img_recolor(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_image_recolor_opa(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_opa_t value)
-int luat_lv_obj_set_style_local_image_recolor_opa(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_image_recolor_opa");
+//  void lv_obj_set_style_img_recolor_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_img_recolor_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_img_recolor_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_image_recolor_opa(obj ,part ,state ,value);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_img_recolor_filtered(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_time(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_time(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_time");
+//  void lv_obj_set_style_img_recolor_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_img_recolor_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_img_recolor_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_time(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_img_recolor_opa(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_time(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_time(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_time");
+//  void lv_obj_set_style_outline_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_outline_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_outline_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_time(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_outline_width(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_delay(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_delay(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_delay");
+//  void lv_obj_set_style_outline_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_outline_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_outline_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_delay(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_outline_color(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_delay(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_delay(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_delay");
+//  void lv_obj_set_style_outline_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_outline_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_outline_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_delay(obj ,part ,state ,value);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_outline_color_filtered(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_prop_1(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_prop_1(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_prop_1");
+//  void lv_obj_set_style_outline_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_outline_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_outline_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_prop_1(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_outline_opa(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_prop_1(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_prop_1(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_prop_1");
+//  void lv_obj_set_style_outline_pad(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_outline_pad(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_outline_pad");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_prop_1(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_outline_pad(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_prop_2(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_prop_2(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_prop_2");
+//  void lv_obj_set_style_shadow_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_shadow_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_shadow_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_prop_2(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_shadow_width(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_prop_2(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_prop_2(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_prop_2");
+//  void lv_obj_set_style_shadow_ofs_x(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_shadow_ofs_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_shadow_ofs_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_prop_2(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_shadow_ofs_x(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_prop_3(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_prop_3(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_prop_3");
+//  void lv_obj_set_style_shadow_ofs_y(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_shadow_ofs_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_shadow_ofs_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_prop_3(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_shadow_ofs_y(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_prop_3(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_prop_3(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_prop_3");
+//  void lv_obj_set_style_shadow_spread(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_shadow_spread(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_shadow_spread");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_prop_3(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_shadow_spread(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_prop_4(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_prop_4(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_prop_4");
+//  void lv_obj_set_style_shadow_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_shadow_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_shadow_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_prop_4(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_shadow_color(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_prop_4(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_prop_4(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_prop_4");
+//  void lv_obj_set_style_shadow_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_shadow_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_shadow_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_prop_4(obj ,part ,state ,value);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_shadow_color_filtered(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_prop_5(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_prop_5(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_prop_5");
+//  void lv_obj_set_style_shadow_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_shadow_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_shadow_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_prop_5(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_shadow_opa(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_prop_5(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_prop_5(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_prop_5");
+//  void lv_obj_set_style_line_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_line_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_line_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_prop_5(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_line_width(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_transition_prop_6(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_prop_6(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_prop_6");
+//  void lv_obj_set_style_line_dash_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_line_dash_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_line_dash_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_transition_prop_6(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_line_dash_width(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_prop_6(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_transition_prop_6(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_prop_6");
+//  void lv_obj_set_style_line_dash_gap(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_line_dash_gap(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_line_dash_gap");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_transition_prop_6(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_line_dash_gap(obj ,value ,selector);
     return 0;
 }
 
-//  lv_anim_path_t* lv_obj_get_style_transition_path(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_transition_path(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_transition_path");
+//  void lv_obj_set_style_line_rounded(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_line_rounded(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_line_rounded");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_anim_path_t* ret = NULL;
-    ret = lv_obj_get_style_transition_path(obj ,part);
-    lua_pushlightuserdata(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_line_rounded(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_transition_path(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_anim_path_t* value)
-int luat_lv_obj_set_style_local_transition_path(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_transition_path");
+//  void lv_obj_set_style_line_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_line_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_line_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_anim_path_t* value = (lv_anim_path_t*)lua_touserdata(L, 4);
-    lv_obj_set_style_local_transition_path(obj ,part ,state ,value);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_line_color(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_scale_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_scale_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_scale_width");
+//  void lv_obj_set_style_line_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_line_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_line_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_scale_width(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_line_color_filtered(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_scale_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_scale_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_scale_width");
+//  void lv_obj_set_style_line_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_line_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_line_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_scale_width(obj ,part ,state ,value);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_line_opa(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_scale_border_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_scale_border_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_scale_border_width");
+//  void lv_obj_set_style_arc_width(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_arc_width(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_arc_width");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_scale_border_width(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_arc_width(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_scale_border_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_scale_border_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_scale_border_width");
+//  void lv_obj_set_style_arc_rounded(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_arc_rounded(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_arc_rounded");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_scale_border_width(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_arc_rounded(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_scale_end_border_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_scale_end_border_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_scale_end_border_width");
+//  void lv_obj_set_style_arc_color(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_arc_color(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_arc_color");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_scale_end_border_width(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_arc_color(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_scale_end_border_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_scale_end_border_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_scale_end_border_width");
+//  void lv_obj_set_style_arc_color_filtered(lv_obj_t* obj, lv_color_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_arc_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_arc_color_filtered");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_scale_end_border_width(obj ,part ,state ,value);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_arc_color_filtered(obj ,value ,selector);
     return 0;
 }
 
-//  lv_style_int_t lv_obj_get_style_scale_end_line_width(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_scale_end_line_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_scale_end_line_width");
+//  void lv_obj_set_style_arc_opa(lv_obj_t* obj, lv_opa_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_arc_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_arc_opa");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_int_t ret;
-    ret = lv_obj_get_style_scale_end_line_width(obj ,part);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_arc_opa(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_scale_end_line_width(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_scale_end_line_width(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_scale_end_line_width");
+//  void lv_obj_set_style_arc_img_src(lv_obj_t* obj, void* value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_arc_img_src(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_arc_img_src");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_scale_end_line_width(obj ,part ,state ,value);
+    void* value = (void*)lua_touserdata(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_arc_img_src(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_scale_grad_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_scale_grad_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_scale_grad_color");
+//  void lv_obj_set_style_pad_all(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_all(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_all");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_scale_grad_color(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_all(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_scale_grad_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_scale_grad_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_scale_grad_color");
+//  void lv_obj_set_style_pad_hor(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_hor(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_hor");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_scale_grad_color(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_hor(obj ,value ,selector);
     return 0;
 }
 
-//  lv_color_t lv_obj_get_style_scale_end_color(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_style_scale_end_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_style_scale_end_color");
+//  void lv_obj_set_style_pad_ver(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_ver(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_ver");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t ret;
-    ret = lv_obj_get_style_scale_end_color(obj ,part);
-    lua_pushinteger(L, ret.full);
-    return 1;
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_ver(obj ,value ,selector);
+    return 0;
 }
 
-//  void lv_obj_set_style_local_scale_end_color(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_color_t value)
-int luat_lv_obj_set_style_local_scale_end_color(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_scale_end_color");
+//  void lv_obj_set_style_pad_gap(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_pad_gap(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_pad_gap");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_color_t value = {0};
-    value.full = luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_scale_end_color(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_pad_gap(obj ,value ,selector);
     return 0;
 }
 
-//  void lv_obj_set_style_local_pad_all(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_all(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_all");
+//  void lv_obj_set_style_size(lv_obj_t* obj, lv_coord_t value, lv_style_selector_t selector)
+int luat_lv_obj_set_style_size(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_set_style_size");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_all(obj ,part ,state ,value);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_selector_t selector = (lv_style_selector_t)luaL_checkinteger(L, 3);
+    lv_obj_set_style_size(obj ,value ,selector);
     return 0;
 }
 
-//  void lv_obj_set_style_local_pad_hor(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_hor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_hor");
+//  void lv_obj_init_draw_rect_dsc(lv_obj_t* obj, uint32_t part, lv_draw_rect_dsc_t* draw_dsc)
+int luat_lv_obj_init_draw_rect_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_init_draw_rect_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_hor(obj ,part ,state ,value);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_draw_rect_dsc_t* draw_dsc = (lv_draw_rect_dsc_t*)lua_touserdata(L, 3);
+    lv_obj_init_draw_rect_dsc(obj ,part ,draw_dsc);
     return 0;
 }
 
-//  void lv_obj_set_style_local_pad_ver(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_pad_ver(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_pad_ver");
+//  void lv_obj_init_draw_label_dsc(lv_obj_t* obj, uint32_t part, lv_draw_label_dsc_t* draw_dsc)
+int luat_lv_obj_init_draw_label_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_init_draw_label_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_pad_ver(obj ,part ,state ,value);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_draw_label_dsc_t* draw_dsc = (lv_draw_label_dsc_t*)lua_touserdata(L, 3);
+    lv_obj_init_draw_label_dsc(obj ,part ,draw_dsc);
     return 0;
 }
 
-//  void lv_obj_set_style_local_margin_all(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_margin_all(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_margin_all");
+//  void lv_obj_init_draw_img_dsc(lv_obj_t* obj, uint32_t part, lv_draw_img_dsc_t* draw_dsc)
+int luat_lv_obj_init_draw_img_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_init_draw_img_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_margin_all(obj ,part ,state ,value);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_draw_img_dsc_t* draw_dsc = (lv_draw_img_dsc_t*)lua_touserdata(L, 3);
+    lv_obj_init_draw_img_dsc(obj ,part ,draw_dsc);
     return 0;
 }
 
-//  void lv_obj_set_style_local_margin_hor(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_margin_hor(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_margin_hor");
+//  void lv_obj_init_draw_line_dsc(lv_obj_t* obj, uint32_t part, lv_draw_line_dsc_t* draw_dsc)
+int luat_lv_obj_init_draw_line_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_init_draw_line_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_margin_hor(obj ,part ,state ,value);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_draw_line_dsc_t* draw_dsc = (lv_draw_line_dsc_t*)lua_touserdata(L, 3);
+    lv_obj_init_draw_line_dsc(obj ,part ,draw_dsc);
     return 0;
 }
 
-//  void lv_obj_set_style_local_margin_ver(lv_obj_t* obj, uint8_t part, lv_state_t state, lv_style_int_t value)
-int luat_lv_obj_set_style_local_margin_ver(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_set_style_local_margin_ver");
+//  void lv_obj_init_draw_arc_dsc(lv_obj_t* obj, uint32_t part, lv_draw_arc_dsc_t* draw_dsc)
+int luat_lv_obj_init_draw_arc_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_init_draw_arc_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 3);
-    lv_style_int_t value = (lv_style_int_t)luaL_checkinteger(L, 4);
-    lv_obj_set_style_local_margin_ver(obj ,part ,state ,value);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_draw_arc_dsc_t* draw_dsc = (lv_draw_arc_dsc_t*)lua_touserdata(L, 3);
+    lv_obj_init_draw_arc_dsc(obj ,part ,draw_dsc);
     return 0;
 }
 
-//  bool lv_obj_get_hidden(lv_obj_t* obj)
-int luat_lv_obj_get_hidden(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_hidden");
+//  lv_coord_t lv_obj_calculate_ext_draw_size(lv_obj_t* obj, uint32_t part)
+int luat_lv_obj_calculate_ext_draw_size(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_calculate_ext_draw_size");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_get_hidden(obj);
-    lua_pushboolean(L, ret);
+    uint32_t part = (uint32_t)luaL_checkinteger(L, 2);
+    lv_coord_t ret;
+    ret = lv_obj_calculate_ext_draw_size(obj ,part);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_obj_get_adv_hittest(lv_obj_t* obj)
-int luat_lv_obj_get_adv_hittest(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_adv_hittest");
+//  void lv_obj_draw_dsc_init(lv_obj_draw_part_dsc_t* dsc, lv_area_t* clip_area)
+int luat_lv_obj_draw_dsc_init(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_draw_dsc_init");
+    lv_obj_draw_part_dsc_t* dsc = (lv_obj_draw_part_dsc_t*)lua_touserdata(L, 1);
+    lua_pushvalue(L, 2);
+    lv_area_t clip_area = {0};
+    lua_geti(L, -1, 1); clip_area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); clip_area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); clip_area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); clip_area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_obj_draw_dsc_init(dsc ,&clip_area);
+    return 0;
+}
+
+//  void lv_obj_refresh_ext_draw_size(lv_obj_t* obj)
+int luat_lv_obj_refresh_ext_draw_size(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_refresh_ext_draw_size");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_get_adv_hittest(obj);
-    lua_pushboolean(L, ret);
+    lv_obj_refresh_ext_draw_size(obj);
+    return 0;
+}
+
+//  lv_obj_t* lv_obj_class_create_obj(struct _lv_obj_class_t* class_p, lv_obj_t* parent)
+int luat_lv_obj_class_create_obj(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_class_create_obj");
+    struct _lv_obj_class_t* class_p = (struct _lv_obj_class_t*)lua_touserdata(L, 1);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* ret = NULL;
+    ret = lv_obj_class_create_obj(class_p ,parent);
+    lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  bool lv_obj_get_click(lv_obj_t* obj)
-int luat_lv_obj_get_click(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_click");
+//  void lv_obj_class_init_obj(lv_obj_t* obj)
+int luat_lv_obj_class_init_obj(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_class_init_obj");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_get_click(obj);
-    lua_pushboolean(L, ret);
-    return 1;
+    lv_obj_class_init_obj(obj);
+    return 0;
 }
 
-//  bool lv_obj_get_top(lv_obj_t* obj)
-int luat_lv_obj_get_top(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_top");
+//  bool lv_obj_is_editable(lv_obj_t* obj)
+int luat_lv_obj_is_editable(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_is_editable");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_obj_get_top(obj);
+    ret = lv_obj_is_editable(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_obj_get_drag(lv_obj_t* obj)
-int luat_lv_obj_get_drag(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_drag");
+//  bool lv_obj_is_group_def(lv_obj_t* obj)
+int luat_lv_obj_is_group_def(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_is_group_def");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_obj_get_drag(obj);
+    ret = lv_obj_is_group_def(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  lv_drag_dir_t lv_obj_get_drag_dir(lv_obj_t* obj)
-int luat_lv_obj_get_drag_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_drag_dir");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_drag_dir_t ret;
-    ret = lv_obj_get_drag_dir(obj);
+//  lv_res_t lv_obj_event_base(lv_obj_class_t* class_p, lv_event_t* e)
+int luat_lv_obj_event_base(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_event_base");
+    lv_obj_class_t* class_p = (lv_obj_class_t*)lua_touserdata(L, 1);
+    lv_event_t* e = (lv_event_t*)lua_touserdata(L, 2);
+    lv_res_t ret;
+    ret = lv_obj_event_base(class_p ,e);
+    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
     lua_pushinteger(L, ret);
-    return 1;
+    return 2;
 }
 
-//  bool lv_obj_get_drag_throw(lv_obj_t* obj)
-int luat_lv_obj_get_drag_throw(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_drag_throw");
+//  bool lv_obj_remove_event_dsc(lv_obj_t* obj, struct _lv_event_dsc_t* event_dsc)
+int luat_lv_obj_remove_event_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_remove_event_dsc");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    struct _lv_event_dsc_t* event_dsc = (struct _lv_event_dsc_t*)lua_touserdata(L, 2);
     bool ret;
-    ret = lv_obj_get_drag_throw(obj);
+    ret = lv_obj_remove_event_dsc(obj ,event_dsc);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_obj_get_drag_parent(lv_obj_t* obj)
-int luat_lv_obj_get_drag_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_drag_parent");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_get_drag_parent(obj);
-    lua_pushboolean(L, ret);
+//  lv_obj_t* lv_obj_create(lv_obj_t* parent)
+int luat_lv_obj_create(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_create");
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* ret = NULL;
+    ret = lv_obj_create(parent);
+    lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  bool lv_obj_get_focus_parent(lv_obj_t* obj)
-int luat_lv_obj_get_focus_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_focus_parent");
+//  void lv_obj_add_flag(lv_obj_t* obj, lv_obj_flag_t f)
+int luat_lv_obj_add_flag(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_add_flag");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_get_focus_parent(obj);
-    lua_pushboolean(L, ret);
-    return 1;
+    lv_obj_flag_t f = (lv_obj_flag_t)luaL_checkinteger(L, 2);
+    lv_obj_add_flag(obj ,f);
+    return 0;
 }
 
-//  bool lv_obj_get_parent_event(lv_obj_t* obj)
-int luat_lv_obj_get_parent_event(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_parent_event");
+//  void lv_obj_clear_flag(lv_obj_t* obj, lv_obj_flag_t f)
+int luat_lv_obj_clear_flag(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_clear_flag");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_get_parent_event(obj);
-    lua_pushboolean(L, ret);
-    return 1;
+    lv_obj_flag_t f = (lv_obj_flag_t)luaL_checkinteger(L, 2);
+    lv_obj_clear_flag(obj ,f);
+    return 0;
 }
 
-//  bool lv_obj_get_gesture_parent(lv_obj_t* obj)
-int luat_lv_obj_get_gesture_parent(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_gesture_parent");
+//  void lv_obj_add_state(lv_obj_t* obj, lv_state_t state)
+int luat_lv_obj_add_state(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_add_state");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_obj_get_gesture_parent(obj);
-    lua_pushboolean(L, ret);
-    return 1;
+    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 2);
+    lv_obj_add_state(obj ,state);
+    return 0;
 }
 
-//  lv_bidi_dir_t lv_obj_get_base_dir(lv_obj_t* obj)
-int luat_lv_obj_get_base_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_base_dir");
+//  void lv_obj_clear_state(lv_obj_t* obj, lv_state_t state)
+int luat_lv_obj_clear_state(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_clear_state");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_bidi_dir_t ret;
-    ret = lv_obj_get_base_dir(obj);
-    lua_pushinteger(L, ret);
-    return 1;
+    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 2);
+    lv_obj_clear_state(obj ,state);
+    return 0;
 }
 
-//  uint8_t lv_obj_get_protect(lv_obj_t* obj)
-int luat_lv_obj_get_protect(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_protect");
+//  bool lv_obj_has_flag(lv_obj_t* obj, lv_obj_flag_t f)
+int luat_lv_obj_has_flag(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_has_flag");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t ret;
-    ret = lv_obj_get_protect(obj);
-    lua_pushinteger(L, ret);
+    lv_obj_flag_t f = (lv_obj_flag_t)luaL_checkinteger(L, 2);
+    bool ret;
+    ret = lv_obj_has_flag(obj ,f);
+    lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_obj_is_protected(lv_obj_t* obj, uint8_t prot)
-int luat_lv_obj_is_protected(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_is_protected");
+//  bool lv_obj_has_flag_any(lv_obj_t* obj, lv_obj_flag_t f)
+int luat_lv_obj_has_flag_any(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_has_flag_any");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t prot = (uint8_t)luaL_checkinteger(L, 2);
+    lv_obj_flag_t f = (lv_obj_flag_t)luaL_checkinteger(L, 2);
     bool ret;
-    ret = lv_obj_is_protected(obj ,prot);
+    ret = lv_obj_has_flag_any(obj ,f);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  lv_state_t lv_obj_get_state(lv_obj_t* obj, uint8_t part)
+//  lv_state_t lv_obj_get_state(lv_obj_t* obj)
 int luat_lv_obj_get_state(lua_State *L) {
     LV_DEBUG("CALL lv_obj_get_state");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
     lv_state_t ret;
-    ret = lv_obj_get_state(obj ,part);
+    ret = lv_obj_get_state(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_obj_is_point_on_coords(lv_obj_t* obj, lv_point_t* point)
-int luat_lv_obj_is_point_on_coords(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_is_point_on_coords");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_point_t point = {0};
-    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    bool ret;
-    ret = lv_obj_is_point_on_coords(obj ,&point);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_obj_hittest(lv_obj_t* obj, lv_point_t* point)
-int luat_lv_obj_hittest(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_hittest");
+//  bool lv_obj_has_state(lv_obj_t* obj, lv_state_t state)
+int luat_lv_obj_has_state(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_has_state");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_point_t point = {0};
-    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
+    lv_state_t state = (lv_state_t)luaL_checkinteger(L, 2);
     bool ret;
-    ret = lv_obj_hittest(obj ,&point);
+    ret = lv_obj_has_state(obj ,state);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  void* lv_obj_get_ext_attr(lv_obj_t* obj)
-int luat_lv_obj_get_ext_attr(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_ext_attr");
+//  void* lv_obj_get_group(lv_obj_t* obj)
+int luat_lv_obj_get_group(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_group");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     void* ret = NULL;
-    ret = lv_obj_get_ext_attr(obj);
+    ret = lv_obj_get_group(obj);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_obj_get_type(lv_obj_t* obj, lv_obj_type_t* buf)
-int luat_lv_obj_get_type(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_type");
+//  void lv_obj_allocate_spec_attr(lv_obj_t* obj)
+int luat_lv_obj_allocate_spec_attr(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_allocate_spec_attr");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_type_t* buf = (lv_obj_type_t*)lua_touserdata(L, 2);
-    lv_obj_get_type(obj ,buf);
+    lv_obj_allocate_spec_attr(obj);
     return 0;
 }
 
-//  void* lv_obj_get_group(lv_obj_t* obj)
-int luat_lv_obj_get_group(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_group");
+//  bool lv_obj_check_type(lv_obj_t* obj, lv_obj_class_t* class_p)
+int luat_lv_obj_check_type(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_check_type");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    void* ret = NULL;
-    ret = lv_obj_get_group(obj);
-    lua_pushlightuserdata(L, ret);
+    lv_obj_class_t* class_p = (lv_obj_class_t*)lua_touserdata(L, 2);
+    bool ret;
+    ret = lv_obj_check_type(obj ,class_p);
+    lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_obj_is_focused(lv_obj_t* obj)
-int luat_lv_obj_is_focused(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_is_focused");
+//  bool lv_obj_has_class(lv_obj_t* obj, lv_obj_class_t* class_p)
+int luat_lv_obj_has_class(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_has_class");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_class_t* class_p = (lv_obj_class_t*)lua_touserdata(L, 2);
     bool ret;
-    ret = lv_obj_is_focused(obj);
+    ret = lv_obj_has_class(obj ,class_p);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  lv_obj_t* lv_obj_get_focused_obj(lv_obj_t* obj)
-int luat_lv_obj_get_focused_obj(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_focused_obj");
+//  lv_obj_class_t* lv_obj_get_class(lv_obj_t* obj)
+int luat_lv_obj_get_class(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_get_class");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_obj_get_focused_obj(obj);
+    lv_obj_class_t* ret = NULL;
+    ret = lv_obj_get_class(obj);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  lv_res_t lv_obj_handle_get_type_signal(lv_obj_type_t* buf, char* name)
-int luat_lv_obj_handle_get_type_signal(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_handle_get_type_signal");
-    lv_obj_type_t* buf = (lv_obj_type_t*)lua_touserdata(L, 1);
-    char* name = (char*)luaL_checkstring(L, 2);
-    lv_res_t ret;
-    ret = lv_obj_handle_get_type_signal(buf ,name);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  void lv_obj_init_draw_rect_dsc(lv_obj_t* obj, uint8_t type, lv_draw_rect_dsc_t* draw_dsc)
-int luat_lv_obj_init_draw_rect_dsc(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_init_draw_rect_dsc");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t type = (uint8_t)luaL_checkinteger(L, 2);
-    lv_draw_rect_dsc_t* draw_dsc = (lv_draw_rect_dsc_t*)lua_touserdata(L, 3);
-    lv_obj_init_draw_rect_dsc(obj ,type ,draw_dsc);
-    return 0;
-}
-
-//  void lv_obj_init_draw_label_dsc(lv_obj_t* obj, uint8_t type, lv_draw_label_dsc_t* draw_dsc)
-int luat_lv_obj_init_draw_label_dsc(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_init_draw_label_dsc");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t type = (uint8_t)luaL_checkinteger(L, 2);
-    lv_draw_label_dsc_t* draw_dsc = (lv_draw_label_dsc_t*)lua_touserdata(L, 3);
-    lv_obj_init_draw_label_dsc(obj ,type ,draw_dsc);
-    return 0;
-}
-
-//  void lv_obj_init_draw_img_dsc(lv_obj_t* obj, uint8_t part, lv_draw_img_dsc_t* draw_dsc)
-int luat_lv_obj_init_draw_img_dsc(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_init_draw_img_dsc");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_draw_img_dsc_t* draw_dsc = (lv_draw_img_dsc_t*)lua_touserdata(L, 3);
-    lv_obj_init_draw_img_dsc(obj ,part ,draw_dsc);
-    return 0;
-}
-
-//  void lv_obj_init_draw_line_dsc(lv_obj_t* obj, uint8_t part, lv_draw_line_dsc_t* draw_dsc)
-int luat_lv_obj_init_draw_line_dsc(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_init_draw_line_dsc");
+//  bool lv_obj_is_valid(lv_obj_t* obj)
+int luat_lv_obj_is_valid(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_is_valid");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
-    lv_draw_line_dsc_t* draw_dsc = (lv_draw_line_dsc_t*)lua_touserdata(L, 3);
-    lv_obj_init_draw_line_dsc(obj ,part ,draw_dsc);
-    return 0;
+    bool ret;
+    ret = lv_obj_is_valid(obj);
+    lua_pushboolean(L, ret);
+    return 1;
 }
 
-//  lv_coord_t lv_obj_get_draw_rect_ext_pad_size(lv_obj_t* obj, uint8_t part)
-int luat_lv_obj_get_draw_rect_ext_pad_size(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_get_draw_rect_ext_pad_size");
+//  lv_coord_t lv_obj_dpx(lv_obj_t* obj, lv_coord_t n)
+int luat_lv_obj_dpx(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_dpx");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 2);
+    lv_coord_t n = (lv_coord_t)luaL_checkinteger(L, 2);
     lv_coord_t ret;
-    ret = lv_obj_get_draw_rect_ext_pad_size(obj ,part);
+    ret = lv_obj_dpx(obj ,n);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_obj_fade_in(lv_obj_t* obj, uint32_t time, uint32_t delay)
-int luat_lv_obj_fade_in(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_fade_in");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint32_t time = (uint32_t)luaL_checkinteger(L, 2);
-    uint32_t delay = (uint32_t)luaL_checkinteger(L, 3);
-    lv_obj_fade_in(obj ,time ,delay);
-    return 0;
-}
-
-//  void lv_obj_fade_out(lv_obj_t* obj, uint32_t time, uint32_t delay)
-int luat_lv_obj_fade_out(lua_State *L) {
-    LV_DEBUG("CALL lv_obj_fade_out");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    uint32_t time = (uint32_t)luaL_checkinteger(L, 2);
-    uint32_t delay = (uint32_t)luaL_checkinteger(L, 3);
-    lv_obj_fade_out(obj ,time ,delay);
-    return 0;
-}
-

+ 22 - 0
components/lvgl/gen/lv_core/luat_lv_obj_draw.c

@@ -0,0 +1,22 @@
+

+#include "luat_base.h"
+#include "lvgl.h"
+#include "luat_lvgl.h"
+
+
+//  void lv_obj_draw_dsc_init(lv_obj_draw_part_dsc_t* dsc, lv_area_t* clip_area)
+int luat_lv_obj_draw_dsc_init(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_draw_dsc_init");
+    lv_obj_draw_part_dsc_t* dsc = (lv_obj_draw_part_dsc_t*)lua_touserdata(L, 1);
+    lua_pushvalue(L, 2);
+    lv_area_t clip_area = {0};
+    lua_geti(L, -1, 1); clip_area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); clip_area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); clip_area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); clip_area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_obj_draw_dsc_init(dsc ,&clip_area);
+    return 0;
+}
+

+ 74 - 0
components/lvgl/gen/lv_core/luat_lv_obj_scroll.c

@@ -0,0 +1,74 @@
+

+#include "luat_base.h"
+#include "lvgl.h"
+#include "luat_lvgl.h"
+
+
+//  void lv_obj_scroll_by(lv_obj_t* obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_by(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_by");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 4);
+    lv_obj_scroll_by(obj ,x ,y ,anim_en);
+    return 0;
+}
+
+//  void lv_obj_scroll_to(lv_obj_t* obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 4);
+    lv_obj_scroll_to(obj ,x ,y ,anim_en);
+    return 0;
+}
+
+//  void lv_obj_scroll_to_x(lv_obj_t* obj, lv_coord_t x, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_x(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_x");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 3);
+    lv_obj_scroll_to_x(obj ,x ,anim_en);
+    return 0;
+}
+
+//  void lv_obj_scroll_to_y(lv_obj_t* obj, lv_coord_t y, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_y(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_y");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 3);
+    lv_obj_scroll_to_y(obj ,y ,anim_en);
+    return 0;
+}
+
+//  void lv_obj_scroll_to_view(lv_obj_t* obj, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_view(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_view");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 2);
+    lv_obj_scroll_to_view(obj ,anim_en);
+    return 0;
+}
+
+//  void lv_obj_scroll_to_view_recursive(lv_obj_t* obj, lv_anim_enable_t anim_en)
+int luat_lv_obj_scroll_to_view_recursive(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scroll_to_view_recursive");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 2);
+    lv_obj_scroll_to_view_recursive(obj ,anim_en);
+    return 0;
+}
+
+//  void lv_obj_scrollbar_invalidate(lv_obj_t* obj)
+int luat_lv_obj_scrollbar_invalidate(lua_State *L) {
+    LV_DEBUG("CALL lv_obj_scrollbar_invalidate");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_scrollbar_invalidate(obj);
+    return 0;
+}
+

+ 0 - 80
components/lvgl/gen/lv_core/luat_lv_style.c

@@ -1,80 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  void lv_style_init(lv_style_t* style)
-int luat_lv_style_init(lua_State *L) {
-    LV_DEBUG("CALL lv_style_init");
-    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
-    lv_style_init(style);
-    return 0;
-}
-
-//  void lv_style_copy(lv_style_t* style_dest, lv_style_t* style_src)
-int luat_lv_style_copy(lua_State *L) {
-    LV_DEBUG("CALL lv_style_copy");
-    lv_style_t* style_dest = (lv_style_t*)lua_touserdata(L, 1);
-    lv_style_t* style_src = (lv_style_t*)lua_touserdata(L, 2);
-    lv_style_copy(style_dest ,style_src);
-    return 0;
-}
-
-//  void lv_style_list_init(lv_style_list_t* list)
-int luat_lv_style_list_init(lua_State *L) {
-    LV_DEBUG("CALL lv_style_list_init");
-    lv_style_list_t* list = (lv_style_list_t*)lua_touserdata(L, 1);
-    lv_style_list_init(list);
-    return 0;
-}
-
-//  void lv_style_list_copy(lv_style_list_t* list_dest, lv_style_list_t* list_src)
-int luat_lv_style_list_copy(lua_State *L) {
-    LV_DEBUG("CALL lv_style_list_copy");
-    lv_style_list_t* list_dest = (lv_style_list_t*)lua_touserdata(L, 1);
-    lv_style_list_t* list_src = (lv_style_list_t*)lua_touserdata(L, 2);
-    lv_style_list_copy(list_dest ,list_src);
-    return 0;
-}
-
-//  lv_style_t* lv_style_list_get_style(lv_style_list_t* list, uint8_t id)
-int luat_lv_style_list_get_style(lua_State *L) {
-    LV_DEBUG("CALL lv_style_list_get_style");
-    lv_style_list_t* list = (lv_style_list_t*)lua_touserdata(L, 1);
-    uint8_t id = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_t* ret = NULL;
-    ret = lv_style_list_get_style(list ,id);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_style_reset(lv_style_t* style)
-int luat_lv_style_reset(lua_State *L) {
-    LV_DEBUG("CALL lv_style_reset");
-    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
-    lv_style_reset(style);
-    return 0;
-}
-
-//  bool lv_style_remove_prop(lv_style_t* style, lv_style_property_t prop)
-int luat_lv_style_remove_prop(lua_State *L) {
-    LV_DEBUG("CALL lv_style_remove_prop");
-    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
-    lv_style_property_t prop = (lv_style_property_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_style_remove_prop(style ,prop);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  lv_style_t* lv_style_list_get_local_style(lv_style_list_t* list)
-int luat_lv_style_list_get_local_style(lua_State *L) {
-    LV_DEBUG("CALL lv_style_list_get_local_style");
-    lv_style_list_t* list = (lv_style_list_t*)lua_touserdata(L, 1);
-    lv_style_t* ret = NULL;
-    ret = lv_style_list_get_local_style(list);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-

+ 83 - 0
components/lvgl/gen/lv_core/luat_lv_theme.c

@@ -0,0 +1,83 @@
+

+#include "luat_base.h"
+#include "lvgl.h"
+#include "luat_lvgl.h"
+
+
+//  lv_theme_t* lv_theme_get_from_obj(lv_obj_t* obj)
+int luat_lv_theme_get_from_obj(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_get_from_obj");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_theme_t* ret = NULL;
+    ret = lv_theme_get_from_obj(obj);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
+//  void lv_theme_apply(lv_obj_t* obj)
+int luat_lv_theme_apply(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_apply");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_theme_apply(obj);
+    return 0;
+}
+
+//  void lv_theme_set_parent(lv_theme_t* new_theme, lv_theme_t* parent)
+int luat_lv_theme_set_parent(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_set_parent");
+    lv_theme_t* new_theme = (lv_theme_t*)lua_touserdata(L, 1);
+    lv_theme_t* parent = (lv_theme_t*)lua_touserdata(L, 2);
+    lv_theme_set_parent(new_theme ,parent);
+    return 0;
+}
+
+//  lv_font_t* lv_theme_get_font_small(lv_obj_t* obj)
+int luat_lv_theme_get_font_small(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_get_font_small");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_font_t* ret = NULL;
+    ret = lv_theme_get_font_small(obj);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
+//  lv_font_t* lv_theme_get_font_normal(lv_obj_t* obj)
+int luat_lv_theme_get_font_normal(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_get_font_normal");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_font_t* ret = NULL;
+    ret = lv_theme_get_font_normal(obj);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
+//  lv_font_t* lv_theme_get_font_large(lv_obj_t* obj)
+int luat_lv_theme_get_font_large(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_get_font_large");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_font_t* ret = NULL;
+    ret = lv_theme_get_font_large(obj);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
+//  lv_color_t lv_theme_get_color_primary(lv_obj_t* obj)
+int luat_lv_theme_get_color_primary(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_get_color_primary");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_color_t ret;
+    ret = lv_theme_get_color_primary(obj);
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+
+//  lv_color_t lv_theme_get_color_secondary(lv_obj_t* obj)
+int luat_lv_theme_get_color_secondary(lua_State *L) {
+    LV_DEBUG("CALL lv_theme_get_color_secondary");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_color_t ret;
+    ret = lv_theme_get_color_secondary(obj);
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+

+ 61 - 28
components/lvgl/gen/lv_draw/luat_lv_draw.c

@@ -66,8 +66,7 @@ int luat_lv_draw_mask_line_points_init(lua_State *L) {
     lv_coord_t p1y = (lv_coord_t)luaL_checkinteger(L, 3);
     lv_coord_t p2x = (lv_coord_t)luaL_checkinteger(L, 4);
     lv_coord_t p2y = (lv_coord_t)luaL_checkinteger(L, 5);
-    lv_draw_mask_line_side_t side;
-    // miss arg convert
+    lv_draw_mask_line_side_t side = (lv_draw_mask_line_side_t)luaL_checkinteger(L, 6);
     lv_draw_mask_line_points_init(param ,p1x ,p1y ,p2x ,p2y ,side);
     return 0;
 }
@@ -79,8 +78,7 @@ int luat_lv_draw_mask_line_angle_init(lua_State *L) {
     lv_coord_t p1x = (lv_coord_t)luaL_checkinteger(L, 2);
     lv_coord_t py = (lv_coord_t)luaL_checkinteger(L, 3);
     int16_t angle = (int16_t)luaL_checkinteger(L, 4);
-    lv_draw_mask_line_side_t side;
-    // miss arg convert
+    lv_draw_mask_line_side_t side = (lv_draw_mask_line_side_t)luaL_checkinteger(L, 5);
     lv_draw_mask_line_angle_init(param ,p1x ,py ,angle ,side);
     return 0;
 }
@@ -184,28 +182,6 @@ int luat_lv_draw_rect(lua_State *L) {
     return 0;
 }
 
-//  void lv_draw_px(lv_point_t* point, lv_area_t* clip_area, lv_style_t* style)
-int luat_lv_draw_px(lua_State *L) {
-    LV_DEBUG("CALL lv_draw_px");
-    lua_pushvalue(L, 1);
-    lv_point_t point = {0};
-    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lua_pushvalue(L, 2);
-    lv_area_t clip_area = {0};
-    lua_geti(L, -1, 1); clip_area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); clip_area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 3); clip_area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 4); clip_area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 3);
-    lv_draw_px(&point ,&clip_area ,style);
-    return 0;
-}
-
 //  void lv_draw_label_dsc_init(lv_draw_label_dsc_t* dsc)
 int luat_lv_draw_label_dsc_init(lua_State *L) {
     LV_DEBUG("CALL lv_draw_label_dsc_init");
@@ -240,6 +216,33 @@ int luat_lv_draw_label(lua_State *L) {
     return 0;
 }
 
+//  void lv_draw_letter(lv_point_t* pos_p, lv_area_t* clip_area, lv_font_t* font_p, uint32_t letter, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode)
+int luat_lv_draw_letter(lua_State *L) {
+    LV_DEBUG("CALL lv_draw_letter");
+    lua_pushvalue(L, 1);
+    lv_point_t pos_p = {0};
+    lua_geti(L, -1, 1); pos_p.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); pos_p.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lua_pushvalue(L, 2);
+    lv_area_t clip_area = {0};
+    lua_geti(L, -1, 1); clip_area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); clip_area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); clip_area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); clip_area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_font_t* font_p = (lv_font_t*)lua_touserdata(L, 3);
+    uint32_t letter = (uint32_t)luaL_checkinteger(L, 4);
+    lv_color_t color = {0};
+    color.full = luaL_checkinteger(L, 5);
+    lv_opa_t opa = (lv_opa_t)luaL_checkinteger(L, 6);
+    lv_blend_mode_t blend_mode = (lv_blend_mode_t)luaL_checkinteger(L, 7);
+    lv_draw_letter(&pos_p ,&clip_area ,font_p ,letter ,color ,opa ,blend_mode);
+    return 0;
+}
+
 //  void lv_draw_img_dsc_init(lv_draw_img_dsc_t* dsc)
 int luat_lv_draw_img_dsc_init(lua_State *L) {
     LV_DEBUG("CALL lv_draw_img_dsc_init");
@@ -309,7 +312,15 @@ int luat_lv_draw_line_dsc_init(lua_State *L) {
     return 0;
 }
 
-//  void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, uint16_t start_angle, uint16_t end_angle, lv_area_t* clip_area, lv_draw_line_dsc_t* dsc)
+//  void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t* dsc)
+int luat_lv_draw_arc_dsc_init(lua_State *L) {
+    LV_DEBUG("CALL lv_draw_arc_dsc_init");
+    lv_draw_arc_dsc_t* dsc = (lv_draw_arc_dsc_t*)lua_touserdata(L, 1);
+    lv_draw_arc_dsc_init(dsc);
+    return 0;
+}
+
+//  void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, uint16_t start_angle, uint16_t end_angle, lv_area_t* clip_area, lv_draw_arc_dsc_t* dsc)
 int luat_lv_draw_arc(lua_State *L) {
     LV_DEBUG("CALL lv_draw_arc");
     lv_coord_t center_x = (lv_coord_t)luaL_checkinteger(L, 1);
@@ -325,8 +336,30 @@ int luat_lv_draw_arc(lua_State *L) {
     lua_geti(L, -1, 4); clip_area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
     lua_pop(L, 1);
 
-    lv_draw_line_dsc_t* dsc = (lv_draw_line_dsc_t*)lua_touserdata(L, 7);
+    lv_draw_arc_dsc_t* dsc = (lv_draw_arc_dsc_t*)lua_touserdata(L, 7);
     lv_draw_arc(center_x ,center_y ,radius ,start_angle ,end_angle ,&clip_area ,dsc);
     return 0;
 }
 
+//  void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, uint16_t start_angle, uint16_t end_angle, lv_coord_t w, bool rounded, lv_area_t* area)
+int luat_lv_draw_arc_get_area(lua_State *L) {
+    LV_DEBUG("CALL lv_draw_arc_get_area");
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 1);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 2);
+    uint16_t radius = (uint16_t)luaL_checkinteger(L, 3);
+    uint16_t start_angle = (uint16_t)luaL_checkinteger(L, 4);
+    uint16_t end_angle = (uint16_t)luaL_checkinteger(L, 5);
+    lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 6);
+    bool rounded = (bool)lua_toboolean(L, 7);
+    lua_pushvalue(L, 8);
+    lv_area_t area = {0};
+    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_draw_arc_get_area(x ,y ,radius ,start_angle ,end_angle ,w ,rounded ,&area);
+    return 0;
+}
+

+ 0 - 98
components/lvgl/gen/lv_draw/luat_lv_img_buf.c

@@ -1,98 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_img_dsc_t* lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
-int luat_lv_img_buf_alloc(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_alloc");
-    lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 1);
-    lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_img_cf_t cf = (lv_img_cf_t)luaL_checkinteger(L, 3);
-    lv_img_dsc_t* ret = NULL;
-    ret = lv_img_buf_alloc(w ,h ,cf);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t* dsc, lv_coord_t x, lv_coord_t y, lv_color_t color)
-int luat_lv_img_buf_get_px_color(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_get_px_color");
-    lv_img_dsc_t* dsc = (lv_img_dsc_t*)lua_touserdata(L, 1);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_color_t color = {0};
-    color.full = luaL_checkinteger(L, 4);
-    lv_color_t ret;
-    ret = lv_img_buf_get_px_color(dsc ,x ,y ,color);
-    lua_pushinteger(L, ret.full);
-    return 1;
-}
-
-//  lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t* dsc, lv_coord_t x, lv_coord_t y)
-int luat_lv_img_buf_get_px_alpha(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_get_px_alpha");
-    lv_img_dsc_t* dsc = (lv_img_dsc_t*)lua_touserdata(L, 1);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_opa_t ret;
-    ret = lv_img_buf_get_px_alpha(dsc ,x ,y);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_img_buf_set_px_color(lv_img_dsc_t* dsc, lv_coord_t x, lv_coord_t y, lv_color_t c)
-int luat_lv_img_buf_set_px_color(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_set_px_color");
-    lv_img_dsc_t* dsc = (lv_img_dsc_t*)lua_touserdata(L, 1);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_color_t c = {0};
-    c.full = luaL_checkinteger(L, 4);
-    lv_img_buf_set_px_color(dsc ,x ,y ,c);
-    return 0;
-}
-
-//  void lv_img_buf_set_px_alpha(lv_img_dsc_t* dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa)
-int luat_lv_img_buf_set_px_alpha(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_set_px_alpha");
-    lv_img_dsc_t* dsc = (lv_img_dsc_t*)lua_touserdata(L, 1);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_opa_t opa = (lv_opa_t)luaL_checkinteger(L, 4);
-    lv_img_buf_set_px_alpha(dsc ,x ,y ,opa);
-    return 0;
-}
-
-//  void lv_img_buf_set_palette(lv_img_dsc_t* dsc, uint8_t id, lv_color_t c)
-int luat_lv_img_buf_set_palette(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_set_palette");
-    lv_img_dsc_t* dsc = (lv_img_dsc_t*)lua_touserdata(L, 1);
-    uint8_t id = (uint8_t)luaL_checkinteger(L, 2);
-    lv_color_t c = {0};
-    c.full = luaL_checkinteger(L, 3);
-    lv_img_buf_set_palette(dsc ,id ,c);
-    return 0;
-}
-
-//  void lv_img_buf_free(lv_img_dsc_t* dsc)
-int luat_lv_img_buf_free(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_free");
-    lv_img_dsc_t* dsc = (lv_img_dsc_t*)lua_touserdata(L, 1);
-    lv_img_buf_free(dsc);
-    return 0;
-}
-
-//  uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
-int luat_lv_img_buf_get_img_size(lua_State *L) {
-    LV_DEBUG("CALL lv_img_buf_get_img_size");
-    lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 1);
-    lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_img_cf_t cf = (lv_img_cf_t)luaL_checkinteger(L, 3);
-    uint32_t ret;
-    ret = lv_img_buf_get_img_size(w ,h ,cf);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 0 - 22
components/lvgl/gen/lv_draw/luat_lv_img_cache.c

@@ -1,22 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  void lv_img_cache_set_size(uint16_t new_slot_num)
-int luat_lv_img_cache_set_size(lua_State *L) {
-    LV_DEBUG("CALL lv_img_cache_set_size");
-    uint16_t new_slot_num = (uint16_t)luaL_checkinteger(L, 1);
-    lv_img_cache_set_size(new_slot_num);
-    return 0;
-}
-
-//  void lv_img_cache_invalidate_src(void* src)
-int luat_lv_img_cache_invalidate_src(lua_State *L) {
-    LV_DEBUG("CALL lv_img_cache_invalidate_src");
-    void* src = (void*)lua_touserdata(L, 1);
-    lv_img_cache_invalidate_src(src);
-    return 0;
-}
-

+ 0 - 122
components/lvgl/gen/lv_draw/luat_lv_img_decoder.c

@@ -1,122 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_res_t lv_img_decoder_get_info(char* src, lv_img_header_t* header)
-int luat_lv_img_decoder_get_info(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_get_info");
-    char* src = (char*)luaL_checkstring(L, 1);
-    lv_img_header_t* header = (lv_img_header_t*)lua_touserdata(L, 2);
-    lv_res_t ret;
-    ret = lv_img_decoder_get_info(src ,header);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t* dsc, void* src, lv_color_t color)
-int luat_lv_img_decoder_open(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_open");
-    lv_img_decoder_dsc_t* dsc = (lv_img_decoder_dsc_t*)lua_touserdata(L, 1);
-    void* src = (void*)lua_touserdata(L, 2);
-    lv_color_t color = {0};
-    color.full = luaL_checkinteger(L, 3);
-    lv_res_t ret;
-    ret = lv_img_decoder_open(dsc ,src ,color);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t* dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t* buf)
-int luat_lv_img_decoder_read_line(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_read_line");
-    lv_img_decoder_dsc_t* dsc = (lv_img_decoder_dsc_t*)lua_touserdata(L, 1);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_coord_t len = (lv_coord_t)luaL_checkinteger(L, 4);
-    uint8_t* buf = (uint8_t*)lua_touserdata(L, 5);
-    lv_res_t ret;
-    ret = lv_img_decoder_read_line(dsc ,x ,y ,len ,buf);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  void lv_img_decoder_close(lv_img_decoder_dsc_t* dsc)
-int luat_lv_img_decoder_close(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_close");
-    lv_img_decoder_dsc_t* dsc = (lv_img_decoder_dsc_t*)lua_touserdata(L, 1);
-    lv_img_decoder_close(dsc);
-    return 0;
-}
-
-//  lv_img_decoder_t* lv_img_decoder_create()
-int luat_lv_img_decoder_create(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_create");
-    lv_img_decoder_t* ret = NULL;
-    ret = lv_img_decoder_create();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_img_decoder_delete(lv_img_decoder_t* decoder)
-int luat_lv_img_decoder_delete(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_delete");
-    lv_img_decoder_t* decoder = (lv_img_decoder_t*)lua_touserdata(L, 1);
-    lv_img_decoder_delete(decoder);
-    return 0;
-}
-
-//  lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t* decoder, void* src, lv_img_header_t* header)
-int luat_lv_img_decoder_built_in_info(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_built_in_info");
-    lv_img_decoder_t* decoder = (lv_img_decoder_t*)lua_touserdata(L, 1);
-    void* src = (void*)lua_touserdata(L, 2);
-    lv_img_header_t* header = (lv_img_header_t*)lua_touserdata(L, 3);
-    lv_res_t ret;
-    ret = lv_img_decoder_built_in_info(decoder ,src ,header);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t* decoder, lv_img_decoder_dsc_t* dsc)
-int luat_lv_img_decoder_built_in_open(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_built_in_open");
-    lv_img_decoder_t* decoder = (lv_img_decoder_t*)lua_touserdata(L, 1);
-    lv_img_decoder_dsc_t* dsc = (lv_img_decoder_dsc_t*)lua_touserdata(L, 2);
-    lv_res_t ret;
-    ret = lv_img_decoder_built_in_open(decoder ,dsc);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t* decoder, lv_img_decoder_dsc_t* dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t* buf)
-int luat_lv_img_decoder_built_in_read_line(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_built_in_read_line");
-    lv_img_decoder_t* decoder = (lv_img_decoder_t*)lua_touserdata(L, 1);
-    lv_img_decoder_dsc_t* dsc = (lv_img_decoder_dsc_t*)lua_touserdata(L, 2);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_coord_t len = (lv_coord_t)luaL_checkinteger(L, 5);
-    uint8_t* buf = (uint8_t*)lua_touserdata(L, 6);
-    lv_res_t ret;
-    ret = lv_img_decoder_built_in_read_line(decoder ,dsc ,x ,y ,len ,buf);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  void lv_img_decoder_built_in_close(lv_img_decoder_t* decoder, lv_img_decoder_dsc_t* dsc)
-int luat_lv_img_decoder_built_in_close(lua_State *L) {
-    LV_DEBUG("CALL lv_img_decoder_built_in_close");
-    lv_img_decoder_t* decoder = (lv_img_decoder_t*)lua_touserdata(L, 1);
-    lv_img_decoder_dsc_t* dsc = (lv_img_decoder_dsc_t*)lua_touserdata(L, 2);
-    lv_img_decoder_built_in_close(decoder ,dsc);
-    return 0;
-}
-

+ 9 - 0
components/lvgl/gen/lv_font/luat_lv_font.c

@@ -39,3 +39,12 @@ int luat_lv_font_get_line_height(lua_State *L) {
     return 1;
 }
 
+//  lv_font_t* lv_font_default()
+int luat_lv_font_default(lua_State *L) {
+    LV_DEBUG("CALL lv_font_default");
+    lv_font_t* ret = NULL;
+    ret = lv_font_default();
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+

+ 47 - 69
components/lvgl/gen/lv_misc/luat_lv_anim.c

@@ -39,25 +39,16 @@ int luat_lv_anim_set_delay(lua_State *L) {
     return 0;
 }
 
-//  void lv_anim_set_values(lv_anim_t* a, lv_anim_value_t start, lv_anim_value_t end)
+//  void lv_anim_set_values(lv_anim_t* a, int32_t start, int32_t end)
 int luat_lv_anim_set_values(lua_State *L) {
     LV_DEBUG("CALL lv_anim_set_values");
     lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
-    lv_anim_value_t start = (lv_anim_value_t)luaL_checkinteger(L, 2);
-    lv_anim_value_t end = (lv_anim_value_t)luaL_checkinteger(L, 3);
+    int32_t start = (int32_t)luaL_checkinteger(L, 2);
+    int32_t end = (int32_t)luaL_checkinteger(L, 3);
     lv_anim_set_values(a ,start ,end);
     return 0;
 }
 
-//  void lv_anim_set_path(lv_anim_t* a, lv_anim_path_t* path)
-int luat_lv_anim_set_path(lua_State *L) {
-    LV_DEBUG("CALL lv_anim_set_path");
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 2);
-    lv_anim_set_path(a ,path);
-    return 0;
-}
-
 //  void lv_anim_set_playback_time(lv_anim_t* a, uint32_t time)
 int luat_lv_anim_set_playback_time(lua_State *L) {
     LV_DEBUG("CALL lv_anim_set_playback_time");
@@ -94,29 +85,23 @@ int luat_lv_anim_set_repeat_delay(lua_State *L) {
     return 0;
 }
 
-//  void lv_anim_start(lv_anim_t* a)
-int luat_lv_anim_start(lua_State *L) {
-    LV_DEBUG("CALL lv_anim_start");
+//  void lv_anim_set_early_apply(lv_anim_t* a, bool en)
+int luat_lv_anim_set_early_apply(lua_State *L) {
+    LV_DEBUG("CALL lv_anim_set_early_apply");
     lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
-    lv_anim_start(a);
+    bool en = (bool)lua_toboolean(L, 2);
+    lv_anim_set_early_apply(a ,en);
     return 0;
 }
 
-//  void lv_anim_path_init(lv_anim_path_t* path)
-int luat_lv_anim_path_init(lua_State *L) {
-    LV_DEBUG("CALL lv_anim_path_init");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_path_init(path);
-    return 0;
-}
-
-//  void lv_anim_path_set_user_data(lv_anim_path_t* path, void* user_data)
-int luat_lv_anim_path_set_user_data(lua_State *L) {
-    LV_DEBUG("CALL lv_anim_path_set_user_data");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    void* user_data = (void*)lua_touserdata(L, 2);
-    lv_anim_path_set_user_data(path ,user_data);
-    return 0;
+//  lv_anim_t* lv_anim_start(lv_anim_t* a)
+int luat_lv_anim_start(lua_State *L) {
+    LV_DEBUG("CALL lv_anim_start");
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    lv_anim_t* ret = NULL;
+    ret = lv_anim_start(a);
+    lua_pushlightuserdata(L, ret);
+    return 1;
 }
 
 //  uint32_t lv_anim_get_delay(lv_anim_t* a)
@@ -181,12 +166,12 @@ int luat_lv_anim_count_running(lua_State *L) {
     return 1;
 }
 
-//  uint32_t lv_anim_speed_to_time(uint32_t speed, lv_anim_value_t start, lv_anim_value_t end)
+//  uint32_t lv_anim_speed_to_time(uint32_t speed, int32_t start, int32_t end)
 int luat_lv_anim_speed_to_time(lua_State *L) {
     LV_DEBUG("CALL lv_anim_speed_to_time");
     uint32_t speed = (uint32_t)luaL_checkinteger(L, 1);
-    lv_anim_value_t start = (lv_anim_value_t)luaL_checkinteger(L, 2);
-    lv_anim_value_t end = (lv_anim_value_t)luaL_checkinteger(L, 3);
+    int32_t start = (int32_t)luaL_checkinteger(L, 2);
+    int32_t end = (int32_t)luaL_checkinteger(L, 3);
     uint32_t ret;
     ret = lv_anim_speed_to_time(speed ,start ,end);
     lua_pushinteger(L, ret);
@@ -200,79 +185,72 @@ int luat_lv_anim_refr_now(lua_State *L) {
     return 0;
 }
 
-//  lv_anim_value_t lv_anim_path_linear(lv_anim_path_t* path, lv_anim_t* a)
+//  int32_t lv_anim_path_linear(lv_anim_t* a)
 int luat_lv_anim_path_linear(lua_State *L) {
     LV_DEBUG("CALL lv_anim_path_linear");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 2);
-    lv_anim_value_t ret;
-    ret = lv_anim_path_linear(path ,a);
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_anim_path_linear(a);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_anim_value_t lv_anim_path_ease_in(lv_anim_path_t* path, lv_anim_t* a)
+//  int32_t lv_anim_path_ease_in(lv_anim_t* a)
 int luat_lv_anim_path_ease_in(lua_State *L) {
     LV_DEBUG("CALL lv_anim_path_ease_in");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 2);
-    lv_anim_value_t ret;
-    ret = lv_anim_path_ease_in(path ,a);
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_anim_path_ease_in(a);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_anim_value_t lv_anim_path_ease_out(lv_anim_path_t* path, lv_anim_t* a)
+//  int32_t lv_anim_path_ease_out(lv_anim_t* a)
 int luat_lv_anim_path_ease_out(lua_State *L) {
     LV_DEBUG("CALL lv_anim_path_ease_out");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 2);
-    lv_anim_value_t ret;
-    ret = lv_anim_path_ease_out(path ,a);
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_anim_path_ease_out(a);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_anim_value_t lv_anim_path_ease_in_out(lv_anim_path_t* path, lv_anim_t* a)
+//  int32_t lv_anim_path_ease_in_out(lv_anim_t* a)
 int luat_lv_anim_path_ease_in_out(lua_State *L) {
     LV_DEBUG("CALL lv_anim_path_ease_in_out");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 2);
-    lv_anim_value_t ret;
-    ret = lv_anim_path_ease_in_out(path ,a);
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_anim_path_ease_in_out(a);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_anim_value_t lv_anim_path_overshoot(lv_anim_path_t* path, lv_anim_t* a)
+//  int32_t lv_anim_path_overshoot(lv_anim_t* a)
 int luat_lv_anim_path_overshoot(lua_State *L) {
     LV_DEBUG("CALL lv_anim_path_overshoot");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 2);
-    lv_anim_value_t ret;
-    ret = lv_anim_path_overshoot(path ,a);
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_anim_path_overshoot(a);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_anim_value_t lv_anim_path_bounce(lv_anim_path_t* path, lv_anim_t* a)
+//  int32_t lv_anim_path_bounce(lv_anim_t* a)
 int luat_lv_anim_path_bounce(lua_State *L) {
     LV_DEBUG("CALL lv_anim_path_bounce");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 2);
-    lv_anim_value_t ret;
-    ret = lv_anim_path_bounce(path ,a);
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_anim_path_bounce(a);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_anim_value_t lv_anim_path_step(lv_anim_path_t* path, lv_anim_t* a)
+//  int32_t lv_anim_path_step(lv_anim_t* a)
 int luat_lv_anim_path_step(lua_State *L) {
     LV_DEBUG("CALL lv_anim_path_step");
-    lv_anim_path_t* path = (lv_anim_path_t*)lua_touserdata(L, 1);
-    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 2);
-    lv_anim_value_t ret;
-    ret = lv_anim_path_step(path ,a);
+    lv_anim_t* a = (lv_anim_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_anim_path_step(a);
     lua_pushinteger(L, ret);
     return 1;
 }

+ 60 - 0
components/lvgl/gen/lv_misc/luat_lv_area.c

@@ -129,3 +129,63 @@ int luat_lv_area_get_size(lua_State *L) {
     return 1;
 }
 
+//  void lv_area_increase(lv_area_t* area, lv_coord_t w_extra, lv_coord_t h_extra)
+int luat_lv_area_increase(lua_State *L) {
+    LV_DEBUG("CALL lv_area_increase");
+    lua_pushvalue(L, 1);
+    lv_area_t area = {0};
+    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_coord_t w_extra = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t h_extra = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_area_increase(&area ,w_extra ,h_extra);
+    return 0;
+}
+
+//  void lv_area_move(lv_area_t* area, lv_coord_t x_ofs, lv_coord_t y_ofs)
+int luat_lv_area_move(lua_State *L) {
+    LV_DEBUG("CALL lv_area_move");
+    lua_pushvalue(L, 1);
+    lv_area_t area = {0};
+    lua_geti(L, -1, 1); area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y_ofs = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_area_move(&area ,x_ofs ,y_ofs);
+    return 0;
+}
+
+//  void lv_area_align(lv_area_t* base, lv_area_t* to_align, lv_align_t align, lv_coord_t ofs_x, lv_coord_t ofs_y)
+int luat_lv_area_align(lua_State *L) {
+    LV_DEBUG("CALL lv_area_align");
+    lua_pushvalue(L, 1);
+    lv_area_t base = {0};
+    lua_geti(L, -1, 1); base.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); base.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); base.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); base.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lua_pushvalue(L, 2);
+    lv_area_t to_align = {0};
+    lua_geti(L, -1, 1); to_align.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); to_align.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 3); to_align.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 4); to_align.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
+    lv_coord_t ofs_x = (lv_coord_t)luaL_checkinteger(L, 4);
+    lv_coord_t ofs_y = (lv_coord_t)luaL_checkinteger(L, 5);
+    lv_area_align(&base ,&to_align ,align ,ofs_x ,ofs_y);
+    return 0;
+}
+

+ 0 - 19
components/lvgl/gen/lv_misc/luat_lv_async.c

@@ -1,19 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_res_t lv_async_call(lv_async_cb_t async_xcb, void* user_data)
-int luat_lv_async_call(lua_State *L) {
-    LV_DEBUG("CALL lv_async_call");
-    lv_async_cb_t async_xcb;
-    // miss arg convert
-    void* user_data = (void*)lua_touserdata(L, 2);
-    lv_res_t ret;
-    ret = lv_async_call(async_xcb ,user_data);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-

+ 49 - 0
components/lvgl/gen/lv_misc/luat_lv_color.c

@@ -144,6 +144,16 @@ int luat_lv_color_hex3(lua_State *L) {
     return 1;
 }
 
+//  void lv_color_filter_dsc_init(lv_color_filter_dsc_t* dsc, lv_color_filter_cb_t cb)
+int luat_lv_color_filter_dsc_init(lua_State *L) {
+    LV_DEBUG("CALL lv_color_filter_dsc_init");
+    lv_color_filter_dsc_t* dsc = (lv_color_filter_dsc_t*)lua_touserdata(L, 1);
+    lv_color_filter_cb_t cb;
+    // miss arg convert
+    lv_color_filter_dsc_init(dsc ,cb);
+    return 0;
+}
+
 //  void lv_color_fill(lv_color_t* buf, lv_color_t color, uint32_t px_num)
 int luat_lv_color_fill(lua_State *L) {
     LV_DEBUG("CALL lv_color_fill");
@@ -179,6 +189,18 @@ int luat_lv_color_darken(lua_State *L) {
     return 1;
 }
 
+//  lv_color_t lv_color_change_lightness(lv_color_t c, lv_opa_t lvl)
+int luat_lv_color_change_lightness(lua_State *L) {
+    LV_DEBUG("CALL lv_color_change_lightness");
+    lv_color_t c = {0};
+    c.full = luaL_checkinteger(L, 1);
+    lv_opa_t lvl = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_color_t ret;
+    ret = lv_color_change_lightness(c ,lvl);
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+
 //  lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v)
 int luat_lv_color_hsv_to_rgb(lua_State *L) {
     LV_DEBUG("CALL lv_color_hsv_to_rgb");
@@ -218,3 +240,30 @@ int luat_lv_color_to_hsv(lua_State *L) {
     return 3;
 }
 
+//  lv_color_t lv_color_chroma_key()
+int luat_lv_color_chroma_key(lua_State *L) {
+    LV_DEBUG("CALL lv_color_chroma_key");
+    lv_color_t ret;
+    ret = lv_color_chroma_key();
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+
+//  lv_color_t lv_color_white()
+int luat_lv_color_white(lua_State *L) {
+    LV_DEBUG("CALL lv_color_white");
+    lv_color_t ret;
+    ret = lv_color_white();
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+
+//  lv_color_t lv_color_black()
+int luat_lv_color_black(lua_State *L) {
+    LV_DEBUG("CALL lv_color_black");
+    lv_color_t ret;
+    ret = lv_color_black();
+    lua_pushinteger(L, ret.full);
+    return 1;
+}
+

+ 0 - 45
components/lvgl/gen/lv_misc/luat_lv_debug.c

@@ -1,45 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  bool lv_debug_check_null(void* p)
-int luat_lv_debug_check_null(lua_State *L) {
-    LV_DEBUG("CALL lv_debug_check_null");
-    void* p = (void*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_debug_check_null(p);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_debug_check_mem_integrity()
-int luat_lv_debug_check_mem_integrity(lua_State *L) {
-    LV_DEBUG("CALL lv_debug_check_mem_integrity");
-    bool ret;
-    ret = lv_debug_check_mem_integrity();
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_debug_check_str(void* str)
-int luat_lv_debug_check_str(lua_State *L) {
-    LV_DEBUG("CALL lv_debug_check_str");
-    void* str = (void*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_debug_check_str(str);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  void lv_debug_log_error(char* msg, uint64_t value)
-int luat_lv_debug_log_error(lua_State *L) {
-    LV_DEBUG("CALL lv_debug_log_error");
-    char* msg = (char*)luaL_checkstring(L, 1);
-    uint64_t value;
-    // miss arg convert
-    lv_debug_log_error(msg ,value);
-    return 0;
-}
-

+ 0 - 253
components/lvgl/gen/lv_misc/luat_lv_fs.c

@@ -1,253 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  void lv_fs_drv_init(lv_fs_drv_t* drv)
-int luat_lv_fs_drv_init(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_drv_init");
-    lv_fs_drv_t* drv = (lv_fs_drv_t*)lua_touserdata(L, 1);
-    lv_fs_drv_init(drv);
-    return 0;
-}
-
-//  void lv_fs_drv_register(lv_fs_drv_t* drv_p)
-int luat_lv_fs_drv_register(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_drv_register");
-    lv_fs_drv_t* drv_p = (lv_fs_drv_t*)lua_touserdata(L, 1);
-    lv_fs_drv_register(drv_p);
-    return 0;
-}
-
-//  lv_fs_drv_t* lv_fs_get_drv(char letter)
-int luat_lv_fs_get_drv(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_get_drv");
-    char letter = (char)luaL_checkinteger(L, 1);
-    lv_fs_drv_t* ret = NULL;
-    ret = lv_fs_get_drv(letter);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  bool lv_fs_is_ready(char letter)
-int luat_lv_fs_is_ready(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_is_ready");
-    char letter = (char)luaL_checkinteger(L, 1);
-    bool ret;
-    ret = lv_fs_is_ready(letter);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  lv_fs_res_t lv_fs_open(lv_fs_file_t* file_p, char* path, lv_fs_mode_t mode)
-int luat_lv_fs_open(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_open");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    char* path = (char*)luaL_checkstring(L, 2);
-    lv_fs_mode_t mode;
-    // miss arg convert
-    lv_fs_res_t ret;
-    ret = lv_fs_open(file_p ,path ,mode);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_close(lv_fs_file_t* file_p)
-int luat_lv_fs_close(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_close");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    lv_fs_res_t ret;
-    ret = lv_fs_close(file_p);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_remove(char* path)
-int luat_lv_fs_remove(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_remove");
-    char* path = (char*)luaL_checkstring(L, 1);
-    lv_fs_res_t ret;
-    ret = lv_fs_remove(path);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_read(lv_fs_file_t* file_p, void* buf, uint32_t btr, uint32_t* br)
-int luat_lv_fs_read(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_read");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    void* buf = (void*)lua_touserdata(L, 2);
-    uint32_t btr = (uint32_t)luaL_checkinteger(L, 3);
-    uint32_t* br = (uint32_t*)lua_touserdata(L, 4);
-    lv_fs_res_t ret;
-    ret = lv_fs_read(file_p ,buf ,btr ,br);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_write(lv_fs_file_t* file_p, void* buf, uint32_t btw, uint32_t* bw)
-int luat_lv_fs_write(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_write");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    void* buf = (void*)lua_touserdata(L, 2);
-    uint32_t btw = (uint32_t)luaL_checkinteger(L, 3);
-    uint32_t* bw = (uint32_t*)lua_touserdata(L, 4);
-    lv_fs_res_t ret;
-    ret = lv_fs_write(file_p ,buf ,btw ,bw);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_seek(lv_fs_file_t* file_p, uint32_t pos)
-int luat_lv_fs_seek(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_seek");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    uint32_t pos = (uint32_t)luaL_checkinteger(L, 2);
-    lv_fs_res_t ret;
-    ret = lv_fs_seek(file_p ,pos);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_tell(lv_fs_file_t* file_p, uint32_t* pos)
-int luat_lv_fs_tell(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_tell");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    uint32_t* pos = (uint32_t*)lua_touserdata(L, 2);
-    lv_fs_res_t ret;
-    ret = lv_fs_tell(file_p ,pos);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_trunc(lv_fs_file_t* file_p)
-int luat_lv_fs_trunc(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_trunc");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    lv_fs_res_t ret;
-    ret = lv_fs_trunc(file_p);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_size(lv_fs_file_t* file_p, uint32_t* size)
-int luat_lv_fs_size(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_size");
-    lv_fs_file_t* file_p = (lv_fs_file_t*)lua_touserdata(L, 1);
-    uint32_t* size = (uint32_t*)lua_touserdata(L, 2);
-    lv_fs_res_t ret;
-    ret = lv_fs_size(file_p ,size);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_rename(char* oldname, char* newname)
-int luat_lv_fs_rename(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_rename");
-    char* oldname = (char*)luaL_checkstring(L, 1);
-    char* newname = (char*)luaL_checkstring(L, 2);
-    lv_fs_res_t ret;
-    ret = lv_fs_rename(oldname ,newname);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t* rddir_p, char* path)
-int luat_lv_fs_dir_open(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_dir_open");
-    lv_fs_dir_t* rddir_p = (lv_fs_dir_t*)lua_touserdata(L, 1);
-    char* path = (char*)luaL_checkstring(L, 2);
-    lv_fs_res_t ret;
-    ret = lv_fs_dir_open(rddir_p ,path);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t* rddir_p, char* fn)
-int luat_lv_fs_dir_read(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_dir_read");
-    lv_fs_dir_t* rddir_p = (lv_fs_dir_t*)lua_touserdata(L, 1);
-    char* fn = (char*)luaL_checkstring(L, 2);
-    lv_fs_res_t ret;
-    ret = lv_fs_dir_read(rddir_p ,fn);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t* rddir_p)
-int luat_lv_fs_dir_close(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_dir_close");
-    lv_fs_dir_t* rddir_p = (lv_fs_dir_t*)lua_touserdata(L, 1);
-    lv_fs_res_t ret;
-    ret = lv_fs_dir_close(rddir_p);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  lv_fs_res_t lv_fs_free_space(char letter, uint32_t* total_p, uint32_t* free_p)
-int luat_lv_fs_free_space(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_free_space");
-    char letter = (char)luaL_checkinteger(L, 1);
-    uint32_t* total_p = (uint32_t*)lua_touserdata(L, 2);
-    uint32_t* free_p = (uint32_t*)lua_touserdata(L, 3);
-    lv_fs_res_t ret;
-    ret = lv_fs_free_space(letter ,total_p ,free_p);
-    lua_pushboolean(L, ret == 0 ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  char* lv_fs_get_letters(char* buf)
-int luat_lv_fs_get_letters(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_get_letters");
-    char* buf = (char*)luaL_checkstring(L, 1);
-    char* ret = NULL;
-    ret = lv_fs_get_letters(buf);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  char* lv_fs_get_ext(char* fn)
-int luat_lv_fs_get_ext(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_get_ext");
-    char* fn = (char*)luaL_checkstring(L, 1);
-    char* ret = NULL;
-    ret = lv_fs_get_ext(fn);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  char* lv_fs_up(char* path)
-int luat_lv_fs_up(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_up");
-    char* path = (char*)luaL_checkstring(L, 1);
-    char* ret = NULL;
-    ret = lv_fs_up(path);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  char* lv_fs_get_last(char* path)
-int luat_lv_fs_get_last(lua_State *L) {
-    LV_DEBUG("CALL lv_fs_get_last");
-    char* path = (char*)luaL_checkstring(L, 1);
-    char* ret = NULL;
-    ret = lv_fs_get_last(path);
-    lua_pushstring(L, ret);
-    return 1;
-}
-

+ 0 - 14
components/lvgl/gen/lv_misc/luat_lv_log.c

@@ -1,14 +0,0 @@
-
-
-#include "luat_base.h"
-#include "lvgl.h"
-
-
-//  void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb)
-int luat_lv_log_register_print_cb(lua_State *L) {
-    //lv_log_print_g_cb_t print_cb;
-    // miss arg convert
-    //lv_log_register_print_cb(print_cb);
-    return 0;
-}
-

+ 0 - 60
components/lvgl/gen/lv_misc/luat_lv_mem.c

@@ -1,60 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  void* lv_mem_alloc(size_t size)
-int luat_lv_mem_alloc(lua_State *L) {
-    LV_DEBUG("CALL lv_mem_alloc");
-    size_t size = (size_t)luaL_checkinteger(L, 1);
-    void* ret = NULL;
-    ret = lv_mem_alloc(size);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_mem_free(void* data)
-int luat_lv_mem_free(lua_State *L) {
-    LV_DEBUG("CALL lv_mem_free");
-    void* data = (void*)lua_touserdata(L, 1);
-    lv_mem_free(data);
-    return 0;
-}
-
-//  void* lv_mem_realloc(void* data_p, size_t new_size)
-int luat_lv_mem_realloc(lua_State *L) {
-    LV_DEBUG("CALL lv_mem_realloc");
-    void* data_p = (void*)lua_touserdata(L, 1);
-    size_t new_size = (size_t)luaL_checkinteger(L, 2);
-    void* ret = NULL;
-    ret = lv_mem_realloc(data_p ,new_size);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_mem_defrag()
-int luat_lv_mem_defrag(lua_State *L) {
-    LV_DEBUG("CALL lv_mem_defrag");
-    lv_mem_defrag();
-    return 0;
-}
-
-//  lv_res_t lv_mem_test()
-int luat_lv_mem_test(lua_State *L) {
-    LV_DEBUG("CALL lv_mem_test");
-    lv_res_t ret;
-    ret = lv_mem_test();
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
-}
-
-//  void lv_mem_monitor(lv_mem_monitor_t* mon_p)
-int luat_lv_mem_monitor(lua_State *L) {
-    LV_DEBUG("CALL lv_mem_monitor");
-    lv_mem_monitor_t* mon_p = (lv_mem_monitor_t*)lua_touserdata(L, 1);
-    lv_mem_monitor(mon_p);
-    return 0;
-}
-

+ 964 - 0
components/lvgl/gen/lv_misc/luat_lv_style.c

@@ -0,0 +1,964 @@
+

+#include "luat_base.h"
+#include "lvgl.h"
+#include "luat_lvgl.h"
+
+
+//  void lv_style_init(lv_style_t* style)
+int luat_lv_style_init(lua_State *L) {
+    LV_DEBUG("CALL lv_style_init");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_style_init(style);
+    return 0;
+}
+
+//  void lv_style_reset(lv_style_t* style)
+int luat_lv_style_reset(lua_State *L) {
+    LV_DEBUG("CALL lv_style_reset");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_style_reset(style);
+    return 0;
+}
+
+//  lv_style_prop_t lv_style_register_prop()
+int luat_lv_style_register_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_style_register_prop");
+    lv_style_prop_t ret;
+    ret = lv_style_register_prop();
+    lua_pushinteger(L, ret);
+    return 1;
+}
+
+//  bool lv_style_remove_prop(lv_style_t* style, lv_style_prop_t prop)
+int luat_lv_style_remove_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_style_remove_prop");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 2);
+    bool ret;
+    ret = lv_style_remove_prop(style ,prop);
+    lua_pushboolean(L, ret);
+    return 1;
+}
+
+//  void lv_style_set_prop(lv_style_t* style, lv_style_prop_t prop, lv_style_value_t value)
+int luat_lv_style_set_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_prop");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 2);
+    lv_style_value_t value;
+    // miss arg convert
+    lv_style_set_prop(style ,prop ,value);
+    return 0;
+}
+
+//  lv_res_t lv_style_get_prop(lv_style_t* style, lv_style_prop_t prop, lv_style_value_t* value)
+int luat_lv_style_get_prop(lua_State *L) {
+    LV_DEBUG("CALL lv_style_get_prop");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 2);
+    lv_style_value_t* value = (lv_style_value_t*)lua_touserdata(L, 3);
+    lv_res_t ret;
+    ret = lv_style_get_prop(style ,prop ,value);
+    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
+    lua_pushinteger(L, ret);
+    return 2;
+}
+
+//  lv_res_t lv_style_get_prop_inlined(lv_style_t* style, lv_style_prop_t prop, lv_style_value_t* value)
+int luat_lv_style_get_prop_inlined(lua_State *L) {
+    LV_DEBUG("CALL lv_style_get_prop_inlined");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 2);
+    lv_style_value_t* value = (lv_style_value_t*)lua_touserdata(L, 3);
+    lv_res_t ret;
+    ret = lv_style_get_prop_inlined(style ,prop ,value);
+    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
+    lua_pushinteger(L, ret);
+    return 2;
+}
+
+//  lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
+int luat_lv_style_prop_get_default(lua_State *L) {
+    LV_DEBUG("CALL lv_style_prop_get_default");
+    lv_style_prop_t prop = (lv_style_prop_t)luaL_checkinteger(L, 1);
+    lv_style_value_t ret;
+    ret = lv_style_prop_get_default(prop);
+    return 0;
+}
+
+//  bool lv_style_is_empty(lv_style_t* style)
+int luat_lv_style_is_empty(lua_State *L) {
+    LV_DEBUG("CALL lv_style_is_empty");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    bool ret;
+    ret = lv_style_is_empty(style);
+    lua_pushboolean(L, ret);
+    return 1;
+}
+
+//  void lv_style_set_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_min_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_min_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_min_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_min_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_max_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_max_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_max_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_max_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_height(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_height(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_height");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_height(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_min_height(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_min_height(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_min_height");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_min_height(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_max_height(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_max_height(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_max_height");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_max_height(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_x(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_x(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_x");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_x(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_y(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_y(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_y");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_y(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_align(lv_style_t* style, lv_align_t value)
+int luat_lv_style_set_align(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_align");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_align_t value = (lv_align_t)luaL_checkinteger(L, 2);
+    lv_style_set_align(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_transform_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_transform_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_transform_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_transform_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_transform_height(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_transform_height(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_transform_height");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_transform_height(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_translate_x(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_translate_x(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_translate_x");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_translate_x(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_translate_y(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_translate_y(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_translate_y");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_translate_y(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_transform_zoom(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_transform_zoom(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_transform_zoom");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_transform_zoom(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_transform_angle(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_transform_angle(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_transform_angle");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_transform_angle(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_top(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_top(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_top");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_top(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_bottom(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_bottom(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_bottom");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_bottom(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_left(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_left(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_left");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_left(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_right(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_right(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_right");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_right(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_row(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_row(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_row");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_row(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_column(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_column(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_column");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_column(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_radius(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_radius(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_radius");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_radius(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_clip_corner(lv_style_t* style, bool value)
+int luat_lv_style_set_clip_corner(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_clip_corner");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    bool value = (bool)lua_toboolean(L, 2);
+    lv_style_set_clip_corner(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_color_filter_dsc(lv_style_t* style, lv_color_filter_dsc_t* value)
+int luat_lv_style_set_color_filter_dsc(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_color_filter_dsc");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_filter_dsc_t* value = (lv_color_filter_dsc_t*)lua_touserdata(L, 2);
+    lv_style_set_color_filter_dsc(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_color_filter_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_color_filter_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_color_filter_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_color_filter_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_anim_time(lv_style_t* style, uint32_t value)
+int luat_lv_style_set_anim_time(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_anim_time");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    uint32_t value = (uint32_t)luaL_checkinteger(L, 2);
+    lv_style_set_anim_time(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_anim_speed(lv_style_t* style, uint32_t value)
+int luat_lv_style_set_anim_speed(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_anim_speed");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    uint32_t value = (uint32_t)luaL_checkinteger(L, 2);
+    lv_style_set_anim_speed(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_transition(lv_style_t* style, lv_style_transition_dsc_t* value)
+int luat_lv_style_set_transition(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_transition");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_style_transition_dsc_t* value = (lv_style_transition_dsc_t*)lua_touserdata(L, 2);
+    lv_style_set_transition(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_blend_mode(lv_style_t* style, lv_blend_mode_t value)
+int luat_lv_style_set_blend_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_blend_mode");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_blend_mode_t value = (lv_blend_mode_t)luaL_checkinteger(L, 2);
+    lv_style_set_blend_mode(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_layout(lv_style_t* style, uint16_t value)
+int luat_lv_style_set_layout(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_layout");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    uint16_t value = (uint16_t)luaL_checkinteger(L, 2);
+    lv_style_set_layout(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_base_dir(lv_style_t* style, lv_base_dir_t value)
+int luat_lv_style_set_base_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_base_dir");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_base_dir_t value = (lv_base_dir_t)luaL_checkinteger(L, 2);
+    lv_style_set_base_dir(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_bg_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_bg_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_bg_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_bg_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_bg_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_bg_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_grad_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_bg_grad_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_grad_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_bg_grad_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_grad_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_bg_grad_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_grad_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_bg_grad_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_grad_dir(lv_style_t* style, lv_grad_dir_t value)
+int luat_lv_style_set_bg_grad_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_grad_dir");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_grad_dir_t value = (lv_grad_dir_t)luaL_checkinteger(L, 2);
+    lv_style_set_bg_grad_dir(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_main_stop(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_bg_main_stop(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_main_stop");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_bg_main_stop(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_grad_stop(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_bg_grad_stop(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_grad_stop");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_bg_grad_stop(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_img_src(lv_style_t* style, void* value)
+int luat_lv_style_set_bg_img_src(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_img_src");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    void* value = (void*)lua_touserdata(L, 2);
+    lv_style_set_bg_img_src(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_img_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_bg_img_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_img_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_bg_img_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_img_recolor(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_bg_img_recolor(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_img_recolor");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_bg_img_recolor(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_img_recolor_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_bg_img_recolor_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_img_recolor_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_bg_img_recolor_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_img_recolor_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_bg_img_recolor_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_img_recolor_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_bg_img_recolor_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_bg_img_tiled(lv_style_t* style, bool value)
+int luat_lv_style_set_bg_img_tiled(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_bg_img_tiled");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    bool value = (bool)lua_toboolean(L, 2);
+    lv_style_set_bg_img_tiled(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_border_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_border_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_border_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_border_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_border_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_border_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_border_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_border_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_border_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_border_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_border_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_border_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_border_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_border_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_border_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_border_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_border_side(lv_style_t* style, lv_border_side_t value)
+int luat_lv_style_set_border_side(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_border_side");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_border_side_t value = (lv_border_side_t)luaL_checkinteger(L, 2);
+    lv_style_set_border_side(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_border_post(lv_style_t* style, bool value)
+int luat_lv_style_set_border_post(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_border_post");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    bool value = (bool)lua_toboolean(L, 2);
+    lv_style_set_border_post(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_text_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_text_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_text_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_text_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_text_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_text_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_font(lv_style_t* style, lv_font_t* value)
+int luat_lv_style_set_text_font(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_font");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_font_t* value = (lv_font_t*)lua_touserdata(L, 2);
+    lv_style_set_text_font(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_letter_space(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_text_letter_space(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_letter_space");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_text_letter_space(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_line_space(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_text_line_space(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_line_space");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_text_line_space(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_decor(lv_style_t* style, lv_text_decor_t value)
+int luat_lv_style_set_text_decor(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_decor");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_text_decor_t value = (lv_text_decor_t)luaL_checkinteger(L, 2);
+    lv_style_set_text_decor(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_text_align(lv_style_t* style, lv_text_align_t value)
+int luat_lv_style_set_text_align(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_text_align");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_text_align_t value = (lv_text_align_t)luaL_checkinteger(L, 2);
+    lv_style_set_text_align(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_img_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_img_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_img_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_img_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_img_recolor(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_img_recolor(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_img_recolor");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_img_recolor(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_img_recolor_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_img_recolor_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_img_recolor_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_img_recolor_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_img_recolor_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_img_recolor_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_img_recolor_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_img_recolor_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_outline_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_outline_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_outline_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_outline_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_outline_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_outline_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_outline_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_outline_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_outline_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_outline_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_outline_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_outline_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_outline_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_outline_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_outline_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_outline_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_outline_pad(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_outline_pad(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_outline_pad");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_outline_pad(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_shadow_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_shadow_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_shadow_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_shadow_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_shadow_ofs_x(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_shadow_ofs_x(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_shadow_ofs_x");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_shadow_ofs_x(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_shadow_ofs_y(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_shadow_ofs_y(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_shadow_ofs_y");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_shadow_ofs_y(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_shadow_spread(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_shadow_spread(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_shadow_spread");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_shadow_spread(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_shadow_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_shadow_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_shadow_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_shadow_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_shadow_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_shadow_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_shadow_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_shadow_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_shadow_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_shadow_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_shadow_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_shadow_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_line_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_line_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_line_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_line_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_line_dash_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_line_dash_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_line_dash_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_line_dash_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_line_dash_gap(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_line_dash_gap(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_line_dash_gap");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_line_dash_gap(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_line_rounded(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_line_rounded(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_line_rounded");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_line_rounded(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_line_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_line_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_line_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_line_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_line_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_line_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_line_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_line_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_line_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_line_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_line_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_line_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_arc_width(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_arc_width(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_arc_width");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_arc_width(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_arc_rounded(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_arc_rounded(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_arc_rounded");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_arc_rounded(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_arc_color(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_arc_color(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_arc_color");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_arc_color(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_arc_color_filtered(lv_style_t* style, lv_color_t value)
+int luat_lv_style_set_arc_color_filtered(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_arc_color_filtered");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_color_t value = {0};
+    value.full = luaL_checkinteger(L, 2);
+    lv_style_set_arc_color_filtered(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_arc_opa(lv_style_t* style, lv_opa_t value)
+int luat_lv_style_set_arc_opa(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_arc_opa");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_opa_t value = (lv_opa_t)luaL_checkinteger(L, 2);
+    lv_style_set_arc_opa(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_arc_img_src(lv_style_t* style, void* value)
+int luat_lv_style_set_arc_img_src(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_arc_img_src");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    void* value = (void*)lua_touserdata(L, 2);
+    lv_style_set_arc_img_src(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_all(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_all(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_all");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_all(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_hor(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_hor(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_hor");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_hor(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_ver(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_ver(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_ver");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_ver(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_pad_gap(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_pad_gap(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_pad_gap");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_pad_gap(style ,value);
+    return 0;
+}
+
+//  void lv_style_set_size(lv_style_t* style, lv_coord_t value)
+int luat_lv_style_set_size(lua_State *L) {
+    LV_DEBUG("CALL lv_style_set_size");
+    lv_style_t* style = (lv_style_t*)lua_touserdata(L, 1);
+    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_style_set_size(style ,value);
+    return 0;
+}
+

+ 0 - 118
components/lvgl/gen/lv_misc/luat_lv_task.c

@@ -1,118 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  uint32_t lv_task_handler()
-int luat_lv_task_handler(lua_State *L) {
-    LV_DEBUG("CALL lv_task_handler");
-    uint32_t ret;
-    ret = lv_task_handler();
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_task_t* lv_task_create_basic()
-int luat_lv_task_create_basic(lua_State *L) {
-    LV_DEBUG("CALL lv_task_create_basic");
-    lv_task_t* ret = NULL;
-    ret = lv_task_create_basic();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_task_t* lv_task_create(lv_task_cb_t task_xcb, uint32_t period, lv_task_prio_t prio, void* user_data)
-int luat_lv_task_create(lua_State *L) {
-    LV_DEBUG("CALL lv_task_create");
-    lv_task_cb_t task_xcb;
-    // miss arg convert
-    uint32_t period = (uint32_t)luaL_checkinteger(L, 2);
-    lv_task_prio_t prio;
-    // miss arg convert
-    void* user_data = (void*)lua_touserdata(L, 4);
-    lv_task_t* ret = NULL;
-    ret = lv_task_create(task_xcb ,period ,prio ,user_data);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_task_del(lv_task_t* task)
-int luat_lv_task_del(lua_State *L) {
-    LV_DEBUG("CALL lv_task_del");
-    lv_task_t* task = (lv_task_t*)lua_touserdata(L, 1);
-    lv_task_del(task);
-    return 0;
-}
-
-//  void lv_task_set_prio(lv_task_t* task, lv_task_prio_t prio)
-int luat_lv_task_set_prio(lua_State *L) {
-    LV_DEBUG("CALL lv_task_set_prio");
-    lv_task_t* task = (lv_task_t*)lua_touserdata(L, 1);
-    lv_task_prio_t prio;
-    // miss arg convert
-    lv_task_set_prio(task ,prio);
-    return 0;
-}
-
-//  void lv_task_set_period(lv_task_t* task, uint32_t period)
-int luat_lv_task_set_period(lua_State *L) {
-    LV_DEBUG("CALL lv_task_set_period");
-    lv_task_t* task = (lv_task_t*)lua_touserdata(L, 1);
-    uint32_t period = (uint32_t)luaL_checkinteger(L, 2);
-    lv_task_set_period(task ,period);
-    return 0;
-}
-
-//  void lv_task_ready(lv_task_t* task)
-int luat_lv_task_ready(lua_State *L) {
-    LV_DEBUG("CALL lv_task_ready");
-    lv_task_t* task = (lv_task_t*)lua_touserdata(L, 1);
-    lv_task_ready(task);
-    return 0;
-}
-
-//  void lv_task_set_repeat_count(lv_task_t* task, int32_t repeat_count)
-int luat_lv_task_set_repeat_count(lua_State *L) {
-    LV_DEBUG("CALL lv_task_set_repeat_count");
-    lv_task_t* task = (lv_task_t*)lua_touserdata(L, 1);
-    int32_t repeat_count = (int32_t)luaL_checkinteger(L, 2);
-    lv_task_set_repeat_count(task ,repeat_count);
-    return 0;
-}
-
-//  void lv_task_reset(lv_task_t* task)
-int luat_lv_task_reset(lua_State *L) {
-    LV_DEBUG("CALL lv_task_reset");
-    lv_task_t* task = (lv_task_t*)lua_touserdata(L, 1);
-    lv_task_reset(task);
-    return 0;
-}
-
-//  void lv_task_enable(bool en)
-int luat_lv_task_enable(lua_State *L) {
-    LV_DEBUG("CALL lv_task_enable");
-    bool en = (bool)lua_toboolean(L, 1);
-    lv_task_enable(en);
-    return 0;
-}
-
-//  uint8_t lv_task_get_idle()
-int luat_lv_task_get_idle(lua_State *L) {
-    LV_DEBUG("CALL lv_task_get_idle");
-    uint8_t ret;
-    ret = lv_task_get_idle();
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_task_t* lv_task_get_next(lv_task_t* task)
-int luat_lv_task_get_next(lua_State *L) {
-    LV_DEBUG("CALL lv_task_get_next");
-    lv_task_t* task = (lv_task_t*)lua_touserdata(L, 1);
-    lv_task_t* ret = NULL;
-    ret = lv_task_get_next(task);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-

+ 39 - 0
components/lvgl/gen/lv_misc/luat_lv_txt.c

@@ -0,0 +1,39 @@
+

+#include "luat_base.h"
+#include "lvgl.h"
+#include "luat_lvgl.h"
+
+
+//  void lv_txt_get_size(lv_point_t* size_res, char* text, lv_font_t* font, lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, lv_text_flag_t flag)
+int luat_lv_txt_get_size(lua_State *L) {
+    LV_DEBUG("CALL lv_txt_get_size");
+    lua_pushvalue(L, 1);
+    lv_point_t size_res = {0};
+    lua_geti(L, -1, 1); size_res.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); size_res.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_pop(L, 1);
+
+    char* text = (char*)luaL_checkstring(L, 2);
+    lv_font_t* font = (lv_font_t*)lua_touserdata(L, 3);
+    lv_coord_t letter_space = (lv_coord_t)luaL_checkinteger(L, 4);
+    lv_coord_t line_space = (lv_coord_t)luaL_checkinteger(L, 5);
+    lv_coord_t max_width = (lv_coord_t)luaL_checkinteger(L, 6);
+    lv_text_flag_t flag = (lv_text_flag_t)luaL_checkinteger(L, 7);
+    lv_txt_get_size(&size_res ,text ,font ,letter_space ,line_space ,max_width ,flag);
+    return 0;
+}
+
+//  lv_coord_t lv_txt_get_width(char* txt, uint32_t length, lv_font_t* font, lv_coord_t letter_space, lv_text_flag_t flag)
+int luat_lv_txt_get_width(lua_State *L) {
+    LV_DEBUG("CALL lv_txt_get_width");
+    char* txt = (char*)luaL_checkstring(L, 1);
+    uint32_t length = (uint32_t)luaL_checkinteger(L, 2);
+    lv_font_t* font = (lv_font_t*)lua_touserdata(L, 3);
+    lv_coord_t letter_space = (lv_coord_t)luaL_checkinteger(L, 4);
+    lv_text_flag_t flag = (lv_text_flag_t)luaL_checkinteger(L, 5);
+    lv_coord_t ret;
+    ret = lv_txt_get_width(txt ,length ,font ,letter_space ,flag);
+    lua_pushinteger(L, ret);
+    return 1;
+}
+

+ 0 - 186
components/lvgl/gen/lv_themes/luat_lv_theme.c

@@ -1,186 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  void lv_theme_set_act(lv_theme_t* th)
-int luat_lv_theme_set_act(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_set_act");
-    lv_theme_t* th = (lv_theme_t*)lua_touserdata(L, 1);
-    lv_theme_set_act(th);
-    return 0;
-}
-
-//  lv_theme_t* lv_theme_get_act()
-int luat_lv_theme_get_act(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_act");
-    lv_theme_t* ret = NULL;
-    ret = lv_theme_get_act();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_theme_apply(lv_obj_t* obj, lv_theme_style_t name)
-int luat_lv_theme_apply(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_apply");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_theme_style_t name;
-    // miss arg convert
-    lv_theme_apply(obj ,name);
-    return 0;
-}
-
-//  void lv_theme_copy(lv_theme_t* theme, lv_theme_t* copy)
-int luat_lv_theme_copy(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_copy");
-    lv_theme_t* theme = (lv_theme_t*)lua_touserdata(L, 1);
-    lv_theme_t* copy = (lv_theme_t*)lua_touserdata(L, 2);
-    lv_theme_copy(theme ,copy);
-    return 0;
-}
-
-//  void lv_theme_set_base(lv_theme_t* new_theme, lv_theme_t* base)
-int luat_lv_theme_set_base(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_set_base");
-    lv_theme_t* new_theme = (lv_theme_t*)lua_touserdata(L, 1);
-    lv_theme_t* base = (lv_theme_t*)lua_touserdata(L, 2);
-    lv_theme_set_base(new_theme ,base);
-    return 0;
-}
-
-//  lv_font_t* lv_theme_get_font_small()
-int luat_lv_theme_get_font_small(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_font_small");
-    lv_font_t* ret = NULL;
-    ret = lv_theme_get_font_small();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_font_t* lv_theme_get_font_normal()
-int luat_lv_theme_get_font_normal(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_font_normal");
-    lv_font_t* ret = NULL;
-    ret = lv_theme_get_font_normal();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_font_t* lv_theme_get_font_subtitle()
-int luat_lv_theme_get_font_subtitle(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_font_subtitle");
-    lv_font_t* ret = NULL;
-    ret = lv_theme_get_font_subtitle();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_font_t* lv_theme_get_font_title()
-int luat_lv_theme_get_font_title(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_font_title");
-    lv_font_t* ret = NULL;
-    ret = lv_theme_get_font_title();
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_color_t lv_theme_get_color_primary()
-int luat_lv_theme_get_color_primary(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_color_primary");
-    lv_color_t ret;
-    ret = lv_theme_get_color_primary();
-    lua_pushinteger(L, ret.full);
-    return 1;
-}
-
-//  lv_color_t lv_theme_get_color_secondary()
-int luat_lv_theme_get_color_secondary(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_color_secondary");
-    lv_color_t ret;
-    ret = lv_theme_get_color_secondary();
-    lua_pushinteger(L, ret.full);
-    return 1;
-}
-
-//  uint32_t lv_theme_get_flags()
-int luat_lv_theme_get_flags(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_get_flags");
-    uint32_t ret;
-    ret = lv_theme_get_flags();
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_theme_t* lv_theme_empty_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags, lv_font_t* font_small, lv_font_t* font_normal, lv_font_t* font_subtitle, lv_font_t* font_title)
-int luat_lv_theme_empty_init(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_empty_init");
-    lv_color_t color_primary = {0};
-    color_primary.full = luaL_checkinteger(L, 1);
-    lv_color_t color_secondary = {0};
-    color_secondary.full = luaL_checkinteger(L, 2);
-    uint32_t flags = (uint32_t)luaL_checkinteger(L, 3);
-    lv_font_t* font_small = (lv_font_t*)lua_touserdata(L, 4);
-    lv_font_t* font_normal = (lv_font_t*)lua_touserdata(L, 5);
-    lv_font_t* font_subtitle = (lv_font_t*)lua_touserdata(L, 6);
-    lv_font_t* font_title = (lv_font_t*)lua_touserdata(L, 7);
-    lv_theme_t* ret = NULL;
-    ret = lv_theme_empty_init(color_primary ,color_secondary ,flags ,font_small ,font_normal ,font_subtitle ,font_title);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_theme_t* lv_theme_template_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags, lv_font_t* font_small, lv_font_t* font_normal, lv_font_t* font_subtitle, lv_font_t* font_title)
-int luat_lv_theme_template_init(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_template_init");
-    lv_color_t color_primary = {0};
-    color_primary.full = luaL_checkinteger(L, 1);
-    lv_color_t color_secondary = {0};
-    color_secondary.full = luaL_checkinteger(L, 2);
-    uint32_t flags = (uint32_t)luaL_checkinteger(L, 3);
-    lv_font_t* font_small = (lv_font_t*)lua_touserdata(L, 4);
-    lv_font_t* font_normal = (lv_font_t*)lua_touserdata(L, 5);
-    lv_font_t* font_subtitle = (lv_font_t*)lua_touserdata(L, 6);
-    lv_font_t* font_title = (lv_font_t*)lua_touserdata(L, 7);
-    lv_theme_t* ret = NULL;
-    ret = lv_theme_template_init(color_primary ,color_secondary ,flags ,font_small ,font_normal ,font_subtitle ,font_title);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_theme_t* lv_theme_material_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags, lv_font_t* font_small, lv_font_t* font_normal, lv_font_t* font_subtitle, lv_font_t* font_title)
-int luat_lv_theme_material_init(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_material_init");
-    lv_color_t color_primary = {0};
-    color_primary.full = luaL_checkinteger(L, 1);
-    lv_color_t color_secondary = {0};
-    color_secondary.full = luaL_checkinteger(L, 2);
-    uint32_t flags = (uint32_t)luaL_checkinteger(L, 3);
-    lv_font_t* font_small = (lv_font_t*)lua_touserdata(L, 4);
-    lv_font_t* font_normal = (lv_font_t*)lua_touserdata(L, 5);
-    lv_font_t* font_subtitle = (lv_font_t*)lua_touserdata(L, 6);
-    lv_font_t* font_title = (lv_font_t*)lua_touserdata(L, 7);
-    lv_theme_t* ret = NULL;
-    ret = lv_theme_material_init(color_primary ,color_secondary ,flags ,font_small ,font_normal ,font_subtitle ,font_title);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_theme_t* lv_theme_mono_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags, lv_font_t* font_small, lv_font_t* font_normal, lv_font_t* font_subtitle, lv_font_t* font_title)
-int luat_lv_theme_mono_init(lua_State *L) {
-    LV_DEBUG("CALL lv_theme_mono_init");
-    lv_color_t color_primary = {0};
-    color_primary.full = luaL_checkinteger(L, 1);
-    lv_color_t color_secondary = {0};
-    color_secondary.full = luaL_checkinteger(L, 2);
-    uint32_t flags = (uint32_t)luaL_checkinteger(L, 3);
-    lv_font_t* font_small = (lv_font_t*)lua_touserdata(L, 4);
-    lv_font_t* font_normal = (lv_font_t*)lua_touserdata(L, 5);
-    lv_font_t* font_subtitle = (lv_font_t*)lua_touserdata(L, 6);
-    lv_font_t* font_title = (lv_font_t*)lua_touserdata(L, 7);
-    lv_theme_t* ret = NULL;
-    ret = lv_theme_mono_init(color_primary ,color_secondary ,flags ,font_small ,font_normal ,font_subtitle ,font_title);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-

+ 44 - 74
components/lvgl/gen/lv_widgets/luat_lv_arc.c

@@ -4,13 +4,12 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_arc_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_arc_create(lv_obj_t* parent)
 int luat_lv_arc_create(lua_State *L) {
     LV_DEBUG("CALL lv_arc_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_arc_create(par ,copy);
+    ret = lv_arc_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
@@ -71,21 +70,21 @@ int luat_lv_arc_set_bg_angles(lua_State *L) {
     return 0;
 }
 
-//  void lv_arc_set_rotation(lv_obj_t* arc, uint16_t rotation_angle)
+//  void lv_arc_set_rotation(lv_obj_t* arc, uint16_t rotation)
 int luat_lv_arc_set_rotation(lua_State *L) {
     LV_DEBUG("CALL lv_arc_set_rotation");
     lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t rotation_angle = (uint16_t)luaL_checkinteger(L, 2);
-    lv_arc_set_rotation(arc ,rotation_angle);
+    uint16_t rotation = (uint16_t)luaL_checkinteger(L, 2);
+    lv_arc_set_rotation(arc ,rotation);
     return 0;
 }
 
-//  void lv_arc_set_type(lv_obj_t* arc, lv_arc_type_t type)
-int luat_lv_arc_set_type(lua_State *L) {
-    LV_DEBUG("CALL lv_arc_set_type");
+//  void lv_arc_set_mode(lv_obj_t* arc, lv_arc_mode_t type)
+int luat_lv_arc_set_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_arc_set_mode");
     lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_arc_type_t type = (lv_arc_type_t)luaL_checkinteger(L, 2);
-    lv_arc_set_type(arc ,type);
+    lv_arc_mode_t type = (lv_arc_mode_t)luaL_checkinteger(L, 2);
+    lv_arc_set_mode(arc ,type);
     return 0;
 }
 
@@ -108,121 +107,92 @@ int luat_lv_arc_set_range(lua_State *L) {
     return 0;
 }
 
-//  void lv_arc_set_chg_rate(lv_obj_t* arc, uint16_t threshold)
-int luat_lv_arc_set_chg_rate(lua_State *L) {
-    LV_DEBUG("CALL lv_arc_set_chg_rate");
+//  void lv_arc_set_change_rate(lv_obj_t* arc, uint16_t rate)
+int luat_lv_arc_set_change_rate(lua_State *L) {
+    LV_DEBUG("CALL lv_arc_set_change_rate");
     lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t threshold = (uint16_t)luaL_checkinteger(L, 2);
-    lv_arc_set_chg_rate(arc ,threshold);
+    uint16_t rate = (uint16_t)luaL_checkinteger(L, 2);
+    lv_arc_set_change_rate(arc ,rate);
     return 0;
 }
 
-//  void lv_arc_set_adjustable(lv_obj_t* arc, bool adjustable)
-int luat_lv_arc_set_adjustable(lua_State *L) {
-    LV_DEBUG("CALL lv_arc_set_adjustable");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
-    bool adjustable = (bool)lua_toboolean(L, 2);
-    lv_arc_set_adjustable(arc ,adjustable);
-    return 0;
-}
-
-//  uint16_t lv_arc_get_angle_start(lv_obj_t* arc)
+//  uint16_t lv_arc_get_angle_start(lv_obj_t* obj)
 int luat_lv_arc_get_angle_start(lua_State *L) {
     LV_DEBUG("CALL lv_arc_get_angle_start");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_arc_get_angle_start(arc);
+    ret = lv_arc_get_angle_start(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_arc_get_angle_end(lv_obj_t* arc)
+//  uint16_t lv_arc_get_angle_end(lv_obj_t* obj)
 int luat_lv_arc_get_angle_end(lua_State *L) {
     LV_DEBUG("CALL lv_arc_get_angle_end");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_arc_get_angle_end(arc);
+    ret = lv_arc_get_angle_end(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_arc_get_bg_angle_start(lv_obj_t* arc)
+//  uint16_t lv_arc_get_bg_angle_start(lv_obj_t* obj)
 int luat_lv_arc_get_bg_angle_start(lua_State *L) {
     LV_DEBUG("CALL lv_arc_get_bg_angle_start");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_arc_get_bg_angle_start(arc);
+    ret = lv_arc_get_bg_angle_start(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_arc_get_bg_angle_end(lv_obj_t* arc)
+//  uint16_t lv_arc_get_bg_angle_end(lv_obj_t* obj)
 int luat_lv_arc_get_bg_angle_end(lua_State *L) {
     LV_DEBUG("CALL lv_arc_get_bg_angle_end");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_arc_get_bg_angle_end(arc);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_arc_type_t lv_arc_get_type(lv_obj_t* arc)
-int luat_lv_arc_get_type(lua_State *L) {
-    LV_DEBUG("CALL lv_arc_get_type");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_arc_type_t ret;
-    ret = lv_arc_get_type(arc);
+    ret = lv_arc_get_bg_angle_end(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_arc_get_value(lv_obj_t* arc)
+//  int16_t lv_arc_get_value(lv_obj_t* obj)
 int luat_lv_arc_get_value(lua_State *L) {
     LV_DEBUG("CALL lv_arc_get_value");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     int16_t ret;
-    ret = lv_arc_get_value(arc);
+    ret = lv_arc_get_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_arc_get_min_value(lv_obj_t* arc)
+//  int16_t lv_arc_get_min_value(lv_obj_t* obj)
 int luat_lv_arc_get_min_value(lua_State *L) {
     LV_DEBUG("CALL lv_arc_get_min_value");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     int16_t ret;
-    ret = lv_arc_get_min_value(arc);
+    ret = lv_arc_get_min_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_arc_get_max_value(lv_obj_t* arc)
+//  int16_t lv_arc_get_max_value(lv_obj_t* obj)
 int luat_lv_arc_get_max_value(lua_State *L) {
     LV_DEBUG("CALL lv_arc_get_max_value");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     int16_t ret;
-    ret = lv_arc_get_max_value(arc);
+    ret = lv_arc_get_max_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_arc_is_dragged(lv_obj_t* arc)
-int luat_lv_arc_is_dragged(lua_State *L) {
-    LV_DEBUG("CALL lv_arc_is_dragged");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_arc_is_dragged(arc);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_arc_get_adjustable(lv_obj_t* arc)
-int luat_lv_arc_get_adjustable(lua_State *L) {
-    LV_DEBUG("CALL lv_arc_get_adjustable");
-    lv_obj_t* arc = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_arc_get_adjustable(arc);
-    lua_pushboolean(L, ret);
+//  lv_arc_mode_t lv_arc_get_mode(lv_obj_t* obj)
+int luat_lv_arc_get_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_arc_get_mode");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_arc_mode_t ret;
+    ret = lv_arc_get_mode(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 

+ 44 - 64
components/lvgl/gen/lv_widgets/luat_lv_bar.c

@@ -4,121 +4,101 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_bar_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_bar_create(lv_obj_t* parent)
 int luat_lv_bar_create(lua_State *L) {
     LV_DEBUG("CALL lv_bar_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_bar_create(par ,copy);
+    ret = lv_bar_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_bar_set_value(lv_obj_t* bar, int16_t value, lv_anim_enable_t anim)
+//  void lv_bar_set_value(lv_obj_t* obj, int32_t value, lv_anim_enable_t anim)
 int luat_lv_bar_set_value(lua_State *L) {
     LV_DEBUG("CALL lv_bar_set_value");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t value = (int16_t)luaL_checkinteger(L, 2);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t value = (int32_t)luaL_checkinteger(L, 2);
     lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_bar_set_value(bar ,value ,anim);
+    lv_bar_set_value(obj ,value ,anim);
     return 0;
 }
 
-//  void lv_bar_set_start_value(lv_obj_t* bar, int16_t start_value, lv_anim_enable_t anim)
+//  void lv_bar_set_start_value(lv_obj_t* obj, int32_t start_value, lv_anim_enable_t anim)
 int luat_lv_bar_set_start_value(lua_State *L) {
     LV_DEBUG("CALL lv_bar_set_start_value");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t start_value = (int16_t)luaL_checkinteger(L, 2);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t start_value = (int32_t)luaL_checkinteger(L, 2);
     lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_bar_set_start_value(bar ,start_value ,anim);
+    lv_bar_set_start_value(obj ,start_value ,anim);
     return 0;
 }
 
-//  void lv_bar_set_range(lv_obj_t* bar, int16_t min, int16_t max)
+//  void lv_bar_set_range(lv_obj_t* obj, int32_t min, int32_t max)
 int luat_lv_bar_set_range(lua_State *L) {
     LV_DEBUG("CALL lv_bar_set_range");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t min = (int16_t)luaL_checkinteger(L, 2);
-    int16_t max = (int16_t)luaL_checkinteger(L, 3);
-    lv_bar_set_range(bar ,min ,max);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t min = (int32_t)luaL_checkinteger(L, 2);
+    int32_t max = (int32_t)luaL_checkinteger(L, 3);
+    lv_bar_set_range(obj ,min ,max);
     return 0;
 }
 
-//  void lv_bar_set_type(lv_obj_t* bar, lv_bar_type_t type)
-int luat_lv_bar_set_type(lua_State *L) {
-    LV_DEBUG("CALL lv_bar_set_type");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_bar_type_t type = (lv_bar_type_t)luaL_checkinteger(L, 2);
-    lv_bar_set_type(bar ,type);
+//  void lv_bar_set_mode(lv_obj_t* obj, lv_bar_mode_t mode)
+int luat_lv_bar_set_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_bar_set_mode");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_bar_mode_t mode = (lv_bar_mode_t)luaL_checkinteger(L, 2);
+    lv_bar_set_mode(obj ,mode);
     return 0;
 }
 
-//  void lv_bar_set_anim_time(lv_obj_t* bar, uint16_t anim_time)
-int luat_lv_bar_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_bar_set_anim_time");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_bar_set_anim_time(bar ,anim_time);
-    return 0;
-}
-
-//  int16_t lv_bar_get_value(lv_obj_t* bar)
+//  int32_t lv_bar_get_value(lv_obj_t* obj)
 int luat_lv_bar_get_value(lua_State *L) {
     LV_DEBUG("CALL lv_bar_get_value");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_bar_get_value(bar);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_bar_get_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_bar_get_start_value(lv_obj_t* bar)
+//  int32_t lv_bar_get_start_value(lv_obj_t* obj)
 int luat_lv_bar_get_start_value(lua_State *L) {
     LV_DEBUG("CALL lv_bar_get_start_value");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_bar_get_start_value(bar);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_bar_get_start_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_bar_get_min_value(lv_obj_t* bar)
+//  int32_t lv_bar_get_min_value(lv_obj_t* obj)
 int luat_lv_bar_get_min_value(lua_State *L) {
     LV_DEBUG("CALL lv_bar_get_min_value");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_bar_get_min_value(bar);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_bar_get_min_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_bar_get_max_value(lv_obj_t* bar)
+//  int32_t lv_bar_get_max_value(lv_obj_t* obj)
 int luat_lv_bar_get_max_value(lua_State *L) {
     LV_DEBUG("CALL lv_bar_get_max_value");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_bar_get_max_value(bar);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_bar_type_t lv_bar_get_type(lv_obj_t* bar)
-int luat_lv_bar_get_type(lua_State *L) {
-    LV_DEBUG("CALL lv_bar_get_type");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_bar_type_t ret;
-    ret = lv_bar_get_type(bar);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_bar_get_max_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_bar_get_anim_time(lv_obj_t* bar)
-int luat_lv_bar_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_bar_get_anim_time");
-    lv_obj_t* bar = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_bar_get_anim_time(bar);
+//  lv_bar_mode_t lv_bar_get_mode(lv_obj_t* obj)
+int luat_lv_bar_get_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_bar_get_mode");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_bar_mode_t ret;
+    ret = lv_bar_get_mode(obj);
     lua_pushinteger(L, ret);
     return 1;
 }

+ 3 - 140
components/lvgl/gen/lv_widgets/luat_lv_btn.c

@@ -4,150 +4,13 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_btn_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_btn_create(lv_obj_t* parent)
 int luat_lv_btn_create(lua_State *L) {
     LV_DEBUG("CALL lv_btn_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_btn_create(par ,copy);
+    ret = lv_btn_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_btn_set_checkable(lv_obj_t* btn, bool tgl)
-int luat_lv_btn_set_checkable(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_set_checkable");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    bool tgl = (bool)lua_toboolean(L, 2);
-    lv_btn_set_checkable(btn ,tgl);
-    return 0;
-}
-
-//  void lv_btn_set_state(lv_obj_t* btn, lv_btn_state_t state)
-int luat_lv_btn_set_state(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_set_state");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t state = (lv_btn_state_t)luaL_checkinteger(L, 2);
-    lv_btn_set_state(btn ,state);
-    return 0;
-}
-
-//  void lv_btn_toggle(lv_obj_t* btn)
-int luat_lv_btn_toggle(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_toggle");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_toggle(btn);
-    return 0;
-}
-
-//  void lv_btn_set_layout(lv_obj_t* btn, lv_layout_t layout)
-int luat_lv_btn_set_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_set_layout");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t layout = (lv_layout_t)luaL_checkinteger(L, 2);
-    lv_btn_set_layout(btn ,layout);
-    return 0;
-}
-
-//  void lv_btn_set_fit4(lv_obj_t* btn, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom)
-int luat_lv_btn_set_fit4(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_set_fit4");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t left = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_fit_t right = (lv_fit_t)luaL_checkinteger(L, 3);
-    lv_fit_t top = (lv_fit_t)luaL_checkinteger(L, 4);
-    lv_fit_t bottom = (lv_fit_t)luaL_checkinteger(L, 5);
-    lv_btn_set_fit4(btn ,left ,right ,top ,bottom);
-    return 0;
-}
-
-//  void lv_btn_set_fit2(lv_obj_t* btn, lv_fit_t hor, lv_fit_t ver)
-int luat_lv_btn_set_fit2(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_set_fit2");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t hor = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_fit_t ver = (lv_fit_t)luaL_checkinteger(L, 3);
-    lv_btn_set_fit2(btn ,hor ,ver);
-    return 0;
-}
-
-//  void lv_btn_set_fit(lv_obj_t* btn, lv_fit_t fit)
-int luat_lv_btn_set_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_set_fit");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t fit = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_btn_set_fit(btn ,fit);
-    return 0;
-}
-
-//  lv_btn_state_t lv_btn_get_state(lv_obj_t* btn)
-int luat_lv_btn_get_state(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_get_state");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t ret;
-    ret = lv_btn_get_state(btn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_btn_get_checkable(lv_obj_t* btn)
-int luat_lv_btn_get_checkable(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_get_checkable");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_btn_get_checkable(btn);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  lv_layout_t lv_btn_get_layout(lv_obj_t* btn)
-int luat_lv_btn_get_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_get_layout");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t ret;
-    ret = lv_btn_get_layout(btn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_btn_get_fit_left(lv_obj_t* btn)
-int luat_lv_btn_get_fit_left(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_get_fit_left");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_btn_get_fit_left(btn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_btn_get_fit_right(lv_obj_t* btn)
-int luat_lv_btn_get_fit_right(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_get_fit_right");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_btn_get_fit_right(btn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_btn_get_fit_top(lv_obj_t* btn)
-int luat_lv_btn_get_fit_top(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_get_fit_top");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_btn_get_fit_top(btn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_btn_get_fit_bottom(lv_obj_t* btn)
-int luat_lv_btn_get_fit_bottom(lua_State *L) {
-    LV_DEBUG("CALL lv_btn_get_fit_bottom");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_btn_get_fit_bottom(btn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 48 - 107
components/lvgl/gen/lv_widgets/luat_lv_btnmatrix.c

@@ -4,186 +4,127 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_btnmatrix_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_btnmatrix_create(lv_obj_t* parent)
 int luat_lv_btnmatrix_create(lua_State *L) {
     LV_DEBUG("CALL lv_btnmatrix_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_btnmatrix_create(par ,copy);
+    ret = lv_btnmatrix_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_btnmatrix_set_focused_btn(lv_obj_t* btnm, uint16_t id)
-int luat_lv_btnmatrix_set_focused_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_set_focused_btn");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 2);
-    lv_btnmatrix_set_focused_btn(btnm ,id);
-    return 0;
-}
-
-//  void lv_btnmatrix_set_recolor(lv_obj_t* btnm, bool en)
-int luat_lv_btnmatrix_set_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_set_recolor");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_btnmatrix_set_recolor(btnm ,en);
+//  void lv_btnmatrix_set_selected_btn(lv_obj_t* obj, uint16_t btn_id)
+int luat_lv_btnmatrix_set_selected_btn(lua_State *L) {
+    LV_DEBUG("CALL lv_btnmatrix_set_selected_btn");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint16_t btn_id = (uint16_t)luaL_checkinteger(L, 2);
+    lv_btnmatrix_set_selected_btn(obj ,btn_id);
     return 0;
 }
 
-//  void lv_btnmatrix_set_btn_ctrl(lv_obj_t* btnm, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl)
+//  void lv_btnmatrix_set_btn_ctrl(lv_obj_t* obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl)
 int luat_lv_btnmatrix_set_btn_ctrl(lua_State *L) {
     LV_DEBUG("CALL lv_btnmatrix_set_btn_ctrl");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t btn_id = (uint16_t)luaL_checkinteger(L, 2);
     lv_btnmatrix_ctrl_t ctrl;
     // miss arg convert
-    lv_btnmatrix_set_btn_ctrl(btnm ,btn_id ,ctrl);
+    lv_btnmatrix_set_btn_ctrl(obj ,btn_id ,ctrl);
     return 0;
 }
 
-//  void lv_btnmatrix_clear_btn_ctrl(lv_obj_t* btnm, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl)
+//  void lv_btnmatrix_clear_btn_ctrl(lv_obj_t* obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl)
 int luat_lv_btnmatrix_clear_btn_ctrl(lua_State *L) {
     LV_DEBUG("CALL lv_btnmatrix_clear_btn_ctrl");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t btn_id = (uint16_t)luaL_checkinteger(L, 2);
     lv_btnmatrix_ctrl_t ctrl;
     // miss arg convert
-    lv_btnmatrix_clear_btn_ctrl(btnm ,btn_id ,ctrl);
+    lv_btnmatrix_clear_btn_ctrl(obj ,btn_id ,ctrl);
     return 0;
 }
 
-//  void lv_btnmatrix_set_btn_ctrl_all(lv_obj_t* btnm, lv_btnmatrix_ctrl_t ctrl)
+//  void lv_btnmatrix_set_btn_ctrl_all(lv_obj_t* obj, lv_btnmatrix_ctrl_t ctrl)
 int luat_lv_btnmatrix_set_btn_ctrl_all(lua_State *L) {
     LV_DEBUG("CALL lv_btnmatrix_set_btn_ctrl_all");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_btnmatrix_ctrl_t ctrl;
     // miss arg convert
-    lv_btnmatrix_set_btn_ctrl_all(btnm ,ctrl);
+    lv_btnmatrix_set_btn_ctrl_all(obj ,ctrl);
     return 0;
 }
 
-//  void lv_btnmatrix_clear_btn_ctrl_all(lv_obj_t* btnm, lv_btnmatrix_ctrl_t ctrl)
+//  void lv_btnmatrix_clear_btn_ctrl_all(lv_obj_t* obj, lv_btnmatrix_ctrl_t ctrl)
 int luat_lv_btnmatrix_clear_btn_ctrl_all(lua_State *L) {
     LV_DEBUG("CALL lv_btnmatrix_clear_btn_ctrl_all");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_btnmatrix_ctrl_t ctrl;
     // miss arg convert
-    lv_btnmatrix_clear_btn_ctrl_all(btnm ,ctrl);
+    lv_btnmatrix_clear_btn_ctrl_all(obj ,ctrl);
     return 0;
 }
 
-//  void lv_btnmatrix_set_btn_width(lv_obj_t* btnm, uint16_t btn_id, uint8_t width)
+//  void lv_btnmatrix_set_btn_width(lv_obj_t* obj, uint16_t btn_id, uint8_t width)
 int luat_lv_btnmatrix_set_btn_width(lua_State *L) {
     LV_DEBUG("CALL lv_btnmatrix_set_btn_width");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t btn_id = (uint16_t)luaL_checkinteger(L, 2);
     uint8_t width = (uint8_t)luaL_checkinteger(L, 3);
-    lv_btnmatrix_set_btn_width(btnm ,btn_id ,width);
-    return 0;
-}
-
-//  void lv_btnmatrix_set_one_check(lv_obj_t* btnm, bool one_chk)
-int luat_lv_btnmatrix_set_one_check(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_set_one_check");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    bool one_chk = (bool)lua_toboolean(L, 2);
-    lv_btnmatrix_set_one_check(btnm ,one_chk);
+    lv_btnmatrix_set_btn_width(obj ,btn_id ,width);
     return 0;
 }
 
-//  void lv_btnmatrix_set_align(lv_obj_t* btnm, lv_label_align_t align)
-int luat_lv_btnmatrix_set_align(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_set_align");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_align_t align = (lv_label_align_t)luaL_checkinteger(L, 2);
-    lv_btnmatrix_set_align(btnm ,align);
+//  void lv_btnmatrix_set_one_checked(lv_obj_t* obj, bool en)
+int luat_lv_btnmatrix_set_one_checked(lua_State *L) {
+    LV_DEBUG("CALL lv_btnmatrix_set_one_checked");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    bool en = (bool)lua_toboolean(L, 2);
+    lv_btnmatrix_set_one_checked(obj ,en);
     return 0;
 }
 
-//  bool lv_btnmatrix_get_recolor(lv_obj_t* btnm)
-int luat_lv_btnmatrix_get_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_get_recolor");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_btnmatrix_get_recolor(btnm);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_btnmatrix_get_active_btn(lv_obj_t* btnm)
-int luat_lv_btnmatrix_get_active_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_get_active_btn");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+//  uint16_t lv_btnmatrix_get_selected_btn(lv_obj_t* obj)
+int luat_lv_btnmatrix_get_selected_btn(lua_State *L) {
+    LV_DEBUG("CALL lv_btnmatrix_get_selected_btn");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_btnmatrix_get_active_btn(btnm);
+    ret = lv_btnmatrix_get_selected_btn(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  char* lv_btnmatrix_get_active_btn_text(lv_obj_t* btnm)
-int luat_lv_btnmatrix_get_active_btn_text(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_get_active_btn_text");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    char* ret = NULL;
-    ret = lv_btnmatrix_get_active_btn_text(btnm);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_btnmatrix_get_focused_btn(lv_obj_t* btnm)
-int luat_lv_btnmatrix_get_focused_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_get_focused_btn");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_btnmatrix_get_focused_btn(btnm);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  char* lv_btnmatrix_get_btn_text(lv_obj_t* btnm, uint16_t btn_id)
+//  char* lv_btnmatrix_get_btn_text(lv_obj_t* obj, uint16_t btn_id)
 int luat_lv_btnmatrix_get_btn_text(lua_State *L) {
     LV_DEBUG("CALL lv_btnmatrix_get_btn_text");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t btn_id = (uint16_t)luaL_checkinteger(L, 2);
     char* ret = NULL;
-    ret = lv_btnmatrix_get_btn_text(btnm ,btn_id);
+    ret = lv_btnmatrix_get_btn_text(obj ,btn_id);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  bool lv_btnmatrix_get_btn_ctrl(lv_obj_t* btnm, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl)
-int luat_lv_btnmatrix_get_btn_ctrl(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_get_btn_ctrl");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+//  bool lv_btnmatrix_has_btn_ctrl(lv_obj_t* obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl)
+int luat_lv_btnmatrix_has_btn_ctrl(lua_State *L) {
+    LV_DEBUG("CALL lv_btnmatrix_has_btn_ctrl");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t btn_id = (uint16_t)luaL_checkinteger(L, 2);
     lv_btnmatrix_ctrl_t ctrl;
     // miss arg convert
     bool ret;
-    ret = lv_btnmatrix_get_btn_ctrl(btnm ,btn_id ,ctrl);
+    ret = lv_btnmatrix_has_btn_ctrl(obj ,btn_id ,ctrl);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_btnmatrix_get_one_check(lv_obj_t* btnm)
-int luat_lv_btnmatrix_get_one_check(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_get_one_check");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
+//  bool lv_btnmatrix_get_one_checked(lv_obj_t* obj)
+int luat_lv_btnmatrix_get_one_checked(lua_State *L) {
+    LV_DEBUG("CALL lv_btnmatrix_get_one_checked");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_btnmatrix_get_one_check(btnm);
+    ret = lv_btnmatrix_get_one_checked(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  lv_label_align_t lv_btnmatrix_get_align(lv_obj_t* btnm)
-int luat_lv_btnmatrix_get_align(lua_State *L) {
-    LV_DEBUG("CALL lv_btnmatrix_get_align");
-    lv_obj_t* btnm = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_align_t ret;
-    ret = lv_btnmatrix_get_align(btnm);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 0 - 97
components/lvgl/gen/lv_widgets/luat_lv_calendar.c

@@ -1,97 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_calendar_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_calendar_create(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_calendar_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_calendar_set_today_date(lv_obj_t* calendar, lv_calendar_date_t* today)
-int luat_lv_calendar_set_today_date(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_set_today_date");
-    lv_obj_t* calendar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_calendar_date_t* today = (lv_calendar_date_t*)lua_touserdata(L, 2);
-    lv_calendar_set_today_date(calendar ,today);
-    return 0;
-}
-
-//  void lv_calendar_set_showed_date(lv_obj_t* calendar, lv_calendar_date_t* showed)
-int luat_lv_calendar_set_showed_date(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_set_showed_date");
-    lv_obj_t* calendar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_calendar_date_t* showed = (lv_calendar_date_t*)lua_touserdata(L, 2);
-    lv_calendar_set_showed_date(calendar ,showed);
-    return 0;
-}
-
-//  lv_calendar_date_t* lv_calendar_get_today_date(lv_obj_t* calendar)
-int luat_lv_calendar_get_today_date(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_get_today_date");
-    lv_obj_t* calendar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_calendar_date_t* ret = NULL;
-    ret = lv_calendar_get_today_date(calendar);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_calendar_date_t* lv_calendar_get_showed_date(lv_obj_t* calendar)
-int luat_lv_calendar_get_showed_date(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_get_showed_date");
-    lv_obj_t* calendar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_calendar_date_t* ret = NULL;
-    ret = lv_calendar_get_showed_date(calendar);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_calendar_date_t* lv_calendar_get_pressed_date(lv_obj_t* calendar)
-int luat_lv_calendar_get_pressed_date(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_get_pressed_date");
-    lv_obj_t* calendar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_calendar_date_t* ret = NULL;
-    ret = lv_calendar_get_pressed_date(calendar);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_calendar_date_t* lv_calendar_get_highlighted_dates(lv_obj_t* calendar)
-int luat_lv_calendar_get_highlighted_dates(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_get_highlighted_dates");
-    lv_obj_t* calendar = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_calendar_date_t* ret = NULL;
-    ret = lv_calendar_get_highlighted_dates(calendar);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_calendar_get_highlighted_dates_num(lv_obj_t* calendar)
-int luat_lv_calendar_get_highlighted_dates_num(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_get_highlighted_dates_num");
-    lv_obj_t* calendar = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_calendar_get_highlighted_dates_num(calendar);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint8_t lv_calendar_get_day_of_week(uint32_t year, uint32_t month, uint32_t day)
-int luat_lv_calendar_get_day_of_week(lua_State *L) {
-    LV_DEBUG("CALL lv_calendar_get_day_of_week");
-    uint32_t year = (uint32_t)luaL_checkinteger(L, 1);
-    uint32_t month = (uint32_t)luaL_checkinteger(L, 2);
-    uint32_t day = (uint32_t)luaL_checkinteger(L, 3);
-    uint8_t ret;
-    ret = lv_calendar_get_day_of_week(year ,month ,day);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 15 - 17
components/lvgl/gen/lv_widgets/luat_lv_canvas.c

@@ -4,13 +4,12 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_canvas_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_canvas_create(lv_obj_t* parent)
 int luat_lv_canvas_create(lua_State *L) {
     LV_DEBUG("CALL lv_canvas_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_canvas_create(par ,copy);
+    ret = lv_canvas_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
@@ -146,7 +145,7 @@ int luat_lv_canvas_fill_bg(lua_State *L) {
     return 0;
 }
 
-//  void lv_canvas_draw_rect(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, lv_draw_rect_dsc_t* rect_dsc)
+//  void lv_canvas_draw_rect(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, lv_draw_rect_dsc_t* draw_dsc)
 int luat_lv_canvas_draw_rect(lua_State *L) {
     LV_DEBUG("CALL lv_canvas_draw_rect");
     lv_obj_t* canvas = (lv_obj_t*)lua_touserdata(L, 1);
@@ -154,38 +153,37 @@ int luat_lv_canvas_draw_rect(lua_State *L) {
     lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
     lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 4);
     lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 5);
-    lv_draw_rect_dsc_t* rect_dsc = (lv_draw_rect_dsc_t*)lua_touserdata(L, 6);
-    lv_canvas_draw_rect(canvas ,x ,y ,w ,h ,rect_dsc);
+    lv_draw_rect_dsc_t* draw_dsc = (lv_draw_rect_dsc_t*)lua_touserdata(L, 6);
+    lv_canvas_draw_rect(canvas ,x ,y ,w ,h ,draw_dsc);
     return 0;
 }
 
-//  void lv_canvas_draw_text(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, lv_draw_label_dsc_t* label_draw_dsc, char* txt, lv_label_align_t align)
+//  void lv_canvas_draw_text(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, lv_draw_label_dsc_t* draw_dsc, char* txt)
 int luat_lv_canvas_draw_text(lua_State *L) {
     LV_DEBUG("CALL lv_canvas_draw_text");
     lv_obj_t* canvas = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
     lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
     lv_coord_t max_w = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_draw_label_dsc_t* label_draw_dsc = (lv_draw_label_dsc_t*)lua_touserdata(L, 5);
+    lv_draw_label_dsc_t* draw_dsc = (lv_draw_label_dsc_t*)lua_touserdata(L, 5);
     char* txt = (char*)luaL_checkstring(L, 6);
-    lv_label_align_t align = (lv_label_align_t)luaL_checkinteger(L, 7);
-    lv_canvas_draw_text(canvas ,x ,y ,max_w ,label_draw_dsc ,txt ,align);
+    lv_canvas_draw_text(canvas ,x ,y ,max_w ,draw_dsc ,txt);
     return 0;
 }
 
-//  void lv_canvas_draw_img(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, void* src, lv_draw_img_dsc_t* img_draw_dsc)
+//  void lv_canvas_draw_img(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, void* src, lv_draw_img_dsc_t* draw_dsc)
 int luat_lv_canvas_draw_img(lua_State *L) {
     LV_DEBUG("CALL lv_canvas_draw_img");
     lv_obj_t* canvas = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
     lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
     void* src = (void*)lua_touserdata(L, 4);
-    lv_draw_img_dsc_t* img_draw_dsc = (lv_draw_img_dsc_t*)lua_touserdata(L, 5);
-    lv_canvas_draw_img(canvas ,x ,y ,src ,img_draw_dsc);
+    lv_draw_img_dsc_t* draw_dsc = (lv_draw_img_dsc_t*)lua_touserdata(L, 5);
+    lv_canvas_draw_img(canvas ,x ,y ,src ,draw_dsc);
     return 0;
 }
 
-//  void lv_canvas_draw_arc(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, int32_t end_angle, lv_draw_line_dsc_t* arc_draw_dsc)
+//  void lv_canvas_draw_arc(lv_obj_t* canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, int32_t end_angle, lv_draw_arc_dsc_t* draw_dsc)
 int luat_lv_canvas_draw_arc(lua_State *L) {
     LV_DEBUG("CALL lv_canvas_draw_arc");
     lv_obj_t* canvas = (lv_obj_t*)lua_touserdata(L, 1);
@@ -194,8 +192,8 @@ int luat_lv_canvas_draw_arc(lua_State *L) {
     lv_coord_t r = (lv_coord_t)luaL_checkinteger(L, 4);
     int32_t start_angle = (int32_t)luaL_checkinteger(L, 5);
     int32_t end_angle = (int32_t)luaL_checkinteger(L, 6);
-    lv_draw_line_dsc_t* arc_draw_dsc = (lv_draw_line_dsc_t*)lua_touserdata(L, 7);
-    lv_canvas_draw_arc(canvas ,x ,y ,r ,start_angle ,end_angle ,arc_draw_dsc);
+    lv_draw_arc_dsc_t* draw_dsc = (lv_draw_arc_dsc_t*)lua_touserdata(L, 7);
+    lv_canvas_draw_arc(canvas ,x ,y ,r ,start_angle ,end_angle ,draw_dsc);
     return 0;
 }
 

+ 0 - 376
components/lvgl/gen/lv_widgets/luat_lv_chart.c

@@ -1,376 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_chart_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_chart_create(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_chart_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_chart_series_t* lv_chart_add_series(lv_obj_t* chart, lv_color_t color)
-int luat_lv_chart_add_series(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_add_series");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_color_t color = {0};
-    color.full = luaL_checkinteger(L, 2);
-    lv_chart_series_t* ret = NULL;
-    ret = lv_chart_add_series(chart ,color);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_chart_remove_series(lv_obj_t* chart, lv_chart_series_t* series)
-int luat_lv_chart_remove_series(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_remove_series");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* series = (lv_chart_series_t*)lua_touserdata(L, 2);
-    lv_chart_remove_series(chart ,series);
-    return 0;
-}
-
-//  lv_chart_cursor_t* lv_chart_add_cursor(lv_obj_t* chart, lv_color_t color, lv_cursor_direction_t dir)
-int luat_lv_chart_add_cursor(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_add_cursor");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_color_t color = {0};
-    color.full = luaL_checkinteger(L, 2);
-    lv_cursor_direction_t dir;
-    // miss arg convert
-    lv_chart_cursor_t* ret = NULL;
-    ret = lv_chart_add_cursor(chart ,color ,dir);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_chart_clear_series(lv_obj_t* chart, lv_chart_series_t* series)
-int luat_lv_chart_clear_series(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_clear_series");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* series = (lv_chart_series_t*)lua_touserdata(L, 2);
-    lv_chart_clear_series(chart ,series);
-    return 0;
-}
-
-//  void lv_chart_hide_series(lv_obj_t* chart, lv_chart_series_t* series, bool hide)
-int luat_lv_chart_hide_series(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_hide_series");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* series = (lv_chart_series_t*)lua_touserdata(L, 2);
-    bool hide = (bool)lua_toboolean(L, 3);
-    lv_chart_hide_series(chart ,series ,hide);
-    return 0;
-}
-
-//  void lv_chart_set_div_line_count(lv_obj_t* chart, uint8_t hdiv, uint8_t vdiv)
-int luat_lv_chart_set_div_line_count(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_div_line_count");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t hdiv = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t vdiv = (uint8_t)luaL_checkinteger(L, 3);
-    lv_chart_set_div_line_count(chart ,hdiv ,vdiv);
-    return 0;
-}
-
-//  void lv_chart_set_y_range(lv_obj_t* chart, lv_chart_axis_t axis, lv_coord_t ymin, lv_coord_t ymax)
-int luat_lv_chart_set_y_range(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_y_range");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_axis_t axis = (lv_chart_axis_t)luaL_checkinteger(L, 2);
-    lv_coord_t ymin = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_coord_t ymax = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_chart_set_y_range(chart ,axis ,ymin ,ymax);
-    return 0;
-}
-
-//  void lv_chart_set_type(lv_obj_t* chart, lv_chart_type_t type)
-int luat_lv_chart_set_type(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_type");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_type_t type = (lv_chart_type_t)luaL_checkinteger(L, 2);
-    lv_chart_set_type(chart ,type);
-    return 0;
-}
-
-//  void lv_chart_set_point_count(lv_obj_t* chart, uint16_t point_cnt)
-int luat_lv_chart_set_point_count(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_point_count");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t point_cnt = (uint16_t)luaL_checkinteger(L, 2);
-    lv_chart_set_point_count(chart ,point_cnt);
-    return 0;
-}
-
-//  void lv_chart_init_points(lv_obj_t* chart, lv_chart_series_t* ser, lv_coord_t y)
-int luat_lv_chart_init_points(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_init_points");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_chart_init_points(chart ,ser ,y);
-    return 0;
-}
-
-//  void lv_chart_set_next(lv_obj_t* chart, lv_chart_series_t* ser, lv_coord_t y)
-int luat_lv_chart_set_next(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_next");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_chart_set_next(chart ,ser ,y);
-    return 0;
-}
-
-//  void lv_chart_set_update_mode(lv_obj_t* chart, lv_chart_update_mode_t update_mode)
-int luat_lv_chart_set_update_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_update_mode");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_update_mode_t update_mode;
-    // miss arg convert
-    lv_chart_set_update_mode(chart ,update_mode);
-    return 0;
-}
-
-//  void lv_chart_set_x_tick_length(lv_obj_t* chart, uint8_t major_tick_len, uint8_t minor_tick_len)
-int luat_lv_chart_set_x_tick_length(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_x_tick_length");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t major_tick_len = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t minor_tick_len = (uint8_t)luaL_checkinteger(L, 3);
-    lv_chart_set_x_tick_length(chart ,major_tick_len ,minor_tick_len);
-    return 0;
-}
-
-//  void lv_chart_set_y_tick_length(lv_obj_t* chart, uint8_t major_tick_len, uint8_t minor_tick_len)
-int luat_lv_chart_set_y_tick_length(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_y_tick_length");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t major_tick_len = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t minor_tick_len = (uint8_t)luaL_checkinteger(L, 3);
-    lv_chart_set_y_tick_length(chart ,major_tick_len ,minor_tick_len);
-    return 0;
-}
-
-//  void lv_chart_set_secondary_y_tick_length(lv_obj_t* chart, uint8_t major_tick_len, uint8_t minor_tick_len)
-int luat_lv_chart_set_secondary_y_tick_length(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_secondary_y_tick_length");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t major_tick_len = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t minor_tick_len = (uint8_t)luaL_checkinteger(L, 3);
-    lv_chart_set_secondary_y_tick_length(chart ,major_tick_len ,minor_tick_len);
-    return 0;
-}
-
-//  void lv_chart_set_x_tick_texts(lv_obj_t* chart, char* list_of_values, uint8_t num_tick_marks, lv_chart_axis_options_t options)
-int luat_lv_chart_set_x_tick_texts(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_x_tick_texts");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    char* list_of_values = (char*)luaL_checkstring(L, 2);
-    uint8_t num_tick_marks = (uint8_t)luaL_checkinteger(L, 3);
-    lv_chart_axis_options_t options;
-    // miss arg convert
-    lv_chart_set_x_tick_texts(chart ,list_of_values ,num_tick_marks ,options);
-    return 0;
-}
-
-//  void lv_chart_set_secondary_y_tick_texts(lv_obj_t* chart, char* list_of_values, uint8_t num_tick_marks, lv_chart_axis_options_t options)
-int luat_lv_chart_set_secondary_y_tick_texts(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_secondary_y_tick_texts");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    char* list_of_values = (char*)luaL_checkstring(L, 2);
-    uint8_t num_tick_marks = (uint8_t)luaL_checkinteger(L, 3);
-    lv_chart_axis_options_t options;
-    // miss arg convert
-    lv_chart_set_secondary_y_tick_texts(chart ,list_of_values ,num_tick_marks ,options);
-    return 0;
-}
-
-//  void lv_chart_set_y_tick_texts(lv_obj_t* chart, char* list_of_values, uint8_t num_tick_marks, lv_chart_axis_options_t options)
-int luat_lv_chart_set_y_tick_texts(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_y_tick_texts");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    char* list_of_values = (char*)luaL_checkstring(L, 2);
-    uint8_t num_tick_marks = (uint8_t)luaL_checkinteger(L, 3);
-    lv_chart_axis_options_t options;
-    // miss arg convert
-    lv_chart_set_y_tick_texts(chart ,list_of_values ,num_tick_marks ,options);
-    return 0;
-}
-
-//  void lv_chart_set_x_start_point(lv_obj_t* chart, lv_chart_series_t* ser, uint16_t id)
-int luat_lv_chart_set_x_start_point(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_x_start_point");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 3);
-    lv_chart_set_x_start_point(chart ,ser ,id);
-    return 0;
-}
-
-//  void lv_chart_set_point_id(lv_obj_t* chart, lv_chart_series_t* ser, lv_coord_t value, uint16_t id)
-int luat_lv_chart_set_point_id(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_point_id");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    lv_coord_t value = (lv_coord_t)luaL_checkinteger(L, 3);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 4);
-    lv_chart_set_point_id(chart ,ser ,value ,id);
-    return 0;
-}
-
-//  void lv_chart_set_series_axis(lv_obj_t* chart, lv_chart_series_t* ser, lv_chart_axis_t axis)
-int luat_lv_chart_set_series_axis(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_series_axis");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    lv_chart_axis_t axis = (lv_chart_axis_t)luaL_checkinteger(L, 3);
-    lv_chart_set_series_axis(chart ,ser ,axis);
-    return 0;
-}
-
-//  void lv_chart_set_cursor_point(lv_obj_t* chart, lv_chart_cursor_t* cursor, lv_point_t* point)
-int luat_lv_chart_set_cursor_point(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_set_cursor_point");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_cursor_t* cursor = (lv_chart_cursor_t*)lua_touserdata(L, 2);
-    lua_pushvalue(L, 3);
-    lv_point_t point = {0};
-    lua_geti(L, -1, 1); point.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); point.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lv_chart_set_cursor_point(chart ,cursor ,&point);
-    return 0;
-}
-
-//  lv_chart_type_t lv_chart_get_type(lv_obj_t* chart)
-int luat_lv_chart_get_type(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_type");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_type_t ret;
-    ret = lv_chart_get_type(chart);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_chart_get_point_count(lv_obj_t* chart)
-int luat_lv_chart_get_point_count(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_point_count");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_chart_get_point_count(chart);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_chart_get_x_start_point(lv_chart_series_t* ser)
-int luat_lv_chart_get_x_start_point(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_x_start_point");
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_chart_get_x_start_point(ser);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_chart_get_point_id(lv_obj_t* chart, lv_chart_series_t* ser, uint16_t id)
-int luat_lv_chart_get_point_id(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_point_id");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 3);
-    lv_coord_t ret;
-    ret = lv_chart_get_point_id(chart ,ser ,id);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_chart_axis_t lv_chart_get_series_axis(lv_obj_t* chart, lv_chart_series_t* ser)
-int luat_lv_chart_get_series_axis(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_series_axis");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    lv_chart_axis_t ret;
-    ret = lv_chart_get_series_axis(chart ,ser);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_chart_get_series_area(lv_obj_t* chart, lv_area_t* series_area)
-int luat_lv_chart_get_series_area(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_series_area");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_area_t series_area = {0};
-    lua_geti(L, -1, 1); series_area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); series_area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 3); series_area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 4); series_area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    lv_chart_get_series_area(chart ,&series_area);
-    return 0;
-}
-
-//  lv_point_t lv_chart_get_cursor_point(lv_obj_t* chart, lv_chart_cursor_t* cursor)
-int luat_lv_chart_get_cursor_point(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_cursor_point");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_cursor_t* cursor = (lv_chart_cursor_t*)lua_touserdata(L, 2);
-    lv_point_t ret;
-    ret = lv_chart_get_cursor_point(chart ,cursor);
-    lua_pushinteger(L, ret.x);
-    lua_pushinteger(L, ret.y);
-    return 2;
-}
-
-//  uint16_t lv_chart_get_nearest_index_from_coord(lv_obj_t* chart, lv_coord_t x)
-int luat_lv_chart_get_nearest_index_from_coord(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_nearest_index_from_coord");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    uint16_t ret;
-    ret = lv_chart_get_nearest_index_from_coord(chart ,x);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_chart_get_x_from_index(lv_obj_t* chart, lv_chart_series_t* ser, uint16_t id)
-int luat_lv_chart_get_x_from_index(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_x_from_index");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 3);
-    lv_coord_t ret;
-    ret = lv_chart_get_x_from_index(chart ,ser ,id);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_chart_get_y_from_index(lv_obj_t* chart, lv_chart_series_t* ser, uint16_t id)
-int luat_lv_chart_get_y_from_index(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_get_y_from_index");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_series_t* ser = (lv_chart_series_t*)lua_touserdata(L, 2);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 3);
-    lv_coord_t ret;
-    ret = lv_chart_get_y_from_index(chart ,ser ,id);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_chart_refresh(lv_obj_t* chart)
-int luat_lv_chart_refresh(lua_State *L) {
-    LV_DEBUG("CALL lv_chart_refresh");
-    lv_obj_t* chart = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_chart_refresh(chart);
-    return 0;
-}
-

+ 12 - 69
components/lvgl/gen/lv_widgets/luat_lv_checkbox.c

@@ -4,98 +4,41 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_checkbox_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_checkbox_create(lv_obj_t* parent)
 int luat_lv_checkbox_create(lua_State *L) {
     LV_DEBUG("CALL lv_checkbox_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_checkbox_create(par ,copy);
+    ret = lv_checkbox_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_checkbox_set_text(lv_obj_t* cb, char* txt)
+//  void lv_checkbox_set_text(lv_obj_t* obj, char* txt)
 int luat_lv_checkbox_set_text(lua_State *L) {
     LV_DEBUG("CALL lv_checkbox_set_text");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* txt = (char*)luaL_checkstring(L, 2);
-    lv_checkbox_set_text(cb ,txt);
+    lv_checkbox_set_text(obj ,txt);
     return 0;
 }
 
-//  void lv_checkbox_set_text_static(lv_obj_t* cb, char* txt)
+//  void lv_checkbox_set_text_static(lv_obj_t* obj, char* txt)
 int luat_lv_checkbox_set_text_static(lua_State *L) {
     LV_DEBUG("CALL lv_checkbox_set_text_static");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* txt = (char*)luaL_checkstring(L, 2);
-    lv_checkbox_set_text_static(cb ,txt);
+    lv_checkbox_set_text_static(obj ,txt);
     return 0;
 }
 
-//  void lv_checkbox_set_checked(lv_obj_t* cb, bool checked)
-int luat_lv_checkbox_set_checked(lua_State *L) {
-    LV_DEBUG("CALL lv_checkbox_set_checked");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
-    bool checked = (bool)lua_toboolean(L, 2);
-    lv_checkbox_set_checked(cb ,checked);
-    return 0;
-}
-
-//  void lv_checkbox_set_disabled(lv_obj_t* cb)
-int luat_lv_checkbox_set_disabled(lua_State *L) {
-    LV_DEBUG("CALL lv_checkbox_set_disabled");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_checkbox_set_disabled(cb);
-    return 0;
-}
-
-//  void lv_checkbox_set_state(lv_obj_t* cb, lv_btn_state_t state)
-int luat_lv_checkbox_set_state(lua_State *L) {
-    LV_DEBUG("CALL lv_checkbox_set_state");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t state = (lv_btn_state_t)luaL_checkinteger(L, 2);
-    lv_checkbox_set_state(cb ,state);
-    return 0;
-}
-
-//  char* lv_checkbox_get_text(lv_obj_t* cb)
+//  char* lv_checkbox_get_text(lv_obj_t* obj)
 int luat_lv_checkbox_get_text(lua_State *L) {
     LV_DEBUG("CALL lv_checkbox_get_text");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_checkbox_get_text(cb);
+    ret = lv_checkbox_get_text(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  bool lv_checkbox_is_checked(lv_obj_t* cb)
-int luat_lv_checkbox_is_checked(lua_State *L) {
-    LV_DEBUG("CALL lv_checkbox_is_checked");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_checkbox_is_checked(cb);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_checkbox_is_inactive(lv_obj_t* cb)
-int luat_lv_checkbox_is_inactive(lua_State *L) {
-    LV_DEBUG("CALL lv_checkbox_is_inactive");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_checkbox_is_inactive(cb);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  lv_btn_state_t lv_checkbox_get_state(lv_obj_t* cb)
-int luat_lv_checkbox_get_state(lua_State *L) {
-    LV_DEBUG("CALL lv_checkbox_get_state");
-    lv_obj_t* cb = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t ret;
-    ret = lv_checkbox_get_state(cb);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 0 - 107
components/lvgl/gen/lv_widgets/luat_lv_cont.c

@@ -1,107 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_cont_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_cont_create(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_cont_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_cont_set_layout(lv_obj_t* cont, lv_layout_t layout)
-int luat_lv_cont_set_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_set_layout");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t layout = (lv_layout_t)luaL_checkinteger(L, 2);
-    lv_cont_set_layout(cont ,layout);
-    return 0;
-}
-
-//  void lv_cont_set_fit4(lv_obj_t* cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom)
-int luat_lv_cont_set_fit4(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_set_fit4");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t left = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_fit_t right = (lv_fit_t)luaL_checkinteger(L, 3);
-    lv_fit_t top = (lv_fit_t)luaL_checkinteger(L, 4);
-    lv_fit_t bottom = (lv_fit_t)luaL_checkinteger(L, 5);
-    lv_cont_set_fit4(cont ,left ,right ,top ,bottom);
-    return 0;
-}
-
-//  void lv_cont_set_fit2(lv_obj_t* cont, lv_fit_t hor, lv_fit_t ver)
-int luat_lv_cont_set_fit2(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_set_fit2");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t hor = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_fit_t ver = (lv_fit_t)luaL_checkinteger(L, 3);
-    lv_cont_set_fit2(cont ,hor ,ver);
-    return 0;
-}
-
-//  void lv_cont_set_fit(lv_obj_t* cont, lv_fit_t fit)
-int luat_lv_cont_set_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_set_fit");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t fit = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_cont_set_fit(cont ,fit);
-    return 0;
-}
-
-//  lv_layout_t lv_cont_get_layout(lv_obj_t* cont)
-int luat_lv_cont_get_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_get_layout");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t ret;
-    ret = lv_cont_get_layout(cont);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_cont_get_fit_left(lv_obj_t* cont)
-int luat_lv_cont_get_fit_left(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_get_fit_left");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_cont_get_fit_left(cont);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_cont_get_fit_right(lv_obj_t* cont)
-int luat_lv_cont_get_fit_right(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_get_fit_right");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_cont_get_fit_right(cont);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_cont_get_fit_top(lv_obj_t* cont)
-int luat_lv_cont_get_fit_top(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_get_fit_top");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_cont_get_fit_top(cont);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_cont_get_fit_bottom(lv_obj_t* cont)
-int luat_lv_cont_get_fit_bottom(lua_State *L) {
-    LV_DEBUG("CALL lv_cont_get_fit_bottom");
-    lv_obj_t* cont = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_cont_get_fit_bottom(cont);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 0 - 192
components/lvgl/gen/lv_widgets/luat_lv_cpicker.c

@@ -1,192 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_cpicker_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_cpicker_create(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_cpicker_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_cpicker_set_type(lv_obj_t* cpicker, lv_cpicker_type_t type)
-int luat_lv_cpicker_set_type(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_type");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_cpicker_type_t type = (lv_cpicker_type_t)luaL_checkinteger(L, 2);
-    lv_cpicker_set_type(cpicker ,type);
-    return 0;
-}
-
-//  bool lv_cpicker_set_hue(lv_obj_t* cpicker, uint16_t hue)
-int luat_lv_cpicker_set_hue(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_hue");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t hue = (uint16_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_cpicker_set_hue(cpicker ,hue);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_cpicker_set_saturation(lv_obj_t* cpicker, uint8_t saturation)
-int luat_lv_cpicker_set_saturation(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_saturation");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t saturation = (uint8_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_cpicker_set_saturation(cpicker ,saturation);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_cpicker_set_value(lv_obj_t* cpicker, uint8_t val)
-int luat_lv_cpicker_set_value(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_value");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t val = (uint8_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_cpicker_set_value(cpicker ,val);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_cpicker_set_hsv(lv_obj_t* cpicker, lv_color_hsv_t hsv)
-int luat_lv_cpicker_set_hsv(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_hsv");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_color_hsv_t hsv;
-    // miss arg convert
-    bool ret;
-    ret = lv_cpicker_set_hsv(cpicker ,hsv);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_cpicker_set_color(lv_obj_t* cpicker, lv_color_t color)
-int luat_lv_cpicker_set_color(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_color");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_color_t color = {0};
-    color.full = luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_cpicker_set_color(cpicker ,color);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  void lv_cpicker_set_color_mode(lv_obj_t* cpicker, lv_cpicker_color_mode_t mode)
-int luat_lv_cpicker_set_color_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_color_mode");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_cpicker_color_mode_t mode = (lv_cpicker_color_mode_t)luaL_checkinteger(L, 2);
-    lv_cpicker_set_color_mode(cpicker ,mode);
-    return 0;
-}
-
-//  void lv_cpicker_set_color_mode_fixed(lv_obj_t* cpicker, bool fixed)
-int luat_lv_cpicker_set_color_mode_fixed(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_color_mode_fixed");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    bool fixed = (bool)lua_toboolean(L, 2);
-    lv_cpicker_set_color_mode_fixed(cpicker ,fixed);
-    return 0;
-}
-
-//  void lv_cpicker_set_knob_colored(lv_obj_t* cpicker, bool en)
-int luat_lv_cpicker_set_knob_colored(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_set_knob_colored");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_cpicker_set_knob_colored(cpicker ,en);
-    return 0;
-}
-
-//  lv_cpicker_color_mode_t lv_cpicker_get_color_mode(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_color_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_color_mode");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_cpicker_color_mode_t ret;
-    ret = lv_cpicker_get_color_mode(cpicker);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_cpicker_get_color_mode_fixed(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_color_mode_fixed(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_color_mode_fixed");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_cpicker_get_color_mode_fixed(cpicker);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_cpicker_get_hue(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_hue(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_hue");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_cpicker_get_hue(cpicker);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint8_t lv_cpicker_get_saturation(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_saturation(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_saturation");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t ret;
-    ret = lv_cpicker_get_saturation(cpicker);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint8_t lv_cpicker_get_value(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_value(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_value");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t ret;
-    ret = lv_cpicker_get_value(cpicker);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_color_hsv_t lv_cpicker_get_hsv(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_hsv(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_hsv");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_color_hsv_t ret;
-    ret = lv_cpicker_get_hsv(cpicker);
-    lua_pushinteger(L, ret.h);
-    lua_pushinteger(L, ret.s);
-    lua_pushinteger(L, ret.v);
-    return 3;
-}
-
-//  lv_color_t lv_cpicker_get_color(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_color(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_color");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_color_t ret;
-    ret = lv_cpicker_get_color(cpicker);
-    lua_pushinteger(L, ret.full);
-    return 1;
-}
-
-//  bool lv_cpicker_get_knob_colored(lv_obj_t* cpicker)
-int luat_lv_cpicker_get_knob_colored(lua_State *L) {
-    LV_DEBUG("CALL lv_cpicker_get_knob_colored");
-    lv_obj_t* cpicker = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_cpicker_get_knob_colored(cpicker);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-

+ 88 - 98
components/lvgl/gen/lv_widgets/luat_lv_dropdown.c

@@ -4,210 +4,200 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_dropdown_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_dropdown_create(lv_obj_t* parent)
 int luat_lv_dropdown_create(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_dropdown_create(par ,copy);
+    ret = lv_dropdown_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_dropdown_set_text(lv_obj_t* ddlist, char* txt)
+//  void lv_dropdown_set_text(lv_obj_t* obj, char* txt)
 int luat_lv_dropdown_set_text(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_set_text");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* txt = (char*)luaL_checkstring(L, 2);
-    lv_dropdown_set_text(ddlist ,txt);
+    lv_dropdown_set_text(obj ,txt);
     return 0;
 }
 
-//  void lv_dropdown_clear_options(lv_obj_t* ddlist)
-int luat_lv_dropdown_clear_options(lua_State *L) {
-    LV_DEBUG("CALL lv_dropdown_clear_options");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_dropdown_clear_options(ddlist);
-    return 0;
-}
-
-//  void lv_dropdown_set_options(lv_obj_t* ddlist, char* options)
+//  void lv_dropdown_set_options(lv_obj_t* obj, char* options)
 int luat_lv_dropdown_set_options(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_set_options");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* options = (char*)luaL_checkstring(L, 2);
-    lv_dropdown_set_options(ddlist ,options);
+    lv_dropdown_set_options(obj ,options);
     return 0;
 }
 
-//  void lv_dropdown_set_options_static(lv_obj_t* ddlist, char* options)
+//  void lv_dropdown_set_options_static(lv_obj_t* obj, char* options)
 int luat_lv_dropdown_set_options_static(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_set_options_static");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* options = (char*)luaL_checkstring(L, 2);
-    lv_dropdown_set_options_static(ddlist ,options);
+    lv_dropdown_set_options_static(obj ,options);
     return 0;
 }
 
-//  void lv_dropdown_add_option(lv_obj_t* ddlist, char* option, uint32_t pos)
+//  void lv_dropdown_add_option(lv_obj_t* obj, char* option, uint32_t pos)
 int luat_lv_dropdown_add_option(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_add_option");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* option = (char*)luaL_checkstring(L, 2);
     uint32_t pos = (uint32_t)luaL_checkinteger(L, 3);
-    lv_dropdown_add_option(ddlist ,option ,pos);
+    lv_dropdown_add_option(obj ,option ,pos);
+    return 0;
+}
+
+//  void lv_dropdown_clear_options(lv_obj_t* obj)
+int luat_lv_dropdown_clear_options(lua_State *L) {
+    LV_DEBUG("CALL lv_dropdown_clear_options");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_dropdown_clear_options(obj);
     return 0;
 }
 
-//  void lv_dropdown_set_selected(lv_obj_t* ddlist, uint16_t sel_opt)
+//  void lv_dropdown_set_selected(lv_obj_t* obj, uint16_t sel_opt)
 int luat_lv_dropdown_set_selected(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_set_selected");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t sel_opt = (uint16_t)luaL_checkinteger(L, 2);
-    lv_dropdown_set_selected(ddlist ,sel_opt);
+    lv_dropdown_set_selected(obj ,sel_opt);
     return 0;
 }
 
-//  void lv_dropdown_set_dir(lv_obj_t* ddlist, lv_dropdown_dir_t dir)
+//  void lv_dropdown_set_dir(lv_obj_t* obj, lv_dir_t dir)
 int luat_lv_dropdown_set_dir(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_set_dir");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_dropdown_dir_t dir = (lv_dropdown_dir_t)luaL_checkinteger(L, 2);
-    lv_dropdown_set_dir(ddlist ,dir);
-    return 0;
-}
-
-//  void lv_dropdown_set_max_height(lv_obj_t* ddlist, lv_coord_t h)
-int luat_lv_dropdown_set_max_height(lua_State *L) {
-    LV_DEBUG("CALL lv_dropdown_set_max_height");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_dropdown_set_max_height(ddlist ,h);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_dir_t dir = (lv_dir_t)luaL_checkinteger(L, 2);
+    lv_dropdown_set_dir(obj ,dir);
     return 0;
 }
 
-//  void lv_dropdown_set_symbol(lv_obj_t* ddlist, char* symbol)
+//  void lv_dropdown_set_symbol(lv_obj_t* obj, void* symbol)
 int luat_lv_dropdown_set_symbol(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_set_symbol");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    char* symbol = (char*)luaL_checkstring(L, 2);
-    lv_dropdown_set_symbol(ddlist ,symbol);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    void* symbol = (void*)lua_touserdata(L, 2);
+    lv_dropdown_set_symbol(obj ,symbol);
     return 0;
 }
 
-//  void lv_dropdown_set_show_selected(lv_obj_t* ddlist, bool show)
-int luat_lv_dropdown_set_show_selected(lua_State *L) {
-    LV_DEBUG("CALL lv_dropdown_set_show_selected");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    bool show = (bool)lua_toboolean(L, 2);
-    lv_dropdown_set_show_selected(ddlist ,show);
+//  void lv_dropdown_set_selected_highlight(lv_obj_t* obj, bool en)
+int luat_lv_dropdown_set_selected_highlight(lua_State *L) {
+    LV_DEBUG("CALL lv_dropdown_set_selected_highlight");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    bool en = (bool)lua_toboolean(L, 2);
+    lv_dropdown_set_selected_highlight(obj ,en);
     return 0;
 }
 
-//  char* lv_dropdown_get_text(lv_obj_t* ddlist)
+//  lv_obj_t* lv_dropdown_get_list(lv_obj_t* obj)
+int luat_lv_dropdown_get_list(lua_State *L) {
+    LV_DEBUG("CALL lv_dropdown_get_list");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* ret = NULL;
+    ret = lv_dropdown_get_list(obj);
+    lua_pushlightuserdata(L, ret);
+    return 1;
+}
+
+//  char* lv_dropdown_get_text(lv_obj_t* obj)
 int luat_lv_dropdown_get_text(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_get_text");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_dropdown_get_text(ddlist);
+    ret = lv_dropdown_get_text(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  char* lv_dropdown_get_options(lv_obj_t* ddlist)
+//  char* lv_dropdown_get_options(lv_obj_t* obj)
 int luat_lv_dropdown_get_options(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_get_options");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_dropdown_get_options(ddlist);
+    ret = lv_dropdown_get_options(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  uint16_t lv_dropdown_get_selected(lv_obj_t* ddlist)
+//  uint16_t lv_dropdown_get_selected(lv_obj_t* obj)
 int luat_lv_dropdown_get_selected(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_get_selected");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_dropdown_get_selected(ddlist);
+    ret = lv_dropdown_get_selected(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_dropdown_get_option_cnt(lv_obj_t* ddlist)
+//  uint16_t lv_dropdown_get_option_cnt(lv_obj_t* obj)
 int luat_lv_dropdown_get_option_cnt(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_get_option_cnt");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_dropdown_get_option_cnt(ddlist);
+    ret = lv_dropdown_get_option_cnt(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_dropdown_get_selected_str(lv_obj_t* ddlist, char* buf, uint32_t buf_size)
+//  void lv_dropdown_get_selected_str(lv_obj_t* obj, char* buf, uint32_t buf_size)
 int luat_lv_dropdown_get_selected_str(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_get_selected_str");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* buf = (char*)luaL_checkstring(L, 2);
     uint32_t buf_size = (uint32_t)luaL_checkinteger(L, 3);
-    lv_dropdown_get_selected_str(ddlist ,buf ,buf_size);
+    lv_dropdown_get_selected_str(obj ,buf ,buf_size);
     return 0;
 }
 
-//  lv_coord_t lv_dropdown_get_max_height(lv_obj_t* ddlist)
-int luat_lv_dropdown_get_max_height(lua_State *L) {
-    LV_DEBUG("CALL lv_dropdown_get_max_height");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_dropdown_get_max_height(ddlist);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  char* lv_dropdown_get_symbol(lv_obj_t* ddlist)
+//  char* lv_dropdown_get_symbol(lv_obj_t* obj)
 int luat_lv_dropdown_get_symbol(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_get_symbol");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_dropdown_get_symbol(ddlist);
+    ret = lv_dropdown_get_symbol(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  lv_dropdown_dir_t lv_dropdown_get_dir(lv_obj_t* ddlist)
-int luat_lv_dropdown_get_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_dropdown_get_dir");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_dropdown_dir_t ret;
-    ret = lv_dropdown_get_dir(ddlist);
-    lua_pushinteger(L, ret);
+//  bool lv_dropdown_get_selected_highlight(lv_obj_t* obj)
+int luat_lv_dropdown_get_selected_highlight(lua_State *L) {
+    LV_DEBUG("CALL lv_dropdown_get_selected_highlight");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    bool ret;
+    ret = lv_dropdown_get_selected_highlight(obj);
+    lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_dropdown_get_show_selected(lv_obj_t* ddlist)
-int luat_lv_dropdown_get_show_selected(lua_State *L) {
-    LV_DEBUG("CALL lv_dropdown_get_show_selected");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_dropdown_get_show_selected(ddlist);
-    lua_pushboolean(L, ret);
+//  lv_dir_t lv_dropdown_get_dir(lv_obj_t* obj)
+int luat_lv_dropdown_get_dir(lua_State *L) {
+    LV_DEBUG("CALL lv_dropdown_get_dir");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_dir_t ret;
+    ret = lv_dropdown_get_dir(obj);
+    lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_dropdown_open(lv_obj_t* ddlist)
+//  void lv_dropdown_open(lv_obj_t* dropdown_obj)
 int luat_lv_dropdown_open(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_open");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_dropdown_open(ddlist);
+    lv_obj_t* dropdown_obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_dropdown_open(dropdown_obj);
     return 0;
 }
 
-//  void lv_dropdown_close(lv_obj_t* ddlist)
+//  void lv_dropdown_close(lv_obj_t* obj)
 int luat_lv_dropdown_close(lua_State *L) {
     LV_DEBUG("CALL lv_dropdown_close");
-    lv_obj_t* ddlist = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_dropdown_close(ddlist);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_dropdown_close(obj);
     return 0;
 }
 

+ 0 - 198
components/lvgl/gen/lv_widgets/luat_lv_gauge.c

@@ -1,198 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_gauge_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_gauge_create(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_gauge_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_gauge_set_value(lv_obj_t* gauge, uint8_t needle_id, int32_t value)
-int luat_lv_gauge_set_value(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_set_value");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t needle_id = (uint8_t)luaL_checkinteger(L, 2);
-    int32_t value = (int32_t)luaL_checkinteger(L, 3);
-    lv_gauge_set_value(gauge ,needle_id ,value);
-    return 0;
-}
-
-//  void lv_gauge_set_range(lv_obj_t* gauge, int32_t min, int32_t max)
-int luat_lv_gauge_set_range(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_set_range");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t min = (int32_t)luaL_checkinteger(L, 2);
-    int32_t max = (int32_t)luaL_checkinteger(L, 3);
-    lv_gauge_set_range(gauge ,min ,max);
-    return 0;
-}
-
-//  void lv_gauge_set_critical_value(lv_obj_t* gauge, int32_t value)
-int luat_lv_gauge_set_critical_value(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_set_critical_value");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t value = (int32_t)luaL_checkinteger(L, 2);
-    lv_gauge_set_critical_value(gauge ,value);
-    return 0;
-}
-
-//  void lv_gauge_set_scale(lv_obj_t* gauge, uint16_t angle, uint8_t line_cnt, uint8_t label_cnt)
-int luat_lv_gauge_set_scale(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_set_scale");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t angle = (uint16_t)luaL_checkinteger(L, 2);
-    uint8_t line_cnt = (uint8_t)luaL_checkinteger(L, 3);
-    uint8_t label_cnt = (uint8_t)luaL_checkinteger(L, 4);
-    lv_gauge_set_scale(gauge ,angle ,line_cnt ,label_cnt);
-    return 0;
-}
-
-//  void lv_gauge_set_angle_offset(lv_obj_t* gauge, uint16_t angle)
-int luat_lv_gauge_set_angle_offset(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_set_angle_offset");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t angle = (uint16_t)luaL_checkinteger(L, 2);
-    lv_gauge_set_angle_offset(gauge ,angle);
-    return 0;
-}
-
-//  void lv_gauge_set_needle_img(lv_obj_t* gauge, void* img, lv_coord_t pivot_x, lv_coord_t pivot_y)
-int luat_lv_gauge_set_needle_img(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_set_needle_img");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    void* img = (void*)lua_touserdata(L, 2);
-    lv_coord_t pivot_x = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_coord_t pivot_y = (lv_coord_t)luaL_checkinteger(L, 4);
-    lv_gauge_set_needle_img(gauge ,img ,pivot_x ,pivot_y);
-    return 0;
-}
-
-//  int32_t lv_gauge_get_value(lv_obj_t* gauge, uint8_t needle)
-int luat_lv_gauge_get_value(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_value");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t needle = (uint8_t)luaL_checkinteger(L, 2);
-    int32_t ret;
-    ret = lv_gauge_get_value(gauge ,needle);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint8_t lv_gauge_get_needle_count(lv_obj_t* gauge)
-int luat_lv_gauge_get_needle_count(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_needle_count");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t ret;
-    ret = lv_gauge_get_needle_count(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  int32_t lv_gauge_get_min_value(lv_obj_t* lmeter)
-int luat_lv_gauge_get_min_value(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_min_value");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_gauge_get_min_value(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  int32_t lv_gauge_get_max_value(lv_obj_t* lmeter)
-int luat_lv_gauge_get_max_value(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_max_value");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_gauge_get_max_value(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  int32_t lv_gauge_get_critical_value(lv_obj_t* gauge)
-int luat_lv_gauge_get_critical_value(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_critical_value");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_gauge_get_critical_value(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint8_t lv_gauge_get_label_count(lv_obj_t* gauge)
-int luat_lv_gauge_get_label_count(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_label_count");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t ret;
-    ret = lv_gauge_get_label_count(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_gauge_get_line_count(lv_obj_t* gauge)
-int luat_lv_gauge_get_line_count(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_line_count");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_gauge_get_line_count(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_gauge_get_scale_angle(lv_obj_t* gauge)
-int luat_lv_gauge_get_scale_angle(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_scale_angle");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_gauge_get_scale_angle(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_gauge_get_angle_offset(lv_obj_t* gauge)
-int luat_lv_gauge_get_angle_offset(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_angle_offset");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_gauge_get_angle_offset(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void* lv_gauge_get_needle_img(lv_obj_t* gauge)
-int luat_lv_gauge_get_needle_img(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_needle_img");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    void* ret = NULL;
-    ret = lv_gauge_get_needle_img(gauge);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_gauge_get_needle_img_pivot_x(lv_obj_t* gauge)
-int luat_lv_gauge_get_needle_img_pivot_x(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_needle_img_pivot_x");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_gauge_get_needle_img_pivot_x(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_gauge_get_needle_img_pivot_y(lv_obj_t* gauge)
-int luat_lv_gauge_get_needle_img_pivot_y(lua_State *L) {
-    LV_DEBUG("CALL lv_gauge_get_needle_img_pivot_y");
-    lv_obj_t* gauge = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_gauge_get_needle_img_pivot_y(gauge);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 61 - 90
components/lvgl/gen/lv_widgets/luat_lv_img.c

@@ -96,10 +96,10 @@ int luat_lv_img_buf_get_img_size(lua_State *L) {
     return 1;
 }
 
-//  lv_res_t lv_img_decoder_get_info(char* src, lv_img_header_t* header)
+//  lv_res_t lv_img_decoder_get_info(void* src, lv_img_header_t* header)
 int luat_lv_img_decoder_get_info(lua_State *L) {
     LV_DEBUG("CALL lv_img_decoder_get_info");
-    char* src = (char*)luaL_checkstring(L, 1);
+    void* src = (void*)lua_touserdata(L, 1);
     lv_img_header_t* header = (lv_img_header_t*)lua_touserdata(L, 2);
     lv_res_t ret;
     ret = lv_img_decoder_get_info(src ,header);
@@ -108,15 +108,16 @@ int luat_lv_img_decoder_get_info(lua_State *L) {
     return 2;
 }
 
-//  lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t* dsc, void* src, lv_color_t color)
+//  lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t* dsc, void* src, lv_color_t color, int32_t frame_id)
 int luat_lv_img_decoder_open(lua_State *L) {
     LV_DEBUG("CALL lv_img_decoder_open");
     lv_img_decoder_dsc_t* dsc = (lv_img_decoder_dsc_t*)lua_touserdata(L, 1);
     void* src = (void*)lua_touserdata(L, 2);
     lv_color_t color = {0};
     color.full = luaL_checkinteger(L, 3);
+    int32_t frame_id = (int32_t)luaL_checkinteger(L, 4);
     lv_res_t ret;
-    ret = lv_img_decoder_open(dsc ,src ,color);
+    ret = lv_img_decoder_open(dsc ,src ,color ,frame_id);
     lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
     lua_pushinteger(L, ret);
     return 2;
@@ -252,180 +253,150 @@ int luat_lv_img_cf_has_alpha(lua_State *L) {
     return 1;
 }
 
-//  lv_obj_t* lv_img_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_img_create(lv_obj_t* parent)
 int luat_lv_img_create(lua_State *L) {
     LV_DEBUG("CALL lv_img_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_img_create(par ,copy);
+    ret = lv_img_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_img_set_src(lv_obj_t* img, void* src_img)
+//  void lv_img_set_src(lv_obj_t* obj, void* src)
 int luat_lv_img_set_src(lua_State *L) {
     LV_DEBUG("CALL lv_img_set_src");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
-    void* src_img = (void*)lua_touserdata(L, 2);
-    lv_img_set_src(img ,src_img);
-    return 0;
-}
-
-//  void lv_img_set_auto_size(lv_obj_t* img, bool autosize_en)
-int luat_lv_img_set_auto_size(lua_State *L) {
-    LV_DEBUG("CALL lv_img_set_auto_size");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
-    bool autosize_en = (bool)lua_toboolean(L, 2);
-    lv_img_set_auto_size(img ,autosize_en);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    void* src = (void*)lua_touserdata(L, 2);
+    lv_img_set_src(obj ,src);
     return 0;
 }
 
-//  void lv_img_set_offset_x(lv_obj_t* img, lv_coord_t x)
+//  void lv_img_set_offset_x(lv_obj_t* obj, lv_coord_t x)
 int luat_lv_img_set_offset_x(lua_State *L) {
     LV_DEBUG("CALL lv_img_set_offset_x");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_img_set_offset_x(img ,x);
+    lv_img_set_offset_x(obj ,x);
     return 0;
 }
 
-//  void lv_img_set_offset_y(lv_obj_t* img, lv_coord_t y)
+//  void lv_img_set_offset_y(lv_obj_t* obj, lv_coord_t y)
 int luat_lv_img_set_offset_y(lua_State *L) {
     LV_DEBUG("CALL lv_img_set_offset_y");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_img_set_offset_y(img ,y);
+    lv_img_set_offset_y(obj ,y);
     return 0;
 }
 
-//  void lv_img_set_pivot(lv_obj_t* img, lv_coord_t pivot_x, lv_coord_t pivot_y)
-int luat_lv_img_set_pivot(lua_State *L) {
-    LV_DEBUG("CALL lv_img_set_pivot");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t pivot_x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t pivot_y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_img_set_pivot(img ,pivot_x ,pivot_y);
-    return 0;
-}
-
-//  void lv_img_set_angle(lv_obj_t* img, int16_t angle)
+//  void lv_img_set_angle(lv_obj_t* obj, int16_t angle)
 int luat_lv_img_set_angle(lua_State *L) {
     LV_DEBUG("CALL lv_img_set_angle");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     int16_t angle = (int16_t)luaL_checkinteger(L, 2);
-    lv_img_set_angle(img ,angle);
+    lv_img_set_angle(obj ,angle);
     return 0;
 }
 
-//  void lv_img_set_zoom(lv_obj_t* img, uint16_t zoom)
+//  void lv_img_set_pivot(lv_obj_t* obj, lv_coord_t x, lv_coord_t y)
+int luat_lv_img_set_pivot(lua_State *L) {
+    LV_DEBUG("CALL lv_img_set_pivot");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
+    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
+    lv_img_set_pivot(obj ,x ,y);
+    return 0;
+}
+
+//  void lv_img_set_zoom(lv_obj_t* obj, uint16_t zoom)
 int luat_lv_img_set_zoom(lua_State *L) {
     LV_DEBUG("CALL lv_img_set_zoom");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t zoom = (uint16_t)luaL_checkinteger(L, 2);
-    lv_img_set_zoom(img ,zoom);
+    lv_img_set_zoom(obj ,zoom);
     return 0;
 }
 
-//  void lv_img_set_antialias(lv_obj_t* img, bool antialias)
+//  void lv_img_set_antialias(lv_obj_t* obj, bool antialias)
 int luat_lv_img_set_antialias(lua_State *L) {
     LV_DEBUG("CALL lv_img_set_antialias");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool antialias = (bool)lua_toboolean(L, 2);
-    lv_img_set_antialias(img ,antialias);
+    lv_img_set_antialias(obj ,antialias);
     return 0;
 }
 
-//  void* lv_img_get_src(lv_obj_t* img)
+//  void* lv_img_get_src(lv_obj_t* obj)
 int luat_lv_img_get_src(lua_State *L) {
     LV_DEBUG("CALL lv_img_get_src");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     void* ret = NULL;
-    ret = lv_img_get_src(img);
+    ret = lv_img_get_src(obj);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  char* lv_img_get_file_name(lv_obj_t* img)
-int luat_lv_img_get_file_name(lua_State *L) {
-    LV_DEBUG("CALL lv_img_get_file_name");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
-    char* ret = NULL;
-    ret = lv_img_get_file_name(img);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  bool lv_img_get_auto_size(lv_obj_t* img)
-int luat_lv_img_get_auto_size(lua_State *L) {
-    LV_DEBUG("CALL lv_img_get_auto_size");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_img_get_auto_size(img);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_img_get_offset_x(lv_obj_t* img)
+//  lv_coord_t lv_img_get_offset_x(lv_obj_t* obj)
 int luat_lv_img_get_offset_x(lua_State *L) {
     LV_DEBUG("CALL lv_img_get_offset_x");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t ret;
-    ret = lv_img_get_offset_x(img);
+    ret = lv_img_get_offset_x(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_coord_t lv_img_get_offset_y(lv_obj_t* img)
+//  lv_coord_t lv_img_get_offset_y(lv_obj_t* obj)
 int luat_lv_img_get_offset_y(lua_State *L) {
     LV_DEBUG("CALL lv_img_get_offset_y");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_coord_t ret;
-    ret = lv_img_get_offset_y(img);
+    ret = lv_img_get_offset_y(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_img_get_angle(lv_obj_t* img)
+//  uint16_t lv_img_get_angle(lv_obj_t* obj)
 int luat_lv_img_get_angle(lua_State *L) {
     LV_DEBUG("CALL lv_img_get_angle");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_img_get_angle(img);
+    ret = lv_img_get_angle(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_img_get_pivot(lv_obj_t* img, lv_point_t* center)
+//  void lv_img_get_pivot(lv_obj_t* obj, lv_point_t* pivot)
 int luat_lv_img_get_pivot(lua_State *L) {
     LV_DEBUG("CALL lv_img_get_pivot");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lua_pushvalue(L, 2);
-    lv_point_t center = {0};
-    lua_geti(L, -1, 1); center.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); center.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lv_point_t pivot = {0};
+    lua_geti(L, -1, 1); pivot.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); pivot.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
     lua_pop(L, 1);
 
-    lv_img_get_pivot(img ,&center);
+    lv_img_get_pivot(obj ,&pivot);
     return 0;
 }
 
-//  uint16_t lv_img_get_zoom(lv_obj_t* img)
+//  uint16_t lv_img_get_zoom(lv_obj_t* obj)
 int luat_lv_img_get_zoom(lua_State *L) {
     LV_DEBUG("CALL lv_img_get_zoom");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_img_get_zoom(img);
+    ret = lv_img_get_zoom(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_img_get_antialias(lv_obj_t* img)
+//  bool lv_img_get_antialias(lv_obj_t* obj)
 int luat_lv_img_get_antialias(lua_State *L) {
     LV_DEBUG("CALL lv_img_get_antialias");
-    lv_obj_t* img = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_img_get_antialias(img);
+    ret = lv_img_get_antialias(obj);
     lua_pushboolean(L, ret);
     return 1;
 }

+ 0 - 84
components/lvgl/gen/lv_widgets/luat_lv_imgbtn.c

@@ -1,84 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_imgbtn_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_imgbtn_create(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_imgbtn_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_imgbtn_set_src(lv_obj_t* imgbtn, lv_btn_state_t state, void* src)
-int luat_lv_imgbtn_set_src(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_set_src");
-    lv_obj_t* imgbtn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t state = (lv_btn_state_t)luaL_checkinteger(L, 2);
-    void* src = (void*)lua_touserdata(L, 3);
-    lv_imgbtn_set_src(imgbtn ,state ,src);
-    return 0;
-}
-
-//  void lv_imgbtn_set_state(lv_obj_t* imgbtn, lv_btn_state_t state)
-int luat_lv_imgbtn_set_state(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_set_state");
-    lv_obj_t* imgbtn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t state = (lv_btn_state_t)luaL_checkinteger(L, 2);
-    lv_imgbtn_set_state(imgbtn ,state);
-    return 0;
-}
-
-//  void lv_imgbtn_toggle(lv_obj_t* imgbtn)
-int luat_lv_imgbtn_toggle(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_toggle");
-    lv_obj_t* imgbtn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_imgbtn_toggle(imgbtn);
-    return 0;
-}
-
-//  void lv_imgbtn_set_checkable(lv_obj_t* imgbtn, bool tgl)
-int luat_lv_imgbtn_set_checkable(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_set_checkable");
-    lv_obj_t* imgbtn = (lv_obj_t*)lua_touserdata(L, 1);
-    bool tgl = (bool)lua_toboolean(L, 2);
-    lv_imgbtn_set_checkable(imgbtn ,tgl);
-    return 0;
-}
-
-//  void* lv_imgbtn_get_src(lv_obj_t* imgbtn, lv_btn_state_t state)
-int luat_lv_imgbtn_get_src(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_get_src");
-    lv_obj_t* imgbtn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t state = (lv_btn_state_t)luaL_checkinteger(L, 2);
-    void* ret = NULL;
-    ret = lv_imgbtn_get_src(imgbtn ,state);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_btn_state_t lv_imgbtn_get_state(lv_obj_t* imgbtn)
-int luat_lv_imgbtn_get_state(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_get_state");
-    lv_obj_t* imgbtn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_btn_state_t ret;
-    ret = lv_imgbtn_get_state(imgbtn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_imgbtn_get_checkable(lv_obj_t* imgbtn)
-int luat_lv_imgbtn_get_checkable(lua_State *L) {
-    LV_DEBUG("CALL lv_imgbtn_get_checkable");
-    lv_obj_t* imgbtn = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_imgbtn_get_checkable(imgbtn);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-

+ 0 - 74
components/lvgl/gen/lv_widgets/luat_lv_keyboard.c

@@ -1,74 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_keyboard_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_keyboard_create(lua_State *L) {
-    LV_DEBUG("CALL lv_keyboard_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_keyboard_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_keyboard_set_textarea(lv_obj_t* kb, lv_obj_t* ta)
-int luat_lv_keyboard_set_textarea(lua_State *L) {
-    LV_DEBUG("CALL lv_keyboard_set_textarea");
-    lv_obj_t* kb = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_keyboard_set_textarea(kb ,ta);
-    return 0;
-}
-
-//  void lv_keyboard_set_mode(lv_obj_t* kb, lv_keyboard_mode_t mode)
-int luat_lv_keyboard_set_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_keyboard_set_mode");
-    lv_obj_t* kb = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_keyboard_mode_t mode = (lv_keyboard_mode_t)luaL_checkinteger(L, 2);
-    lv_keyboard_set_mode(kb ,mode);
-    return 0;
-}
-
-//  void lv_keyboard_set_cursor_manage(lv_obj_t* kb, bool en)
-int luat_lv_keyboard_set_cursor_manage(lua_State *L) {
-    LV_DEBUG("CALL lv_keyboard_set_cursor_manage");
-    lv_obj_t* kb = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_keyboard_set_cursor_manage(kb ,en);
-    return 0;
-}
-
-//  lv_obj_t* lv_keyboard_get_textarea(lv_obj_t* kb)
-int luat_lv_keyboard_get_textarea(lua_State *L) {
-    LV_DEBUG("CALL lv_keyboard_get_textarea");
-    lv_obj_t* kb = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_keyboard_get_textarea(kb);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_keyboard_mode_t lv_keyboard_get_mode(lv_obj_t* kb)
-int luat_lv_keyboard_get_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_keyboard_get_mode");
-    lv_obj_t* kb = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_keyboard_mode_t ret;
-    ret = lv_keyboard_get_mode(kb);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_keyboard_get_cursor_manage(lv_obj_t* kb)
-int luat_lv_keyboard_get_cursor_manage(lua_State *L) {
-    LV_DEBUG("CALL lv_keyboard_get_cursor_manage");
-    lv_obj_t* kb = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_keyboard_get_cursor_manage(kb);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-

+ 59 - 117
components/lvgl/gen/lv_widgets/luat_lv_label.c

@@ -4,174 +4,135 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_label_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_label_create(lv_obj_t* parent)
 int luat_lv_label_create(lua_State *L) {
     LV_DEBUG("CALL lv_label_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_label_create(par ,copy);
+    ret = lv_label_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_label_set_text(lv_obj_t* label, char* text)
+//  void lv_label_set_text(lv_obj_t* obj, char* text)
 int luat_lv_label_set_text(lua_State *L) {
     LV_DEBUG("CALL lv_label_set_text");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* text = (char*)luaL_checkstring(L, 2);
-    lv_label_set_text(label ,text);
+    lv_label_set_text(obj ,text);
     return 0;
 }
 
-//  void lv_label_set_text_static(lv_obj_t* label, char* text)
+//  void lv_label_set_text_static(lv_obj_t* obj, char* text)
 int luat_lv_label_set_text_static(lua_State *L) {
     LV_DEBUG("CALL lv_label_set_text_static");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* text = (char*)luaL_checkstring(L, 2);
-    lv_label_set_text_static(label ,text);
+    lv_label_set_text_static(obj ,text);
     return 0;
 }
 
-//  void lv_label_set_long_mode(lv_obj_t* label, lv_label_long_mode_t long_mode)
+//  void lv_label_set_long_mode(lv_obj_t* obj, lv_label_long_mode_t long_mode)
 int luat_lv_label_set_long_mode(lua_State *L) {
     LV_DEBUG("CALL lv_label_set_long_mode");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_label_long_mode_t long_mode = (lv_label_long_mode_t)luaL_checkinteger(L, 2);
-    lv_label_set_long_mode(label ,long_mode);
+    lv_label_set_long_mode(obj ,long_mode);
     return 0;
 }
 
-//  void lv_label_set_align(lv_obj_t* label, lv_label_align_t align)
-int luat_lv_label_set_align(lua_State *L) {
-    LV_DEBUG("CALL lv_label_set_align");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_align_t align = (lv_label_align_t)luaL_checkinteger(L, 2);
-    lv_label_set_align(label ,align);
-    return 0;
-}
-
-//  void lv_label_set_recolor(lv_obj_t* label, bool en)
+//  void lv_label_set_recolor(lv_obj_t* obj, bool en)
 int luat_lv_label_set_recolor(lua_State *L) {
     LV_DEBUG("CALL lv_label_set_recolor");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool en = (bool)lua_toboolean(L, 2);
-    lv_label_set_recolor(label ,en);
+    lv_label_set_recolor(obj ,en);
     return 0;
 }
 
-//  void lv_label_set_anim_speed(lv_obj_t* label, uint16_t anim_speed)
-int luat_lv_label_set_anim_speed(lua_State *L) {
-    LV_DEBUG("CALL lv_label_set_anim_speed");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_speed = (uint16_t)luaL_checkinteger(L, 2);
-    lv_label_set_anim_speed(label ,anim_speed);
-    return 0;
-}
-
-//  void lv_label_set_text_sel_start(lv_obj_t* label, uint32_t index)
+//  void lv_label_set_text_sel_start(lv_obj_t* obj, uint32_t index)
 int luat_lv_label_set_text_sel_start(lua_State *L) {
     LV_DEBUG("CALL lv_label_set_text_sel_start");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t index = (uint32_t)luaL_checkinteger(L, 2);
-    lv_label_set_text_sel_start(label ,index);
+    lv_label_set_text_sel_start(obj ,index);
     return 0;
 }
 
-//  void lv_label_set_text_sel_end(lv_obj_t* label, uint32_t index)
+//  void lv_label_set_text_sel_end(lv_obj_t* obj, uint32_t index)
 int luat_lv_label_set_text_sel_end(lua_State *L) {
     LV_DEBUG("CALL lv_label_set_text_sel_end");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t index = (uint32_t)luaL_checkinteger(L, 2);
-    lv_label_set_text_sel_end(label ,index);
+    lv_label_set_text_sel_end(obj ,index);
     return 0;
 }
 
-//  char* lv_label_get_text(lv_obj_t* label)
+//  char* lv_label_get_text(lv_obj_t* obj)
 int luat_lv_label_get_text(lua_State *L) {
     LV_DEBUG("CALL lv_label_get_text");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_label_get_text(label);
+    ret = lv_label_get_text(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  lv_label_long_mode_t lv_label_get_long_mode(lv_obj_t* label)
+//  lv_label_long_mode_t lv_label_get_long_mode(lv_obj_t* obj)
 int luat_lv_label_get_long_mode(lua_State *L) {
     LV_DEBUG("CALL lv_label_get_long_mode");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_label_long_mode_t ret;
-    ret = lv_label_get_long_mode(label);
+    ret = lv_label_get_long_mode(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_label_align_t lv_label_get_align(lv_obj_t* label)
-int luat_lv_label_get_align(lua_State *L) {
-    LV_DEBUG("CALL lv_label_get_align");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_align_t ret;
-    ret = lv_label_get_align(label);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_label_get_recolor(lv_obj_t* label)
+//  bool lv_label_get_recolor(lv_obj_t* obj)
 int luat_lv_label_get_recolor(lua_State *L) {
     LV_DEBUG("CALL lv_label_get_recolor");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_label_get_recolor(label);
+    ret = lv_label_get_recolor(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  uint16_t lv_label_get_anim_speed(lv_obj_t* label)
-int luat_lv_label_get_anim_speed(lua_State *L) {
-    LV_DEBUG("CALL lv_label_get_anim_speed");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_label_get_anim_speed(label);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_label_get_letter_pos(lv_obj_t* label, uint32_t index, lv_point_t* pos)
+//  void lv_label_get_letter_pos(lv_obj_t* obj, uint32_t char_id, lv_point_t* pos)
 int luat_lv_label_get_letter_pos(lua_State *L) {
     LV_DEBUG("CALL lv_label_get_letter_pos");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
-    uint32_t index = (uint32_t)luaL_checkinteger(L, 2);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint32_t char_id = (uint32_t)luaL_checkinteger(L, 2);
     lua_pushvalue(L, 3);
     lv_point_t pos = {0};
     lua_geti(L, -1, 1); pos.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
     lua_geti(L, -1, 2); pos.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
     lua_pop(L, 1);
 
-    lv_label_get_letter_pos(label ,index ,&pos);
+    lv_label_get_letter_pos(obj ,char_id ,&pos);
     return 0;
 }
 
-//  uint32_t lv_label_get_letter_on(lv_obj_t* label, lv_point_t* pos)
+//  uint32_t lv_label_get_letter_on(lv_obj_t* obj, lv_point_t* pos_in)
 int luat_lv_label_get_letter_on(lua_State *L) {
     LV_DEBUG("CALL lv_label_get_letter_on");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lua_pushvalue(L, 2);
-    lv_point_t pos = {0};
-    lua_geti(L, -1, 1); pos.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); pos.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lv_point_t pos_in = {0};
+    lua_geti(L, -1, 1); pos_in.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
+    lua_geti(L, -1, 2); pos_in.y = luaL_checkinteger(L, -1); lua_pop(L, 1);
     lua_pop(L, 1);
 
     uint32_t ret;
-    ret = lv_label_get_letter_on(label ,&pos);
+    ret = lv_label_get_letter_on(obj ,&pos_in);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_label_is_char_under_pos(lv_obj_t* label, lv_point_t* pos)
+//  bool lv_label_is_char_under_pos(lv_obj_t* obj, lv_point_t* pos)
 int luat_lv_label_is_char_under_pos(lua_State *L) {
     LV_DEBUG("CALL lv_label_is_char_under_pos");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lua_pushvalue(L, 2);
     lv_point_t pos = {0};
     lua_geti(L, -1, 1); pos.x = luaL_checkinteger(L, -1); lua_pop(L, 1);
@@ -179,67 +140,48 @@ int luat_lv_label_is_char_under_pos(lua_State *L) {
     lua_pop(L, 1);
 
     bool ret;
-    ret = lv_label_is_char_under_pos(label ,&pos);
+    ret = lv_label_is_char_under_pos(obj ,&pos);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  uint32_t lv_label_get_text_sel_start(lv_obj_t* label)
-int luat_lv_label_get_text_sel_start(lua_State *L) {
-    LV_DEBUG("CALL lv_label_get_text_sel_start");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+//  uint32_t lv_label_get_text_selection_start(lv_obj_t* obj)
+int luat_lv_label_get_text_selection_start(lua_State *L) {
+    LV_DEBUG("CALL lv_label_get_text_selection_start");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t ret;
-    ret = lv_label_get_text_sel_start(label);
+    ret = lv_label_get_text_selection_start(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint32_t lv_label_get_text_sel_end(lv_obj_t* label)
-int luat_lv_label_get_text_sel_end(lua_State *L) {
-    LV_DEBUG("CALL lv_label_get_text_sel_end");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+//  uint32_t lv_label_get_text_selection_end(lv_obj_t* obj)
+int luat_lv_label_get_text_selection_end(lua_State *L) {
+    LV_DEBUG("CALL lv_label_get_text_selection_end");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t ret;
-    ret = lv_label_get_text_sel_end(label);
+    ret = lv_label_get_text_selection_end(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_style_list_t* lv_label_get_style(lv_obj_t* label, uint8_t type)
-int luat_lv_label_get_style(lua_State *L) {
-    LV_DEBUG("CALL lv_label_get_style");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t type = (uint8_t)luaL_checkinteger(L, 2);
-    lv_style_list_t* ret = NULL;
-    ret = lv_label_get_style(label ,type);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_label_ins_text(lv_obj_t* label, uint32_t pos, char* txt)
+//  void lv_label_ins_text(lv_obj_t* obj, uint32_t pos, char* txt)
 int luat_lv_label_ins_text(lua_State *L) {
     LV_DEBUG("CALL lv_label_ins_text");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t pos = (uint32_t)luaL_checkinteger(L, 2);
     char* txt = (char*)luaL_checkstring(L, 3);
-    lv_label_ins_text(label ,pos ,txt);
+    lv_label_ins_text(obj ,pos ,txt);
     return 0;
 }
 
-//  void lv_label_cut_text(lv_obj_t* label, uint32_t pos, uint32_t cnt)
+//  void lv_label_cut_text(lv_obj_t* obj, uint32_t pos, uint32_t cnt)
 int luat_lv_label_cut_text(lua_State *L) {
     LV_DEBUG("CALL lv_label_cut_text");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t pos = (uint32_t)luaL_checkinteger(L, 2);
     uint32_t cnt = (uint32_t)luaL_checkinteger(L, 3);
-    lv_label_cut_text(label ,pos ,cnt);
-    return 0;
-}
-
-//  void lv_label_refr_text(lv_obj_t* label)
-int luat_lv_label_refr_text(lua_State *L) {
-    LV_DEBUG("CALL lv_label_refr_text");
-    lv_obj_t* label = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_refr_text(label);
+    lv_label_cut_text(obj ,pos ,cnt);
     return 0;
 }
 

+ 0 - 60
components/lvgl/gen/lv_widgets/luat_lv_led.c

@@ -1,60 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_led_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_led_create(lua_State *L) {
-    LV_DEBUG("CALL lv_led_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_led_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_led_set_bright(lv_obj_t* led, uint8_t bright)
-int luat_lv_led_set_bright(lua_State *L) {
-    LV_DEBUG("CALL lv_led_set_bright");
-    lv_obj_t* led = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t bright = (uint8_t)luaL_checkinteger(L, 2);
-    lv_led_set_bright(led ,bright);
-    return 0;
-}
-
-//  void lv_led_on(lv_obj_t* led)
-int luat_lv_led_on(lua_State *L) {
-    LV_DEBUG("CALL lv_led_on");
-    lv_obj_t* led = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_led_on(led);
-    return 0;
-}
-
-//  void lv_led_off(lv_obj_t* led)
-int luat_lv_led_off(lua_State *L) {
-    LV_DEBUG("CALL lv_led_off");
-    lv_obj_t* led = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_led_off(led);
-    return 0;
-}
-
-//  void lv_led_toggle(lv_obj_t* led)
-int luat_lv_led_toggle(lua_State *L) {
-    LV_DEBUG("CALL lv_led_toggle");
-    lv_obj_t* led = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_led_toggle(led);
-    return 0;
-}
-
-//  uint8_t lv_led_get_bright(lv_obj_t* led)
-int luat_lv_led_get_bright(lua_State *L) {
-    LV_DEBUG("CALL lv_led_get_bright");
-    lv_obj_t* led = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t ret;
-    ret = lv_led_get_bright(led);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 9 - 29
components/lvgl/gen/lv_widgets/luat_lv_line.c

@@ -4,51 +4,31 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_line_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_line_create(lv_obj_t* parent)
 int luat_lv_line_create(lua_State *L) {
     LV_DEBUG("CALL lv_line_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_line_create(par ,copy);
+    ret = lv_line_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_line_set_auto_size(lv_obj_t* line, bool en)
-int luat_lv_line_set_auto_size(lua_State *L) {
-    LV_DEBUG("CALL lv_line_set_auto_size");
-    lv_obj_t* line = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_line_set_auto_size(line ,en);
-    return 0;
-}
-
-//  void lv_line_set_y_invert(lv_obj_t* line, bool en)
+//  void lv_line_set_y_invert(lv_obj_t* obj, bool en)
 int luat_lv_line_set_y_invert(lua_State *L) {
     LV_DEBUG("CALL lv_line_set_y_invert");
-    lv_obj_t* line = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool en = (bool)lua_toboolean(L, 2);
-    lv_line_set_y_invert(line ,en);
+    lv_line_set_y_invert(obj ,en);
     return 0;
 }
 
-//  bool lv_line_get_auto_size(lv_obj_t* line)
-int luat_lv_line_get_auto_size(lua_State *L) {
-    LV_DEBUG("CALL lv_line_get_auto_size");
-    lv_obj_t* line = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_line_get_auto_size(line);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_line_get_y_invert(lv_obj_t* line)
+//  bool lv_line_get_y_invert(lv_obj_t* obj)
 int luat_lv_line_get_y_invert(lua_State *L) {
     LV_DEBUG("CALL lv_line_get_y_invert");
-    lv_obj_t* line = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_line_get_y_invert(line);
+    ret = lv_line_get_y_invert(obj);
     lua_pushboolean(L, ret);
     return 1;
 }

+ 0 - 151
components/lvgl/gen/lv_widgets/luat_lv_linemeter.c

@@ -1,151 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_linemeter_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_linemeter_create(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_linemeter_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_linemeter_set_value(lv_obj_t* lmeter, int32_t value)
-int luat_lv_linemeter_set_value(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_set_value");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t value = (int32_t)luaL_checkinteger(L, 2);
-    lv_linemeter_set_value(lmeter ,value);
-    return 0;
-}
-
-//  void lv_linemeter_set_range(lv_obj_t* lmeter, int32_t min, int32_t max)
-int luat_lv_linemeter_set_range(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_set_range");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t min = (int32_t)luaL_checkinteger(L, 2);
-    int32_t max = (int32_t)luaL_checkinteger(L, 3);
-    lv_linemeter_set_range(lmeter ,min ,max);
-    return 0;
-}
-
-//  void lv_linemeter_set_scale(lv_obj_t* lmeter, uint16_t angle, uint16_t line_cnt)
-int luat_lv_linemeter_set_scale(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_set_scale");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t angle = (uint16_t)luaL_checkinteger(L, 2);
-    uint16_t line_cnt = (uint16_t)luaL_checkinteger(L, 3);
-    lv_linemeter_set_scale(lmeter ,angle ,line_cnt);
-    return 0;
-}
-
-//  void lv_linemeter_set_angle_offset(lv_obj_t* lmeter, uint16_t angle)
-int luat_lv_linemeter_set_angle_offset(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_set_angle_offset");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t angle = (uint16_t)luaL_checkinteger(L, 2);
-    lv_linemeter_set_angle_offset(lmeter ,angle);
-    return 0;
-}
-
-//  void lv_linemeter_set_mirror(lv_obj_t* lmeter, bool mirror)
-int luat_lv_linemeter_set_mirror(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_set_mirror");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    bool mirror = (bool)lua_toboolean(L, 2);
-    lv_linemeter_set_mirror(lmeter ,mirror);
-    return 0;
-}
-
-//  int32_t lv_linemeter_get_value(lv_obj_t* lmeter)
-int luat_lv_linemeter_get_value(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_get_value");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_linemeter_get_value(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  int32_t lv_linemeter_get_min_value(lv_obj_t* lmeter)
-int luat_lv_linemeter_get_min_value(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_get_min_value");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_linemeter_get_min_value(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  int32_t lv_linemeter_get_max_value(lv_obj_t* lmeter)
-int luat_lv_linemeter_get_max_value(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_get_max_value");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_linemeter_get_max_value(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_linemeter_get_line_count(lv_obj_t* lmeter)
-int luat_lv_linemeter_get_line_count(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_get_line_count");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_linemeter_get_line_count(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_linemeter_get_scale_angle(lv_obj_t* lmeter)
-int luat_lv_linemeter_get_scale_angle(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_get_scale_angle");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_linemeter_get_scale_angle(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_linemeter_get_angle_offset(lv_obj_t* lmeter)
-int luat_lv_linemeter_get_angle_offset(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_get_angle_offset");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_linemeter_get_angle_offset(lmeter);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_linemeter_draw_scale(lv_obj_t* lmeter, lv_area_t* clip_area, uint8_t part)
-int luat_lv_linemeter_draw_scale(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_draw_scale");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    lua_pushvalue(L, 2);
-    lv_area_t clip_area = {0};
-    lua_geti(L, -1, 1); clip_area.x1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 2); clip_area.y1 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 3); clip_area.x2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_geti(L, -1, 4); clip_area.y2 = luaL_checkinteger(L, -1); lua_pop(L, 1);
-    lua_pop(L, 1);
-
-    uint8_t part = (uint8_t)luaL_checkinteger(L, 3);
-    lv_linemeter_draw_scale(lmeter ,&clip_area ,part);
-    return 0;
-}
-
-//  bool lv_linemeter_get_mirror(lv_obj_t* lmeter)
-int luat_lv_linemeter_get_mirror(lua_State *L) {
-    LV_DEBUG("CALL lv_linemeter_get_mirror");
-    lv_obj_t* lmeter = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_linemeter_get_mirror(lmeter);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-

+ 0 - 260
components/lvgl/gen/lv_widgets/luat_lv_list.c

@@ -1,260 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_list_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_list_create(lua_State *L) {
-    LV_DEBUG("CALL lv_list_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_list_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_list_clean(lv_obj_t* list)
-int luat_lv_list_clean(lua_State *L) {
-    LV_DEBUG("CALL lv_list_clean");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_list_clean(list);
-    return 0;
-}
-
-//  lv_obj_t* lv_list_add_btn(lv_obj_t* list, void* img_src, char* txt)
-int luat_lv_list_add_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_list_add_btn");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    void* img_src = (void*)lua_touserdata(L, 2);
-    char* txt = (char*)luaL_checkstring(L, 3);
-    lv_obj_t* ret = NULL;
-    ret = lv_list_add_btn(list ,img_src ,txt);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  bool lv_list_remove(lv_obj_t* list, uint16_t index)
-int luat_lv_list_remove(lua_State *L) {
-    LV_DEBUG("CALL lv_list_remove");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t index = (uint16_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_list_remove(list ,index);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  void lv_list_focus_btn(lv_obj_t* list, lv_obj_t* btn)
-int luat_lv_list_focus_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_list_focus_btn");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_list_focus_btn(list ,btn);
-    return 0;
-}
-
-//  void lv_list_set_scrollbar_mode(lv_obj_t* list, lv_scrollbar_mode_t mode)
-int luat_lv_list_set_scrollbar_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_list_set_scrollbar_mode");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t mode = (lv_scrollbar_mode_t)luaL_checkinteger(L, 2);
-    lv_list_set_scrollbar_mode(list ,mode);
-    return 0;
-}
-
-//  void lv_list_set_scroll_propagation(lv_obj_t* list, bool en)
-int luat_lv_list_set_scroll_propagation(lua_State *L) {
-    LV_DEBUG("CALL lv_list_set_scroll_propagation");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_list_set_scroll_propagation(list ,en);
-    return 0;
-}
-
-//  void lv_list_set_edge_flash(lv_obj_t* list, bool en)
-int luat_lv_list_set_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_list_set_edge_flash");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_list_set_edge_flash(list ,en);
-    return 0;
-}
-
-//  void lv_list_set_anim_time(lv_obj_t* list, uint16_t anim_time)
-int luat_lv_list_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_list_set_anim_time");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_list_set_anim_time(list ,anim_time);
-    return 0;
-}
-
-//  void lv_list_set_layout(lv_obj_t* list, lv_layout_t layout)
-int luat_lv_list_set_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_list_set_layout");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t layout = (lv_layout_t)luaL_checkinteger(L, 2);
-    lv_list_set_layout(list ,layout);
-    return 0;
-}
-
-//  char* lv_list_get_btn_text(lv_obj_t* btn)
-int luat_lv_list_get_btn_text(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_btn_text");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    char* ret = NULL;
-    ret = lv_list_get_btn_text(btn);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_list_get_btn_label(lv_obj_t* btn)
-int luat_lv_list_get_btn_label(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_btn_label");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_list_get_btn_label(btn);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_list_get_btn_img(lv_obj_t* btn)
-int luat_lv_list_get_btn_img(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_btn_img");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_list_get_btn_img(btn);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_list_get_prev_btn(lv_obj_t* list, lv_obj_t* prev_btn)
-int luat_lv_list_get_prev_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_prev_btn");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* prev_btn = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_list_get_prev_btn(list ,prev_btn);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_list_get_next_btn(lv_obj_t* list, lv_obj_t* prev_btn)
-int luat_lv_list_get_next_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_next_btn");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* prev_btn = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_list_get_next_btn(list ,prev_btn);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  int32_t lv_list_get_btn_index(lv_obj_t* list, lv_obj_t* btn)
-int luat_lv_list_get_btn_index(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_btn_index");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 2);
-    int32_t ret;
-    ret = lv_list_get_btn_index(list ,btn);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_list_get_size(lv_obj_t* list)
-int luat_lv_list_get_size(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_size");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_list_get_size(list);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_list_get_btn_selected(lv_obj_t* list)
-int luat_lv_list_get_btn_selected(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_btn_selected");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_list_get_btn_selected(list);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_layout_t lv_list_get_layout(lv_obj_t* list)
-int luat_lv_list_get_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_layout");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t ret;
-    ret = lv_list_get_layout(list);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_scrollbar_mode_t lv_list_get_scrollbar_mode(lv_obj_t* list)
-int luat_lv_list_get_scrollbar_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_scrollbar_mode");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t ret;
-    ret = lv_list_get_scrollbar_mode(list);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_list_get_scroll_propagation(lv_obj_t* list)
-int luat_lv_list_get_scroll_propagation(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_scroll_propagation");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_list_get_scroll_propagation(list);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_list_get_edge_flash(lv_obj_t* list)
-int luat_lv_list_get_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_edge_flash");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_list_get_edge_flash(list);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_list_get_anim_time(lv_obj_t* list)
-int luat_lv_list_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_list_get_anim_time");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_list_get_anim_time(list);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_list_up(lv_obj_t* list)
-int luat_lv_list_up(lua_State *L) {
-    LV_DEBUG("CALL lv_list_up");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_list_up(list);
-    return 0;
-}
-
-//  void lv_list_down(lv_obj_t* list)
-int luat_lv_list_down(lua_State *L) {
-    LV_DEBUG("CALL lv_list_down");
-    lv_obj_t* list = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_list_down(list);
-    return 0;
-}
-
-//  void lv_list_focus(lv_obj_t* btn, lv_anim_enable_t anim)
-int luat_lv_list_focus(lua_State *L) {
-    LV_DEBUG("CALL lv_list_focus");
-    lv_obj_t* btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 2);
-    lv_list_focus(btn ,anim);
-    return 0;
-}
-

+ 0 - 121
components/lvgl/gen/lv_widgets/luat_lv_msgbox.c

@@ -1,121 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_msgbox_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_msgbox_create(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_msgbox_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_msgbox_set_text(lv_obj_t* mbox, char* txt)
-int luat_lv_msgbox_set_text(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_set_text");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    char* txt = (char*)luaL_checkstring(L, 2);
-    lv_msgbox_set_text(mbox ,txt);
-    return 0;
-}
-
-//  void lv_msgbox_set_anim_time(lv_obj_t* mbox, uint16_t anim_time)
-int luat_lv_msgbox_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_set_anim_time");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_msgbox_set_anim_time(mbox ,anim_time);
-    return 0;
-}
-
-//  void lv_msgbox_start_auto_close(lv_obj_t* mbox, uint16_t delay)
-int luat_lv_msgbox_start_auto_close(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_start_auto_close");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t delay = (uint16_t)luaL_checkinteger(L, 2);
-    lv_msgbox_start_auto_close(mbox ,delay);
-    return 0;
-}
-
-//  void lv_msgbox_stop_auto_close(lv_obj_t* mbox)
-int luat_lv_msgbox_stop_auto_close(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_stop_auto_close");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_msgbox_stop_auto_close(mbox);
-    return 0;
-}
-
-//  void lv_msgbox_set_recolor(lv_obj_t* mbox, bool en)
-int luat_lv_msgbox_set_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_set_recolor");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_msgbox_set_recolor(mbox ,en);
-    return 0;
-}
-
-//  char* lv_msgbox_get_text(lv_obj_t* mbox)
-int luat_lv_msgbox_get_text(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_get_text");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    char* ret = NULL;
-    ret = lv_msgbox_get_text(mbox);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_msgbox_get_active_btn(lv_obj_t* mbox)
-int luat_lv_msgbox_get_active_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_get_active_btn");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_msgbox_get_active_btn(mbox);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  char* lv_msgbox_get_active_btn_text(lv_obj_t* mbox)
-int luat_lv_msgbox_get_active_btn_text(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_get_active_btn_text");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    char* ret = NULL;
-    ret = lv_msgbox_get_active_btn_text(mbox);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_msgbox_get_anim_time(lv_obj_t* mbox)
-int luat_lv_msgbox_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_get_anim_time");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_msgbox_get_anim_time(mbox);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_msgbox_get_recolor(lv_obj_t* mbox)
-int luat_lv_msgbox_get_recolor(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_get_recolor");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_msgbox_get_recolor(mbox);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_msgbox_get_btnmatrix(lv_obj_t* mbox)
-int luat_lv_msgbox_get_btnmatrix(lua_State *L) {
-    LV_DEBUG("CALL lv_msgbox_get_btnmatrix");
-    lv_obj_t* mbox = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_msgbox_get_btnmatrix(mbox);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-

+ 0 - 47
components/lvgl/gen/lv_widgets/luat_lv_objmask.c

@@ -1,47 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_objmask_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_objmask_create(lua_State *L) {
-    LV_DEBUG("CALL lv_objmask_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_objmask_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_objmask_mask_t* lv_objmask_add_mask(lv_obj_t* objmask, void* param)
-int luat_lv_objmask_add_mask(lua_State *L) {
-    LV_DEBUG("CALL lv_objmask_add_mask");
-    lv_obj_t* objmask = (lv_obj_t*)lua_touserdata(L, 1);
-    void* param = (void*)lua_touserdata(L, 2);
-    lv_objmask_mask_t* ret = NULL;
-    ret = lv_objmask_add_mask(objmask ,param);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_objmask_update_mask(lv_obj_t* objmask, lv_objmask_mask_t* mask, void* param)
-int luat_lv_objmask_update_mask(lua_State *L) {
-    LV_DEBUG("CALL lv_objmask_update_mask");
-    lv_obj_t* objmask = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_objmask_mask_t* mask = (lv_objmask_mask_t*)lua_touserdata(L, 2);
-    void* param = (void*)lua_touserdata(L, 3);
-    lv_objmask_update_mask(objmask ,mask ,param);
-    return 0;
-}
-
-//  void lv_objmask_remove_mask(lv_obj_t* objmask, lv_objmask_mask_t* mask)
-int luat_lv_objmask_remove_mask(lua_State *L) {
-    LV_DEBUG("CALL lv_objmask_remove_mask");
-    lv_obj_t* objmask = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_objmask_mask_t* mask = (lv_objmask_mask_t*)lua_touserdata(L, 2);
-    lv_objmask_remove_mask(objmask ,mask);
-    return 0;
-}
-

+ 0 - 342
components/lvgl/gen/lv_widgets/luat_lv_page.c

@@ -1,342 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_page_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_page_create(lua_State *L) {
-    LV_DEBUG("CALL lv_page_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_page_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_page_clean(lv_obj_t* page)
-int luat_lv_page_clean(lua_State *L) {
-    LV_DEBUG("CALL lv_page_clean");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_page_clean(page);
-    return 0;
-}
-
-//  lv_obj_t* lv_page_get_scrollable(lv_obj_t* page)
-int luat_lv_page_get_scrollable(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrollable");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_page_get_scrollable(page);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_page_get_anim_time(lv_obj_t* page)
-int luat_lv_page_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_anim_time");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_page_get_anim_time(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_page_set_scrollbar_mode(lv_obj_t* page, lv_scrollbar_mode_t sb_mode)
-int luat_lv_page_set_scrollbar_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scrollbar_mode");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t sb_mode = (lv_scrollbar_mode_t)luaL_checkinteger(L, 2);
-    lv_page_set_scrollbar_mode(page ,sb_mode);
-    return 0;
-}
-
-//  void lv_page_set_anim_time(lv_obj_t* page, uint16_t anim_time)
-int luat_lv_page_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_anim_time");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_page_set_anim_time(page ,anim_time);
-    return 0;
-}
-
-//  void lv_page_set_scroll_propagation(lv_obj_t* page, bool en)
-int luat_lv_page_set_scroll_propagation(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scroll_propagation");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_page_set_scroll_propagation(page ,en);
-    return 0;
-}
-
-//  void lv_page_set_edge_flash(lv_obj_t* page, bool en)
-int luat_lv_page_set_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_edge_flash");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_page_set_edge_flash(page ,en);
-    return 0;
-}
-
-//  void lv_page_set_scrollable_fit4(lv_obj_t* page, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom)
-int luat_lv_page_set_scrollable_fit4(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scrollable_fit4");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t left = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_fit_t right = (lv_fit_t)luaL_checkinteger(L, 3);
-    lv_fit_t top = (lv_fit_t)luaL_checkinteger(L, 4);
-    lv_fit_t bottom = (lv_fit_t)luaL_checkinteger(L, 5);
-    lv_page_set_scrollable_fit4(page ,left ,right ,top ,bottom);
-    return 0;
-}
-
-//  void lv_page_set_scrollable_fit2(lv_obj_t* page, lv_fit_t hor, lv_fit_t ver)
-int luat_lv_page_set_scrollable_fit2(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scrollable_fit2");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t hor = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_fit_t ver = (lv_fit_t)luaL_checkinteger(L, 3);
-    lv_page_set_scrollable_fit2(page ,hor ,ver);
-    return 0;
-}
-
-//  void lv_page_set_scrollable_fit(lv_obj_t* page, lv_fit_t fit)
-int luat_lv_page_set_scrollable_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scrollable_fit");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t fit = (lv_fit_t)luaL_checkinteger(L, 2);
-    lv_page_set_scrollable_fit(page ,fit);
-    return 0;
-}
-
-//  void lv_page_set_scrl_width(lv_obj_t* page, lv_coord_t w)
-int luat_lv_page_set_scrl_width(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scrl_width");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_page_set_scrl_width(page ,w);
-    return 0;
-}
-
-//  void lv_page_set_scrl_height(lv_obj_t* page, lv_coord_t h)
-int luat_lv_page_set_scrl_height(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scrl_height");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_page_set_scrl_height(page ,h);
-    return 0;
-}
-
-//  void lv_page_set_scrl_layout(lv_obj_t* page, lv_layout_t layout)
-int luat_lv_page_set_scrl_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_page_set_scrl_layout");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t layout = (lv_layout_t)luaL_checkinteger(L, 2);
-    lv_page_set_scrl_layout(page ,layout);
-    return 0;
-}
-
-//  lv_scrollbar_mode_t lv_page_get_scrollbar_mode(lv_obj_t* page)
-int luat_lv_page_get_scrollbar_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrollbar_mode");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t ret;
-    ret = lv_page_get_scrollbar_mode(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_page_get_scroll_propagation(lv_obj_t* page)
-int luat_lv_page_get_scroll_propagation(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scroll_propagation");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_page_get_scroll_propagation(page);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_page_get_edge_flash(lv_obj_t* page)
-int luat_lv_page_get_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_edge_flash");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_page_get_edge_flash(page);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_page_get_width_fit(lv_obj_t* page)
-int luat_lv_page_get_width_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_width_fit");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_page_get_width_fit(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_page_get_height_fit(lv_obj_t* page)
-int luat_lv_page_get_height_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_height_fit");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_page_get_height_fit(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_page_get_width_grid(lv_obj_t* page, uint8_t div, uint8_t span)
-int luat_lv_page_get_width_grid(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_width_grid");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t div = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t span = (uint8_t)luaL_checkinteger(L, 3);
-    lv_coord_t ret;
-    ret = lv_page_get_width_grid(page ,div ,span);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_page_get_height_grid(lv_obj_t* page, uint8_t div, uint8_t span)
-int luat_lv_page_get_height_grid(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_height_grid");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t div = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t span = (uint8_t)luaL_checkinteger(L, 3);
-    lv_coord_t ret;
-    ret = lv_page_get_height_grid(page ,div ,span);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_page_get_scrl_width(lv_obj_t* page)
-int luat_lv_page_get_scrl_width(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrl_width");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_page_get_scrl_width(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_page_get_scrl_height(lv_obj_t* page)
-int luat_lv_page_get_scrl_height(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrl_height");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_page_get_scrl_height(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_layout_t lv_page_get_scrl_layout(lv_obj_t* page)
-int luat_lv_page_get_scrl_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrl_layout");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t ret;
-    ret = lv_page_get_scrl_layout(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_page_get_scrl_fit_left(lv_obj_t* page)
-int luat_lv_page_get_scrl_fit_left(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrl_fit_left");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_page_get_scrl_fit_left(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_page_get_scrl_fit_right(lv_obj_t* page)
-int luat_lv_page_get_scrl_fit_right(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrl_fit_right");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_page_get_scrl_fit_right(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_page_get_scrl_fit_top(lv_obj_t* page)
-int luat_lv_page_get_scrl_fit_top(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrl_fit_top");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_page_get_scrl_fit_top(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_fit_t lv_page_get_scrl_fit_bottom(lv_obj_t* page)
-int luat_lv_page_get_scrl_fit_bottom(lua_State *L) {
-    LV_DEBUG("CALL lv_page_get_scrl_fit_bottom");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_fit_t ret;
-    ret = lv_page_get_scrl_fit_bottom(page);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_page_on_edge(lv_obj_t* page, lv_page_edge_t edge)
-int luat_lv_page_on_edge(lua_State *L) {
-    LV_DEBUG("CALL lv_page_on_edge");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_page_edge_t edge;
-    // miss arg convert
-    bool ret;
-    ret = lv_page_on_edge(page ,edge);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  void lv_page_glue_obj(lv_obj_t* obj, bool glue)
-int luat_lv_page_glue_obj(lua_State *L) {
-    LV_DEBUG("CALL lv_page_glue_obj");
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
-    bool glue = (bool)lua_toboolean(L, 2);
-    lv_page_glue_obj(obj ,glue);
-    return 0;
-}
-
-//  void lv_page_focus(lv_obj_t* page, lv_obj_t* obj, lv_anim_enable_t anim_en)
-int luat_lv_page_focus(lua_State *L) {
-    LV_DEBUG("CALL lv_page_focus");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_page_focus(page ,obj ,anim_en);
-    return 0;
-}
-
-//  void lv_page_scroll_hor(lv_obj_t* page, lv_coord_t dist)
-int luat_lv_page_scroll_hor(lua_State *L) {
-    LV_DEBUG("CALL lv_page_scroll_hor");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t dist = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_page_scroll_hor(page ,dist);
-    return 0;
-}
-
-//  void lv_page_scroll_ver(lv_obj_t* page, lv_coord_t dist)
-int luat_lv_page_scroll_ver(lua_State *L) {
-    LV_DEBUG("CALL lv_page_scroll_ver");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t dist = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_page_scroll_ver(page ,dist);
-    return 0;
-}
-
-//  void lv_page_start_edge_flash(lv_obj_t* page, lv_page_edge_t edge)
-int luat_lv_page_start_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_page_start_edge_flash");
-    lv_obj_t* page = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_page_edge_t edge;
-    // miss arg convert
-    lv_page_start_edge_flash(page ,edge);
-    return 0;
-}
-

+ 27 - 86
components/lvgl/gen/lv_widgets/luat_lv_roller.c

@@ -4,140 +4,81 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_roller_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_roller_create(lv_obj_t* parent)
 int luat_lv_roller_create(lua_State *L) {
     LV_DEBUG("CALL lv_roller_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_roller_create(par ,copy);
+    ret = lv_roller_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_roller_set_options(lv_obj_t* roller, char* options, lv_roller_mode_t mode)
+//  void lv_roller_set_options(lv_obj_t* obj, char* options, lv_roller_mode_t mode)
 int luat_lv_roller_set_options(lua_State *L) {
     LV_DEBUG("CALL lv_roller_set_options");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* options = (char*)luaL_checkstring(L, 2);
-    lv_roller_mode_t mode;
-    // miss arg convert
-    lv_roller_set_options(roller ,options ,mode);
+    lv_roller_mode_t mode = (lv_roller_mode_t)luaL_checkinteger(L, 3);
+    lv_roller_set_options(obj ,options ,mode);
     return 0;
 }
 
-//  void lv_roller_set_align(lv_obj_t* roller, lv_label_align_t align)
-int luat_lv_roller_set_align(lua_State *L) {
-    LV_DEBUG("CALL lv_roller_set_align");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_align_t align = (lv_label_align_t)luaL_checkinteger(L, 2);
-    lv_roller_set_align(roller ,align);
-    return 0;
-}
-
-//  void lv_roller_set_selected(lv_obj_t* roller, uint16_t sel_opt, lv_anim_enable_t anim)
+//  void lv_roller_set_selected(lv_obj_t* obj, uint16_t sel_opt, lv_anim_enable_t anim)
 int luat_lv_roller_set_selected(lua_State *L) {
     LV_DEBUG("CALL lv_roller_set_selected");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t sel_opt = (uint16_t)luaL_checkinteger(L, 2);
     lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_roller_set_selected(roller ,sel_opt ,anim);
+    lv_roller_set_selected(obj ,sel_opt ,anim);
     return 0;
 }
 
-//  void lv_roller_set_visible_row_count(lv_obj_t* roller, uint8_t row_cnt)
+//  void lv_roller_set_visible_row_count(lv_obj_t* obj, uint8_t row_cnt)
 int luat_lv_roller_set_visible_row_count(lua_State *L) {
     LV_DEBUG("CALL lv_roller_set_visible_row_count");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint8_t row_cnt = (uint8_t)luaL_checkinteger(L, 2);
-    lv_roller_set_visible_row_count(roller ,row_cnt);
+    lv_roller_set_visible_row_count(obj ,row_cnt);
     return 0;
 }
 
-//  void lv_roller_set_auto_fit(lv_obj_t* roller, bool auto_fit)
-int luat_lv_roller_set_auto_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_roller_set_auto_fit");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
-    bool auto_fit = (bool)lua_toboolean(L, 2);
-    lv_roller_set_auto_fit(roller ,auto_fit);
-    return 0;
-}
-
-//  void lv_roller_set_anim_time(lv_obj_t* roller, uint16_t anim_time)
-int luat_lv_roller_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_roller_set_anim_time");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_roller_set_anim_time(roller ,anim_time);
-    return 0;
-}
-
-//  uint16_t lv_roller_get_selected(lv_obj_t* roller)
+//  uint16_t lv_roller_get_selected(lv_obj_t* obj)
 int luat_lv_roller_get_selected(lua_State *L) {
     LV_DEBUG("CALL lv_roller_get_selected");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_roller_get_selected(roller);
+    ret = lv_roller_get_selected(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_roller_get_option_cnt(lv_obj_t* roller)
-int luat_lv_roller_get_option_cnt(lua_State *L) {
-    LV_DEBUG("CALL lv_roller_get_option_cnt");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_roller_get_option_cnt(roller);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_roller_get_selected_str(lv_obj_t* roller, char* buf, uint32_t buf_size)
+//  void lv_roller_get_selected_str(lv_obj_t* obj, char* buf, uint32_t buf_size)
 int luat_lv_roller_get_selected_str(lua_State *L) {
     LV_DEBUG("CALL lv_roller_get_selected_str");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* buf = (char*)luaL_checkstring(L, 2);
     uint32_t buf_size = (uint32_t)luaL_checkinteger(L, 3);
-    lv_roller_get_selected_str(roller ,buf ,buf_size);
+    lv_roller_get_selected_str(obj ,buf ,buf_size);
     return 0;
 }
 
-//  lv_label_align_t lv_roller_get_align(lv_obj_t* roller)
-int luat_lv_roller_get_align(lua_State *L) {
-    LV_DEBUG("CALL lv_roller_get_align");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_align_t ret;
-    ret = lv_roller_get_align(roller);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_roller_get_auto_fit(lv_obj_t* roller)
-int luat_lv_roller_get_auto_fit(lua_State *L) {
-    LV_DEBUG("CALL lv_roller_get_auto_fit");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_roller_get_auto_fit(roller);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  char* lv_roller_get_options(lv_obj_t* roller)
+//  char* lv_roller_get_options(lv_obj_t* obj)
 int luat_lv_roller_get_options(lua_State *L) {
     LV_DEBUG("CALL lv_roller_get_options");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_roller_get_options(roller);
+    ret = lv_roller_get_options(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  uint16_t lv_roller_get_anim_time(lv_obj_t* roller)
-int luat_lv_roller_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_roller_get_anim_time");
-    lv_obj_t* roller = (lv_obj_t*)lua_touserdata(L, 1);
+//  uint16_t lv_roller_get_option_cnt(lv_obj_t* obj)
+int luat_lv_roller_get_option_cnt(lua_State *L) {
+    LV_DEBUG("CALL lv_roller_get_option_cnt");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_roller_get_anim_time(roller);
+    ret = lv_roller_get_option_cnt(obj);
     lua_pushinteger(L, ret);
     return 1;
 }

+ 46 - 66
components/lvgl/gen/lv_widgets/luat_lv_slider.c

@@ -4,131 +4,111 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_slider_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_slider_create(lv_obj_t* parent)
 int luat_lv_slider_create(lua_State *L) {
     LV_DEBUG("CALL lv_slider_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_slider_create(par ,copy);
+    ret = lv_slider_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_slider_set_value(lv_obj_t* slider, int16_t value, lv_anim_enable_t anim)
+//  void lv_slider_set_value(lv_obj_t* obj, int32_t value, lv_anim_enable_t anim)
 int luat_lv_slider_set_value(lua_State *L) {
     LV_DEBUG("CALL lv_slider_set_value");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t value = (int16_t)luaL_checkinteger(L, 2);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t value = (int32_t)luaL_checkinteger(L, 2);
     lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_slider_set_value(slider ,value ,anim);
+    lv_slider_set_value(obj ,value ,anim);
     return 0;
 }
 
-//  void lv_slider_set_left_value(lv_obj_t* slider, int16_t left_value, lv_anim_enable_t anim)
+//  void lv_slider_set_left_value(lv_obj_t* obj, int32_t value, lv_anim_enable_t anim)
 int luat_lv_slider_set_left_value(lua_State *L) {
     LV_DEBUG("CALL lv_slider_set_left_value");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t left_value = (int16_t)luaL_checkinteger(L, 2);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t value = (int32_t)luaL_checkinteger(L, 2);
     lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_slider_set_left_value(slider ,left_value ,anim);
+    lv_slider_set_left_value(obj ,value ,anim);
     return 0;
 }
 
-//  void lv_slider_set_range(lv_obj_t* slider, int16_t min, int16_t max)
+//  void lv_slider_set_range(lv_obj_t* obj, int32_t min, int32_t max)
 int luat_lv_slider_set_range(lua_State *L) {
     LV_DEBUG("CALL lv_slider_set_range");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t min = (int16_t)luaL_checkinteger(L, 2);
-    int16_t max = (int16_t)luaL_checkinteger(L, 3);
-    lv_slider_set_range(slider ,min ,max);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t min = (int32_t)luaL_checkinteger(L, 2);
+    int32_t max = (int32_t)luaL_checkinteger(L, 3);
+    lv_slider_set_range(obj ,min ,max);
     return 0;
 }
 
-//  void lv_slider_set_anim_time(lv_obj_t* slider, uint16_t anim_time)
-int luat_lv_slider_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_slider_set_anim_time");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_slider_set_anim_time(slider ,anim_time);
+//  void lv_slider_set_mode(lv_obj_t* obj, lv_slider_mode_t mode)
+int luat_lv_slider_set_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_slider_set_mode");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_slider_mode_t mode = (lv_slider_mode_t)luaL_checkinteger(L, 2);
+    lv_slider_set_mode(obj ,mode);
     return 0;
 }
 
-//  void lv_slider_set_type(lv_obj_t* slider, lv_slider_type_t type)
-int luat_lv_slider_set_type(lua_State *L) {
-    LV_DEBUG("CALL lv_slider_set_type");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_slider_type_t type = (lv_slider_type_t)luaL_checkinteger(L, 2);
-    lv_slider_set_type(slider ,type);
-    return 0;
-}
-
-//  int16_t lv_slider_get_value(lv_obj_t* slider)
+//  int32_t lv_slider_get_value(lv_obj_t* obj)
 int luat_lv_slider_get_value(lua_State *L) {
     LV_DEBUG("CALL lv_slider_get_value");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_slider_get_value(slider);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_slider_get_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_slider_get_left_value(lv_obj_t* slider)
+//  int32_t lv_slider_get_left_value(lv_obj_t* obj)
 int luat_lv_slider_get_left_value(lua_State *L) {
     LV_DEBUG("CALL lv_slider_get_left_value");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_slider_get_left_value(slider);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_slider_get_left_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_slider_get_min_value(lv_obj_t* slider)
+//  int32_t lv_slider_get_min_value(lv_obj_t* obj)
 int luat_lv_slider_get_min_value(lua_State *L) {
     LV_DEBUG("CALL lv_slider_get_min_value");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_slider_get_min_value(slider);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_slider_get_min_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  int16_t lv_slider_get_max_value(lv_obj_t* slider)
+//  int32_t lv_slider_get_max_value(lv_obj_t* obj)
 int luat_lv_slider_get_max_value(lua_State *L) {
     LV_DEBUG("CALL lv_slider_get_max_value");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    int16_t ret;
-    ret = lv_slider_get_max_value(slider);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    int32_t ret;
+    ret = lv_slider_get_max_value(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_slider_is_dragged(lv_obj_t* slider)
+//  bool lv_slider_is_dragged(lv_obj_t* obj)
 int luat_lv_slider_is_dragged(lua_State *L) {
     LV_DEBUG("CALL lv_slider_is_dragged");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_slider_is_dragged(slider);
+    ret = lv_slider_is_dragged(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  uint16_t lv_slider_get_anim_time(lv_obj_t* slider)
-int luat_lv_slider_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_slider_get_anim_time");
-    lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_slider_get_anim_time(slider);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_slider_type_t lv_slider_get_type(lv_obj_t* slider)
-int luat_lv_slider_get_type(lua_State *L) {
-    LV_DEBUG("CALL lv_slider_get_type");
+//  lv_slider_mode_t lv_slider_get_mode(lv_obj_t* slider)
+int luat_lv_slider_get_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_slider_get_mode");
     lv_obj_t* slider = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_slider_type_t ret;
-    ret = lv_slider_get_type(slider);
+    lv_slider_mode_t ret;
+    ret = lv_slider_get_mode(slider);
     lua_pushinteger(L, ret);
     return 1;
 }

+ 0 - 135
components/lvgl/gen/lv_widgets/luat_lv_spinbox.c

@@ -1,135 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_spinbox_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_spinbox_create(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_spinbox_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_spinbox_set_rollover(lv_obj_t* spinbox, bool b)
-int luat_lv_spinbox_set_rollover(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_set_rollover");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    bool b = (bool)lua_toboolean(L, 2);
-    lv_spinbox_set_rollover(spinbox ,b);
-    return 0;
-}
-
-//  void lv_spinbox_set_value(lv_obj_t* spinbox, int32_t i)
-int luat_lv_spinbox_set_value(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_set_value");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t i = (int32_t)luaL_checkinteger(L, 2);
-    lv_spinbox_set_value(spinbox ,i);
-    return 0;
-}
-
-//  void lv_spinbox_set_digit_format(lv_obj_t* spinbox, uint8_t digit_count, uint8_t separator_position)
-int luat_lv_spinbox_set_digit_format(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_set_digit_format");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t digit_count = (uint8_t)luaL_checkinteger(L, 2);
-    uint8_t separator_position = (uint8_t)luaL_checkinteger(L, 3);
-    lv_spinbox_set_digit_format(spinbox ,digit_count ,separator_position);
-    return 0;
-}
-
-//  void lv_spinbox_set_step(lv_obj_t* spinbox, uint32_t step)
-int luat_lv_spinbox_set_step(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_set_step");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    uint32_t step = (uint32_t)luaL_checkinteger(L, 2);
-    lv_spinbox_set_step(spinbox ,step);
-    return 0;
-}
-
-//  void lv_spinbox_set_range(lv_obj_t* spinbox, int32_t range_min, int32_t range_max)
-int luat_lv_spinbox_set_range(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_set_range");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t range_min = (int32_t)luaL_checkinteger(L, 2);
-    int32_t range_max = (int32_t)luaL_checkinteger(L, 3);
-    lv_spinbox_set_range(spinbox ,range_min ,range_max);
-    return 0;
-}
-
-//  void lv_spinbox_set_padding_left(lv_obj_t* spinbox, uint8_t padding)
-int luat_lv_spinbox_set_padding_left(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_set_padding_left");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t padding = (uint8_t)luaL_checkinteger(L, 2);
-    lv_spinbox_set_padding_left(spinbox ,padding);
-    return 0;
-}
-
-//  bool lv_spinbox_get_rollover(lv_obj_t* spinbox)
-int luat_lv_spinbox_get_rollover(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_get_rollover");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_spinbox_get_rollover(spinbox);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  int32_t lv_spinbox_get_value(lv_obj_t* spinbox)
-int luat_lv_spinbox_get_value(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_get_value");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_spinbox_get_value(spinbox);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  int32_t lv_spinbox_get_step(lv_obj_t* spinbox)
-int luat_lv_spinbox_get_step(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_get_step");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    int32_t ret;
-    ret = lv_spinbox_get_step(spinbox);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_spinbox_step_next(lv_obj_t* spinbox)
-int luat_lv_spinbox_step_next(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_step_next");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinbox_step_next(spinbox);
-    return 0;
-}
-
-//  void lv_spinbox_step_prev(lv_obj_t* spinbox)
-int luat_lv_spinbox_step_prev(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_step_prev");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinbox_step_prev(spinbox);
-    return 0;
-}
-
-//  void lv_spinbox_increment(lv_obj_t* spinbox)
-int luat_lv_spinbox_increment(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_increment");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinbox_increment(spinbox);
-    return 0;
-}
-
-//  void lv_spinbox_decrement(lv_obj_t* spinbox)
-int luat_lv_spinbox_decrement(lua_State *L) {
-    LV_DEBUG("CALL lv_spinbox_decrement");
-    lv_obj_t* spinbox = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinbox_decrement(spinbox);
-    return 0;
-}
-

+ 0 - 93
components/lvgl/gen/lv_widgets/luat_lv_spinner.c

@@ -1,93 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_spinner_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_spinner_create(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_spinner_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_spinner_set_arc_length(lv_obj_t* spinner, lv_anim_value_t deg)
-int luat_lv_spinner_set_arc_length(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_set_arc_length");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_anim_value_t deg = (lv_anim_value_t)luaL_checkinteger(L, 2);
-    lv_spinner_set_arc_length(spinner ,deg);
-    return 0;
-}
-
-//  void lv_spinner_set_spin_time(lv_obj_t* spinner, uint16_t time)
-int luat_lv_spinner_set_spin_time(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_set_spin_time");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_spinner_set_spin_time(spinner ,time);
-    return 0;
-}
-
-//  void lv_spinner_set_type(lv_obj_t* spinner, lv_spinner_type_t type)
-int luat_lv_spinner_set_type(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_set_type");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinner_type_t type = (lv_spinner_type_t)luaL_checkinteger(L, 2);
-    lv_spinner_set_type(spinner ,type);
-    return 0;
-}
-
-//  void lv_spinner_set_dir(lv_obj_t* spinner, lv_spinner_dir_t dir)
-int luat_lv_spinner_set_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_set_dir");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinner_dir_t dir = (lv_spinner_dir_t)luaL_checkinteger(L, 2);
-    lv_spinner_set_dir(spinner ,dir);
-    return 0;
-}
-
-//  lv_anim_value_t lv_spinner_get_arc_length(lv_obj_t* spinner)
-int luat_lv_spinner_get_arc_length(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_get_arc_length");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_anim_value_t ret;
-    ret = lv_spinner_get_arc_length(spinner);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_spinner_get_spin_time(lv_obj_t* spinner)
-int luat_lv_spinner_get_spin_time(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_get_spin_time");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_spinner_get_spin_time(spinner);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_spinner_type_t lv_spinner_get_type(lv_obj_t* spinner)
-int luat_lv_spinner_get_type(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_get_type");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinner_type_t ret;
-    ret = lv_spinner_get_type(spinner);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_spinner_dir_t lv_spinner_get_dir(lv_obj_t* spinner)
-int luat_lv_spinner_get_dir(lua_State *L) {
-    LV_DEBUG("CALL lv_spinner_get_dir");
-    lv_obj_t* spinner = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_spinner_dir_t ret;
-    ret = lv_spinner_get_dir(spinner);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 3 - 62
components/lvgl/gen/lv_widgets/luat_lv_switch.c

@@ -4,72 +4,13 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_switch_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_switch_create(lv_obj_t* parent)
 int luat_lv_switch_create(lua_State *L) {
     LV_DEBUG("CALL lv_switch_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_switch_create(par ,copy);
+    ret = lv_switch_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_switch_on(lv_obj_t* sw, lv_anim_enable_t anim)
-int luat_lv_switch_on(lua_State *L) {
-    LV_DEBUG("CALL lv_switch_on");
-    lv_obj_t* sw = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 2);
-    lv_switch_on(sw ,anim);
-    return 0;
-}
-
-//  void lv_switch_off(lv_obj_t* sw, lv_anim_enable_t anim)
-int luat_lv_switch_off(lua_State *L) {
-    LV_DEBUG("CALL lv_switch_off");
-    lv_obj_t* sw = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 2);
-    lv_switch_off(sw ,anim);
-    return 0;
-}
-
-//  bool lv_switch_toggle(lv_obj_t* sw, lv_anim_enable_t anim)
-int luat_lv_switch_toggle(lua_State *L) {
-    LV_DEBUG("CALL lv_switch_toggle");
-    lv_obj_t* sw = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 2);
-    bool ret;
-    ret = lv_switch_toggle(sw ,anim);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  void lv_switch_set_anim_time(lv_obj_t* sw, uint16_t anim_time)
-int luat_lv_switch_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_switch_set_anim_time");
-    lv_obj_t* sw = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_switch_set_anim_time(sw ,anim_time);
-    return 0;
-}
-
-//  bool lv_switch_get_state(lv_obj_t* sw)
-int luat_lv_switch_get_state(lua_State *L) {
-    LV_DEBUG("CALL lv_switch_get_state");
-    lv_obj_t* sw = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_switch_get_state(sw);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_switch_get_anim_time(lv_obj_t* sw)
-int luat_lv_switch_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_switch_get_anim_time");
-    lv_obj_t* sw = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_switch_get_anim_time(sw);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 52 - 113
components/lvgl/gen/lv_widgets/luat_lv_table.c

@@ -4,201 +4,140 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_table_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_table_create(lv_obj_t* parent)
 int luat_lv_table_create(lua_State *L) {
     LV_DEBUG("CALL lv_table_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_table_create(par ,copy);
+    ret = lv_table_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_table_set_cell_value(lv_obj_t* table, uint16_t row, uint16_t col, char* txt)
+//  void lv_table_set_cell_value(lv_obj_t* obj, uint16_t row, uint16_t col, char* txt)
 int luat_lv_table_set_cell_value(lua_State *L) {
     LV_DEBUG("CALL lv_table_set_cell_value");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
     uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
     char* txt = (char*)luaL_checkstring(L, 4);
-    lv_table_set_cell_value(table ,row ,col ,txt);
+    lv_table_set_cell_value(obj ,row ,col ,txt);
     return 0;
 }
 
-//  void lv_table_set_row_cnt(lv_obj_t* table, uint16_t row_cnt)
+//  void lv_table_set_row_cnt(lv_obj_t* obj, uint16_t row_cnt)
 int luat_lv_table_set_row_cnt(lua_State *L) {
     LV_DEBUG("CALL lv_table_set_row_cnt");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t row_cnt = (uint16_t)luaL_checkinteger(L, 2);
-    lv_table_set_row_cnt(table ,row_cnt);
+    lv_table_set_row_cnt(obj ,row_cnt);
     return 0;
 }
 
-//  void lv_table_set_col_cnt(lv_obj_t* table, uint16_t col_cnt)
+//  void lv_table_set_col_cnt(lv_obj_t* obj, uint16_t col_cnt)
 int luat_lv_table_set_col_cnt(lua_State *L) {
     LV_DEBUG("CALL lv_table_set_col_cnt");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t col_cnt = (uint16_t)luaL_checkinteger(L, 2);
-    lv_table_set_col_cnt(table ,col_cnt);
+    lv_table_set_col_cnt(obj ,col_cnt);
     return 0;
 }
 
-//  void lv_table_set_col_width(lv_obj_t* table, uint16_t col_id, lv_coord_t w)
+//  void lv_table_set_col_width(lv_obj_t* obj, uint16_t col_id, lv_coord_t w)
 int luat_lv_table_set_col_width(lua_State *L) {
     LV_DEBUG("CALL lv_table_set_col_width");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t col_id = (uint16_t)luaL_checkinteger(L, 2);
     lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_table_set_col_width(table ,col_id ,w);
+    lv_table_set_col_width(obj ,col_id ,w);
     return 0;
 }
 
-//  void lv_table_set_cell_align(lv_obj_t* table, uint16_t row, uint16_t col, lv_label_align_t align)
-int luat_lv_table_set_cell_align(lua_State *L) {
-    LV_DEBUG("CALL lv_table_set_cell_align");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+//  void lv_table_add_cell_ctrl(lv_obj_t* obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl)
+int luat_lv_table_add_cell_ctrl(lua_State *L) {
+    LV_DEBUG("CALL lv_table_add_cell_ctrl");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
     uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
-    lv_label_align_t align = (lv_label_align_t)luaL_checkinteger(L, 4);
-    lv_table_set_cell_align(table ,row ,col ,align);
+    lv_table_cell_ctrl_t ctrl = (lv_table_cell_ctrl_t)luaL_checkinteger(L, 4);
+    lv_table_add_cell_ctrl(obj ,row ,col ,ctrl);
     return 0;
 }
 
-//  void lv_table_set_cell_type(lv_obj_t* table, uint16_t row, uint16_t col, uint8_t type)
-int luat_lv_table_set_cell_type(lua_State *L) {
-    LV_DEBUG("CALL lv_table_set_cell_type");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+//  void lv_table_clear_cell_ctrl(lv_obj_t* obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl)
+int luat_lv_table_clear_cell_ctrl(lua_State *L) {
+    LV_DEBUG("CALL lv_table_clear_cell_ctrl");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
     uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
-    uint8_t type = (uint8_t)luaL_checkinteger(L, 4);
-    lv_table_set_cell_type(table ,row ,col ,type);
+    lv_table_cell_ctrl_t ctrl = (lv_table_cell_ctrl_t)luaL_checkinteger(L, 4);
+    lv_table_clear_cell_ctrl(obj ,row ,col ,ctrl);
     return 0;
 }
 
-//  void lv_table_set_cell_crop(lv_obj_t* table, uint16_t row, uint16_t col, bool crop)
-int luat_lv_table_set_cell_crop(lua_State *L) {
-    LV_DEBUG("CALL lv_table_set_cell_crop");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
-    uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
-    bool crop = (bool)lua_toboolean(L, 4);
-    lv_table_set_cell_crop(table ,row ,col ,crop);
-    return 0;
-}
-
-//  void lv_table_set_cell_merge_right(lv_obj_t* table, uint16_t row, uint16_t col, bool en)
-int luat_lv_table_set_cell_merge_right(lua_State *L) {
-    LV_DEBUG("CALL lv_table_set_cell_merge_right");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
-    uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
-    bool en = (bool)lua_toboolean(L, 4);
-    lv_table_set_cell_merge_right(table ,row ,col ,en);
-    return 0;
-}
-
-//  char* lv_table_get_cell_value(lv_obj_t* table, uint16_t row, uint16_t col)
+//  char* lv_table_get_cell_value(lv_obj_t* obj, uint16_t row, uint16_t col)
 int luat_lv_table_get_cell_value(lua_State *L) {
     LV_DEBUG("CALL lv_table_get_cell_value");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
     uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
     char* ret = NULL;
-    ret = lv_table_get_cell_value(table ,row ,col);
+    ret = lv_table_get_cell_value(obj ,row ,col);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  uint16_t lv_table_get_row_cnt(lv_obj_t* table)
+//  uint16_t lv_table_get_row_cnt(lv_obj_t* obj)
 int luat_lv_table_get_row_cnt(lua_State *L) {
     LV_DEBUG("CALL lv_table_get_row_cnt");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_table_get_row_cnt(table);
+    ret = lv_table_get_row_cnt(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  uint16_t lv_table_get_col_cnt(lv_obj_t* table)
+//  uint16_t lv_table_get_col_cnt(lv_obj_t* obj)
 int luat_lv_table_get_col_cnt(lua_State *L) {
     LV_DEBUG("CALL lv_table_get_col_cnt");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_table_get_col_cnt(table);
+    ret = lv_table_get_col_cnt(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_coord_t lv_table_get_col_width(lv_obj_t* table, uint16_t col_id)
+//  lv_coord_t lv_table_get_col_width(lv_obj_t* obj, uint16_t col)
 int luat_lv_table_get_col_width(lua_State *L) {
     LV_DEBUG("CALL lv_table_get_col_width");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t col_id = (uint16_t)luaL_checkinteger(L, 2);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    uint16_t col = (uint16_t)luaL_checkinteger(L, 2);
     lv_coord_t ret;
-    ret = lv_table_get_col_width(table ,col_id);
+    ret = lv_table_get_col_width(obj ,col);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  lv_label_align_t lv_table_get_cell_align(lv_obj_t* table, uint16_t row, uint16_t col)
-int luat_lv_table_get_cell_align(lua_State *L) {
-    LV_DEBUG("CALL lv_table_get_cell_align");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
-    uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
-    lv_label_align_t ret;
-    ret = lv_table_get_cell_align(table ,row ,col);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_label_align_t lv_table_get_cell_type(lv_obj_t* table, uint16_t row, uint16_t col)
-int luat_lv_table_get_cell_type(lua_State *L) {
-    LV_DEBUG("CALL lv_table_get_cell_type");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
-    uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
-    lv_label_align_t ret;
-    ret = lv_table_get_cell_type(table ,row ,col);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_label_align_t lv_table_get_cell_crop(lv_obj_t* table, uint16_t row, uint16_t col)
-int luat_lv_table_get_cell_crop(lua_State *L) {
-    LV_DEBUG("CALL lv_table_get_cell_crop");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
-    uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
-    lv_label_align_t ret;
-    ret = lv_table_get_cell_crop(table ,row ,col);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_table_get_cell_merge_right(lv_obj_t* table, uint16_t row, uint16_t col)
-int luat_lv_table_get_cell_merge_right(lua_State *L) {
-    LV_DEBUG("CALL lv_table_get_cell_merge_right");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+//  bool lv_table_has_cell_ctrl(lv_obj_t* obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl)
+int luat_lv_table_has_cell_ctrl(lua_State *L) {
+    LV_DEBUG("CALL lv_table_has_cell_ctrl");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
     uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
+    lv_table_cell_ctrl_t ctrl = (lv_table_cell_ctrl_t)luaL_checkinteger(L, 4);
     bool ret;
-    ret = lv_table_get_cell_merge_right(table ,row ,col);
+    ret = lv_table_has_cell_ctrl(obj ,row ,col ,ctrl);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  lv_res_t lv_table_get_pressed_cell(lv_obj_t* table, uint16_t* row, uint16_t* col)
-int luat_lv_table_get_pressed_cell(lua_State *L) {
-    LV_DEBUG("CALL lv_table_get_pressed_cell");
-    lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
+//  void lv_table_get_selected_cell(lv_obj_t* obj, uint16_t* row, uint16_t* col)
+int luat_lv_table_get_selected_cell(lua_State *L) {
+    LV_DEBUG("CALL lv_table_get_selected_cell");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t* row = (uint16_t*)lua_touserdata(L, 2);
     uint16_t* col = (uint16_t*)lua_touserdata(L, 3);
-    lv_res_t ret;
-    ret = lv_table_get_pressed_cell(table ,row ,col);
-    lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
-    lua_pushinteger(L, ret);
-    return 2;
+    lv_table_get_selected_cell(obj ,row ,col);
+    return 0;
 }
 

+ 0 - 125
components/lvgl/gen/lv_widgets/luat_lv_tabview.c

@@ -1,125 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_tabview_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_tabview_create(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_tabview_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_tabview_add_tab(lv_obj_t* tabview, char* name)
-int luat_lv_tabview_add_tab(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_add_tab");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    char* name = (char*)luaL_checkstring(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_tabview_add_tab(tabview ,name);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_tabview_clean_tab(lv_obj_t* tab)
-int luat_lv_tabview_clean_tab(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_clean_tab");
-    lv_obj_t* tab = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_tabview_clean_tab(tab);
-    return 0;
-}
-
-//  void lv_tabview_set_tab_act(lv_obj_t* tabview, uint16_t id, lv_anim_enable_t anim)
-int luat_lv_tabview_set_tab_act(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_set_tab_act");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 2);
-    lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_tabview_set_tab_act(tabview ,id ,anim);
-    return 0;
-}
-
-//  void lv_tabview_set_tab_name(lv_obj_t* tabview, uint16_t id, char* name)
-int luat_lv_tabview_set_tab_name(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_set_tab_name");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 2);
-    char* name = (char*)luaL_checkstring(L, 3);
-    lv_tabview_set_tab_name(tabview ,id ,name);
-    return 0;
-}
-
-//  void lv_tabview_set_anim_time(lv_obj_t* tabview, uint16_t anim_time)
-int luat_lv_tabview_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_set_anim_time");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_tabview_set_anim_time(tabview ,anim_time);
-    return 0;
-}
-
-//  void lv_tabview_set_btns_pos(lv_obj_t* tabview, lv_tabview_btns_pos_t btns_pos)
-int luat_lv_tabview_set_btns_pos(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_set_btns_pos");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_tabview_btns_pos_t btns_pos = (lv_tabview_btns_pos_t)luaL_checkinteger(L, 2);
-    lv_tabview_set_btns_pos(tabview ,btns_pos);
-    return 0;
-}
-
-//  uint16_t lv_tabview_get_tab_act(lv_obj_t* tabview)
-int luat_lv_tabview_get_tab_act(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_get_tab_act");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_tabview_get_tab_act(tabview);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_tabview_get_tab_count(lv_obj_t* tabview)
-int luat_lv_tabview_get_tab_count(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_get_tab_count");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_tabview_get_tab_count(tabview);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_tabview_get_tab(lv_obj_t* tabview, uint16_t id)
-int luat_lv_tabview_get_tab(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_get_tab");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t id = (uint16_t)luaL_checkinteger(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_tabview_get_tab(tabview ,id);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_tabview_get_anim_time(lv_obj_t* tabview)
-int luat_lv_tabview_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_get_anim_time");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_tabview_get_anim_time(tabview);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_tabview_btns_pos_t lv_tabview_get_btns_pos(lv_obj_t* tabview)
-int luat_lv_tabview_get_btns_pos(lua_State *L) {
-    LV_DEBUG("CALL lv_tabview_get_btns_pos");
-    lv_obj_t* tabview = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_tabview_btns_pos_t ret;
-    ret = lv_tabview_get_btns_pos(tabview);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 117 - 213
components/lvgl/gen/lv_widgets/luat_lv_textarea.c

@@ -4,411 +4,315 @@
 #include "luat_lvgl.h"
 
 
-//  lv_obj_t* lv_textarea_create(lv_obj_t* par, lv_obj_t* copy)
+//  lv_obj_t* lv_textarea_create(lv_obj_t* parent)
 int luat_lv_textarea_create(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
+    lv_obj_t* parent = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_textarea_create(par ,copy);
+    ret = lv_textarea_create(parent);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  void lv_textarea_add_char(lv_obj_t* ta, uint32_t c)
+//  void lv_textarea_add_char(lv_obj_t* obj, uint32_t c)
 int luat_lv_textarea_add_char(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_add_char");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t c = (uint32_t)luaL_checkinteger(L, 2);
-    lv_textarea_add_char(ta ,c);
+    lv_textarea_add_char(obj ,c);
     return 0;
 }
 
-//  void lv_textarea_add_text(lv_obj_t* ta, char* txt)
+//  void lv_textarea_add_text(lv_obj_t* obj, char* txt)
 int luat_lv_textarea_add_text(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_add_text");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* txt = (char*)luaL_checkstring(L, 2);
-    lv_textarea_add_text(ta ,txt);
+    lv_textarea_add_text(obj ,txt);
     return 0;
 }
 
-//  void lv_textarea_del_char(lv_obj_t* ta)
+//  void lv_textarea_del_char(lv_obj_t* obj)
 int luat_lv_textarea_del_char(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_del_char");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_textarea_del_char(ta);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_textarea_del_char(obj);
     return 0;
 }
 
-//  void lv_textarea_del_char_forward(lv_obj_t* ta)
+//  void lv_textarea_del_char_forward(lv_obj_t* obj)
 int luat_lv_textarea_del_char_forward(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_del_char_forward");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_textarea_del_char_forward(ta);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_textarea_del_char_forward(obj);
     return 0;
 }
 
-//  void lv_textarea_set_text(lv_obj_t* ta, char* txt)
+//  void lv_textarea_set_text(lv_obj_t* obj, char* txt)
 int luat_lv_textarea_set_text(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_text");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* txt = (char*)luaL_checkstring(L, 2);
-    lv_textarea_set_text(ta ,txt);
+    lv_textarea_set_text(obj ,txt);
     return 0;
 }
 
-//  void lv_textarea_set_placeholder_text(lv_obj_t* ta, char* txt)
+//  void lv_textarea_set_placeholder_text(lv_obj_t* obj, char* txt)
 int luat_lv_textarea_set_placeholder_text(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_placeholder_text");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* txt = (char*)luaL_checkstring(L, 2);
-    lv_textarea_set_placeholder_text(ta ,txt);
+    lv_textarea_set_placeholder_text(obj ,txt);
     return 0;
 }
 
-//  void lv_textarea_set_cursor_pos(lv_obj_t* ta, int32_t pos)
+//  void lv_textarea_set_cursor_pos(lv_obj_t* obj, int32_t pos)
 int luat_lv_textarea_set_cursor_pos(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_cursor_pos");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     int32_t pos = (int32_t)luaL_checkinteger(L, 2);
-    lv_textarea_set_cursor_pos(ta ,pos);
+    lv_textarea_set_cursor_pos(obj ,pos);
     return 0;
 }
 
-//  void lv_textarea_set_cursor_hidden(lv_obj_t* ta, bool hide)
-int luat_lv_textarea_set_cursor_hidden(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_cursor_hidden");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    bool hide = (bool)lua_toboolean(L, 2);
-    lv_textarea_set_cursor_hidden(ta ,hide);
-    return 0;
-}
-
-//  void lv_textarea_set_cursor_click_pos(lv_obj_t* ta, bool en)
+//  void lv_textarea_set_cursor_click_pos(lv_obj_t* obj, bool en)
 int luat_lv_textarea_set_cursor_click_pos(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_cursor_click_pos");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool en = (bool)lua_toboolean(L, 2);
-    lv_textarea_set_cursor_click_pos(ta ,en);
+    lv_textarea_set_cursor_click_pos(obj ,en);
     return 0;
 }
 
-//  void lv_textarea_set_pwd_mode(lv_obj_t* ta, bool en)
-int luat_lv_textarea_set_pwd_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_pwd_mode");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+//  void lv_textarea_set_password_mode(lv_obj_t* obj, bool en)
+int luat_lv_textarea_set_password_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_textarea_set_password_mode");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool en = (bool)lua_toboolean(L, 2);
-    lv_textarea_set_pwd_mode(ta ,en);
+    lv_textarea_set_password_mode(obj ,en);
     return 0;
 }
 
-//  void lv_textarea_set_one_line(lv_obj_t* ta, bool en)
+//  void lv_textarea_set_one_line(lv_obj_t* obj, bool en)
 int luat_lv_textarea_set_one_line(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_one_line");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool en = (bool)lua_toboolean(L, 2);
-    lv_textarea_set_one_line(ta ,en);
-    return 0;
-}
-
-//  void lv_textarea_set_text_align(lv_obj_t* ta, lv_label_align_t align)
-int luat_lv_textarea_set_text_align(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_text_align");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_label_align_t align = (lv_label_align_t)luaL_checkinteger(L, 2);
-    lv_textarea_set_text_align(ta ,align);
+    lv_textarea_set_one_line(obj ,en);
     return 0;
 }
 
-//  void lv_textarea_set_accepted_chars(lv_obj_t* ta, char* list)
+//  void lv_textarea_set_accepted_chars(lv_obj_t* obj, char* list)
 int luat_lv_textarea_set_accepted_chars(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_accepted_chars");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* list = (char*)luaL_checkstring(L, 2);
-    lv_textarea_set_accepted_chars(ta ,list);
+    lv_textarea_set_accepted_chars(obj ,list);
     return 0;
 }
 
-//  void lv_textarea_set_max_length(lv_obj_t* ta, uint32_t num)
+//  void lv_textarea_set_max_length(lv_obj_t* obj, uint32_t num)
 int luat_lv_textarea_set_max_length(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_max_length");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t num = (uint32_t)luaL_checkinteger(L, 2);
-    lv_textarea_set_max_length(ta ,num);
+    lv_textarea_set_max_length(obj ,num);
     return 0;
 }
 
-//  void lv_textarea_set_insert_replace(lv_obj_t* ta, char* txt)
+//  void lv_textarea_set_insert_replace(lv_obj_t* obj, char* txt)
 int luat_lv_textarea_set_insert_replace(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_set_insert_replace");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* txt = (char*)luaL_checkstring(L, 2);
-    lv_textarea_set_insert_replace(ta ,txt);
+    lv_textarea_set_insert_replace(obj ,txt);
     return 0;
 }
 
-//  void lv_textarea_set_scrollbar_mode(lv_obj_t* ta, lv_scrollbar_mode_t mode)
-int luat_lv_textarea_set_scrollbar_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_scrollbar_mode");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t mode = (lv_scrollbar_mode_t)luaL_checkinteger(L, 2);
-    lv_textarea_set_scrollbar_mode(ta ,mode);
-    return 0;
-}
-
-//  void lv_textarea_set_scroll_propagation(lv_obj_t* ta, bool en)
-int luat_lv_textarea_set_scroll_propagation(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_scroll_propagation");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+//  void lv_textarea_set_text_selection(lv_obj_t* obj, bool en)
+int luat_lv_textarea_set_text_selection(lua_State *L) {
+    LV_DEBUG("CALL lv_textarea_set_text_selection");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool en = (bool)lua_toboolean(L, 2);
-    lv_textarea_set_scroll_propagation(ta ,en);
+    lv_textarea_set_text_selection(obj ,en);
     return 0;
 }
 
-//  void lv_textarea_set_edge_flash(lv_obj_t* ta, bool en)
-int luat_lv_textarea_set_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_edge_flash");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_textarea_set_edge_flash(ta ,en);
-    return 0;
-}
-
-//  void lv_textarea_set_text_sel(lv_obj_t* ta, bool en)
-int luat_lv_textarea_set_text_sel(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_text_sel");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_textarea_set_text_sel(ta ,en);
-    return 0;
-}
-
-//  void lv_textarea_set_pwd_show_time(lv_obj_t* ta, uint16_t time)
-int luat_lv_textarea_set_pwd_show_time(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_pwd_show_time");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+//  void lv_textarea_set_password_show_time(lv_obj_t* obj, uint16_t time)
+int luat_lv_textarea_set_password_show_time(lua_State *L) {
+    LV_DEBUG("CALL lv_textarea_set_password_show_time");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_textarea_set_pwd_show_time(ta ,time);
+    lv_textarea_set_password_show_time(obj ,time);
     return 0;
 }
 
-//  void lv_textarea_set_cursor_blink_time(lv_obj_t* ta, uint16_t time)
-int luat_lv_textarea_set_cursor_blink_time(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_set_cursor_blink_time");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_textarea_set_cursor_blink_time(ta ,time);
+//  void lv_textarea_set_align(lv_obj_t* obj, lv_text_align_t align)
+int luat_lv_textarea_set_align(lua_State *L) {
+    LV_DEBUG("CALL lv_textarea_set_align");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_text_align_t align = (lv_text_align_t)luaL_checkinteger(L, 2);
+    lv_textarea_set_align(obj ,align);
     return 0;
 }
 
-//  char* lv_textarea_get_text(lv_obj_t* ta)
+//  char* lv_textarea_get_text(lv_obj_t* obj)
 int luat_lv_textarea_get_text(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_text");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_textarea_get_text(ta);
+    ret = lv_textarea_get_text(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  char* lv_textarea_get_placeholder_text(lv_obj_t* ta)
+//  char* lv_textarea_get_placeholder_text(lv_obj_t* obj)
 int luat_lv_textarea_get_placeholder_text(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_placeholder_text");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_textarea_get_placeholder_text(ta);
+    ret = lv_textarea_get_placeholder_text(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  lv_obj_t* lv_textarea_get_label(lv_obj_t* ta)
+//  lv_obj_t* lv_textarea_get_label(lv_obj_t* obj)
 int luat_lv_textarea_get_label(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_label");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* ret = NULL;
-    ret = lv_textarea_get_label(ta);
+    ret = lv_textarea_get_label(obj);
     lua_pushlightuserdata(L, ret);
     return 1;
 }
 
-//  uint32_t lv_textarea_get_cursor_pos(lv_obj_t* ta)
+//  uint32_t lv_textarea_get_cursor_pos(lv_obj_t* obj)
 int luat_lv_textarea_get_cursor_pos(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_cursor_pos");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t ret;
-    ret = lv_textarea_get_cursor_pos(ta);
+    ret = lv_textarea_get_cursor_pos(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_textarea_get_cursor_hidden(lv_obj_t* ta)
-int luat_lv_textarea_get_cursor_hidden(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_cursor_hidden");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_textarea_get_cursor_hidden(ta);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_textarea_get_cursor_click_pos(lv_obj_t* ta)
+//  bool lv_textarea_get_cursor_click_pos(lv_obj_t* obj)
 int luat_lv_textarea_get_cursor_click_pos(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_cursor_click_pos");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_textarea_get_cursor_click_pos(ta);
+    ret = lv_textarea_get_cursor_click_pos(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_textarea_get_pwd_mode(lv_obj_t* ta)
-int luat_lv_textarea_get_pwd_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_pwd_mode");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+//  bool lv_textarea_get_password_mode(lv_obj_t* obj)
+int luat_lv_textarea_get_password_mode(lua_State *L) {
+    LV_DEBUG("CALL lv_textarea_get_password_mode");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_textarea_get_pwd_mode(ta);
+    ret = lv_textarea_get_password_mode(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_textarea_get_one_line(lv_obj_t* ta)
+//  bool lv_textarea_get_one_line(lv_obj_t* obj)
 int luat_lv_textarea_get_one_line(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_one_line");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_textarea_get_one_line(ta);
+    ret = lv_textarea_get_one_line(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  char* lv_textarea_get_accepted_chars(lv_obj_t* ta)
+//  char* lv_textarea_get_accepted_chars(lv_obj_t* obj)
 int luat_lv_textarea_get_accepted_chars(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_accepted_chars");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     char* ret = NULL;
-    ret = lv_textarea_get_accepted_chars(ta);
+    ret = lv_textarea_get_accepted_chars(obj);
     lua_pushstring(L, ret);
     return 1;
 }
 
-//  uint32_t lv_textarea_get_max_length(lv_obj_t* ta)
+//  uint32_t lv_textarea_get_max_length(lv_obj_t* obj)
 int luat_lv_textarea_get_max_length(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_get_max_length");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint32_t ret;
-    ret = lv_textarea_get_max_length(ta);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_scrollbar_mode_t lv_textarea_get_scrollbar_mode(lv_obj_t* ta)
-int luat_lv_textarea_get_scrollbar_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_scrollbar_mode");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t ret;
-    ret = lv_textarea_get_scrollbar_mode(ta);
+    ret = lv_textarea_get_max_length(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  bool lv_textarea_get_scroll_propagation(lv_obj_t* ta)
-int luat_lv_textarea_get_scroll_propagation(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_scroll_propagation");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_textarea_get_scroll_propagation(ta);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_textarea_get_edge_flash(lv_obj_t* ta)
-int luat_lv_textarea_get_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_edge_flash");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_textarea_get_edge_flash(ta);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  bool lv_textarea_text_is_selected(lv_obj_t* ta)
+//  bool lv_textarea_text_is_selected(lv_obj_t* obj)
 int luat_lv_textarea_text_is_selected(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_text_is_selected");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_textarea_text_is_selected(ta);
+    ret = lv_textarea_text_is_selected(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  bool lv_textarea_get_text_sel_en(lv_obj_t* ta)
-int luat_lv_textarea_get_text_sel_en(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_text_sel_en");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+//  bool lv_textarea_get_text_selection(lv_obj_t* obj)
+int luat_lv_textarea_get_text_selection(lua_State *L) {
+    LV_DEBUG("CALL lv_textarea_get_text_selection");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     bool ret;
-    ret = lv_textarea_get_text_sel_en(ta);
+    ret = lv_textarea_get_text_selection(obj);
     lua_pushboolean(L, ret);
     return 1;
 }
 
-//  uint16_t lv_textarea_get_pwd_show_time(lv_obj_t* ta)
-int luat_lv_textarea_get_pwd_show_time(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_pwd_show_time");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_textarea_get_pwd_show_time(ta);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_textarea_get_cursor_blink_time(lv_obj_t* ta)
-int luat_lv_textarea_get_cursor_blink_time(lua_State *L) {
-    LV_DEBUG("CALL lv_textarea_get_cursor_blink_time");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
+//  uint16_t lv_textarea_get_password_show_time(lv_obj_t* obj)
+int luat_lv_textarea_get_password_show_time(lua_State *L) {
+    LV_DEBUG("CALL lv_textarea_get_password_show_time");
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     uint16_t ret;
-    ret = lv_textarea_get_cursor_blink_time(ta);
+    ret = lv_textarea_get_password_show_time(obj);
     lua_pushinteger(L, ret);
     return 1;
 }
 
-//  void lv_textarea_clear_selection(lv_obj_t* ta)
+//  void lv_textarea_clear_selection(lv_obj_t* obj)
 int luat_lv_textarea_clear_selection(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_clear_selection");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_textarea_clear_selection(ta);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_textarea_clear_selection(obj);
     return 0;
 }
 
-//  void lv_textarea_cursor_right(lv_obj_t* ta)
+//  void lv_textarea_cursor_right(lv_obj_t* obj)
 int luat_lv_textarea_cursor_right(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_cursor_right");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_textarea_cursor_right(ta);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_textarea_cursor_right(obj);
     return 0;
 }
 
-//  void lv_textarea_cursor_left(lv_obj_t* ta)
+//  void lv_textarea_cursor_left(lv_obj_t* obj)
 int luat_lv_textarea_cursor_left(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_cursor_left");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_textarea_cursor_left(ta);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_textarea_cursor_left(obj);
     return 0;
 }
 
-//  void lv_textarea_cursor_down(lv_obj_t* ta)
+//  void lv_textarea_cursor_down(lv_obj_t* obj)
 int luat_lv_textarea_cursor_down(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_cursor_down");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_textarea_cursor_down(ta);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_textarea_cursor_down(obj);
     return 0;
 }
 
-//  void lv_textarea_cursor_up(lv_obj_t* ta)
+//  void lv_textarea_cursor_up(lv_obj_t* obj)
 int luat_lv_textarea_cursor_up(lua_State *L) {
     LV_DEBUG("CALL lv_textarea_cursor_up");
-    lv_obj_t* ta = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_textarea_cursor_up(ta);
+    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
+    lv_textarea_cursor_up(obj);
     return 0;
 }
 

+ 0 - 85
components/lvgl/gen/lv_widgets/luat_lv_tileview.c

@@ -1,85 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_tileview_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_tileview_create(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_tileview_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_tileview_add_element(lv_obj_t* tileview, lv_obj_t* element)
-int luat_lv_tileview_add_element(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_add_element");
-    lv_obj_t* tileview = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* element = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_tileview_add_element(tileview ,element);
-    return 0;
-}
-
-//  void lv_tileview_set_tile_act(lv_obj_t* tileview, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim)
-int luat_lv_tileview_set_tile_act(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_set_tile_act");
-    lv_obj_t* tileview = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t x = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t y = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_anim_enable_t anim = (lv_anim_enable_t)luaL_checkinteger(L, 4);
-    lv_tileview_set_tile_act(tileview ,x ,y ,anim);
-    return 0;
-}
-
-//  void lv_tileview_set_edge_flash(lv_obj_t* tileview, bool en)
-int luat_lv_tileview_set_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_set_edge_flash");
-    lv_obj_t* tileview = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_tileview_set_edge_flash(tileview ,en);
-    return 0;
-}
-
-//  void lv_tileview_set_anim_time(lv_obj_t* tileview, uint16_t anim_time)
-int luat_lv_tileview_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_set_anim_time");
-    lv_obj_t* tileview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_tileview_set_anim_time(tileview ,anim_time);
-    return 0;
-}
-
-//  void lv_tileview_get_tile_act(lv_obj_t* tileview, lv_coord_t* x, lv_coord_t* y)
-int luat_lv_tileview_get_tile_act(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_get_tile_act");
-    lv_obj_t* tileview = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t* x = (lv_coord_t*)lua_touserdata(L, 2);
-    lv_coord_t* y = (lv_coord_t*)lua_touserdata(L, 3);
-    lv_tileview_get_tile_act(tileview ,x ,y);
-    return 0;
-}
-
-//  bool lv_tileview_get_edge_flash(lv_obj_t* tileview)
-int luat_lv_tileview_get_edge_flash(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_get_edge_flash");
-    lv_obj_t* tileview = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_tileview_get_edge_flash(tileview);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_tileview_get_anim_time(lv_obj_t* tileview)
-int luat_lv_tileview_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_tileview_get_anim_time");
-    lv_obj_t* tileview = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_tileview_get_anim_time(tileview);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-

+ 0 - 267
components/lvgl/gen/lv_widgets/luat_lv_win.c

@@ -1,267 +0,0 @@
-

-#include "luat_base.h"
-#include "lvgl.h"
-#include "luat_lvgl.h"
-
-
-//  lv_obj_t* lv_win_create(lv_obj_t* par, lv_obj_t* copy)
-int luat_lv_win_create(lua_State *L) {
-    LV_DEBUG("CALL lv_win_create");
-    lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_win_create(par ,copy);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_win_clean(lv_obj_t* win)
-int luat_lv_win_clean(lua_State *L) {
-    LV_DEBUG("CALL lv_win_clean");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_win_clean(win);
-    return 0;
-}
-
-//  lv_obj_t* lv_win_add_btn_right(lv_obj_t* win, void* img_src)
-int luat_lv_win_add_btn_right(lua_State *L) {
-    LV_DEBUG("CALL lv_win_add_btn_right");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    void* img_src = (void*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_win_add_btn_right(win ,img_src);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_win_add_btn_left(lv_obj_t* win, void* img_src)
-int luat_lv_win_add_btn_left(lua_State *L) {
-    LV_DEBUG("CALL lv_win_add_btn_left");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    void* img_src = (void*)lua_touserdata(L, 2);
-    lv_obj_t* ret = NULL;
-    ret = lv_win_add_btn_left(win ,img_src);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  void lv_win_set_title(lv_obj_t* win, char* title)
-int luat_lv_win_set_title(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_title");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    char* title = (char*)luaL_checkstring(L, 2);
-    lv_win_set_title(win ,title);
-    return 0;
-}
-
-//  void lv_win_set_header_height(lv_obj_t* win, lv_coord_t size)
-int luat_lv_win_set_header_height(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_header_height");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t size = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_win_set_header_height(win ,size);
-    return 0;
-}
-
-//  void lv_win_set_btn_width(lv_obj_t* win, lv_coord_t width)
-int luat_lv_win_set_btn_width(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_btn_width");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t width = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_win_set_btn_width(win ,width);
-    return 0;
-}
-
-//  void lv_win_set_content_size(lv_obj_t* win, lv_coord_t w, lv_coord_t h)
-int luat_lv_win_set_content_size(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_content_size");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t w = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_coord_t h = (lv_coord_t)luaL_checkinteger(L, 3);
-    lv_win_set_content_size(win ,w ,h);
-    return 0;
-}
-
-//  void lv_win_set_layout(lv_obj_t* win, lv_layout_t layout)
-int luat_lv_win_set_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_layout");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t layout = (lv_layout_t)luaL_checkinteger(L, 2);
-    lv_win_set_layout(win ,layout);
-    return 0;
-}
-
-//  void lv_win_set_scrollbar_mode(lv_obj_t* win, lv_scrollbar_mode_t sb_mode)
-int luat_lv_win_set_scrollbar_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_scrollbar_mode");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t sb_mode = (lv_scrollbar_mode_t)luaL_checkinteger(L, 2);
-    lv_win_set_scrollbar_mode(win ,sb_mode);
-    return 0;
-}
-
-//  void lv_win_set_anim_time(lv_obj_t* win, uint16_t anim_time)
-int luat_lv_win_set_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_anim_time");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t anim_time = (uint16_t)luaL_checkinteger(L, 2);
-    lv_win_set_anim_time(win ,anim_time);
-    return 0;
-}
-
-//  void lv_win_set_drag(lv_obj_t* win, bool en)
-int luat_lv_win_set_drag(lua_State *L) {
-    LV_DEBUG("CALL lv_win_set_drag");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    bool en = (bool)lua_toboolean(L, 2);
-    lv_win_set_drag(win ,en);
-    return 0;
-}
-
-//  void lv_win_title_set_alignment(lv_obj_t* win, uint8_t alignment)
-int luat_lv_win_title_set_alignment(lua_State *L) {
-    LV_DEBUG("CALL lv_win_title_set_alignment");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t alignment = (uint8_t)luaL_checkinteger(L, 2);
-    lv_win_title_set_alignment(win ,alignment);
-    return 0;
-}
-
-//  char* lv_win_get_title(lv_obj_t* win)
-int luat_lv_win_get_title(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_title");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    char* ret = NULL;
-    ret = lv_win_get_title(win);
-    lua_pushstring(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_win_get_content(lv_obj_t* win)
-int luat_lv_win_get_content(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_content");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_win_get_content(win);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_win_get_header_height(lv_obj_t* win)
-int luat_lv_win_get_header_height(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_header_height");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_win_get_header_height(win);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_win_get_btn_width(lv_obj_t* win)
-int luat_lv_win_get_btn_width(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_btn_width");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_win_get_btn_width(win);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_obj_t* lv_win_get_from_btn(lv_obj_t* ctrl_btn)
-int luat_lv_win_get_from_btn(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_from_btn");
-    lv_obj_t* ctrl_btn = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* ret = NULL;
-    ret = lv_win_get_from_btn(ctrl_btn);
-    lua_pushlightuserdata(L, ret);
-    return 1;
-}
-
-//  lv_layout_t lv_win_get_layout(lv_obj_t* win)
-int luat_lv_win_get_layout(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_layout");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_layout_t ret;
-    ret = lv_win_get_layout(win);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_scrollbar_mode_t lv_win_get_sb_mode(lv_obj_t* win)
-int luat_lv_win_get_sb_mode(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_sb_mode");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_scrollbar_mode_t ret;
-    ret = lv_win_get_sb_mode(win);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  uint16_t lv_win_get_anim_time(lv_obj_t* win)
-int luat_lv_win_get_anim_time(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_anim_time");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    uint16_t ret;
-    ret = lv_win_get_anim_time(win);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  lv_coord_t lv_win_get_width(lv_obj_t* win)
-int luat_lv_win_get_width(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_width");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t ret;
-    ret = lv_win_get_width(win);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  bool lv_win_get_drag(lv_obj_t* win)
-int luat_lv_win_get_drag(lua_State *L) {
-    LV_DEBUG("CALL lv_win_get_drag");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    bool ret;
-    ret = lv_win_get_drag(win);
-    lua_pushboolean(L, ret);
-    return 1;
-}
-
-//  uint8_t lv_win_title_get_alignment(lv_obj_t* win)
-int luat_lv_win_title_get_alignment(lua_State *L) {
-    LV_DEBUG("CALL lv_win_title_get_alignment");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    uint8_t ret;
-    ret = lv_win_title_get_alignment(win);
-    lua_pushinteger(L, ret);
-    return 1;
-}
-
-//  void lv_win_focus(lv_obj_t* win, lv_obj_t* obj, lv_anim_enable_t anim_en)
-int luat_lv_win_focus(lua_State *L) {
-    LV_DEBUG("CALL lv_win_focus");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_anim_enable_t anim_en = (lv_anim_enable_t)luaL_checkinteger(L, 3);
-    lv_win_focus(win ,obj ,anim_en);
-    return 0;
-}
-
-//  void lv_win_scroll_hor(lv_obj_t* win, lv_coord_t dist)
-int luat_lv_win_scroll_hor(lua_State *L) {
-    LV_DEBUG("CALL lv_win_scroll_hor");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t dist = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_win_scroll_hor(win ,dist);
-    return 0;
-}
-
-//  void lv_win_scroll_ver(lv_obj_t* win, lv_coord_t dist)
-int luat_lv_win_scroll_ver(lua_State *L) {
-    LV_DEBUG("CALL lv_win_scroll_ver");
-    lv_obj_t* win = (lv_obj_t*)lua_touserdata(L, 1);
-    lv_coord_t dist = (lv_coord_t)luaL_checkinteger(L, 2);
-    lv_win_scroll_ver(win ,dist);
-    return 0;
-}
-

+ 30 - 10
components/lvgl/genapi.py

@@ -62,6 +62,7 @@ class FuncDefVisitor(c_ast.NodeVisitor):
     def visit_FuncDecl(self, node):
         try :
             is_ptr_return = False
+            method_name = None
             if node.type.__class__.__name__ == "PtrDecl":
                 is_ptr_return = True
                 if type(node.type.type) == c_ast.TypeDecl :
@@ -98,7 +99,7 @@ class FuncDefVisitor(c_ast.NodeVisitor):
                 return
             # 因为各种数组无法处理的方法
             if method_name in ["lv_btnmatrix_set_ctrl_map", "lv_keyboard_set_ctrl_map", "lv_calendar_set_highlighted_dates",
-                               "lv_chart_set_points", "lv_chart_set_ext_array", "lv_gauge_set_needle_count"] :
+                               "lv_chart_set_points", "lv_chart_set_ext_array", "lv_gauge_set_needle_count", "lv_style_transition_dsc_init"] :
                 return
             # 这方法不太可能有人用吧,返回值是uint8_t*,很少见
             if method_name in ["lv_font_get_glyph_bitmap"] :
@@ -108,6 +109,11 @@ class FuncDefVisitor(c_ast.NodeVisitor):
             method_return = "void"
             if type(node.type) == c_ast.TypeDecl :
                 method_return = node.type.type.names[0]
+            elif type(node.type.type.type) == c_ast.Struct :
+                if node.type.type.type.name == "_lv_obj_t":
+                    method_return = "lv_obj_t*"
+                else :
+                    method_return = "struct" + node.type.type.type.name + "*"
             else :
                 method_return = node.type.type.type.names[0] + "*"
             if node.args :
@@ -119,7 +125,13 @@ class FuncDefVisitor(c_ast.NodeVisitor):
                         # 指针类型
                         #print(arg.type.declname, "*", arg.type.type.names[0], )
                         #arg.type.show()
-                        method_args.append([arg.name, arg.type.type.type.names[0] + "*"])
+                        if arg.type.type.type.__class__.__name__ == "Struct" :
+                            if arg.type.type.type.name == "_lv_obj_t":
+                                method_args.append([arg.name, "lv_obj_t*"])
+                            else :
+                                method_args.append([arg.name, "struct "+arg.type.type.type.name+"*"])
+                        else :
+                            method_args.append([arg.name, arg.type.type.type.names[0] + "*"])
                     elif arg.type.__class__.__name__ == "TypeDecl":
                         if arg.type.type.names[0] != "void" :
                             method_args.append([arg.name, arg.type.type.names[0]])
@@ -144,6 +156,7 @@ class FuncDefVisitor(c_ast.NodeVisitor):
                 methods[self.group][self.prefix] = []
             methods[self.group][self.prefix].append({"group":self.group, "prefix":self.prefix, "name":method_name, "ret":method_return, "args":method_args})
         except  Exception:
+            print ("method_name", method_name, "error")
             import traceback
             traceback.print_exc()
             sys.exit()
@@ -152,7 +165,8 @@ def handle_groups(group, path):
     for name in os.listdir(path) :
         if not name.endswith(".h"):
             continue
-        if name in ["lv_obj_style_dec.h", "lv_theme_empty.h", "lv_theme_material.h", "lv_theme_mono.h", "lv_theme_template.h"]:
+        if name in ["lv_obj_style_gen.h", "lv_async.h", "lv_fs.h", "lv_log.h", "lv_mem.h",
+                    "lv_printf.h", "lv_style_gen.h", "lv_timer.h", "lv_indev.h", "lv_img_decoder.h", "lv_img_cache.h", "lv_img_buf.h"]:
             continue
         if name.startswith("lv_draw_") :
             continue
@@ -166,12 +180,14 @@ def handle_groups(group, path):
         #sys.exit()
 
 def main():
-    handle_groups("core", "src/lv_core/")
-    handle_groups("draw", "src/lv_draw/")
-    handle_groups("font", "src/lv_font/")
-    handle_groups("misc", "src/lv_misc/")
-    handle_groups("themes", "src/lv_themes/")
-    handle_groups("widgets", "src/lv_widgets/")
+    handle_groups("core", "src/core/")
+    handle_groups("draw", "src/draw/")
+    handle_groups("font", "src/font/")
+    handle_groups("misc", "src/misc/")
+    #handle_groups("themes", "src/extra/themes/")
+    handle_groups("widgets", "src/widgets/")
+    #handle_groups("widgets", "src/extra/widgets/")
+    #handle_groups("layout", "src/extra/layout/")
 
     print("============================================================")
 
@@ -412,7 +428,11 @@ map_lv_ints = ["lv_arc_type_t", "lv_style_int_t", "lv_coord_t", "lv_spinner_dir_
                     "lv_indev_type_t", "lv_disp_size_t",
                     "lv_opa_t", "lv_label_align_t", "lv_fit_t", "lv_bar_type_t", "lv_btn_state_t",
                     "lv_gesture_dir_t", "lv_state_t", "lv_layout_t", "lv_cpicker_color_mode_t",
-                    "lv_disp_rot_t", "lv_grad_dir_t", "lv_chart_type_t"]
+                    "lv_disp_rot_t", "lv_grad_dir_t", "lv_chart_type_t", "lv_text_align_t", "lv_arc_mode_t", "lv_table_cell_ctrl_t",
+                    "lv_scroll_snap_t", "lv_style_prop_t", "lv_draw_mask_line_side_t", "lv_obj_flag_t",
+                    "lv_roller_mode_t", "lv_slider_mode_t", "lv_arc_mode_t", "lv_text_align_t", "lv_bar_mode_t", "lv_part_t",
+                    "lv_text_flag_t", "lv_style_selector_t", "lv_dir_t", "lv_scroll_snap_t", "lv_style_prop_t", "lv_base_dir_t",
+                    "lv_slider_mode_t", "lv_arc_mode_t", "lv_text_align_t"]
 
 def gen_lua_ret(tp, f) :
     # 数值类

+ 308 - 561
components/lvgl/lv_conf.h

@@ -1,6 +1,6 @@
 /**
  * @file lv_conf.h
- * Configuration file for v7.11.0
+ * Configuration file for v8.0.0
  */
 
 /*
@@ -11,376 +11,257 @@
 
 #ifndef LV_CONF_H
 #define LV_CONF_H
-/* clang-format off */
+/*clang-format off*/
 
 #include <stdint.h>
 
+
 /*====================
-   Graphical settings
+   COLOR SETTINGS
  *====================*/
 
-/* Maximal horizontal and vertical resolution to support by the library.*/
-#define LV_HOR_RES_MAX          (480)
-#define LV_VER_RES_MAX          (320)
-
-/* Color depth:
- * - 1:  1 byte per pixel
- * - 8:  RGB332
- * - 16: RGB565
- * - 32: ARGB8888
- */
-#define LV_COLOR_DEPTH     16
+/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
+#define LV_COLOR_DEPTH     32
 
-/* Swap the 2 bytes of RGB565 color.
- * Useful if the display has a 8 bit interface (e.g. SPI)*/
+/*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/
 #define LV_COLOR_16_SWAP   0
 
-/* 1: Enable screen transparency.
- * Useful for OSD or other overlapping GUIs.
- * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/
+/*Enable more complex drawing routines to manage screens transparency.
+ *Can be used if the UI is above an other layer, e.g. an OSD menu or video player.
+ *Requires `LV_COLOR_DEPTH = 32` colors and the screen's `bg_opa` should be set to non LV_OPA_COVER value*/
 #define LV_COLOR_SCREEN_TRANSP    0
 
-/*Images pixels with this color will not be drawn (with chroma keying)*/
-#define LV_COLOR_TRANSP    LV_COLOR_LIME         /*LV_COLOR_LIME: pure green*/
-
-/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
-#define LV_ANTIALIAS        1
-
-/* Default display refresh period.
- * Can be changed in the display driver (`lv_disp_drv_t`).*/
-#define LV_DISP_DEF_REFR_PERIOD      30      /*[ms]*/
-
-/* Dot Per Inch: used to initialize default sizes.
- * E.g. a button with width = LV_DPI / 2 -> half inch wide
- * (Not so important, you can adjust it to modify default sizes and spaces)*/
-#define LV_DPI              130     /*[px]*/
-
-/* The the real width of the display changes some default values:
- * default object sizes, layout of examples, etc.
- * According to the width of the display (hor. res. / dpi)
- * the displays fall in 4 categories.
- * The 4th is extra large which has no upper limit so not listed here
- * The upper limit of the categories are set below in 0.1 inch unit.
- */
-#define LV_DISP_SMALL_LIMIT  30
-#define LV_DISP_MEDIUM_LIMIT 50
-#define LV_DISP_LARGE_LIMIT  70
-
-/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
-typedef int16_t lv_coord_t;
-
-/* Maximum buffer size to allocate for rotation. Only used if software rotation is enabled. */
-#define LV_DISP_ROT_MAX_BUF  (10U * 1024U)
+/*Images pixels with this color will not be drawn if they are  chroma keyed)*/
+#define LV_COLOR_CHROMA_KEY    lv_color_hex(0x00ff00)         /*pure green*/
 
 /*=========================
-   Memory manager settings
+   MEMORY SETTINGS
  *=========================*/
 
-/* LittelvGL's internal memory manager's settings.
- * The graphical objects and other related data are stored here. */
-
-/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
+/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
 #define LV_MEM_CUSTOM      1
 #if LV_MEM_CUSTOM == 0
-/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
-#  define LV_MEM_SIZE    (32U * 1024U)
+/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
+#  define LV_MEM_SIZE    (32U * 1024U)          /*[bytes]*/
 
-/* Compiler prefix for a big array declaration */
-#  define LV_MEM_ATTR
-
-/* Set an address for the memory pool instead of allocating it as an array.
- * Can be in external SRAM too. */
-#  define LV_MEM_ADR          0
-
-/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
-#  define LV_MEM_AUTO_DEFRAG  1
+/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
+#  define LV_MEM_ADR          0     /*0: unused*/
 #else       /*LV_MEM_CUSTOM*/
-#  define LV_MEM_CUSTOM_INCLUDE "luat_malloc.h"        /*Header for the dynamic memory function*/
-#  define LV_MEM_CUSTOM_ALLOC   luat_heap_malloc       /*Wrapper to malloc*/
-#  define LV_MEM_CUSTOM_FREE    luat_heap_free         /*Wrapper to free*/
+#  define LV_MEM_CUSTOM_INCLUDE "luat_malloc.h"   /*Header for the dynamic memory function*/
+#  define LV_MEM_CUSTOM_ALLOC     luat_heap_malloc
+#  define LV_MEM_CUSTOM_FREE      luat_heap_free
+#  define LV_MEM_CUSTOM_REALLOC   luat_heap_realloc
 #endif     /*LV_MEM_CUSTOM*/
 
-/* Use the standard memcpy and memset instead of LVGL's own functions.
- * The standard functions might or might not be faster depending on their implementation. */
+/*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/
 #define LV_MEMCPY_MEMSET_STD    0
 
-/* Garbage Collector settings
- * Used if lvgl is binded to higher level language and the memory is managed by that language */
-#define LV_ENABLE_GC 0
-#if LV_ENABLE_GC != 0
-#  define LV_GC_INCLUDE "gc.h"                           /*Include Garbage Collector related things*/
-#  define LV_MEM_CUSTOM_REALLOC   your_realloc           /*Wrapper to realloc*/
-#  define LV_MEM_CUSTOM_GET_SIZE  your_mem_get_size      /*Wrapper to lv_mem_get_size*/
-#endif /* LV_ENABLE_GC */
-
-/*=======================
-   Input device settings
- *=======================*/
-
-/* Input device default settings.
- * Can be changed in the Input device driver (`lv_indev_drv_t`)*/
-
-/* Input device read period in milliseconds */
-#define LV_INDEV_DEF_READ_PERIOD          30
-
-/* Drag threshold in pixels */
-#define LV_INDEV_DEF_DRAG_LIMIT           10
-
-/* Drag throw slow-down in [%]. Greater value -> faster slow-down */
-#define LV_INDEV_DEF_DRAG_THROW           10
-
-/* Long press time in milliseconds.
- * Time to send `LV_EVENT_LONG_PRESSED`) */
-#define LV_INDEV_DEF_LONG_PRESS_TIME      400
+/*====================
+   HAL SETTINGS
+ *====================*/
 
-/* Repeated trigger period in long press [ms]
- * Time between `LV_EVENT_LONG_PRESSED_REPEAT */
-#define LV_INDEV_DEF_LONG_PRESS_REP_TIME  100
+/*Default display refresh period. LVG will redraw changed ares with this period time*/
+#define LV_DISP_DEF_REFR_PERIOD     30      /*[ms]*/
 
-/* Gesture threshold in pixels */
-#define LV_INDEV_DEF_GESTURE_LIMIT        50
+/*Input device read period in milliseconds*/
+#define LV_INDEV_DEF_READ_PERIOD    30      /*[ms]*/
 
-/* Gesture min velocity at release before swipe (pixels)*/
-#define LV_INDEV_DEF_GESTURE_MIN_VELOCITY 3
+/*Use a custom tick source that tells the elapsed time in milliseconds.
+ *It removes the need to manually update the tick with `lv_tick_inc()`)*/
+#define LV_TICK_CUSTOM     0
+#if LV_TICK_CUSTOM
+#define LV_TICK_CUSTOM_INCLUDE  "Arduino.h"         /*Header for the system time function*/
+#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis())     /*Expression evaluating to current system time in ms*/
+#endif   /*LV_TICK_CUSTOM*/
 
-/*==================
- * Feature usage
- *==================*/
+/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
+ *(Not so important, you can adjust it to modify default sizes and spaces)*/
+#define LV_DPI_DEF                  130     /*[px/inch]*/
 
-/*1: Enable the Animations */
-#define LV_USE_ANIMATION        1
-#if LV_USE_ANIMATION
+/*=======================
+ * FEATURE CONFIGURATION
+ *=======================*/
 
-/*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_anim_user_data_t;
+/*-------------
+ * Drawing
+ *-----------*/
 
-#endif
+/*Enable complex draw engine.
+ *Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/
+#define LV_DRAW_COMPLEX 1
+#if LV_DRAW_COMPLEX != 0
 
-/* 1: Enable shadow drawing on rectangles*/
-#define LV_USE_SHADOW           1
-#if LV_USE_SHADOW
-/* Allow buffering some shadow calculation
- * LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer,
- * where shadow size is `shadow_width + radius`
- * Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
+/*Allow buffering some shadow calculation.
+ *LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
+ *Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
 #define LV_SHADOW_CACHE_SIZE    0
-#endif
-
-/*1: enable outline drawing on rectangles*/
-#define LV_USE_OUTLINE  1
-
-/*1: enable pattern drawing on rectangles*/
-#define LV_USE_PATTERN  1
-
-/*1: enable value string drawing on rectangles*/
-#define LV_USE_VALUE_STR    1
-
-/* 1: Use other blend modes than normal (`LV_BLEND_MODE_...`)*/
-#define LV_USE_BLEND_MODES      1
-
-/* 1: Use the `opa_scale` style property to set the opacity of an object and its children at once*/
-#define LV_USE_OPA_SCALE        1
-
-/* 1: Use image zoom and rotation*/
-#define LV_USE_IMG_TRANSFORM    1
-
-/* 1: Enable object groups (for keyboard/encoder navigation) */
-#define LV_USE_GROUP            1
-#if LV_USE_GROUP
-typedef void * lv_group_user_data_t;
-#endif  /*LV_USE_GROUP*/
-
-/* 1: Enable GPU interface*/
-#define LV_USE_GPU              0   /*Only enables `gpu_fill_cb` and `gpu_blend_cb` in the disp. drv- */
+#endif /*LV_DRAW_COMPLEX*/
+
+/*Default image cache size. Image caching keeps the images opened.
+ *If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added)
+ *With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
+ *However the opened images might consume additional RAM.
+ *0: to disable caching*/
+#define LV_IMG_CACHE_DEF_SIZE       0
+
+/*Maximum buffer size to allocate for rotation. Only used if software rotation is enabled in the display driver.*/
+#define LV_DISP_ROT_MAX_BUF         (10*1024)
+/*-------------
+ * GPU
+ *-----------*/
+
+/*Use STM32's DMA2D (aka Chrom Art) GPU*/
 #define LV_USE_GPU_STM32_DMA2D  0
-/*If enabling LV_USE_GPU_STM32_DMA2D, LV_GPU_DMA2D_CMSIS_INCLUDE must be defined to include path of CMSIS header of target processor
-e.g. "stm32f769xx.h" or "stm32f429xx.h" */
+#if LV_USE_GPU_STM32_DMA2D
+/*Must be defined to include path of CMSIS header of target processor
+e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
 #define LV_GPU_DMA2D_CMSIS_INCLUDE
+#endif
 
-/*1: Use PXP for CPU off-load on NXP RTxxx platforms */
+/*Use NXP's PXP GPU iMX RTxxx platforms*/
 #define LV_USE_GPU_NXP_PXP      0
-
+#if LV_USE_GPU_NXP_PXP
 /*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
  *   and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol FSL_RTOS_FREE_RTOS
  *   has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
  *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
- * */
+ */
 #define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
+#endif
 
-/*1: Use VG-Lite for CPU offload on NXP RTxxx platforms */
+/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
 #define LV_USE_GPU_NXP_VG_LITE   0
 
-/* 1: Enable file system (might be required for images */
-#define LV_USE_FILESYSTEM       1
-#if LV_USE_FILESYSTEM
-/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_fs_drv_user_data_t;
-#endif
+/*-------------
+ * Logging
+ *-----------*/
+
+/*Enable the log module*/
+#define LV_USE_LOG      0
+#if LV_USE_LOG
+
+/*How important log should be added:
+ *LV_LOG_LEVEL_TRACE       A lot of logs to give detailed information
+ *LV_LOG_LEVEL_INFO        Log important events
+ *LV_LOG_LEVEL_WARN        Log if something unwanted happened but didn't cause a problem
+ *LV_LOG_LEVEL_ERROR       Only critical issue, when the system may fail
+ *LV_LOG_LEVEL_USER        Only logs added by the user
+ *LV_LOG_LEVEL_NONE        Do not log anything*/
+#  define LV_LOG_LEVEL    LV_LOG_LEVEL_WARN
+
+/*1: Print the log with 'printf';
+ *0: User need to register a callback with `lv_log_register_print_cb()`*/
+#  define LV_LOG_PRINTF   0
+
+/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
+#  define LV_LOG_TRACE_MEM            1
+#  define LV_LOG_TRACE_TIMER          1
+#  define LV_LOG_TRACE_INDEV          1
+#  define LV_LOG_TRACE_DISP_REFR      1
+#  define LV_LOG_TRACE_EVENT          1
+#  define LV_LOG_TRACE_OBJ_CREATE     1
+#  define LV_LOG_TRACE_LAYOUT         1
+#  define LV_LOG_TRACE_ANIM           1
+
+#endif  /*LV_USE_LOG*/
+
+/*-------------
+ * Asserts
+ *-----------*/
+
+/*Enable asserts if an operation is failed or an invalid data is found.
+ *If LV_USE_LOG is enabled an error message will be printed on failure*/
+#define LV_USE_ASSERT_NULL          1   /*Check if the parameter is NULL. (Very fast, recommended)*/
+#define LV_USE_ASSERT_MALLOC        1   /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
+#define LV_USE_ASSERT_STYLE         0   /*Check if the styles are properly initialized. (Very fast, recommended)*/
+#define LV_USE_ASSERT_MEM_INTEGRITY 0   /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
+#define LV_USE_ASSERT_OBJ           0   /*Check the object's type and existence (e.g. not deleted). (Slow)*/
+
+/*Add a custom handler when assert happens e.g. to restart the MCU*/
+#define LV_ASSERT_HANDLER_INCLUDE   <stdint.h>
+#define LV_ASSERT_HANDLER   while(1);   /*Halt by default*/
 
-/*1: Add a `user_data` to drivers and objects*/
-#define LV_USE_USER_DATA        0
+/*-------------
+ * Others
+ *-----------*/
 
 /*1: Show CPU usage and FPS count in the right bottom corner*/
 #define LV_USE_PERF_MONITOR     0
 
-/*1: Use the functions and types from the older API if possible */
-#define LV_USE_API_EXTENSION_V6  1
-#define LV_USE_API_EXTENSION_V7  1
+/*1: Show the used memory and the memory fragmentation  in the left bottom corner
+ * Requires LV_MEM_CUSTOM = 0*/
+#define LV_USE_MEM_MONITOR      0
 
-/*========================
- * Image decoder and cache
- *========================*/
+/*1: Draw random colored rectangles over the redrawn areas*/
+#define LV_USE_REFR_DEBUG       0
 
-/* 1: Enable indexed (palette) images */
-#define LV_IMG_CF_INDEXED       1
-
-/* 1: Enable alpha indexed images */
-#define LV_IMG_CF_ALPHA         1
+/*Change the built in (v)snprintf functions*/
+#define LV_SPRINTF_CUSTOM   1
+#if LV_SPRINTF_CUSTOM
+#  define LV_SPRINTF_INCLUDE "printf.h"
+#  define lv_snprintf     snprintf_
+#  define lv_vsnprintf    vsnprintf_
+#else   /*LV_SPRINTF_CUSTOM*/
+#  define LV_SPRINTF_USE_FLOAT 0
+#endif  /*LV_SPRINTF_CUSTOM*/
 
-/* Default image cache size. Image caching keeps the images opened.
- * If only the built-in image formats are used there is no real advantage of caching.
- * (I.e. no new image decoder is added)
- * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
- * However the opened images might consume additional RAM.
- * Set it to 0 to disable caching */
-#define LV_IMG_CACHE_DEF_SIZE       1
+#define LV_USE_USER_DATA      0
 
-/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_img_decoder_user_data_t;
+/*Garbage Collector settings
+ *Used if lvgl is binded to higher level language and the memory is managed by that language*/
+#define LV_ENABLE_GC 0
+#if LV_ENABLE_GC != 0
+#  define LV_GC_INCLUDE "gc.h"                           /*Include Garbage Collector related things*/
+#endif /*LV_ENABLE_GC*/
 
 /*=====================
- *  Compiler settings
+ *  COMPILER SETTINGS
  *====================*/
 
-/* For big endian systems set to 1 */
+/*For big endian systems set to 1*/
 #define LV_BIG_ENDIAN_SYSTEM    0
 
-/* Define a custom attribute to `lv_tick_inc` function */
+/*Define a custom attribute to `lv_tick_inc` function*/
 #define LV_ATTRIBUTE_TICK_INC
 
-/* Define a custom attribute to `lv_task_handler` function */
-#define LV_ATTRIBUTE_TASK_HANDLER
+/*Define a custom attribute to `lv_timer_handler` function*/
+#define LV_ATTRIBUTE_TIMER_HANDLER
 
-/* Define a custom attribute to `lv_disp_flush_ready` function */
+/*Define a custom attribute to `lv_disp_flush_ready` function*/
 #define LV_ATTRIBUTE_FLUSH_READY
 
-/* Required alignment size for buffers */
+/*Required alignment size for buffers*/
 #define LV_ATTRIBUTE_MEM_ALIGN_SIZE
 
-/* With size optimization (-Os) the compiler might not align data to
- * 4 or 8 byte boundary. Some HW may need even 32 or 64 bytes.
- * This alignment will be explicitly applied where needed.
- * LV_ATTRIBUTE_MEM_ALIGN_SIZE should be used to specify required align size.
- * E.g. __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE))) */
+/*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default).
+ * E.g. __attribute__((aligned(4)))*/
 #define LV_ATTRIBUTE_MEM_ALIGN
 
-/* Attribute to mark large constant arrays for example
- * font's bitmaps */
+/*Attribute to mark large constant arrays for example font's bitmaps*/
 #define LV_ATTRIBUTE_LARGE_CONST
 
-/* Prefix performance critical functions to place them into a faster memory (e.g RAM)
- * Uses 15-20 kB extra memory */
-#define LV_ATTRIBUTE_FAST_MEM
+/*Complier prefix for a big array declaration in RAM*/
+#define LV_ATTRIBUTE_LARGE_RAM_ARRAY
 
-/* Export integer constant to binding.
- * This macro is used with constants in the form of LV_<CONST> that
- * should also appear on lvgl binding API such as Micropython
- *
- * The default value just prevents a GCC warning.
- */
-#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
+/*Place performance critical functions into a faster memory (e.g RAM)*/
+#define LV_ATTRIBUTE_FAST_MEM
 
-/* Prefix variables that are used in GPU accelerated operations, often these need to be
- * placed in RAM sections that are DMA accessible */
+/*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible*/
 #define LV_ATTRIBUTE_DMA
 
-/*===================
- *  HAL settings
- *==================*/
-
-/* 1: use a custom tick source.
- * It removes the need to manually update the tick with `lv_tick_inc`) */
-#define LV_TICK_CUSTOM     0
-#if LV_TICK_CUSTOM == 1
-#define LV_TICK_CUSTOM_INCLUDE  "Arduino.h"         /*Header for the system time function*/
-#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis())     /*Expression evaluating to current system time in ms*/
-#endif   /*LV_TICK_CUSTOM*/
-
-typedef void * lv_disp_drv_user_data_t;             /*Type of user data in the display driver*/
-typedef void * lv_indev_drv_user_data_t;            /*Type of user data in the input device driver*/
-
-/*================
- * Log settings
- *===============*/
-
-/*1: Enable the log module*/
-#define LV_USE_LOG      1
-#if LV_USE_LOG
-/* How important log should be added:
- * LV_LOG_LEVEL_TRACE       A lot of logs to give detailed information
- * LV_LOG_LEVEL_INFO        Log important events
- * LV_LOG_LEVEL_WARN        Log if something unwanted happened but didn't cause a problem
- * LV_LOG_LEVEL_ERROR       Only critical issue, when the system may fail
- * LV_LOG_LEVEL_NONE        Do not log anything
- */
-#  define LV_LOG_LEVEL    LV_LOG_LEVEL_WARN
+/*Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
+ *should also appear on LVGL binding API such as Micropython.*/
+#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
 
-/* 1: Print the log with 'printf';
- * 0: user need to register a callback with `lv_log_register_print_cb`*/
-#  define LV_LOG_PRINTF   0
-#endif  /*LV_USE_LOG*/
-
-/*=================
- * Debug settings
- *================*/
-
-/* If Debug is enabled LittelvGL validates the parameters of the functions.
- * If an invalid parameter is found an error log message is printed and
- * the MCU halts at the error. (`LV_USE_LOG` should be enabled)
- * If you are debugging the MCU you can pause
- * the debugger to see exactly where the issue is.
- *
- * The behavior of asserts can be overwritten by redefining them here.
- * E.g. #define LV_ASSERT_MEM(p)  <my_assert_code>
- */
-#define LV_USE_DEBUG        1
-#if LV_USE_DEBUG
-
-/*Check if the parameter is NULL. (Quite fast) */
-#define LV_USE_ASSERT_NULL      1
-
-/*Checks is the memory is successfully allocated or no. (Quite fast)*/
-#define LV_USE_ASSERT_MEM       1
-
-/*Check the integrity of `lv_mem` after critical operations. (Slow)*/
-#define LV_USE_ASSERT_MEM_INTEGRITY       0
-
-/* Check the strings.
- * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow)
- * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
-#define LV_USE_ASSERT_STR       0
-
-/* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow)
- * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
-#define LV_USE_ASSERT_OBJ       0
-
-/*Check if the styles are properly initialized. (Fast)*/
-#define LV_USE_ASSERT_STYLE     0
-
-#endif /*LV_USE_DEBUG*/
+/*Extend the default -32k..32k coordinate range to -4M..4M by using int32_t for coordinates instead of int16_t*/
+#define LV_USE_LARGE_COORD  0
 
 /*==================
- *    FONT USAGE
+ *   FONT USAGE
  *===================*/
 
-/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
- * The symbols are available via `LV_SYMBOL_...` defines
- * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
- * To create a new font go to: https://lvgl.com/ttf-font-to-c-array
- */
-
-/* Montserrat fonts with bpp = 4
- * https://fonts.google.com/specimen/Montserrat  */
+/*Montserrat fonts with ASCII range and some symbols using bpp = 4
+ *https://fonts.google.com/specimen/Montserrat*/
 #define LV_FONT_MONTSERRAT_8     0
 #define LV_FONT_MONTSERRAT_10    0
 #define LV_FONT_MONTSERRAT_12    0
@@ -403,360 +284,226 @@ typedef void * lv_indev_drv_user_data_t;            /*Type of user data in the i
 #define LV_FONT_MONTSERRAT_46    0
 #define LV_FONT_MONTSERRAT_48    0
 
-/* Demonstrate special features */
+/*Demonstrate special features*/
 #define LV_FONT_MONTSERRAT_12_SUBPX      0
 #define LV_FONT_MONTSERRAT_28_COMPRESSED 0  /*bpp = 3*/
-#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0  /*Hebrew, Arabic, PErisan letters and all their forms*/
+#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0  /*Hebrew, Arabic, Perisan letters and all their forms*/
 #define LV_FONT_SIMSUN_16_CJK            0  /*1000 most common CJK radicals*/
 
-/*Pixel perfect monospace font
- * http://pelulamu.net/unscii/ */
-#define LV_FONT_UNSCII_8     0
-#define LV_FONT_UNSCII_16     0
+/*Pixel perfect monospace fonts*/
+#define LV_FONT_UNSCII_8        0
+#define LV_FONT_UNSCII_16       0
 
-/* Optionally declare your custom fonts here.
- * You can use these fonts as default font too
- * and they will be available globally. E.g.
- * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
- *                                LV_FONT_DECLARE(my_font_2)
- */
+/*Optionally declare custom fonts here.
+ *You can use these fonts as default font too and they will be available globally.
+ *E.g. #define LV_FONT_CUSTOM_DECLARE   LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/
 #define LV_FONT_CUSTOM_DECLARE
 
-/* Enable it if you have fonts with a lot of characters.
- * The limit depends on the font size, font face and bpp
- * but with > 10,000 characters if you see issues probably you need to enable it.*/
+/*Always set a default font*/
+#define LV_FONT_DEFAULT &lv_font_montserrat_14
+
+/*Enable handling large font and/or fonts with a lot of characters.
+ *The limit depends on the font size, font face and bpp.
+ *Compiler error will be triggered if a font needs it.*/
 #define LV_FONT_FMT_TXT_LARGE   0
 
-/* Enables/disables support for compressed fonts. If it's disabled, compressed
- * glyphs cannot be processed by the library and won't be rendered.
- */
-#define LV_USE_FONT_COMPRESSED 1
+/*Enables/disables support for compressed fonts.*/
+#define LV_USE_FONT_COMPRESSED  0
 
-/* Enable subpixel rendering */
-#define LV_USE_FONT_SUBPX 1
+/*Enable subpixel rendering*/
+#define LV_USE_FONT_SUBPX       0
 #if LV_USE_FONT_SUBPX
-/* Set the pixel order of the display.
- * Important only if "subpx fonts" are used.
- * With "normal" font it doesn't matter.
- */
-#define LV_FONT_SUBPX_BGR    0
+/*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
+#define LV_FONT_SUBPX_BGR       0  /*0: RGB; 1:BGR order*/
 #endif
 
-/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_font_user_data_t;
-
-/*================
- *  THEME USAGE
- *================*/
-
-/*Always enable at least on theme*/
-
-/* No theme, you can apply your styles as you need
- * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
-#define LV_USE_THEME_EMPTY       1
-
-/*Simple to the create your theme based on it
- * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
-#define LV_USE_THEME_TEMPLATE    1
-
-/* A fast and impressive theme.
- * Flags:
- * LV_THEME_MATERIAL_FLAG_LIGHT: light theme
- * LV_THEME_MATERIAL_FLAG_DARK: dark theme
- * LV_THEME_MATERIAL_FLAG_NO_TRANSITION: disable transitions (state change animations)
- * LV_THEME_MATERIAL_FLAG_NO_FOCUS: disable indication of focused state)
- * */
-#define LV_USE_THEME_MATERIAL    1
-
-/* Mono-color theme for monochrome displays.
- * If LV_THEME_DEFAULT_COLOR_PRIMARY is LV_COLOR_BLACK the
- * texts and borders will be black and the background will be
- * white. Else the colors are inverted.
- * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
-#define LV_USE_THEME_MONO        1
-
-#define LV_THEME_DEFAULT_INCLUDE            <stdint.h>      /*Include a header for the init. function*/
-#define LV_THEME_DEFAULT_INIT               lv_theme_material_init
-#define LV_THEME_DEFAULT_COLOR_PRIMARY      lv_color_hex(0x01a2b1)
-#define LV_THEME_DEFAULT_COLOR_SECONDARY    lv_color_hex(0x44d1b6)
-#define LV_THEME_DEFAULT_FLAG               LV_THEME_MATERIAL_FLAG_LIGHT
-#define LV_THEME_DEFAULT_FONT_SMALL         &lv_font_montserrat_14
-#define LV_THEME_DEFAULT_FONT_NORMAL        &lv_font_montserrat_14
-#define LV_THEME_DEFAULT_FONT_SUBTITLE      &lv_font_montserrat_14
-#define LV_THEME_DEFAULT_FONT_TITLE         &lv_font_montserrat_14
-
 /*=================
- *  Text settings
+ *  TEXT SETTINGS
  *=================*/
 
-/* Select a character encoding for strings.
+/**
+ * Select a character encoding for strings.
  * Your IDE or editor should have the same character encoding
  * - LV_TXT_ENC_UTF8
  * - LV_TXT_ENC_ASCII
- * */
+ */
 #define LV_TXT_ENC LV_TXT_ENC_UTF8
 
  /*Can break (wrap) texts on these chars*/
 #define LV_TXT_BREAK_CHARS                  " ,.;:-_"
 
-/* If a word is at least this long, will break wherever "prettiest"
- * To disable, set to a value <= 0 */
+/*If a word is at least this long, will break wherever "prettiest"
+ *To disable, set to a value <= 0*/
 #define LV_TXT_LINE_BREAK_LONG_LEN          0
 
-/* Minimum number of characters in a long word to put on a line before a break.
- * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
+/*Minimum number of characters in a long word to put on a line before a break.
+ *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
 #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN  3
 
-/* Minimum number of characters in a long word to put on a line after a break.
- * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
+/*Minimum number of characters in a long word to put on a line after a break.
+ *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
 #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
 
-/* The control character to use for signalling text recoloring. */
+/*The control character to use for signalling text recoloring.*/
 #define LV_TXT_COLOR_CMD "#"
 
-/* Support bidirectional texts.
- * Allows mixing Left-to-Right and Right-to-Left texts.
- * The direction will be processed according to the Unicode Bidirectional Algorithm:
- * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
-#define LV_USE_BIDI     0
+/*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts.
+ *The direction will be processed according to the Unicode Bidirectioanl Algorithm:
+ *https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
+#define LV_USE_BIDI         0
 #if LV_USE_BIDI
-/* Set the default direction. Supported values:
- * `LV_BIDI_DIR_LTR` Left-to-Right
- * `LV_BIDI_DIR_RTL` Right-to-Left
- * `LV_BIDI_DIR_AUTO` detect texts base direction */
-#define LV_BIDI_BASE_DIR_DEF  LV_BIDI_DIR_AUTO
+/*Set the default direction. Supported values:
+ *`LV_BASE_DIR_LTR` Left-to-Right
+ *`LV_BASE_DIR_RTL` Right-to-Left
+ *`LV_BASE_DIR_AUTO` detect texts base direction*/
+#define LV_BIDI_BASE_DIR_DEF  LV_BASE_DIR_AUTO
 #endif
 
-/* Enable Arabic/Persian processing
- * In these languages characters should be replaced with
- * an other form based on their position in the text */
+/*Enable Arabic/Persian processing
+ *In these languages characters should be replaced with an other form based on their position in the text*/
 #define LV_USE_ARABIC_PERSIAN_CHARS 0
 
-/*Change the built in (v)snprintf functions*/
-#define LV_SPRINTF_CUSTOM   1
-#if LV_SPRINTF_CUSTOM
-#  define LV_SPRINTF_INCLUDE "printf.h"
-#  define lv_snprintf     snprintf_
-#  define lv_vsnprintf    vsnprintf_
-#else   /*!LV_SPRINTF_CUSTOM*/
-#  define LV_SPRINTF_DISABLE_FLOAT 1
-#endif  /*LV_SPRINTF_CUSTOM*/
-
-/*===================
- *  LV_OBJ SETTINGS
- *==================*/
+/*==================
+ *  WIDGET USAGE
+ *================*/
 
-#if LV_USE_USER_DATA
-/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_obj_user_data_t;
-/*Provide a function to free user data*/
-#define LV_USE_USER_DATA_FREE 0
-#if LV_USE_USER_DATA_FREE
-#  define LV_USER_DATA_FREE_INCLUDE  "something.h"  /*Header for user data free function*/
-/* Function prototype : void user_data_free(lv_obj_t * obj); */
-#  define LV_USER_DATA_FREE  (user_data_free)       /*Invoking for user data free function*/
-#endif
-#endif
+/*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/
 
-/*1: enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/
-#define LV_USE_OBJ_REALIGN          1
+#define LV_USE_ARC          1
 
-/* Enable to make the object clickable on a larger area.
- * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature
- * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px)
- * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px)
- */
-#define LV_USE_EXT_CLICK_AREA  LV_EXT_CLICK_AREA_TINY
+#define LV_USE_ANIMIMG	    1
 
-/*==================
- *  LV OBJ X USAGE
- *================*/
-/*
- * Documentation of the object types: https://docs.lvgl.com/#Object-types
- */
+#define LV_USE_BAR          1
 
-/*Arc (dependencies: -)*/
-#define LV_USE_ARC      1
+#define LV_USE_BTN          1
 
-/*Bar (dependencies: -)*/
-#define LV_USE_BAR      1
+#define LV_USE_BTNMATRIX    1
 
-/*Button (dependencies: lv_cont*/
-#define LV_USE_BTN      1
+#define LV_USE_CANVAS       1
 
-/*Button matrix (dependencies: -)*/
-#define LV_USE_BTNMATRIX     1
+#define LV_USE_CHECKBOX     1
 
-/*Calendar (dependencies: -)*/
-#define LV_USE_CALENDAR 1
-#if LV_USE_CALENDAR
-#  define LV_CALENDAR_WEEK_STARTS_MONDAY    0
-#endif
 
-/*Canvas (dependencies: lv_img)*/
-#define LV_USE_CANVAS   1
+#define LV_USE_DROPDOWN     1   /*Requires: lv_label*/
 
-/*Check box (dependencies: lv_btn, lv_label)*/
-#define LV_USE_CHECKBOX       1
+#define LV_USE_IMG          1   /*Requires: lv_label*/
 
-/*Chart (dependencies: -)*/
-#define LV_USE_CHART    1
-#if LV_USE_CHART
-#  define LV_CHART_AXIS_TICK_LABEL_MAX_LEN    256
+#define LV_USE_LABEL        1
+#if LV_USE_LABEL
+#  define LV_LABEL_TEXT_SELECTION         1   /*Enable selecting text of the label*/
+#  define LV_LABEL_LONG_TXT_HINT    1   /*Store some extra info in labels to speed up drawing of very long texts*/
 #endif
 
-/*Container (dependencies: -*/
-#define LV_USE_CONT     1
-
-/*Color picker (dependencies: -*/
-#define LV_USE_CPICKER   1
+#define LV_USE_LINE         1
 
-/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
-#define LV_USE_DROPDOWN    1
-#if LV_USE_DROPDOWN != 0
-/*Open and close default animation time [ms] (0: no animation)*/
-#  define LV_DROPDOWN_DEF_ANIM_TIME     200
+#define LV_USE_ROLLER       1   /*Requires: lv_label*/
+#if LV_USE_ROLLER
+#  define LV_ROLLER_INF_PAGES       7   /*Number of extra "pages" when the roller is infinite*/
 #endif
 
-/*Gauge (dependencies:lv_bar, lv_linemeter)*/
-#define LV_USE_GAUGE    1
+#define LV_USE_SLIDER       1   /*Requires: lv_bar*/
 
-/*Image (dependencies: lv_label*/
-#define LV_USE_IMG      1
+#define LV_USE_SWITCH    1
 
-/*Image Button (dependencies: lv_btn*/
-#define LV_USE_IMGBTN   1
-#if LV_USE_IMGBTN
-/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
-#  define LV_IMGBTN_TILED 0
+#define LV_USE_TEXTAREA   1     /*Requires: lv_label*/
+#if LV_USE_TEXTAREA != 0
+#  define LV_TEXTAREA_DEF_PWD_SHOW_TIME     1500    /*ms*/
 #endif
 
-/*Keyboard (dependencies: lv_btnm)*/
-#define LV_USE_KEYBOARD       1
+#define LV_USE_TABLE  1
 
-/*Label (dependencies: -*/
-#define LV_USE_LABEL    1
-#if LV_USE_LABEL != 0
-/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/
-#  define LV_LABEL_DEF_SCROLL_SPEED       25
+/*==================
+ * EXTRA COMPONENTS
+ *==================*/
 
-/* Waiting period at beginning/end of animation cycle */
-#  define LV_LABEL_WAIT_CHAR_COUNT        3
+/*-----------
+ * Widgets
+ *----------*/
+#define LV_USE_CALENDAR     1
+#if LV_USE_CALENDAR
+# define LV_CALENDAR_WEEK_STARTS_MONDAY 0
+# if LV_CALENDAR_WEEK_STARTS_MONDAY
+#  define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
+# else
+#  define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
+# endif
 
-/*Enable selecting text of the label */
-#  define LV_LABEL_TEXT_SEL               0
+# define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March",  "April", "May",  "June", "July", "August", "September", "October", "November", "December"}
+# define LV_USE_CALENDAR_HEADER_ARROW       1
+# define LV_USE_CALENDAR_HEADER_DROPDOWN    1
+#endif  /*LV_USE_CALENDAR*/
 
-/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/
-#  define LV_LABEL_LONG_TXT_HINT          0
-#endif
+#define LV_USE_CHART        1
 
-/*LED (dependencies: -)*/
-#define LV_USE_LED      1
-#if LV_USE_LED
-#  define LV_LED_BRIGHT_MIN  120      /*Minimal brightness*/
-#  define LV_LED_BRIGHT_MAX  255     /*Maximal brightness*/
-#endif
+#define LV_USE_COLORWHEEL   1
 
-/*Line (dependencies: -*/
-#define LV_USE_LINE     1
+#define LV_USE_IMGBTN       1
 
-/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
-#define LV_USE_LIST     1
-#if LV_USE_LIST != 0
-/*Default animation time of focusing to a list element [ms] (0: no animation)  */
-#  define LV_LIST_DEF_ANIM_TIME  100
-#endif
+#define LV_USE_KEYBOARD     1
 
-/*Line meter (dependencies: *;)*/
-#define LV_USE_LINEMETER   1
-#if LV_USE_LINEMETER
-/* Draw line more precisely at cost of performance.
- * Useful if there are lot of lines any minor are visible
- * 0: No extra precision
- * 1: Some extra precision
- * 2: Best precision
- */
-#  define LV_LINEMETER_PRECISE    1
-#endif
+#define LV_USE_LED          1
 
-/*Mask (dependencies: -)*/
-#define LV_USE_OBJMASK  1
+#define LV_USE_LIST         1
 
-/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
-#define LV_USE_MSGBOX     1
+#define LV_USE_METER        1
 
-/*Page (dependencies: lv_cont)*/
-#define LV_USE_PAGE     1
-#if LV_USE_PAGE != 0
-/*Focus default animation time [ms] (0: no animation)*/
-#  define LV_PAGE_DEF_ANIM_TIME     400
-#endif
+#define LV_USE_MSGBOX       1
+
+#define LV_USE_SPINBOX      1
 
-/*Preload (dependencies: lv_arc, lv_anim)*/
 #define LV_USE_SPINNER      1
-#if LV_USE_SPINNER != 0
-#  define LV_SPINNER_DEF_ARC_LENGTH   60      /*[deg]*/
-#  define LV_SPINNER_DEF_SPIN_TIME    1000    /*[ms]*/
-#  define LV_SPINNER_DEF_ANIM         LV_SPINNER_TYPE_SPINNING_ARC
-#endif
 
-/*Roller (dependencies: lv_ddlist)*/
-#define LV_USE_ROLLER    1
-#if LV_USE_ROLLER != 0
-/*Focus animation time [ms] (0: no animation)*/
-#  define LV_ROLLER_DEF_ANIM_TIME     200
+#define LV_USE_TABVIEW      1
+
+#define LV_USE_TILEVIEW     1
 
-/*Number of extra "pages" when the roller is infinite*/
-#  define LV_ROLLER_INF_PAGES         7
+#define LV_USE_WIN          1
+
+#define LV_USE_SPAN         1
+#if LV_USE_SPAN
+/*A line text can contain maximum num of span descriptor */
+#  define LV_SPAN_SNIPPET_STACK_SIZE   64
 #endif
 
-/*Slider (dependencies: lv_bar)*/
-#define LV_USE_SLIDER    1
+/*-----------
+ * Themes
+ *----------*/
+/*A simple, impressive and very complete theme*/
+#define LV_USE_THEME_DEFAULT    1
+#if LV_USE_THEME_DEFAULT
 
-/*Spinbox (dependencies: lv_ta)*/
-#define LV_USE_SPINBOX       1
+/*0: Light mode; 1: Dark mode*/
+# define LV_THEME_DEFAULT_DARK     0
 
-/*Switch (dependencies: lv_slider)*/
-#define LV_USE_SWITCH       1
+/*1: Enable grow on press*/
+# define LV_THEME_DEFAULT_GROW              1
 
-/*Text area (dependencies: lv_label, lv_page)*/
-#define LV_USE_TEXTAREA       1
-#if LV_USE_TEXTAREA != 0
-#  define LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 400     /*ms*/
-#  define LV_TEXTAREA_DEF_PWD_SHOW_TIME     1500    /*ms*/
-#endif
+/*Default transition time in [ms]*/
+# define LV_THEME_DEFAULT_TRANSITON_TIME    80
+#endif /*LV_USE_THEME_DEFAULT*/
 
-/*Table (dependencies: lv_label)*/
-#define LV_USE_TABLE    1
-#if LV_USE_TABLE
-#  define LV_TABLE_COL_MAX    12
-#  define LV_TABLE_CELL_STYLE_CNT 4
-#endif
+/*An very simple them that is a good starting point for a custom theme*/
+ #define LV_USE_THEME_BASIC    1
 
-/*Tab (dependencies: lv_page, lv_btnm)*/
-#define LV_USE_TABVIEW      1
-#  if LV_USE_TABVIEW != 0
-/*Time of slide animation [ms] (0: no animation)*/
-#  define LV_TABVIEW_DEF_ANIM_TIME    300
-#endif
+/*A theme designed for monochrome displays*/
+#define LV_USE_THEME_MONO       1
 
-/*Tileview (dependencies: lv_page) */
-#define LV_USE_TILEVIEW     1
-#if LV_USE_TILEVIEW
-/*Time of slide animation [ms] (0: no animation)*/
-#  define LV_TILEVIEW_DEF_ANIM_TIME   300
-#endif
+/*-----------
+ * Layouts
+ *----------*/
+
+/*A layout similar to Flexbox in CSS.*/
+#define LV_USE_FLEX     1
 
-/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
-#define LV_USE_WIN      1
+/*A layout similar to Grid in CSS.*/
+#define LV_USE_GRID     1
 
 /*==================
- * Non-user section
- *==================*/
+* EXAMPLES
+*==================*/
 
-#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)    /* Disable warnings for Visual Studio*/
-#  define _CRT_SECURE_NO_WARNINGS
-#endif
+/*Enable the examples to be built with the library*/
+#define LV_BUILD_EXAMPLES   0
 
 /*--END OF LV_CONF_H--*/
 

+ 50 - 61
components/lvgl/lvgl.h

@@ -1,6 +1,6 @@
 /**
  * @file lvgl.h
- * Include all LittleV GL related headers
+ * Include all LVGL related headers
  */
 
 #ifndef LVGL_H
@@ -13,8 +13,8 @@ extern "C" {
 /***************************
  * CURRENT VERSION OF LVGL
  ***************************/
-#define LVGL_VERSION_MAJOR 7
-#define LVGL_VERSION_MINOR 11
+#define LVGL_VERSION_MAJOR 8
+#define LVGL_VERSION_MINOR 0
 #define LVGL_VERSION_PATCH 0
 #define LVGL_VERSION_INFO ""
 
@@ -22,65 +22,54 @@ extern "C" {
  *      INCLUDES
  *********************/
 
-#include "src/lv_misc/lv_log.h"
-#include "src/lv_misc/lv_task.h"
-#include "src/lv_misc/lv_math.h"
-#include "src/lv_misc/lv_async.h"
-
-#include "src/lv_hal/lv_hal.h"
-
-#include "src/lv_core/lv_obj.h"
-#include "src/lv_core/lv_group.h"
-#include "src/lv_core/lv_indev.h"
-
-#include "src/lv_core/lv_refr.h"
-#include "src/lv_core/lv_disp.h"
-
-#include "src/lv_themes/lv_theme.h"
-
-#include "src/lv_font/lv_font.h"
-#include "src/lv_font/lv_font_loader.h"
-#include "src/lv_font/lv_font_fmt_txt.h"
-#include "src/lv_misc/lv_printf.h"
-
-#include "src/lv_widgets/lv_btn.h"
-#include "src/lv_widgets/lv_imgbtn.h"
-#include "src/lv_widgets/lv_img.h"
-#include "src/lv_widgets/lv_label.h"
-#include "src/lv_widgets/lv_line.h"
-#include "src/lv_widgets/lv_page.h"
-#include "src/lv_widgets/lv_cont.h"
-#include "src/lv_widgets/lv_list.h"
-#include "src/lv_widgets/lv_chart.h"
-#include "src/lv_widgets/lv_table.h"
-#include "src/lv_widgets/lv_checkbox.h"
-#include "src/lv_widgets/lv_cpicker.h"
-#include "src/lv_widgets/lv_bar.h"
-#include "src/lv_widgets/lv_slider.h"
-#include "src/lv_widgets/lv_led.h"
-#include "src/lv_widgets/lv_btnmatrix.h"
-#include "src/lv_widgets/lv_keyboard.h"
-#include "src/lv_widgets/lv_dropdown.h"
-#include "src/lv_widgets/lv_roller.h"
-#include "src/lv_widgets/lv_textarea.h"
-#include "src/lv_widgets/lv_canvas.h"
-#include "src/lv_widgets/lv_win.h"
-#include "src/lv_widgets/lv_tabview.h"
-#include "src/lv_widgets/lv_tileview.h"
-#include "src/lv_widgets/lv_msgbox.h"
-#include "src/lv_widgets/lv_objmask.h"
-#include "src/lv_widgets/lv_gauge.h"
-#include "src/lv_widgets/lv_linemeter.h"
-#include "src/lv_widgets/lv_switch.h"
-#include "src/lv_widgets/lv_arc.h"
-#include "src/lv_widgets/lv_spinner.h"
-#include "src/lv_widgets/lv_calendar.h"
-#include "src/lv_widgets/lv_spinbox.h"
-
-#include "src/lv_draw/lv_img_cache.h"
+#include "src/misc/lv_log.h"
+#include "src/misc/lv_timer.h"
+#include "src/misc/lv_math.h"
+#include "src/misc/lv_async.h"
+
+#include "src/hal/lv_hal.h"
+
+#include "src/core/lv_obj.h"
+#include "src/core/lv_group.h"
+#include "src/core/lv_indev.h"
+
+#include "src/core/lv_refr.h"
+#include "src/core/lv_disp.h"
+#include "src/core/lv_theme.h"
+
+#include "src/font/lv_font.h"
+#include "src/font/lv_font_loader.h"
+#include "src/font/lv_font_fmt_txt.h"
+#include "src/misc/lv_printf.h"
+
+#include "src/widgets/lv_arc.h"
+#include "src/widgets/lv_btn.h"
+#include "src/widgets/lv_img.h"
+#include "src/widgets/lv_label.h"
+#include "src/widgets/lv_line.h"
+#include "src/widgets/lv_table.h"
+#include "src/widgets/lv_checkbox.h"
+#include "src/widgets/lv_bar.h"
+#include "src/widgets/lv_slider.h"
+#include "src/widgets/lv_btnmatrix.h"
+#include "src/widgets/lv_dropdown.h"
+#include "src/widgets/lv_roller.h"
+#include "src/widgets/lv_textarea.h"
+#include "src/widgets/lv_canvas.h"
+#include "src/widgets/lv_switch.h"
+
+#include "src/draw/lv_draw.h"
 
 #include "src/lv_api_map.h"
 
+/*-----------------
+ * EXTRAS
+ *----------------*/
+#include "src/extra/lv_extra.h"
+#include "src/extra/widgets/lv_widgets.h"
+#include "src/extra/layouts/lv_layouts.h"
+#include "src/extra/themes/lv_themes.h"
+
 /*********************
  *      DEFINES
  *********************/
@@ -117,7 +106,7 @@ extern "C" {
  *   bugfix_in_v5_3_2();
  * #endif
  *
- * */
+ */
 #define LV_VERSION_CHECK(x,y,z) (x == LVGL_VERSION_MAJOR && (y < LVGL_VERSION_MINOR || (y == LVGL_VERSION_MINOR && z <= LVGL_VERSION_PATCH)))
 
 /**
@@ -145,7 +134,7 @@ static inline const char *lv_version_info(void)
 }
 
 #ifdef __cplusplus
-}
+} /*extern "C"*/
 #endif
 
 #endif /*LVGL_H*/

+ 0 - 13
components/lvgl/src/CMakeLists.txt

@@ -1,13 +0,0 @@
-
-cmake_minimum_required(VERSION 2.8.12)
-
-project("lvgl_src" C)
-
-add_subdirectory(lv_core)
-add_subdirectory(lv_draw)
-add_subdirectory(lv_font)
-add_subdirectory(lv_gpu)
-add_subdirectory(lv_hal)
-add_subdirectory(lv_misc)
-add_subdirectory(lv_themes)
-add_subdirectory(lv_widgets)

+ 20 - 0
components/lvgl/src/core/lv_core.mk

@@ -0,0 +1,20 @@
+CSRCS += lv_disp.c
+CSRCS += lv_group.c
+CSRCS += lv_indev.c
+CSRCS += lv_indev_scroll.c
+CSRCS += lv_obj.c
+CSRCS += lv_obj_class.c
+CSRCS += lv_obj_draw.c
+CSRCS += lv_obj_pos.c
+CSRCS += lv_obj_scroll.c
+CSRCS += lv_obj_style.c
+CSRCS += lv_obj_style_gen.c
+CSRCS += lv_obj_tree.c
+CSRCS += lv_event.c
+CSRCS += lv_refr.c
+CSRCS += lv_theme.c
+
+DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core
+VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core
+
+CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core"

+ 71 - 57
components/lvgl/src/lv_core/lv_disp.c → components/lvgl/src/core/lv_disp.c

@@ -7,8 +7,8 @@
  *      INCLUDES
  *********************/
 #include "lv_disp.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_core/lv_refr.h"
+#include "../misc/lv_math.h"
+#include "../core/lv_refr.h"
 
 /*********************
  *      DEFINES
@@ -22,11 +22,11 @@
  *  STATIC PROTOTYPES
  **********************/
 
-#if LV_USE_ANIMATION
-    static void scr_load_anim_start(lv_anim_t * a);
-    static void opa_scale_anim(lv_obj_t * obj, lv_anim_value_t v);
-    static void scr_anim_ready(lv_anim_t * a);
-#endif
+static void scr_load_anim_start(lv_anim_t * a);
+static void opa_scale_anim(void * obj, int32_t v);
+static void set_x_anim(void * obj, int32_t v);
+static void set_y_anim(void * obj, int32_t v);
+static void scr_anim_ready(lv_anim_t * a);
 
 /**********************
  *  STATIC VARIABLES
@@ -106,7 +106,7 @@ lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp)
 /**
  * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
  * layer)
- * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
+ * @param disp pointer to display which sys. layer  should be get. (NULL to use the default screen)
  * @return pointer to the sys layer object  (transparent screen sized lv_obj)
  */
 lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp)
@@ -121,22 +121,32 @@ lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp)
 }
 
 /**
- * Assign a screen to a display.
- * @param disp pointer to a display where to assign the screen
- * @param scr pointer to a screen object to assign
+ * Get the theme of a display
+ * @param disp pointer to a display
+ * @return the display's theme (can be NULL)
  */
-void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr)
+void lv_disp_set_theme(lv_disp_t * disp, lv_theme_t * th)
 {
-    if(lv_obj_get_parent(scr) != NULL) {
-        LV_LOG_WARN("lv_disp_assign_screen: try to assign a non-screen object");
-        return;
+	if(disp == NULL) disp = lv_disp_get_default();
+    disp->theme = th;
+
+    if(disp->screen_cnt == 3 &&
+        lv_obj_get_child_cnt(disp->screens[0]) == 0 &&
+        lv_obj_get_child_cnt(disp->screens[1]) == 0 &&
+        lv_obj_get_child_cnt(disp->screens[2]) == 0)
+    {
+        lv_theme_apply(disp->screens[0]);
     }
-
-    lv_disp_t * old_disp = lv_obj_get_disp(scr);
-
-    if(old_disp == disp) return;
-
-    _lv_ll_chg_list(&old_disp->scr_ll, &disp->scr_ll, scr, true);
+}
+/**
+ * Get the theme of a display
+ * @param disp pointer to a display
+ * @return the display's theme (can be NULL)
+ */
+lv_theme_t * lv_disp_get_theme(lv_disp_t * disp)
+{
+	if(disp == NULL) disp = lv_disp_get_default();
+    return disp->theme;
 }
 
 /**
@@ -200,8 +210,6 @@ void lv_disp_set_bg_opa(lv_disp_t * disp, lv_opa_t opa)
     _lv_inv_area(disp, &a);
 }
 
-#if LV_USE_ANIMATION
-
 /**
  * Switch screen with animation
  * @param scr pointer to the new screen to load
@@ -220,7 +228,7 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
         lv_disp_load_scr(d->scr_to_load);
         lv_anim_del(d->scr_to_load, NULL);
         lv_obj_set_pos(d->scr_to_load, 0, 0);
-        lv_style_remove_prop(lv_obj_get_local_style(d->scr_to_load, LV_OBJ_PART_MAIN), LV_STYLE_OPA_SCALE);
+        lv_obj_remove_local_style_prop(d->scr_to_load, LV_STYLE_OPA, 0);
 
         act_scr = d->scr_to_load;
     }
@@ -241,8 +249,8 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
     /*Be sure both screens are in a normal position*/
     lv_obj_set_pos(new_scr, 0, 0);
     lv_obj_set_pos(lv_scr_act(), 0, 0);
-    lv_style_remove_prop(lv_obj_get_local_style(new_scr, LV_OBJ_PART_MAIN), LV_STYLE_OPA_SCALE);
-    lv_style_remove_prop(lv_obj_get_local_style(lv_scr_act(), LV_OBJ_PART_MAIN), LV_STYLE_OPA_SCALE);
+    lv_obj_remove_local_style_prop(new_scr, LV_STYLE_OPA, 0);
+    lv_obj_remove_local_style_prop(lv_scr_act(), LV_STYLE_OPA, 0);
 
     lv_anim_t a_new;
     lv_anim_init(&a_new);
@@ -260,57 +268,57 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
 
     switch(anim_type) {
         case LV_SCR_LOAD_ANIM_NONE:
-            /* Create a dummy animation to apply the delay*/
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_x);
+            /*Create a dummy animation to apply the delay*/
+            lv_anim_set_exec_cb(&a_new, set_x_anim);
             lv_anim_set_values(&a_new, 0, 0);
             break;
         case LV_SCR_LOAD_ANIM_OVER_LEFT:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_x);
+            lv_anim_set_exec_cb(&a_new, set_x_anim);
             lv_anim_set_values(&a_new, lv_disp_get_hor_res(d), 0);
             break;
         case LV_SCR_LOAD_ANIM_OVER_RIGHT:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_x);
+            lv_anim_set_exec_cb(&a_new, set_x_anim);
             lv_anim_set_values(&a_new, -lv_disp_get_hor_res(d), 0);
             break;
         case LV_SCR_LOAD_ANIM_OVER_TOP:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_y);
+            lv_anim_set_exec_cb(&a_new, set_y_anim);
             lv_anim_set_values(&a_new, lv_disp_get_ver_res(d), 0);
             break;
         case LV_SCR_LOAD_ANIM_OVER_BOTTOM:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_y);
+            lv_anim_set_exec_cb(&a_new, set_y_anim);
             lv_anim_set_values(&a_new, -lv_disp_get_ver_res(d), 0);
             break;
         case LV_SCR_LOAD_ANIM_MOVE_LEFT:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_x);
+            lv_anim_set_exec_cb(&a_new, set_x_anim);
             lv_anim_set_values(&a_new, lv_disp_get_hor_res(d), 0);
 
-            lv_anim_set_exec_cb(&a_old, (lv_anim_exec_xcb_t) lv_obj_set_x);
+            lv_anim_set_exec_cb(&a_old, set_x_anim);
             lv_anim_set_values(&a_old, 0, -lv_disp_get_hor_res(d));
             break;
         case LV_SCR_LOAD_ANIM_MOVE_RIGHT:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_x);
+            lv_anim_set_exec_cb(&a_new, set_x_anim);
             lv_anim_set_values(&a_new, -lv_disp_get_hor_res(d), 0);
 
-            lv_anim_set_exec_cb(&a_old, (lv_anim_exec_xcb_t) lv_obj_set_x);
+            lv_anim_set_exec_cb(&a_old, set_x_anim);
             lv_anim_set_values(&a_old, 0, lv_disp_get_hor_res(d));
             break;
         case LV_SCR_LOAD_ANIM_MOVE_TOP:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_y);
+            lv_anim_set_exec_cb(&a_new, set_y_anim);
             lv_anim_set_values(&a_new, lv_disp_get_ver_res(d), 0);
 
-            lv_anim_set_exec_cb(&a_old, (lv_anim_exec_xcb_t) lv_obj_set_y);
+            lv_anim_set_exec_cb(&a_old, set_y_anim);
             lv_anim_set_values(&a_old, 0, -lv_disp_get_ver_res(d));
             break;
         case LV_SCR_LOAD_ANIM_MOVE_BOTTOM:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) lv_obj_set_y);
+            lv_anim_set_exec_cb(&a_new, set_y_anim);
             lv_anim_set_values(&a_new, -lv_disp_get_ver_res(d), 0);
 
-            lv_anim_set_exec_cb(&a_old, (lv_anim_exec_xcb_t) lv_obj_set_y);
+            lv_anim_set_exec_cb(&a_old, set_y_anim);
             lv_anim_set_values(&a_old, 0, lv_disp_get_ver_res(d));
             break;
 
         case LV_SCR_LOAD_ANIM_FADE_ON:
-            lv_anim_set_exec_cb(&a_new, (lv_anim_exec_xcb_t) opa_scale_anim);
+            lv_anim_set_exec_cb(&a_new, opa_scale_anim);
             lv_anim_set_values(&a_new, LV_OPA_TRANSP, LV_OPA_COVER);
             break;
     }
@@ -319,8 +327,6 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
     lv_anim_start(&a_old);
 }
 
-#endif
-
 /**
  * Get elapsed time since last user activity on a display (e.g. click)
  * @param disp pointer to an display (NULL to get the overall smallest inactivity)
@@ -335,7 +341,7 @@ uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp)
     d          = lv_disp_get_next(NULL);
     while(d) {
         uint32_t elaps = lv_tick_elaps(d->last_activity_time);
-        t = LV_MATH_MIN(t, elaps);
+        t = LV_MIN(t, elaps);
         d = lv_disp_get_next(d);
     }
 
@@ -369,32 +375,31 @@ void lv_disp_clean_dcache(lv_disp_t * disp)
         return;
     }
 
-    if(disp->driver.clean_dcache_cb)
-        disp->driver.clean_dcache_cb(&disp->driver);
+    if(disp->driver->clean_dcache_cb)
+        disp->driver->clean_dcache_cb(disp->driver);
 }
 
 /**
- * Get a pointer to the screen refresher task to
- * modify its parameters with `lv_task_...` functions.
+ * Get a pointer to the screen refresher timer to
+ * modify its parameters with `lv_timer_...` functions.
  * @param disp pointer to a display
- * @return pointer to the display refresher task. (NULL on error)
+ * @return pointer to the display refresher timer. (NULL on error)
  */
-lv_task_t * _lv_disp_get_refr_task(lv_disp_t * disp)
+lv_timer_t * _lv_disp_get_refr_timer(lv_disp_t * disp)
 {
     if(!disp) disp = lv_disp_get_default();
     if(!disp) {
-        LV_LOG_WARN("lv_disp_get_refr_task: no display registered");
+        LV_LOG_WARN("lv_disp_get_refr_timer: no display registered");
         return NULL;
     }
 
-    return disp->refr_task;
+    return disp->refr_timer;
 }
 
 /**********************
  *   STATIC FUNCTIONS
  **********************/
 
-#if LV_USE_ANIMATION
 static void scr_load_anim_start(lv_anim_t * a)
 {
     lv_disp_t * d = lv_obj_get_disp(a->var);
@@ -403,9 +408,19 @@ static void scr_load_anim_start(lv_anim_t * a)
     lv_disp_load_scr(a->var);
 }
 
-static void opa_scale_anim(lv_obj_t * obj, lv_anim_value_t v)
+static void opa_scale_anim(void * obj, int32_t v)
+{
+    lv_obj_set_style_opa(obj, v, 0);
+}
+
+static void set_x_anim(void * obj, int32_t v)
+{
+    lv_obj_set_x(obj, v);
+}
+
+static void set_y_anim(void * obj, int32_t v)
 {
-    lv_obj_set_style_local_opa_scale(obj, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, v);
+    lv_obj_set_y(obj, v);
 }
 
 static void scr_anim_ready(lv_anim_t * a)
@@ -415,6 +430,5 @@ static void scr_anim_ready(lv_anim_t * a)
     if(d->prev_scr && d->del_prev) lv_obj_del(d->prev_scr);
     d->prev_scr = NULL;
     d->scr_to_load = NULL;
-    lv_style_remove_prop(lv_obj_get_local_style(a->var, LV_OBJ_PART_MAIN), LV_STYLE_OPA_SCALE);
+    lv_obj_remove_local_style_prop(a->var, LV_STYLE_OPA, 0);
 }
-#endif

+ 41 - 22
components/lvgl/src/lv_core/lv_disp.h → components/lvgl/src/core/lv_disp.h

@@ -13,8 +13,9 @@ extern "C" {
 /*********************
  *      INCLUDES
  *********************/
-#include "../lv_hal/lv_hal.h"
+#include "../hal/lv_hal.h"
 #include "lv_obj.h"
+#include "lv_theme.h"
 
 /*********************
  *      DEFINES
@@ -73,17 +74,24 @@ lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp);
 /**
  * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
  * layer)
- * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
+ * @param disp pointer to display which sys. layer  should be get. (NULL to use the default screen)
  * @return pointer to the sys layer object  (transparent screen sized lv_obj)
  */
 lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp);
 
 /**
- * Assign a screen to a display.
- * @param disp pointer to a display where to assign the screen
- * @param scr pointer to a screen object to assign
+ * Get the theme of a display
+ * @param disp pointer to a display
+ * @return the display's theme (can be NULL)
  */
-void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr);
+void lv_disp_set_theme(lv_disp_t * disp, lv_theme_t * th);
+
+/**
+ * Get the theme of a display
+ * @param disp pointer to a display
+ * @return the display's theme (can be NULL)
+ */
+lv_theme_t * lv_disp_get_theme(lv_disp_t * disp);
 
 /**
  * Set the background color of a display
@@ -106,8 +114,6 @@ void lv_disp_set_bg_image(lv_disp_t * disp, const void  * img_src);
  */
 void lv_disp_set_bg_opa(lv_disp_t * disp, lv_opa_t opa);
 
-#if LV_USE_ANIMATION
-
 /**
  * Switch screen with animation
  * @param scr pointer to the new screen to load
@@ -118,7 +124,6 @@ void lv_disp_set_bg_opa(lv_disp_t * disp, lv_opa_t opa);
  */
 void lv_scr_load_anim(lv_obj_t * scr, lv_scr_load_anim_t anim_type, uint32_t time, uint32_t delay, bool auto_del);
 
-#endif
 /**
  * Get elapsed time since last user activity on a display (e.g. click)
  * @param disp pointer to an display (NULL to get the overall smallest inactivity)
@@ -139,12 +144,12 @@ void lv_disp_trig_activity(lv_disp_t * disp);
 void lv_disp_clean_dcache(lv_disp_t * disp);
 
 /**
- * Get a pointer to the screen refresher task to
- * modify its parameters with `lv_task_...` functions.
+ * Get a pointer to the screen refresher timer to
+ * modify its parameters with `lv_timer_...` functions.
  * @param disp pointer to a display
- * @return pointer to the display refresher task. (NULL on error)
+ * @return pointer to the display refresher timer. (NULL on error)
  */
-lv_task_t * _lv_disp_get_refr_task(lv_disp_t * disp);
+lv_timer_t * _lv_disp_get_refr_timer(lv_disp_t * disp);
 
 /*------------------------------------------------
  * To improve backward compatibility
@@ -161,7 +166,7 @@ static inline lv_obj_t * lv_scr_act(void)
 }
 
 /**
- * Get the top layer of the default display
+ * Get the top layer  of the default display
  * @return pointer to the top layer
  */
 static inline lv_obj_t * lv_layer_top(void)
@@ -171,7 +176,7 @@ static inline lv_obj_t * lv_layer_top(void)
 
 /**
  * Get the active screen of the default display
- * @return pointer to the sys layer
+ * @return  pointer to the sys layer
  */
 static inline lv_obj_t * lv_layer_sys(void)
 {
@@ -207,20 +212,34 @@ static inline void lv_scr_load(lv_obj_t * scr)
 #endif
 
 /**
- * Same as Android's DIP. (Different name is chosen to avoid mistype between LV_DPI and LV_DIP)
- * 1 dip is 1 px on a 160 DPI screen
- * 1 dip is 2 px on a 320 DPI screen
- * https://stackoverflow.com/questions/2025282/what-is-the-difference-between-px-dip-dp-and-sp
+ * Scale the given number of pixels (a distance or size) relative to a 160 DPI display
+ * considering the DPI of the default display.
+ * It ensures that e.g. `lv_dpx(100)` will have the same physical size regardless to the
+ * DPI of the display.
+ * @param n     the number of pixels to scale
+ * @return      `n x current_dpi/160`
  */
-#define LV_DPX(n)   (n == 0 ? 0 :LV_MATH_MAX((( lv_disp_get_dpi(NULL) * (n) + 80) / 160), 1)) /*+80 for rounding*/
-
 static inline lv_coord_t lv_dpx(lv_coord_t n)
 {
     return LV_DPX(n);
 }
 
+/**
+ * Scale the given number of pixels (a distance or size) relative to a 160 DPI display
+ * considering the DPI of the given display.
+ * It ensures that e.g. `lv_dpx(100)` will have the same physical size regardless to the
+ * DPI of the display.
+ * @param obj   an display whose dpi should be considered
+ * @param n     the number of pixels to scale
+ * @return      `n x current_dpi/160`
+ */
+static inline lv_coord_t lv_disp_dpx(const lv_disp_t * disp, lv_coord_t n)
+{
+    return _LV_DPX_CALC(lv_disp_get_dpi(disp), n);
+}
+
 #ifdef __cplusplus
-} /* extern "C" */
+} /*extern "C"*/
 #endif
 
 #endif /*LV_DISP_H*/

+ 419 - 0
components/lvgl/src/core/lv_event.c

@@ -0,0 +1,419 @@
+/**
+ * @file lv_event.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj.h"
+#include "lv_indev.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+typedef struct _lv_event_dsc_t{
+    lv_event_cb_t cb;
+    void * user_data;
+    lv_event_code_t filter :8;
+}lv_event_dsc_t;
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static lv_event_dsc_t * lv_obj_get_event_dsc(const lv_obj_t * obj, uint32_t id);
+static lv_res_t event_send_core(lv_event_t * e);
+static bool event_is_bubbled(lv_event_code_t e);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+static lv_event_t * event_head;
+
+/**********************
+ *      MACROS
+ **********************/
+#if LV_LOG_TRACE_EVENT
+#  define EVENT_TRACE(...) LV_LOG_TRACE( __VA_ARGS__)
+#else
+#  define EVENT_TRACE(...)
+#endif
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+lv_res_t lv_event_send(lv_obj_t * obj, lv_event_code_t event_code, void * param)
+{
+    if(obj == NULL) return LV_RES_OK;
+
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_event_t e;
+    e.target = obj;
+    e.current_target = obj;
+    e.code = event_code;
+    e.user_data = NULL;
+    e.param = param;
+    e.deleted = 0;
+
+
+    /*Build a simple linked list from the objects used in the events
+     *It's important to know if an this object was deleted by a nested event
+     *called from this `event_cb`.*/
+    e.prev = event_head;
+    event_head = &e;
+
+    /*Send the event*/
+    lv_res_t res = event_send_core(&e);
+
+    /*Remove this element from the list*/
+    event_head = e.prev;
+
+    return res;
+}
+
+
+lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e)
+{
+    const lv_obj_class_t * base;
+    if(class_p == NULL) base = e->current_target->class_p;
+    else base = class_p->base_class;
+
+    /*Find a base in which Call the ancestor's event handler_cb is set*/
+    while(base && base->event_cb == NULL) base = base->base_class;
+
+    if(base == NULL) return LV_RES_OK;
+    if(base->event_cb == NULL) return LV_RES_OK;
+
+    /*Call the actual event callback*/
+    e->user_data = NULL;
+    base->event_cb(base, e);
+
+    lv_res_t res = LV_RES_OK;
+    /*Stop if the object is deleted*/
+    if(e->deleted) res = LV_RES_INV;
+
+    return res;
+}
+
+
+lv_obj_t * lv_event_get_target(lv_event_t * e)
+{
+    return e->target;
+}
+
+lv_obj_t * lv_event_get_current_target(lv_event_t * e)
+{
+    return e->current_target;
+}
+
+lv_event_code_t lv_event_get_code(lv_event_t * e)
+{
+    return e->code;
+}
+
+void * lv_event_get_param(lv_event_t * e)
+{
+    return e->param;
+}
+
+void * lv_event_get_user_data(lv_event_t * e)
+{
+    return e->user_data;
+}
+
+
+uint32_t lv_event_register_id(void)
+{
+    static uint32_t last_id = _LV_EVENT_LAST;
+    last_id ++;
+    return last_id;
+}
+
+void _lv_event_mark_deleted(lv_obj_t * obj)
+{
+    lv_event_t * e = event_head;
+
+    while(e) {
+        if(e->current_target == obj || e->target == obj) e->deleted = 1;
+        e = e->prev;
+    }
+}
+
+
+struct _lv_event_dsc_t * lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    lv_obj_allocate_spec_attr(obj);
+
+    obj->spec_attr->event_dsc_cnt++;
+    obj->spec_attr->event_dsc = lv_mem_realloc(obj->spec_attr->event_dsc, obj->spec_attr->event_dsc_cnt * sizeof(lv_event_dsc_t));
+    LV_ASSERT_MALLOC(obj->spec_attr->event_dsc);
+
+    obj->spec_attr->event_dsc[obj->spec_attr->event_dsc_cnt - 1].cb = event_cb;
+    obj->spec_attr->event_dsc[obj->spec_attr->event_dsc_cnt - 1].filter = filter;
+    obj->spec_attr->event_dsc[obj->spec_attr->event_dsc_cnt - 1].user_data = user_data;
+
+    return &obj->spec_attr->event_dsc[obj->spec_attr->event_dsc_cnt - 1];
+}
+
+bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    if(obj->spec_attr == NULL) return false;
+
+    int32_t i = 0;
+    for(i = 0; i < obj->spec_attr->event_dsc_cnt; i++) {
+        if(obj->spec_attr->event_dsc[i].cb == event_cb) {
+            /*Shift the remaining event handlers forward*/
+            for(; i < (obj->spec_attr->event_dsc_cnt-1); i++) {
+                obj->spec_attr->event_dsc[i].cb = obj->spec_attr->event_dsc[i+1].cb;
+                obj->spec_attr->event_dsc[i].user_data = obj->spec_attr->event_dsc[i+1].user_data;
+            }
+            obj->spec_attr->event_dsc_cnt--;
+            obj->spec_attr->event_dsc = lv_mem_realloc(obj->spec_attr->event_dsc, obj->spec_attr->event_dsc_cnt * sizeof(lv_event_dsc_t));
+            LV_ASSERT_MALLOC(obj->spec_attr->event_dsc);
+            return true;
+        }
+    }
+
+    /*No event handler found*/
+    return false;
+}
+
+bool lv_obj_remove_event_dsc(lv_obj_t * obj, struct _lv_event_dsc_t * event_dsc)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    if(obj->spec_attr == NULL) return false;
+
+    int32_t i = 0;
+    for(i = 0; i < obj->spec_attr->event_dsc_cnt; i++) {
+        if(&obj->spec_attr->event_dsc[i] == event_dsc) {
+            /*Shift the remaining event handlers forward*/
+            for(; i < (obj->spec_attr->event_dsc_cnt-1); i++) {
+                obj->spec_attr->event_dsc[i].cb = obj->spec_attr->event_dsc[i+1].cb;
+                obj->spec_attr->event_dsc[i].user_data = obj->spec_attr->event_dsc[i+1].user_data;
+            }
+            obj->spec_attr->event_dsc_cnt--;
+            obj->spec_attr->event_dsc = lv_mem_realloc(obj->spec_attr->event_dsc, obj->spec_attr->event_dsc_cnt * sizeof(lv_event_dsc_t));
+            LV_ASSERT_MALLOC(obj->spec_attr->event_dsc);
+            return true;
+        }
+    }
+
+    /*No event handler found*/
+    return false;
+}
+
+lv_indev_t * lv_event_get_indev(lv_event_t * e)
+{
+
+    if(e->code == LV_EVENT_PRESSED ||
+        e->code == LV_EVENT_PRESSING ||
+        e->code == LV_EVENT_PRESS_LOST ||
+        e->code == LV_EVENT_SHORT_CLICKED ||
+        e->code == LV_EVENT_LONG_PRESSED ||
+        e->code == LV_EVENT_LONG_PRESSED_REPEAT ||
+        e->code == LV_EVENT_CLICKED ||
+        e->code == LV_EVENT_RELEASED ||
+        e->code == LV_EVENT_SCROLL_BEGIN ||
+        e->code == LV_EVENT_SCROLL_END ||
+        e->code == LV_EVENT_SCROLL ||
+        e->code == LV_EVENT_GESTURE ||
+        e->code == LV_EVENT_KEY ||
+        e->code == LV_EVENT_FOCUSED ||
+        e->code == LV_EVENT_DEFOCUSED ||
+        e->code == LV_EVENT_LEAVE)
+    {
+        return lv_event_get_param(e);
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return NULL;
+    }
+}
+
+lv_obj_draw_part_dsc_t * lv_event_get_draw_part_dsc(lv_event_t * e)
+{
+    if(e->code == LV_EVENT_DRAW_PART_BEGIN||
+        e->code == LV_EVENT_DRAW_PART_END)
+    {
+        return lv_event_get_param(e);
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return NULL;
+    }
+}
+
+const lv_area_t * lv_event_get_clip_area(lv_event_t * e)
+{
+    if(e->code == LV_EVENT_DRAW_MAIN ||
+        e->code == LV_EVENT_DRAW_MAIN_BEGIN ||
+        e->code == LV_EVENT_DRAW_MAIN_END ||
+        e->code == LV_EVENT_DRAW_POST ||
+        e->code == LV_EVENT_DRAW_POST_BEGIN ||
+        e->code == LV_EVENT_DRAW_POST_END)
+    {
+        return lv_event_get_param(e);
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return NULL;
+    }
+}
+
+const lv_area_t * lv_event_get_old_size(lv_event_t * e)
+{
+    if(e->code == LV_EVENT_SIZE_CHANGED) {
+        return lv_event_get_param(e);
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return NULL;
+    }
+}
+
+uint32_t lv_event_get_key(lv_event_t * e)
+{
+    if(e->code == LV_EVENT_KEY) {
+        uint32_t * k = lv_event_get_param(e);
+        if(k) return *k;
+        else return 0;
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return 0;
+    }
+}
+
+void lv_event_set_ext_draw_size(lv_event_t * e, lv_coord_t size)
+{
+    if(e->code == LV_EVENT_REFR_EXT_DRAW_SIZE) {
+        lv_coord_t * cur_size = lv_event_get_param(e);
+        *cur_size = LV_MAX(*cur_size, size);
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+    }
+}
+
+lv_point_t * lv_event_get_self_size_info(lv_event_t * e)
+{
+    if(e->code == LV_EVENT_GET_SELF_SIZE) {
+        return lv_event_get_param(e);
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return 0;
+    }
+}
+
+lv_hit_test_info_t * lv_event_get_hit_test_info(lv_event_t * e)
+{
+    if(e->code == LV_EVENT_HIT_TEST) {
+        return lv_event_get_param(e);
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return 0;
+    }
+}
+
+const lv_area_t * lv_event_get_cover_area(lv_event_t * e)
+{
+    if(e->code == LV_EVENT_COVER_CHECK) {
+        lv_cover_check_info_t * p = lv_event_get_param(e);
+        return p->area;
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+        return NULL;
+    }
+}
+
+void lv_event_set_cover_res(lv_event_t * e, lv_cover_res_t res)
+{
+    if(e->code == LV_EVENT_COVER_CHECK) {
+        lv_cover_check_info_t * p = lv_event_get_param(e);
+        if(res > p->res) p->res = res;  /*Save only "stronger" results*/
+    } else {
+        LV_LOG_WARN("Not interpreted with this event code");
+    }
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+static lv_event_dsc_t * lv_obj_get_event_dsc(const lv_obj_t * obj, uint32_t id)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    if(!obj->spec_attr) return NULL;
+    if(id >= obj->spec_attr->event_dsc_cnt) return NULL;
+
+    return &obj->spec_attr->event_dsc[id];
+}
+
+static lv_res_t event_send_core(lv_event_t * e)
+{
+    EVENT_TRACE("Sending event %d to %p with %p param", e->code, e->current_target, e->param);
+
+    /*Call the input device's feedback callback if set*/
+    lv_indev_t * indev_act = lv_indev_get_act();
+    if(indev_act) {
+        if(indev_act->driver->feedback_cb) indev_act->driver->feedback_cb(indev_act->driver, e->code);
+    }
+
+    lv_event_dsc_t * event_dsc = lv_obj_get_event_dsc(e->current_target, 0);
+    lv_res_t res = LV_RES_OK;
+    res = lv_obj_event_base(NULL, e);
+
+    uint32_t i = 0;
+    while(event_dsc && res == LV_RES_OK) {
+        if(event_dsc->cb && (event_dsc->filter == LV_EVENT_ALL || event_dsc->filter == e->code)) {
+            e->user_data = event_dsc->user_data;
+            event_dsc->cb(e);
+
+            /*Stop if the object is deleted*/
+            if(e->deleted) return LV_RES_INV;
+        }
+
+        i++;
+        event_dsc = lv_obj_get_event_dsc(e->current_target, i);
+    }
+
+    if(res == LV_RES_OK && event_is_bubbled(e->code)) {
+        if(lv_obj_has_flag(e->current_target, LV_OBJ_FLAG_EVENT_BUBBLE) && e->current_target->parent) {
+            e->current_target = e->current_target->parent;
+            res = event_send_core(e);
+            if(res != LV_RES_OK) return LV_RES_INV;
+        }
+    }
+
+    return res;
+}
+
+static bool event_is_bubbled(lv_event_code_t e)
+{
+    switch(e) {
+    case LV_EVENT_HIT_TEST:
+    case LV_EVENT_COVER_CHECK:
+    case LV_EVENT_REFR_EXT_DRAW_SIZE:
+    case LV_EVENT_DRAW_MAIN_BEGIN:
+    case LV_EVENT_DRAW_MAIN:
+    case LV_EVENT_DRAW_MAIN_END:
+    case LV_EVENT_DRAW_POST_BEGIN:
+    case LV_EVENT_DRAW_POST:
+    case LV_EVENT_DRAW_POST_END:
+    case LV_EVENT_DRAW_PART_BEGIN:
+    case LV_EVENT_DRAW_PART_END:
+    case LV_EVENT_REFRESH:
+    case LV_EVENT_DELETE:
+    case LV_EVENT_CHILD_CHANGED:
+    case LV_EVENT_SIZE_CHANGED:
+    case LV_EVENT_STYLE_CHANGED:
+    case LV_EVENT_GET_SELF_SIZE:
+        return false;
+    default:
+        return true;
+    }
+}

+ 311 - 0
components/lvgl/src/core/lv_event.h

@@ -0,0 +1,311 @@
+/**
+ * @file lv_templ.h
+ *
+ */
+
+#ifndef LV_EVENT_H
+#define LV_EVENT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include <stdbool.h>
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+struct _lv_obj_t;
+struct _lv_event_dsc_t;
+
+/**
+ * Type of event being sent to the object.
+ */
+typedef enum {
+    LV_EVENT_ALL = 0,
+
+    /** Input device events*/
+    LV_EVENT_PRESSED,             /**< The object has been pressed*/
+    LV_EVENT_PRESSING,            /**< The object is being pressed (called continuously while pressing)*/
+    LV_EVENT_PRESS_LOST,          /**< The object is still being pressed but slid cursor/finger off of the object */
+    LV_EVENT_SHORT_CLICKED,       /**< The object was pressed for a short period of time, then released it. Not called if scrolled.*/
+    LV_EVENT_LONG_PRESSED,        /**< Object has been pressed for at least `long_press_time`.  Not called if scrolled.*/
+    LV_EVENT_LONG_PRESSED_REPEAT, /**< Called after `long_press_time` in every `long_press_repeat_time` ms.  Not called if scrolled.*/
+    LV_EVENT_CLICKED,             /**< Called on release if not scrolled (regardless to long press)*/
+    LV_EVENT_RELEASED,            /**< Called in every cases when the object has been released*/
+    LV_EVENT_SCROLL_BEGIN,        /**< Scrolling begins*/
+    LV_EVENT_SCROLL_END,          /**< Scrolling ends*/
+    LV_EVENT_SCROLL,              /**< Scrolling*/
+    LV_EVENT_GESTURE,             /**< A gesture is detected. Get the gesture with `lv_indev_get_gesture_dir(lv_indev_get_act());` */
+    LV_EVENT_KEY,                 /**< A key is sent to the object. Get the key with `lv_indev_get_key(lv_indev_get_act());`*/
+    LV_EVENT_FOCUSED,             /**< The object is focused*/
+    LV_EVENT_DEFOCUSED,           /**< The object is defocused*/
+    LV_EVENT_LEAVE,               /**< The object is defocused but still selected*/
+    LV_EVENT_HIT_TEST,            /**< Perform advanced hit-testing*/
+
+    /** Drawing events*/
+    LV_EVENT_COVER_CHECK,        /**< Check if the object fully covers an area. The event parameter is `lv_cover_check_info_t *`.*/
+    LV_EVENT_REFR_EXT_DRAW_SIZE, /**< Get the required extra draw area around the object (e.g. for shadow). The event parameter is `lv_coord_t *` to store the size.*/
+    LV_EVENT_DRAW_MAIN_BEGIN,    /**< Starting the main drawing phase*/
+    LV_EVENT_DRAW_MAIN,          /**< Perform the main drawing*/
+    LV_EVENT_DRAW_MAIN_END,      /**< Finishing the main drawing phase*/
+    LV_EVENT_DRAW_POST_BEGIN,    /**< Starting the post draw phase (when all children are drawn)*/
+    LV_EVENT_DRAW_POST,          /**< Perform the post draw phase (when all children are drawn)*/
+    LV_EVENT_DRAW_POST_END,      /**< Finishing the post draw phase (when all children are drawn)*/
+    LV_EVENT_DRAW_PART_BEGIN,    /**< Starting to draw a part. The event parameter is `lv_obj_draw_dsc_t *`. */
+    LV_EVENT_DRAW_PART_END,      /**< Finishing to draw a part. The event parameter is `lv_obj_draw_dsc_t *`. */
+
+    /** Special events*/
+    LV_EVENT_VALUE_CHANGED,       /**< The object's value has changed (i.e. slider moved)*/
+    LV_EVENT_INSERT,              /**< A text is inserted to the object. The event data is `char *` being inserted.*/
+    LV_EVENT_REFRESH,             /**< Notify the object to refresh something on it (for the user)*/
+    LV_EVENT_READY,               /**< A process has finished*/
+    LV_EVENT_CANCEL,              /**< A process has been cancelled */
+
+    /** Other events*/
+    LV_EVENT_DELETE,              /**< Object is being deleted*/
+    LV_EVENT_CHILD_CHANGED,       /**< Child was removed/added*/
+    LV_EVENT_SIZE_CHANGED,        /**< Object coordinates/size have changed*/
+    LV_EVENT_STYLE_CHANGED,       /**< Object's style has changed*/
+    LV_EVENT_LAYOUT_CHANGED,      /**< The children position has changed due to a layout recalculation*/
+    LV_EVENT_GET_SELF_SIZE,       /**< Get the internal size of a widget*/
+
+    _LV_EVENT_LAST                /** Number of default events*/
+}lv_event_code_t;
+
+typedef struct _lv_event_t {
+    struct _lv_obj_t * target;
+    struct _lv_obj_t * current_target;
+    lv_event_code_t code;
+    void * user_data;
+    void * param;
+    struct _lv_event_t * prev;
+    uint8_t deleted :1;
+}lv_event_t;
+
+/**
+ * @brief Event callback.
+ * Events are used to notify the user of some action being taken on the object.
+ * For details, see ::lv_event_t.
+ */
+typedef void (*lv_event_cb_t)(lv_event_t * e);
+
+/**
+ * Used as the event parameter of ::LV_EVENT_HIT_TEST to check if an `point` can click the object or not.
+ * `res` should be set like this:
+ *   - If already set to `false` an other event wants that point non clickable. If you want to respect it leave it as `false` or set `true` to overwrite it.
+ *   - If already set `true` and `point` shouldn't be clickable set to `false`
+ *   - If already set to `true` you agree that `point` can click the object leave it as `true`
+ */
+typedef struct {
+    const lv_point_t * point;   /**< A point relative to screen to check if it can click the object or not*/
+    bool res;                   /**< true: `point` can click the object; false: it cannot*/
+} lv_hit_test_info_t;
+
+/**
+ * Used as the event parameter of ::LV_EVENT_COVER_CHECK to check if an area is covered by the object or not.
+ * In the event use `const lv_area_t * area = lv_event_get_cover_area(e)` to get the area to check
+ * and `lv_event_set_cover_res(e, res)` to set the result.
+ */
+typedef struct {
+    lv_cover_res_t res;
+    const lv_area_t * area;
+} lv_cover_check_info_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Send an event to the object
+ * @param obj           pointer to an object
+ * @param event_code    the type of the event from `lv_event_t`
+ * @param param         arbitrary data depending on the widget type and the event. (Usually `NULL`)
+ * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event_code
+ */
+lv_res_t lv_event_send(struct _lv_obj_t * obj, lv_event_code_t event_code, void * param);
+
+/**
+ * Used by the widgets internally to call the ancestor widget types's event handler
+ * @param class_p   pointer to the class of the widget (NOT the ancestor class)
+ * @param e         pointer to the event descriptor
+ * @return          LV_RES_OK: the taget object was not deleted in the event; LV_RES_INV: it was deleted in the event_code
+ */
+lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e);
+
+/**
+ * Get the object originally targeted by the event. It's the same even if the event is bubbled.
+ * @param e     pointer to the event descriptor
+ * @return      the target of the event_code
+ */
+struct _lv_obj_t * lv_event_get_target(lv_event_t * e);
+
+/**
+ * Get the current target of the event. It's the object which event handler being called.
+ * If the event is not bubbled it's the same as "normal" target.
+ * @param e     pointer to the event descriptor
+ * @return      pointer to the current target of the event_code
+ */
+struct _lv_obj_t * lv_event_get_current_target(lv_event_t * e);
+
+/**
+ * Get the event code of an event
+ * @param e     pointer to the event descriptor
+ * @return      the event code. (E.g. `LV_EVENT_CLICKED`, `LV_EVENT_FOCUSED`, etc)
+ */
+lv_event_code_t lv_event_get_code(lv_event_t * e);
+
+/**
+ * Get the parameter passed when the event was sent
+ * @param e     pointer to the event descriptor
+ * @return      pointer to the parameter
+ */
+void * lv_event_get_param(lv_event_t * e);
+
+/**
+ * Get the user_data passed when the event was registered on the object
+ * @param e     pointer to the event descriptor
+ * @return      pointer to the user_data
+ */
+void * lv_event_get_user_data(lv_event_t * e);
+
+
+/**
+ * Register a new, custom event ID.
+ * It can be used the same way as e.g. `LV_EVENT_CLICKED` to send custom events
+ * @return      the new event id
+ * @example
+ * uint32_t LV_EVENT_MINE = 0;
+ * ...
+ * e = lv_event_register_id();
+ * ...
+ * lv_event_send(obj, LV_EVENT_MINE, &some_data);
+ */
+uint32_t lv_event_register_id(void);
+
+/**
+ * Nested events can be called and one of them might belong to an object that is being deleted.
+ * Mark this object's `event_temp_data` deleted to know that it's `lv_event_send` should return `LV_RES_INV`
+ * @param obj pointer to an obejct to mark as deleted
+ */
+void _lv_event_mark_deleted(struct _lv_obj_t * obj);
+
+
+/**
+ * Add an event handler function for an object.
+ * Used by the user to react on event which happens with the object.
+ * An object can have multiple event handler. They will be called in the same order as they were added.
+ * @param obj       pointer to an object
+ * @param filter    and event code (e.g. `LV_EVENT_CLICKED`) on which the event should be called. `LV_EVENT_ALL` can be sued the receive all the events.
+ * @param event_cb  the new event function
+ * @param           user_data custom data data will be available in `event_cb`
+ * @return          a pointer the event descriptor. Can be used in ::lv_obj_remove_event_dsc
+ */
+struct _lv_event_dsc_t * lv_obj_add_event_cb(struct _lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data);
+
+/**
+ * Remove an event handler function for an object.
+ * @param obj       pointer to an object
+ * @param event_cb  the event function to remove
+ * @return          true if any event handlers were removed
+ */
+bool lv_obj_remove_event_cb(struct _lv_obj_t * obj, lv_event_cb_t event_cb);
+
+/**
+ * Remove an event handler function for an object.
+ * @param obj       pointer to an object
+ * @param event_dsc pointer to an event descriptor to remove (returned by ::lv_obj_add_event_cb)
+ * @return          true if any event handlers were removed
+ */
+bool lv_obj_remove_event_dsc(struct _lv_obj_t * obj, struct _lv_event_dsc_t * event_dsc);
+
+/**
+ * Get the input device passed as parameter to indev related events.
+ * @param e     pointer to an event
+ * @return      the indev that triggered the event or NULL if called on a not indev related event
+ */
+lv_indev_t * lv_event_get_indev(lv_event_t * e);
+
+/**
+ * Get the part draw descriptor passed as parameter to `LV_EVENT_DRAW_PART_BEGIN/END`.
+ * @param e     pointer to an event
+ * @return      the part draw descriptor to hook the drawing or NULL if called on an unrelated event
+ */
+lv_obj_draw_part_dsc_t * lv_event_get_draw_part_dsc(lv_event_t * e);
+
+/**
+ * Get the clip area passed as parameter to draw events events.
+ * Namely: `LV_EVENT_DRAW_MAIN/POST`, `LV_EVENT_DRAW_MAIN/POST_BEGIN`, `LV_EVENT_DRAW_MAIN/POST_END`
+ * @param e     pointer to an event
+ * @return      the clip area to use during drawing or NULL if called on an unrelated event
+ */
+const lv_area_t * lv_event_get_clip_area(lv_event_t * e);
+
+/**
+ * Get the old area of the object before its size was changed. Can be used in `LV_EVENT_SIZE_CHANGED`
+ * @param e     pointer to an event
+ * @return      the old absolute area of the object or NULL if called on an unrelated event
+ */
+const lv_area_t * lv_event_get_old_size(lv_event_t * e);
+
+/**
+ * Get the key passed as parameter to an event. Can be used in `LV_EVENT_KEY`
+ * @param e     pointer to an event
+ * @return      the triggering key or NULL if called on an unrelated event
+ */
+uint32_t lv_event_get_key(lv_event_t * e);
+
+/**
+ * Set the new extra draw size. Can be used in `LV_EVENT_REFR_EXT_DRAW_SIZE`
+ * @param e     pointer to an event
+ * @param size  The new extra draw size
+ */
+void lv_event_set_ext_draw_size(lv_event_t * e, lv_coord_t size);
+
+/**
+ * Get a pointer to an `lv_point_t` variable in which the self size should be saved (width in `point->x` and height `point->y`).
+ * Can be used in `LV_EVENT_GET_SELF_SIZE`
+ * @param e     pointer to an event
+ * @return      pointer to `lv_point_t` or NULL if called on an unrelated event
+ */
+lv_point_t * lv_event_get_self_size_info(lv_event_t * e);
+
+/**
+ * Get a pointer to an `lv_hit_test_info_t` variable in which the hit test result should be saved. Can be used in `LV_EVENT_HIT_TEST`
+ * @param e     pointer to an event
+ * @return      pointer to `lv_hit_test_info_t` or NULL if called on an unrelated event
+ */
+lv_hit_test_info_t * lv_event_get_hit_test_info(lv_event_t * e);
+
+/**
+ * Get a pointer to an area which should be examined whether the object fully covers it or not.
+ * Can be used in `LV_EVENT_HIT_TEST`
+ * @param e     pointer to an event
+ * @return      an area with absolute coordinates to check
+ */
+const lv_area_t * lv_event_get_cover_area(lv_event_t * e);
+
+/**
+ * Set the result of cover checking. Can be used in `LV_EVENT_COVER_CHECK`
+ * @param e     pointer to an event
+ * @param res   an element of ::lv_cover_check_info_t
+ */
+void lv_event_set_cover_res(lv_event_t * e, lv_cover_res_t res);
+
+/**********************
+ *      MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_EVENT_H*/

+ 98 - 191
components/lvgl/src/lv_core/lv_group.c → components/lvgl/src/core/lv_group.c

@@ -6,12 +6,12 @@
 /*********************
  *      INCLUDES
  *********************/
-#include "lv_group.h"
-#if LV_USE_GROUP != 0
 #include <stddef.h>
-#include "../lv_misc/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_gc.h"
+
+#include "lv_group.h"
+#include "../misc/lv_gc.h"
+#include "../core/lv_obj.h"
+#include "../core/lv_indev.h"
 
 /*********************
  *      DEFINES
@@ -27,11 +27,12 @@
 static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *),
                             void * (*move)(const lv_ll_t *, const void *));
 static void lv_group_refocus(lv_group_t * g);
-static void obj_to_foreground(lv_obj_t * obj);
+static lv_indev_t * get_indev(const lv_group_t * g);
 
 /**********************
  *  STATIC VARIABLES
  **********************/
+static lv_group_t * default_group;
 
 /**********************
  *      MACROS
@@ -41,56 +42,44 @@ static void obj_to_foreground(lv_obj_t * obj);
  *   GLOBAL FUNCTIONS
  **********************/
 
-/**
- * Init. the group module
- */
 void _lv_group_init(void)
 {
     _lv_ll_init(&LV_GC_ROOT(_lv_group_ll), sizeof(lv_group_t));
 }
 
-/**
- * Create a new object group
- * @return pointer to the new object group
- */
 lv_group_t * lv_group_create(void)
 {
     lv_group_t * group = _lv_ll_ins_head(&LV_GC_ROOT(_lv_group_ll));
-    LV_ASSERT_MEM(group);
+    LV_ASSERT_MALLOC(group);
     if(group == NULL) return NULL;
     _lv_ll_init(&group->obj_ll, sizeof(lv_obj_t *));
 
     group->obj_focus      = NULL;
     group->frozen         = 0;
     group->focus_cb       = NULL;
-    group->click_focus    = 1;
     group->editing        = 0;
     group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV;
     group->wrap           = 1;
 
 #if LV_USE_USER_DATA
-    _lv_memset_00(&group->user_data, sizeof(lv_group_user_data_t));
+    group->user_data = NULL;
 #endif
 
     return group;
 }
 
-/**
- * Delete a group object
- * @param group pointer to a group
- */
 void lv_group_del(lv_group_t * group)
 {
     /*Defocus the currently focused object*/
     if(group->obj_focus != NULL) {
-        (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
+        lv_event_send(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group));
         lv_obj_invalidate(*group->obj_focus);
     }
 
     /*Remove the objects from the group*/
     lv_obj_t ** obj;
-    _LV_LL_READ(group->obj_ll, obj) {
-        (*obj)->group_p = NULL;
+    _LV_LL_READ(&group->obj_ll, obj) {
+        if((*obj)->spec_attr) (*obj)->spec_attr->group_p = NULL;
     }
 
     _lv_ll_clear(&(group->obj_ll));
@@ -98,61 +87,72 @@ void lv_group_del(lv_group_t * group)
     lv_mem_free(group);
 }
 
-/**
- * Add an object to a group
- * @param group pointer to a group
- * @param obj pointer to an object to add
- */
+void lv_group_set_default(lv_group_t * group)
+{
+    default_group = group;
+}
+
+lv_group_t * lv_group_get_default(void)
+{
+    return default_group;
+}
+
 void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj)
 {
     if(group == NULL) return;
+
+    LV_LOG_TRACE("begin");
+
     /*Do not add the object twice*/
     lv_obj_t ** obj_i;
-    _LV_LL_READ(group->obj_ll, obj_i) {
+    _LV_LL_READ(&group->obj_ll, obj_i) {
         if((*obj_i) == obj) {
-            LV_LOG_INFO("lv_group_add_obj: the object is already added to this group");
+            LV_LOG_INFO("the object is already added to this group");
             return;
         }
     }
 
-    /*If the object is already in a group and focused then defocus it*/
-    if(obj->group_p) {
-        if(lv_obj_is_focused(obj)) {
-            lv_group_refocus(obj->group_p);
+    /*If the object is already in a group and focused then refocus it*/
+    lv_group_t * group_cur = lv_obj_get_group(obj);
+    if(group_cur) {
+        if(obj->spec_attr->group_p && *(obj->spec_attr->group_p->obj_focus) == obj) {
+            lv_group_refocus(group_cur);
 
-            LV_LOG_INFO("lv_group_add_obj: assign object to an other group");
+            LV_LOG_INFO("changing object's group");
         }
     }
 
-    obj->group_p     = group;
+    if(obj->spec_attr == NULL) lv_obj_allocate_spec_attr(obj);
+    obj->spec_attr->group_p = group;
+
     lv_obj_t ** next = _lv_ll_ins_tail(&group->obj_ll);
-    LV_ASSERT_MEM(next);
+    LV_ASSERT_MALLOC(next);
     if(next == NULL) return;
     *next = obj;
 
-    /* If the head and the tail is equal then there is only one object in the linked list.
-     * In this case automatically activate it*/
+    /*If the head and the tail is equal then there is only one object in the linked list.
+     *In this case automatically activate it*/
     if(_lv_ll_get_head(&group->obj_ll) == next) {
         lv_group_refocus(group);
     }
+
+    LV_LOG_TRACE("finished");
 }
 
-/**
- * Remove an object from its group
- * @param obj pointer to an object to remove
- */
 void lv_group_remove_obj(lv_obj_t * obj)
 {
-    lv_group_t * g = obj->group_p;
+    lv_group_t * g = lv_obj_get_group(obj);
     if(g == NULL) return;
 
+    LV_LOG_TRACE("begin");
+
     /*Focus on the next object*/
-    if(*g->obj_focus == obj) {
+    if(g->obj_focus && *g->obj_focus == obj) {
         if(g->frozen) g->frozen = 0;
 
         /*If this is the only object in the group then focus to nothing.*/
         if(_lv_ll_get_head(&g->obj_ll) == g->obj_focus && _lv_ll_get_tail(&g->obj_ll) == g->obj_focus) {
-            (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
+            lv_event_send(*g->obj_focus, LV_EVENT_DEFOCUSED, get_indev(g));
         }
         /*If there more objects in the group then focus to the next/prev object*/
         else {
@@ -160,55 +160,48 @@ void lv_group_remove_obj(lv_obj_t * obj)
         }
     }
 
-    /* If the focuses object is still the same then it was the only object in the group but it will
-     * be deleted. Set the `obj_focus` to NULL to get back to the initial state of the group with
-     * zero objects*/
-    if(*g->obj_focus == obj) {
+    /*If the focuses object is still the same then it was the only object in the group but it will
+     *be deleted. Set the `obj_focus` to NULL to get back to the initial state of the group with
+     *zero objects*/
+    if(g->obj_focus && *g->obj_focus == obj) {
         g->obj_focus = NULL;
     }
 
-    /*Search the object and remove it from its group */
+    /*Search the object and remove it from its group*/
     lv_obj_t ** i;
-    _LV_LL_READ(g->obj_ll, i) {
+    _LV_LL_READ(&g->obj_ll, i) {
         if(*i == obj) {
             _lv_ll_remove(&g->obj_ll, i);
             lv_mem_free(i);
-            obj->group_p = NULL;
+            if(obj->spec_attr) obj->spec_attr->group_p = NULL;
             break;
         }
     }
+    LV_LOG_TRACE("finished");
 }
 
-/**
- * Remove all objects from a group
- * @param group pointer to a group
- */
 void lv_group_remove_all_objs(lv_group_t * group)
 {
     /*Defocus the currently focused object*/
     if(group->obj_focus != NULL) {
-        (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
+        lv_event_send(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group));
         lv_obj_invalidate(*group->obj_focus);
         group->obj_focus = NULL;
     }
 
     /*Remove the objects from the group*/
     lv_obj_t ** obj;
-    _LV_LL_READ(group->obj_ll, obj) {
-        (*obj)->group_p = NULL;
+    _LV_LL_READ(&group->obj_ll, obj) {
+        if((*obj)->spec_attr) (*obj)->spec_attr->group_p = NULL;
     }
 
     _lv_ll_clear(&(group->obj_ll));
 }
 
-/**
- * Focus on an object (defocus the current)
- * @param obj pointer to an object to focus on
- */
 void lv_group_focus_obj(lv_obj_t * obj)
 {
     if(obj == NULL) return;
-    lv_group_t * g = obj->group_p;
+    lv_group_t * g = lv_obj_get_group(obj);
     if(g == NULL) return;
 
     if(g->frozen != 0) return;
@@ -219,11 +212,10 @@ void lv_group_focus_obj(lv_obj_t * obj)
     lv_group_set_editing(g, false);
 
     lv_obj_t ** i;
-    _LV_LL_READ(g->obj_ll, i) {
+    _LV_LL_READ(&g->obj_ll, i) {
         if(*i == obj) {
             if(g->obj_focus != NULL) {
-                (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
-                lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_DEFOCUSED, NULL);
+                lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_DEFOCUSED, get_indev(g));
                 if(res != LV_RES_OK) return;
                 lv_obj_invalidate(*g->obj_focus);
             }
@@ -231,57 +223,32 @@ void lv_group_focus_obj(lv_obj_t * obj)
             g->obj_focus = i;
 
             if(g->obj_focus != NULL) {
-                (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_FOCUS, NULL);
                 if(g->focus_cb) g->focus_cb(g);
-                lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_FOCUSED, NULL);
+                lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_FOCUSED, get_indev(g));
                 if(res != LV_RES_OK) return;
                 lv_obj_invalidate(*g->obj_focus);
-
-                /*If the object or its parent has `top == true` bring it to the foreground*/
-                obj_to_foreground(*g->obj_focus);
             }
             break;
         }
     }
 }
 
-/**
- * Focus the next object in a group (defocus the current)
- * @param group pointer to a group
- */
 void lv_group_focus_next(lv_group_t * group)
 {
     focus_next_core(group, _lv_ll_get_head, _lv_ll_get_next);
 }
 
-/**
- * Focus the previous object in a group (defocus the current)
- * @param group pointer to a group
- */
 void lv_group_focus_prev(lv_group_t * group)
 {
     focus_next_core(group, _lv_ll_get_tail, _lv_ll_get_prev);
 }
 
-/**
- * Do not let to change the focus from the current object
- * @param group pointer to a group
- * @param en true: freeze, false: release freezing (normal mode)
- */
 void lv_group_focus_freeze(lv_group_t * group, bool en)
 {
-    if(en == false)
-        group->frozen = 0;
-    else
-        group->frozen = 1;
+    if(en == false) group->frozen = 0;
+    else group->frozen = 1;
 }
 
-/**
- * Send a control character to the focuses object of a group
- * @param group pointer to a group
- * @param c a character (use LV_KEY_.. to navigate)
- * @return result of focused object in group.
- */
 lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c)
 {
     lv_obj_t * act = lv_group_get_focused(group);
@@ -289,30 +256,17 @@ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c)
 
     lv_res_t res;
 
-    res = act->signal_cb(act, LV_SIGNAL_CONTROL, &c);
-    if(res != LV_RES_OK) return res;
-
     res = lv_event_send(act, LV_EVENT_KEY, &c);
     if(res != LV_RES_OK) return res;
 
     return res;
 }
 
-/**
- * Set a function for a group which will be called when a new object is focused
- * @param group pointer to a group
- * @param focus_cb the call back function or NULL if unused
- */
 void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb)
 {
     group->focus_cb = focus_cb;
 }
 
-/**
- * Manually set the current mode (edit or navigate).
- * @param group pointer to group
- * @param edit: true: edit mode; false: navigate mode
- */
 void lv_group_set_editing(lv_group_t * group, bool edit)
 {
     if(group == NULL) return;
@@ -324,44 +278,23 @@ void lv_group_set_editing(lv_group_t * group, bool edit)
     lv_obj_t * focused = lv_group_get_focused(group);
 
     if(focused) {
-        focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave/open edit/navigate mode*/
-        lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL);
+        lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, get_indev(group));
         if(res != LV_RES_OK) return;
 
         lv_obj_invalidate(focused);
     }
 }
 
-/**
- * Set the `click_focus` attribute. If enabled then the object will be focused then it is clicked.
- * @param group pointer to group
- * @param en: true: enable `click_focus`
- */
-void lv_group_set_click_focus(lv_group_t * group, bool en)
-{
-    group->click_focus = en ? 1 : 0;
-}
-
 void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy)
 {
     group->refocus_policy = policy & 0x01;
 }
 
-/**
- * Set whether focus next/prev will allow wrapping from first->last or last->first.
- * @param group pointer to group
- * @param en: true: enable `wrap`
- */
 void lv_group_set_wrap(lv_group_t * group, bool en)
 {
     group->wrap = en ? 1 : 0;
 }
 
-/**
- * Get the focused object or NULL if there isn't one
- * @param group pointer to a group
- * @return pointer to the focused object
- */
 lv_obj_t * lv_group_get_focused(const lv_group_t * group)
 {
     if(!group) return NULL;
@@ -370,62 +303,28 @@ lv_obj_t * lv_group_get_focused(const lv_group_t * group)
     return *group->obj_focus;
 }
 
-#if LV_USE_USER_DATA
-/**
- * Get a pointer to the group's user data
- * @param group pointer to an group
- * @return pointer to the user data
- */
-lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group)
-{
-    return &group->user_data;
-}
-#endif
-
-/**
- * Get the focus callback function of a group
- * @param group pointer to a group
- * @return the call back function or NULL if not set
- */
 lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group)
 {
     if(!group) return NULL;
     return group->focus_cb;
 }
 
-/**
- * Get the current mode (edit or navigate).
- * @param group pointer to group
- * @return true: edit mode; false: navigate mode
- */
 bool lv_group_get_editing(const lv_group_t * group)
 {
     if(!group) return false;
     return group->editing ? true : false;
 }
 
-/**
- * Get the `click_focus` attribute.
- * @param group pointer to group
- * @return true: `click_focus` is enabled; false: disabled
- */
-bool lv_group_get_click_focus(const lv_group_t * group)
-{
-    if(!group) return false;
-    return group->click_focus ? true : false;
-}
-
-/**
- * Get whether focus next/prev will allow wrapping from first->last or last->first object.
- * @param group pointer to group
- * @param en: true: wrapping enabled; false: wrapping disabled
- */
 bool lv_group_get_wrap(lv_group_t * group)
 {
     if(!group) return false;
     return group->wrap ? true : false;
 }
 
+uint32_t lv_group_get_obj_count(lv_group_t * group)
+{
+    return _lv_ll_get_len(&group->obj_ll);
+}
 /**********************
  *   STATIC FUNCTIONS
  **********************/
@@ -483,49 +382,57 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *)
         can_move = true;
 
         if(obj_next == NULL) continue;
-        if(lv_obj_get_state(*obj_next, LV_OBJ_PART_MAIN) & LV_STATE_DISABLED) continue;
+        if(lv_obj_get_state(*obj_next) & LV_STATE_DISABLED) continue;
 
-        /*Hidden and disabled objects don't receive focus*/
-        if(!lv_obj_get_hidden(*obj_next)) break;
+        /*Hidden objects don't receive focus*/
+        if(lv_obj_has_flag(*obj_next, LV_OBJ_FLAG_HIDDEN) == false) break;
     }
 
     if(obj_next == group->obj_focus) return; /*There's only one visible object and it's already focused*/
 
     if(group->obj_focus) {
-        (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
-        lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_DEFOCUSED, NULL);
+        lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group));
         if(res != LV_RES_OK) return;
         lv_obj_invalidate(*group->obj_focus);
     }
 
     group->obj_focus = obj_next;
 
-    (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
-    lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL);
+    lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, get_indev(group));
     if(res != LV_RES_OK) return;
 
-    /*If the object or its parent has `top == true` bring it to the foreground*/
-    obj_to_foreground(*group->obj_focus);
-
     lv_obj_invalidate(*group->obj_focus);
 
     if(group->focus_cb) group->focus_cb(group);
 }
 
-static void obj_to_foreground(lv_obj_t * obj)
+/**
+ * Find an indev preferably with KEYPAD or ENCOEDR type that uses the given group.
+ * In other words, find an indev, that is related to the given group.
+ * In the worst case simply return the latest indev
+ * @param g     a group the find in the indevs
+ * @return      the suggested indev
+ */
+static lv_indev_t * get_indev(const lv_group_t * g)
 {
-    /*Search for 'top' attribute*/
-    lv_obj_t * i        = obj;
-    lv_obj_t * last_top = NULL;
-    while(i != NULL) {
-        if(i->top != 0) last_top = i;
-        i = lv_obj_get_parent(i);
+    lv_indev_t * indev_encoder = NULL;
+    lv_indev_t * indev_group = NULL;
+    lv_indev_t * indev = lv_indev_get_next(NULL);
+    while(indev) {
+        lv_indev_type_t indev_type = lv_indev_get_type(indev);
+        if(indev->group == g) {
+            /*Prefer KEYPAD*/
+            if(indev_type == LV_INDEV_TYPE_KEYPAD) return indev;
+            if(indev_type == LV_INDEV_TYPE_ENCODER) indev_encoder = indev;
+            indev_group = indev;
+        }
+        indev = lv_indev_get_next(indev);
     }
 
-    if(last_top != NULL) {
-        /*Move the last_top object to the foreground*/
-        lv_obj_move_foreground(last_top);
-    }
+    if(indev_encoder) return indev_encoder;
+    if(indev_group) return indev_group;
+
+    /*In lack of a better option use the first input device. (It can be NULL if there is no input device)*/
+    return lv_indev_get_next(NULL);
 }
 
-#endif /*LV_USE_GROUP != 0*/

+ 67 - 69
components/lvgl/src/lv_core/lv_group.h → components/lvgl/src/core/lv_group.h

@@ -14,13 +14,17 @@ extern "C" {
  *      INCLUDES
  *********************/
 
-#include "lv_obj.h"
+#include "../lv_conf_internal.h"
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "../misc/lv_ll.h"
+#include "../misc/lv_types.h"
 
 /*********************
  *      DEFINES
  *********************/
 /*Predefined keys to control the focused object via lv_group_send(group, c)*/
-/*For compatibility in signal function define the keys regardless to `LV_USE_GROUP`*/
 
 enum {
     LV_KEY_UP        = 17,  /*0x11*/
@@ -38,13 +42,13 @@ enum {
 };
 typedef uint8_t lv_key_t;
 
-#if LV_USE_GROUP != 0
 /**********************
  *      TYPEDEFS
  **********************/
+
+struct _lv_obj_t;
 struct _lv_group_t;
 
-typedef void (*lv_group_style_mod_cb_t)(struct _lv_group_t *, lv_style_t *);
 typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *);
 
 /**
@@ -52,26 +56,27 @@ typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *);
  * They are NOT for laying out objects on a screen (try `lv_cont` for that).
  */
 typedef struct _lv_group_t {
-    lv_ll_t obj_ll;        /**< Linked list to store the objects in the group */
-    lv_obj_t ** obj_focus; /**< The object in focus*/
+    lv_ll_t obj_ll;        /**< Linked list to store the objects in the group*/
+    struct _lv_obj_t ** obj_focus; /**< The object in focus*/
 
     lv_group_focus_cb_t focus_cb;              /**< A function to call when a new object is focused (optional)*/
 #if LV_USE_USER_DATA
-    lv_group_user_data_t user_data;
+    void * user_data;
 #endif
 
     uint8_t frozen : 1;         /**< 1: can't focus to new object*/
     uint8_t editing : 1;        /**< 1: Edit mode, 0: Navigate mode*/
-    uint8_t click_focus : 1;    /**< 1: If an object in a group is clicked by an indev then it will be
-                                   focused */
     uint8_t refocus_policy : 1; /**< 1: Focus prev if focused on deletion. 0: Focus next if focused on
                                    deletion.*/
     uint8_t wrap : 1;           /**< 1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end
                                    of list.*/
 } lv_group_t;
 
-enum { LV_GROUP_REFOCUS_POLICY_NEXT = 0, LV_GROUP_REFOCUS_POLICY_PREV = 1 };
-typedef uint8_t lv_group_refocus_policy_t;
+
+typedef enum {
+    LV_GROUP_REFOCUS_POLICY_NEXT = 0,
+    LV_GROUP_REFOCUS_POLICY_PREV = 1
+}lv_group_refocus_policy_t;
 
 /**********************
  * GLOBAL PROTOTYPES
@@ -85,120 +90,115 @@ void _lv_group_init(void);
 
 /**
  * Create a new object group
- * @return pointer to the new object group
+ * @return          pointer to the new object group
  */
 lv_group_t * lv_group_create(void);
 
 /**
  * Delete a group object
- * @param group pointer to a group
+ * @param group     pointer to a group
  */
 void lv_group_del(lv_group_t * group);
 
+/**
+ * Set a default group. New object are added to this group if it's enabled in their class with `add_to_def_group = true`
+ * @param group     pointer to a group (can be `NULL`)
+ */
+void lv_group_set_default(lv_group_t * group);
+
+/**
+ * Get the default group
+ * @return          pointer to the default group
+ */
+lv_group_t * lv_group_get_default(void);
+
 /**
  * Add an object to a group
- * @param group pointer to a group
- * @param obj pointer to an object to add
+ * @param group     pointer to a group
+ * @param obj       pointer to an object to add
  */
-void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj);
+void lv_group_add_obj(lv_group_t * group, struct _lv_obj_t * obj);
 
 /**
  * Remove an object from its group
- * @param obj pointer to an object to remove
+ * @param obj       pointer to an object to remove
  */
-void lv_group_remove_obj(lv_obj_t * obj);
+void lv_group_remove_obj(struct _lv_obj_t * obj);
 
 /**
  * Remove all objects from a group
- * @param group pointer to a group
+ * @param group     pointer to a group
  */
 void lv_group_remove_all_objs(lv_group_t * group);
 
 /**
  * Focus on an object (defocus the current)
- * @param obj pointer to an object to focus on
+ * @param obj       pointer to an object to focus on
  */
-void lv_group_focus_obj(lv_obj_t * obj);
+void lv_group_focus_obj(struct _lv_obj_t * obj);
 
 /**
  * Focus the next object in a group (defocus the current)
- * @param group pointer to a group
+ * @param group     pointer to a group
  */
 void lv_group_focus_next(lv_group_t * group);
 
 /**
  * Focus the previous object in a group (defocus the current)
- * @param group pointer to a group
+ * @param group     pointer to a group
  */
 void lv_group_focus_prev(lv_group_t * group);
 
 /**
  * Do not let to change the focus from the current object
- * @param group pointer to a group
- * @param en true: freeze, false: release freezing (normal mode)
+ * @param group     pointer to a group
+ * @param en        true: freeze, false: release freezing (normal mode)
  */
 void lv_group_focus_freeze(lv_group_t * group, bool en);
 
 /**
  * Send a control character to the focuses object of a group
- * @param group pointer to a group
- * @param c a character (use LV_KEY_.. to navigate)
- * @return result of focused object in group.
+ * @param group     pointer to a group
+ * @param c         a character (use LV_KEY_.. to navigate)
+ * @return          result of focused object in group.
  */
 lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c);
 
 /**
  * Set a function for a group which will be called when a new object is focused
- * @param group pointer to a group
- * @param focus_cb the call back function or NULL if unused
+ * @param group         pointer to a group
+ * @param focus_cb      the call back function or NULL if unused
  */
 void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb);
 
 /**
  * Set whether the next or previous item in a group is focused if the currently focused obj is
  * deleted.
- * @param group pointer to a group
- * @param new refocus policy enum
+ * @param group         pointer to a group
+ * @param policy        new refocus policy enum
  */
 void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy);
 
 /**
  * Manually set the current mode (edit or navigate).
- * @param group pointer to group
- * @param edit: true: edit mode; false: navigate mode
+ * @param group         pointer to group
+ * @param edit          true: edit mode; false: navigate mode
  */
 void lv_group_set_editing(lv_group_t * group, bool edit);
 
-/**
- * Set the `click_focus` attribute. If enabled then the object will be focused then it is clicked.
- * @param group pointer to group
- * @param en: true: enable `click_focus`
- */
-void lv_group_set_click_focus(lv_group_t * group, bool en);
-
 /**
  * Set whether focus next/prev will allow wrapping from first->last or last->first object.
- * @param group pointer to group
- * @param en: true: wrapping enabled; false: wrapping disabled
+ * @param group         pointer to group
+ * @param               en true: wrapping enabled; false: wrapping disabled
  */
 void lv_group_set_wrap(lv_group_t * group, bool en);
 
 /**
  * Get the focused object or NULL if there isn't one
- * @param group pointer to a group
- * @return pointer to the focused object
- */
-lv_obj_t * lv_group_get_focused(const lv_group_t * group);
-
-#if LV_USE_USER_DATA
-/**
- * Get a pointer to the group's user data
- * @param group pointer to an group
- * @return pointer to the user data
+ * @param group         pointer to a group
+ * @return              pointer to the focused object
  */
-lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group);
-
-#endif
+struct _lv_obj_t * lv_group_get_focused(const lv_group_t * group);
 
 /**
  * Get the focus callback function of a group
@@ -209,33 +209,31 @@ lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group);
 
 /**
  * Get the current mode (edit or navigate).
- * @param group pointer to group
- * @return true: edit mode; false: navigate mode
+ * @param group         pointer to group
+ * @return              true: edit mode; false: navigate mode
  */
 bool lv_group_get_editing(const lv_group_t * group);
 
 /**
- * Get the `click_focus` attribute.
- * @param group pointer to group
- * @return true: `click_focus` is enabled; false: disabled
+ * Get whether focus next/prev will allow wrapping from first->last or last->first object.
+ * @param group         pointer to group
+ * @param               en true: wrapping enabled; false: wrapping disabled
  */
-bool lv_group_get_click_focus(const lv_group_t * group);
+bool lv_group_get_wrap(lv_group_t * group);
 
 /**
- * Get whether focus next/prev will allow wrapping from first->last or last->first object.
- * @param group pointer to group
- * @param en: true: wrapping enabled; false: wrapping disabled
+ * Get the number of object in the group
+ * @param group         pointer to a group
+ * @return              number of objects in the group
  */
-bool lv_group_get_wrap(lv_group_t * group);
+uint32_t lv_group_get_obj_count(lv_group_t * group);
 
 /**********************
  *      MACROS
  **********************/
 
-#endif /*LV_USE_GROUP != 0*/
-
 #ifdef __cplusplus
-} /* extern "C" */
+} /*extern "C"*/
 #endif
 
 #endif /*LV_GROUP_H*/

+ 1110 - 0
components/lvgl/src/core/lv_indev.c

@@ -0,0 +1,1110 @@
+/**
+ * @file lv_indev.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ ********************/
+#include "lv_indev.h"
+#include "lv_disp.h"
+#include "lv_obj.h"
+#include "lv_indev_scroll.h"
+#include "lv_group.h"
+#include "lv_refr.h"
+
+#include "../hal/lv_hal_tick.h"
+#include "../misc/lv_timer.h"
+#include "../misc/lv_math.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#if LV_INDEV_DEF_SCROLL_THROW <= 0
+    #warning "LV_INDEV_DRAG_THROW must be greater than 0"
+#endif
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data);
+static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data);
+static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data);
+static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data);
+static void indev_proc_press(_lv_indev_proc_t * proc);
+static void indev_proc_release(_lv_indev_proc_t * proc);
+static void indev_proc_reset_query_handler(lv_indev_t * indev);
+static void indev_click_focus(_lv_indev_proc_t * proc);
+static void indev_gesture(_lv_indev_proc_t * proc);
+static bool indev_reset_check(_lv_indev_proc_t * proc);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+static lv_indev_t * indev_act;
+static lv_obj_t * indev_obj_act = NULL;
+
+/**********************
+ *      MACROS
+ **********************/
+#if LV_LOG_TRACE_INDEV
+#  define INDEV_TRACE(...) LV_LOG_TRACE( __VA_ARGS__)
+#else
+#  define INDEV_TRACE(...)
+#endif
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+void lv_indev_read_timer_cb(lv_timer_t * timer)
+{
+    INDEV_TRACE("begin");
+
+    lv_indev_data_t data;
+
+    indev_act = timer->user_data;
+
+    /*Read and process all indevs*/
+    if(indev_act->driver->disp == NULL) return; /*Not assigned to any displays*/
+
+    /*Handle reset query before processing the point*/
+    indev_proc_reset_query_handler(indev_act);
+
+    if(indev_act->proc.disabled) return;
+    bool continue_reading;
+    do {
+        /*Read the data*/
+        _lv_indev_read(indev_act, &data);
+        continue_reading = data.continue_reading;
+
+        /*The active object might deleted even in the read function*/
+        indev_proc_reset_query_handler(indev_act);
+        indev_obj_act = NULL;
+
+        indev_act->proc.state = data.state;
+
+        /*Save the last activity time*/
+        if(indev_act->proc.state == LV_INDEV_STATE_PRESSED) {
+            indev_act->driver->disp->last_activity_time = lv_tick_get();
+        }
+        else if(indev_act->driver->type == LV_INDEV_TYPE_ENCODER && data.enc_diff) {
+            indev_act->driver->disp->last_activity_time = lv_tick_get();
+        }
+
+        if(indev_act->driver->type == LV_INDEV_TYPE_POINTER) {
+            indev_pointer_proc(indev_act, &data);
+        }
+        else if(indev_act->driver->type == LV_INDEV_TYPE_KEYPAD) {
+            indev_keypad_proc(indev_act, &data);
+        }
+        else if(indev_act->driver->type == LV_INDEV_TYPE_ENCODER) {
+            indev_encoder_proc(indev_act, &data);
+        }
+        else if(indev_act->driver->type == LV_INDEV_TYPE_BUTTON) {
+            indev_button_proc(indev_act, &data);
+        }
+        /*Handle reset query if it happened in during processing*/
+        indev_proc_reset_query_handler(indev_act);
+    } while(continue_reading);
+
+    /*End of indev processing, so no act indev*/
+    indev_act     = NULL;
+    indev_obj_act = NULL;
+
+    INDEV_TRACE("finished");
+}
+
+void lv_indev_enable(lv_indev_t * indev, bool en)
+{
+    if(!indev) return;
+
+    indev->proc.disabled = en ? 0 : 1;
+}
+
+lv_indev_t * lv_indev_get_act(void)
+{
+    return indev_act;
+}
+
+lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev)
+{
+    if(indev == NULL) return LV_INDEV_TYPE_NONE;
+
+    return indev->driver->type;
+}
+
+void lv_indev_reset(lv_indev_t * indev, lv_obj_t * obj)
+{
+    if(indev) {
+        indev->proc.reset_query = 1;
+        if(indev_act == indev) indev_obj_act = NULL;
+        if(obj == NULL || indev->proc.types.pointer.last_pressed == obj) {
+            indev->proc.types.pointer.last_pressed = NULL;
+        }
+        if(obj == NULL || indev->proc.types.pointer.act_obj == obj) {
+            indev->proc.types.pointer.act_obj = NULL;
+        }
+        if(obj == NULL || indev->proc.types.pointer.last_obj == obj) {
+            indev->proc.types.pointer.last_obj = NULL;
+        }
+    }
+    else {
+        lv_indev_t * i = lv_indev_get_next(NULL);
+        while(i) {
+            i->proc.reset_query = 1;
+            if((i->driver->type == LV_INDEV_TYPE_POINTER || i->driver->type == LV_INDEV_TYPE_KEYPAD) &&
+               (obj == NULL || i->proc.types.pointer.last_pressed == obj)) {
+                i->proc.types.pointer.last_pressed = NULL;
+            }
+            if(obj == NULL || i->proc.types.pointer.act_obj == obj) {
+                i->proc.types.pointer.act_obj = NULL;
+            }
+            if(obj == NULL || i->proc.types.pointer.last_obj == obj) {
+                i->proc.types.pointer.last_obj = NULL;
+            }
+            i = lv_indev_get_next(i);
+        }
+        indev_obj_act = NULL;
+    }
+}
+
+void lv_indev_reset_long_press(lv_indev_t * indev)
+{
+    indev->proc.long_pr_sent         = 0;
+    indev->proc.longpr_rep_timestamp = lv_tick_get();
+    indev->proc.pr_timestamp         = lv_tick_get();
+}
+
+void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj)
+{
+    if(indev->driver->type != LV_INDEV_TYPE_POINTER) return;
+
+    indev->cursor = cur_obj;
+    lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver->disp));
+    lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y);
+    lv_obj_clear_flag(indev->cursor, LV_OBJ_FLAG_CLICKABLE);
+    lv_obj_add_flag(indev->cursor, LV_OBJ_FLAG_IGNORE_LAYOUT | LV_OBJ_FLAG_FLOATING);
+}
+
+void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group)
+{
+    if(indev->driver->type == LV_INDEV_TYPE_KEYPAD || indev->driver->type == LV_INDEV_TYPE_ENCODER) {
+        indev->group = group;
+    }
+}
+
+void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t points[])
+{
+    if(indev->driver->type == LV_INDEV_TYPE_BUTTON) {
+        indev->btn_points = points;
+    }
+}
+
+void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point)
+{
+    if(indev == NULL) {
+        point->x = 0;
+        point->y = 0;
+        return;
+    }
+    if(indev->driver->type != LV_INDEV_TYPE_POINTER && indev->driver->type != LV_INDEV_TYPE_BUTTON) {
+        point->x = -1;
+        point->y = -1;
+    }
+    else {
+        point->x = indev->proc.types.pointer.act_point.x;
+        point->y = indev->proc.types.pointer.act_point.y;
+    }
+}
+
+lv_dir_t lv_indev_get_gesture_dir(const lv_indev_t * indev)
+{
+    return indev->proc.types.pointer.gesture_dir;
+}
+
+uint32_t lv_indev_get_key(const lv_indev_t * indev)
+{
+    if(indev->driver->type != LV_INDEV_TYPE_KEYPAD)
+        return 0;
+    else
+        return indev->proc.types.keypad.last_key;
+}
+
+lv_dir_t lv_indev_get_scroll_dir(const lv_indev_t * indev)
+{
+    if(indev == NULL) return false;
+    if(indev->driver->type != LV_INDEV_TYPE_POINTER && indev->driver->type != LV_INDEV_TYPE_BUTTON) return false;
+    return indev->proc.types.pointer.scroll_dir;
+}
+
+lv_obj_t * lv_indev_get_scroll_obj(const lv_indev_t * indev)
+{
+    if(indev == NULL) return NULL;
+    if(indev->driver->type != LV_INDEV_TYPE_POINTER && indev->driver->type != LV_INDEV_TYPE_BUTTON) return NULL;
+    return indev->proc.types.pointer.scroll_obj;
+}
+
+void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point)
+{
+    point->x = 0;
+    point->y = 0;
+
+    if(indev == NULL) return;
+
+    if(indev->driver->type == LV_INDEV_TYPE_POINTER || indev->driver->type == LV_INDEV_TYPE_BUTTON) {
+        point->x = indev->proc.types.pointer.vect.x;
+        point->y = indev->proc.types.pointer.vect.y;
+    }
+}
+
+void lv_indev_wait_release(lv_indev_t * indev)
+{
+    if(indev == NULL)return;
+    indev->proc.wait_until_release = 1;
+}
+
+lv_obj_t * lv_indev_get_obj_act(void)
+{
+    return indev_obj_act;
+}
+
+lv_timer_t * lv_indev_get_read_timer(lv_disp_t * indev)
+{
+    if(!indev) {
+        LV_LOG_WARN("lv_indev_get_read_timer: indev was NULL");
+        return NULL;
+    }
+
+    return indev->refr_timer;
+}
+
+lv_obj_t * lv_indev_search_obj(lv_obj_t * obj, lv_point_t * point)
+{
+    lv_obj_t * found_p = NULL;
+
+    /*If the point is on this object check its children too*/
+    if(lv_obj_hit_test(obj, point)) {
+        int32_t i;
+        for(i = lv_obj_get_child_cnt(obj) - 1; i >= 0; i--) {
+            lv_obj_t * child = lv_obj_get_child(obj, i);
+            found_p = lv_indev_search_obj(child, point);
+
+            /*If a child was found then break*/
+            if(found_p != NULL) break;
+        }
+
+        /*If then the children was not ok, and this obj is clickable
+         * and it or its parent is not hidden then save this object*/
+        if(found_p == NULL && lv_obj_has_flag(obj, LV_OBJ_FLAG_CLICKABLE)) {
+            lv_obj_t * hidden_i = obj;
+            while(hidden_i != NULL) {
+                if(lv_obj_has_flag(hidden_i, LV_OBJ_FLAG_HIDDEN) == true) break;
+                hidden_i = lv_obj_get_parent(hidden_i);
+            }
+            /*No parent found with hidden == true*/
+            if(hidden_i == NULL && (lv_obj_get_state(obj) & LV_STATE_DISABLED) == false) found_p = obj;
+        }
+    }
+
+    return found_p;
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+/**
+ * Process a new point from LV_INDEV_TYPE_POINTER input device
+ * @param i pointer to an input device
+ * @param data pointer to the data read from the input device
+ */
+static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)
+{
+    lv_disp_t *disp = i->driver->disp;
+    /*Save the raw points so they can be used again in _lv_indev_read*/
+    i->proc.types.pointer.last_raw_point.x = data->point.x;
+    i->proc.types.pointer.last_raw_point.y = data->point.y;
+
+    if(disp->driver->rotated == LV_DISP_ROT_180 || disp->driver->rotated == LV_DISP_ROT_270) {
+        data->point.x = disp->driver->hor_res - data->point.x - 1;
+        data->point.y = disp->driver->ver_res - data->point.y - 1;
+    }
+    if(disp->driver->rotated == LV_DISP_ROT_90 || disp->driver->rotated == LV_DISP_ROT_270) {
+        lv_coord_t tmp = data->point.y;
+        data->point.y = data->point.x;
+        data->point.x = disp->driver->ver_res - tmp - 1;
+    }
+
+    /*Simple sanity check*/
+    if(data->point.x < 0) LV_LOG_WARN("X is %d which is smaller than zero", data->point.x);
+    if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) LV_LOG_WARN("X is %d which is greater than hor. res", data->point.x);
+    if(data->point.y < 0) LV_LOG_WARN("Y is %d which is smaller than zero", data->point.y);
+    if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) LV_LOG_WARN("Y is %d which is greater than hor. res", data->point.y);
+
+    /*Move the cursor if set and moved*/
+    if(i->cursor != NULL &&
+       (i->proc.types.pointer.last_point.x != data->point.x || i->proc.types.pointer.last_point.y != data->point.y)) {
+        lv_obj_set_pos(i->cursor, data->point.x, data->point.y);
+    }
+
+    i->proc.types.pointer.act_point.x = data->point.x;
+    i->proc.types.pointer.act_point.y = data->point.y;
+
+    if(i->proc.state == LV_INDEV_STATE_PRESSED) {
+        indev_proc_press(&i->proc);
+    }
+    else {
+        indev_proc_release(&i->proc);
+    }
+
+    i->proc.types.pointer.last_point.x = i->proc.types.pointer.act_point.x;
+    i->proc.types.pointer.last_point.y = i->proc.types.pointer.act_point.y;
+}
+
+/**
+ * Process a new point from LV_INDEV_TYPE_KEYPAD input device
+ * @param i pointer to an input device
+ * @param data pointer to the data read from the input device
+ */
+static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
+{
+    if(data->state == LV_INDEV_STATE_PRESSED && i->proc.wait_until_release) return;
+
+    if(i->proc.wait_until_release) {
+        i->proc.wait_until_release      = 0;
+        i->proc.pr_timestamp            = 0;
+        i->proc.long_pr_sent            = 0;
+        i->proc.types.keypad.last_state = LV_INDEV_STATE_RELEASED; /*To skip the processing of release*/
+    }
+
+    lv_group_t * g = i->group;
+    if(g == NULL) return;
+
+    indev_obj_act = lv_group_get_focused(g);
+    if(indev_obj_act == NULL) return;
+
+    /*Save the last key to compare it with the current latter on RELEASE*/
+    uint32_t prev_key = i->proc.types.keypad.last_key;
+
+    /*Save the last key.
+     *It must be done here else `lv_indev_get_key` will return the last key in events*/
+    i->proc.types.keypad.last_key = data->key;
+
+    /*Save the previous state so we can detect state changes below and also set the last state now
+     *so if any event handler on the way returns `LV_RES_INV` the last state is remembered
+     *for the next time*/
+    uint32_t prev_state             = i->proc.types.keypad.last_state;
+    i->proc.types.keypad.last_state = data->state;
+
+    /*Key press happened*/
+    if(data->state == LV_INDEV_STATE_PRESSED && prev_state == LV_INDEV_STATE_RELEASED) {
+        LV_LOG_INFO("%d key is pressed", data->key);
+        i->proc.pr_timestamp = lv_tick_get();
+
+        /*Simulate a press on the object if ENTER was pressed*/
+        if(data->key == LV_KEY_ENTER) {
+            /*Send the ENTER as a normal KEY*/
+            lv_group_send_data(g, LV_KEY_ENTER);
+
+            lv_event_send(indev_obj_act, LV_EVENT_PRESSED, indev_act);
+            if(indev_reset_check(&i->proc)) return;
+        }
+        else if(data->key == LV_KEY_ESC) {
+            /*Send the ESC as a normal KEY*/
+            lv_group_send_data(g, LV_KEY_ESC);
+
+            lv_event_send(indev_obj_act, LV_EVENT_CANCEL, indev_act);
+            if(indev_reset_check(&i->proc)) return;
+        }
+        /*Move the focus on NEXT*/
+        else if(data->key == LV_KEY_NEXT) {
+            lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
+            lv_group_focus_next(g);
+            if(indev_reset_check(&i->proc)) return;
+        }
+        /*Move the focus on PREV*/
+        else if(data->key == LV_KEY_PREV) {
+            lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
+            lv_group_focus_prev(g);
+            if(indev_reset_check(&i->proc)) return;
+        }
+        /*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/
+        else {
+            lv_group_send_data(g, data->key);
+        }
+    }
+    /*Pressing*/
+    else if(data->state == LV_INDEV_STATE_PRESSED && prev_state == LV_INDEV_STATE_PRESSED) {
+
+        if(data->key == LV_KEY_ENTER) {
+            lv_event_send(indev_obj_act, LV_EVENT_PRESSING, indev_act);
+            if(indev_reset_check(&i->proc)) return;
+        }
+
+        /*Long press time has elapsed?*/
+        if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver->long_press_time) {
+            i->proc.long_pr_sent = 1;
+            if(data->key == LV_KEY_ENTER) {
+                i->proc.longpr_rep_timestamp = lv_tick_get();
+                lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+            }
+        }
+        /*Long press repeated time has elapsed?*/
+        else if(i->proc.long_pr_sent != 0 &&
+                lv_tick_elaps(i->proc.longpr_rep_timestamp) > i->driver->long_press_repeat_time) {
+
+            i->proc.longpr_rep_timestamp = lv_tick_get();
+
+            /*Send LONG_PRESS_REP on ENTER*/
+            if(data->key == LV_KEY_ENTER) {
+                lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+            }
+            /*Move the focus on NEXT again*/
+            else if(data->key == LV_KEY_NEXT) {
+                lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
+                lv_group_focus_next(g);
+                if(indev_reset_check(&i->proc)) return;
+            }
+            /*Move the focus on PREV again*/
+            else if(data->key == LV_KEY_PREV) {
+                lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
+                lv_group_focus_prev(g);
+                if(indev_reset_check(&i->proc)) return;
+            }
+            /*Just send other keys again to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT)*/
+            else {
+                lv_group_send_data(g, data->key);
+                if(indev_reset_check(&i->proc)) return;
+            }
+        }
+    }
+    /*Release happened*/
+    else if(data->state == LV_INDEV_STATE_RELEASED && prev_state == LV_INDEV_STATE_PRESSED) {
+        LV_LOG_INFO("%d key is released", data->key);
+        /*The user might clear the key when it was released. Always release the pressed key*/
+        data->key = prev_key;
+        if(data->key == LV_KEY_ENTER) {
+
+            lv_event_send(indev_obj_act, LV_EVENT_RELEASED, indev_act);
+            if(indev_reset_check(&i->proc)) return;
+
+            if(i->proc.long_pr_sent == 0) {
+                lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+            }
+
+            lv_event_send(indev_obj_act, LV_EVENT_CLICKED, indev_act);
+            if(indev_reset_check(&i->proc)) return;
+
+        }
+        i->proc.pr_timestamp = 0;
+        i->proc.long_pr_sent = 0;
+    }
+    indev_obj_act = NULL;
+}
+
+/**
+ * Process a new point from LV_INDEV_TYPE_ENCODER input device
+ * @param i pointer to an input device
+ * @param data pointer to the data read from the input device
+ */
+static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
+{
+    if(data->state == LV_INDEV_STATE_PRESSED && i->proc.wait_until_release) return;
+
+    if(i->proc.wait_until_release) {
+        i->proc.wait_until_release      = 0;
+        i->proc.pr_timestamp            = 0;
+        i->proc.long_pr_sent            = 0;
+        i->proc.types.keypad.last_state = LV_INDEV_STATE_RELEASED; /*To skip the processing of release*/
+    }
+
+    /*Save the last keys before anything else.
+     *They need to be already saved if the function returns for any reason*/
+    lv_indev_state_t last_state     = i->proc.types.keypad.last_state;
+    i->proc.types.keypad.last_state = data->state;
+    i->proc.types.keypad.last_key   = data->key;
+
+    lv_group_t * g = i->group;
+    if(g == NULL) return;
+
+    indev_obj_act = lv_group_get_focused(g);
+    if(indev_obj_act == NULL) return;
+
+    /*Process the steps they are valid only with released button*/
+    if(data->state != LV_INDEV_STATE_RELEASED) {
+        data->enc_diff = 0;
+    }
+
+    /*Refresh the focused object. It might change due to lv_group_focus_prev/next*/
+    indev_obj_act = lv_group_get_focused(g);
+    if(indev_obj_act == NULL) return;
+
+    /*Button press happened*/
+    if(data->state == LV_INDEV_STATE_PRESSED && last_state == LV_INDEV_STATE_RELEASED) {
+        LV_LOG_INFO("pressed");
+
+        i->proc.pr_timestamp = lv_tick_get();
+
+        if(data->key == LV_KEY_ENTER) {
+            bool editable = lv_obj_is_editable(indev_obj_act);
+
+            if(lv_group_get_editing(g) == true || editable == false) {
+                lv_event_send(indev_obj_act, LV_EVENT_PRESSED, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+            }
+        }
+        else if(data->key == LV_KEY_LEFT) {
+            /*emulate encoder left*/
+            data->enc_diff--;
+        }
+        else if(data->key == LV_KEY_RIGHT) {
+            /*emulate encoder right*/
+            data->enc_diff++;
+        }
+        else if(data->key == LV_KEY_ESC) {
+            /*Send the ESC as a normal KEY*/
+            lv_group_send_data(g, LV_KEY_ESC);
+
+            lv_event_send(indev_obj_act, LV_EVENT_CANCEL, indev_act);
+            if(indev_reset_check(&i->proc)) return;
+        }
+        /*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/
+        else {
+            lv_group_send_data(g, data->key);
+        }
+    }
+    /*Pressing*/
+    else if(data->state == LV_INDEV_STATE_PRESSED && last_state == LV_INDEV_STATE_PRESSED) {
+        /*Long press*/
+        if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver->long_press_time) {
+
+            i->proc.long_pr_sent = 1;
+            i->proc.longpr_rep_timestamp = lv_tick_get();
+
+            if(data->key == LV_KEY_ENTER) {
+                bool editable = lv_obj_is_editable(indev_obj_act);
+
+                /*On enter long press toggle edit mode.*/
+                if(editable) {
+                    /*Don't leave edit mode if there is only one object (nowhere to navigate)*/
+                    if(lv_group_get_obj_count(g) > 1) {
+                        lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/
+                        lv_obj_clear_state(indev_obj_act, LV_STATE_PRESSED);    /*Remove the pressed state manually*/
+                    }
+                }
+                /*If not editable then just send a long press Call the ancestor's event handler*/
+                else {
+                    lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, indev_act);
+                    if(indev_reset_check(&i->proc)) return;
+                }
+            }
+
+            i->proc.long_pr_sent = 1;
+        }
+        /*Long press repeated time has elapsed?*/
+        else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > i->driver->long_press_repeat_time) {
+
+            i->proc.longpr_rep_timestamp = lv_tick_get();
+
+            if(data->key == LV_KEY_ENTER) {
+                lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+            }
+            else if(data->key == LV_KEY_LEFT) {
+                /*emulate encoder left*/
+                data->enc_diff--;
+            }
+            else if(data->key == LV_KEY_RIGHT) {
+                /*emulate encoder right*/
+                data->enc_diff++;
+            }
+            else {
+                lv_group_send_data(g, data->key);
+                if(indev_reset_check(&i->proc)) return;
+            }
+
+        }
+
+    }
+    /*Release happened*/
+    else if(data->state == LV_INDEV_STATE_RELEASED && last_state == LV_INDEV_STATE_PRESSED) {
+        LV_LOG_INFO("released");
+
+        if(data->key == LV_KEY_ENTER) {
+            bool editable = lv_obj_is_editable(indev_obj_act);
+
+            /*The button was released on a non-editable object. Just send enter*/
+            if(editable == false) {
+                lv_event_send(indev_obj_act, LV_EVENT_RELEASED, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+
+                if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+
+                lv_event_send(indev_obj_act, LV_EVENT_CLICKED, indev_act);
+                if(indev_reset_check(&i->proc)) return;
+
+            }
+            /*An object is being edited and the button is released.*/
+            else if(lv_group_get_editing(g)) {
+                /*Ignore long pressed enter release because it comes from mode switch*/
+                if(!i->proc.long_pr_sent || lv_group_get_obj_count(g) <= 1) {
+                    lv_event_send(indev_obj_act, LV_EVENT_RELEASED, indev_act);
+                    if(indev_reset_check(&i->proc)) return;
+
+                    lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, indev_act);
+                    if(indev_reset_check(&i->proc)) return;
+
+                    lv_event_send(indev_obj_act, LV_EVENT_CLICKED, indev_act);
+                    if(indev_reset_check(&i->proc)) return;
+
+
+                    lv_group_send_data(g, LV_KEY_ENTER);
+                } else {
+                    lv_obj_clear_state(indev_obj_act, LV_STATE_PRESSED);    /*Remove the pressed state manually*/
+                }
+            }
+            /*If the focused object is editable and now in navigate mode then on enter switch edit
+               mode*/
+            else if(editable && !lv_group_get_editing(g) && !i->proc.long_pr_sent) {
+                lv_group_set_editing(g, true); /*Set edit mode*/
+            }
+        }
+
+        i->proc.pr_timestamp = 0;
+        i->proc.long_pr_sent = 0;
+    }
+    indev_obj_act = NULL;
+
+    /*if encoder steps or simulated steps via left/right keys*/
+    if(data->enc_diff != 0) {
+        LV_LOG_INFO("rotated by %d", data->enc_diff);
+        /*In edit mode send LEFT/RIGHT keys*/
+        if(lv_group_get_editing(g)) {
+            int32_t s;
+            if(data->enc_diff < 0) {
+                for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(g, LV_KEY_LEFT);
+            }
+            else if(data->enc_diff > 0) {
+                for(s = 0; s < data->enc_diff; s++) lv_group_send_data(g, LV_KEY_RIGHT);
+            }
+        }
+        /*In navigate mode focus on the next/prev objects*/
+        else {
+            int32_t s;
+            if(data->enc_diff < 0) {
+                for(s = 0; s < -data->enc_diff; s++) lv_group_focus_prev(g);
+            }
+            else if(data->enc_diff > 0) {
+                for(s = 0; s < data->enc_diff; s++) lv_group_focus_next(g);
+            }
+        }
+    }
+}
+
+/**
+ * Process new points from a input device. indev->state.pressed has to be set
+ * @param indev pointer to an input device state
+ * @param x x coordinate of the next point
+ * @param y y coordinate of the next point
+ */
+static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data)
+{
+    /*Die gracefully if i->btn_points is NULL*/
+    if(i->btn_points == NULL) {
+        LV_LOG_WARN("btn_points is NULL");
+        return;
+    }
+
+    lv_coord_t x = i->btn_points[data->btn_id].x;
+    lv_coord_t y = i->btn_points[data->btn_id].y;
+
+    static lv_indev_state_t prev_state = LV_INDEV_STATE_RELEASED;
+    if(prev_state != data->state) {
+        if(data->state == LV_INDEV_STATE_PRESSED) {
+            LV_LOG_INFO("button %d is pressed (x:%d y:%d)", data->btn_id, x, y);
+        }
+        else {
+            LV_LOG_INFO("button %d is released (x:%d y:%d)", data->btn_id, x, y);
+        }
+    }
+
+    /*If a new point comes always make a release*/
+    if(data->state == LV_INDEV_STATE_PRESSED) {
+        if(i->proc.types.pointer.last_point.x != x ||
+           i->proc.types.pointer.last_point.y != y) {
+            indev_proc_release(&i->proc);
+        }
+    }
+
+    if(indev_reset_check(&i->proc)) return;
+
+    /*Save the new points*/
+    i->proc.types.pointer.act_point.x = x;
+    i->proc.types.pointer.act_point.y = y;
+
+    if(data->state == LV_INDEV_STATE_PRESSED) indev_proc_press(&i->proc);
+    else indev_proc_release(&i->proc);
+
+    if(indev_reset_check(&i->proc)) return;
+
+    i->proc.types.pointer.last_point.x = i->proc.types.pointer.act_point.x;
+    i->proc.types.pointer.last_point.y = i->proc.types.pointer.act_point.y;
+}
+
+/**
+ * Process the pressed state of LV_INDEV_TYPE_POINTER input devices
+ * @param indev pointer to an input device 'proc'
+ * @return LV_RES_OK: no indev reset required; LV_RES_INV: indev reset is required
+ */
+static void indev_proc_press(_lv_indev_proc_t * proc)
+{
+    LV_LOG_INFO("pressed at x:%d y:%d", proc->types.pointer.act_point.x, proc->types.pointer.act_point.y);
+    indev_obj_act = proc->types.pointer.act_obj;
+
+    if(proc->wait_until_release != 0) return;
+
+    lv_disp_t * disp = indev_act->driver->disp;
+    bool new_obj_searched = false;
+
+    /*If there is no last object then search*/
+    if(indev_obj_act == NULL) {
+        indev_obj_act = lv_indev_search_obj(lv_disp_get_layer_sys(disp), &proc->types.pointer.act_point);
+        if(indev_obj_act == NULL) indev_obj_act = lv_indev_search_obj(lv_disp_get_layer_top(disp),
+                                                                          &proc->types.pointer.act_point);
+        if(indev_obj_act == NULL) indev_obj_act = lv_indev_search_obj(lv_disp_get_scr_act(disp),
+                                                                          &proc->types.pointer.act_point);
+        new_obj_searched = true;
+    }
+    /*If there is last object but it is not scrolled and not protected also search*/
+    else if(proc->types.pointer.scroll_obj == NULL &&
+            lv_obj_has_flag(indev_obj_act, LV_OBJ_FLAG_PRESS_LOCK) == false) {
+        indev_obj_act = lv_indev_search_obj(lv_disp_get_layer_sys(disp), &proc->types.pointer.act_point);
+        if(indev_obj_act == NULL) indev_obj_act = lv_indev_search_obj(lv_disp_get_layer_top(disp),
+                                                                          &proc->types.pointer.act_point);
+        if(indev_obj_act == NULL) indev_obj_act = lv_indev_search_obj(lv_disp_get_scr_act(disp),
+                                                                          &proc->types.pointer.act_point);
+        new_obj_searched = true;
+    }
+
+    /*The last object might have scroll throw. Stop it manually*/
+    if(new_obj_searched && proc->types.pointer.last_obj) {
+        proc->types.pointer.scroll_throw_vect.x = 0;
+        proc->types.pointer.scroll_throw_vect.y = 0;
+        _lv_indev_scroll_throw_handler(proc);
+        if(indev_reset_check(proc)) return;
+    }
+
+    /*If a new object was found reset some variables and send a pressed Call the ancestor's event handler*/
+    if(indev_obj_act != proc->types.pointer.act_obj) {
+        proc->types.pointer.last_point.x = proc->types.pointer.act_point.x;
+        proc->types.pointer.last_point.y = proc->types.pointer.act_point.y;
+
+        /*If a new object found the previous was lost, so send a Call the ancestor's event handler*/
+        if(proc->types.pointer.act_obj != NULL) {
+            /*Save the obj because in special cases `act_obj` can change in the Call the ancestor's event handler function*/
+            lv_obj_t * last_obj = proc->types.pointer.act_obj;
+
+            lv_event_send(last_obj, LV_EVENT_PRESS_LOST, indev_act);
+            if(indev_reset_check(proc)) return;
+        }
+
+        proc->types.pointer.act_obj  = indev_obj_act; /*Save the pressed object*/
+        proc->types.pointer.last_obj = indev_obj_act;
+
+        if(indev_obj_act != NULL) {
+            /*Save the time when the obj pressed to count long press time.*/
+            proc->pr_timestamp                 = lv_tick_get();
+            proc->long_pr_sent                 = 0;
+            proc->types.pointer.scroll_sum.x     = 0;
+            proc->types.pointer.scroll_sum.y     = 0;
+            proc->types.pointer.scroll_dir = LV_DIR_NONE;
+            proc->types.pointer.gesture_dir = LV_DIR_NONE;
+            proc->types.pointer.gesture_sent   = 0;
+            proc->types.pointer.gesture_sum.x  = 0;
+            proc->types.pointer.gesture_sum.y  = 0;
+            proc->types.pointer.vect.x         = 0;
+            proc->types.pointer.vect.y         = 0;
+
+            /*Call the ancestor's event handler about the press*/
+            lv_event_send(indev_obj_act, LV_EVENT_PRESSED, indev_act);
+            if(indev_reset_check(proc)) return;
+
+            if(indev_act->proc.wait_until_release) return;
+
+            /*Handle focus*/
+            indev_click_focus(&indev_act->proc);
+            if(indev_reset_check(proc)) return;
+
+        }
+    }
+
+    /*Calculate the vector and apply a low pass filter: new value = 0.5 * old_value + 0.5 * new_value*/
+    proc->types.pointer.vect.x = proc->types.pointer.act_point.x - proc->types.pointer.last_point.x;
+    proc->types.pointer.vect.y = proc->types.pointer.act_point.y - proc->types.pointer.last_point.y;
+
+    proc->types.pointer.scroll_throw_vect.x = (proc->types.pointer.scroll_throw_vect.x * 4) >> 3;
+    proc->types.pointer.scroll_throw_vect.y = (proc->types.pointer.scroll_throw_vect.y * 4) >> 3;
+
+    proc->types.pointer.scroll_throw_vect.x += (proc->types.pointer.vect.x * 4) >> 3;
+    proc->types.pointer.scroll_throw_vect.y += (proc->types.pointer.vect.y * 4) >> 3;
+
+    proc->types.pointer.scroll_throw_vect_ori = proc->types.pointer.scroll_throw_vect;
+
+    if(indev_obj_act) {
+        lv_event_send(indev_obj_act, LV_EVENT_PRESSING, indev_act);
+        if(indev_reset_check(proc)) return;
+
+        if(indev_act->proc.wait_until_release) return;
+
+        _lv_indev_scroll_handler(proc);
+        if(indev_reset_check(proc)) return;
+        indev_gesture(proc);
+        if(indev_reset_check(proc)) return;
+
+        /*If there is no scrolling then check for long press time*/
+        if(proc->types.pointer.scroll_obj == NULL && proc->long_pr_sent == 0) {
+            /*Call the ancestor's event handler about the long press if enough time elapsed*/
+            if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver->long_press_time) {
+                lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, indev_act);
+                if(indev_reset_check(proc)) return;
+
+                /*Mark the Call the ancestor's event handler sending to do not send it again*/
+                proc->long_pr_sent = 1;
+
+                /*Save the long press time stamp for the long press repeat handler*/
+                proc->longpr_rep_timestamp = lv_tick_get();
+            }
+        }
+
+        /*Send long press repeated Call the ancestor's event handler*/
+        if(proc->types.pointer.scroll_obj == NULL && proc->long_pr_sent == 1) {
+            /*Call the ancestor's event handler about the long press repeat if enough time elapsed*/
+            if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver->long_press_repeat_time) {
+                lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, indev_act);
+                if(indev_reset_check(proc)) return;
+                proc->longpr_rep_timestamp = lv_tick_get();
+            }
+        }
+    }
+}
+
+/**
+ * Process the released state of LV_INDEV_TYPE_POINTER input devices
+ * @param proc pointer to an input device 'proc'
+ */
+static void indev_proc_release(_lv_indev_proc_t * proc)
+{
+    if(proc->wait_until_release != 0) {
+        proc->types.pointer.act_obj  = NULL;
+        proc->types.pointer.last_obj = NULL;
+        proc->pr_timestamp           = 0;
+        proc->longpr_rep_timestamp   = 0;
+        proc->wait_until_release     = 0;
+    }
+    indev_obj_act = proc->types.pointer.act_obj;
+    lv_obj_t * scroll_obj = proc->types.pointer.scroll_obj;
+
+    /*Forget the act obj and send a released Call the ancestor's event handler*/
+    if(indev_obj_act) {
+        LV_LOG_INFO("released");
+
+        /*Send RELEASE Call the ancestor's event handler and event*/
+        lv_event_send(indev_obj_act, LV_EVENT_RELEASED, indev_act);
+        if(indev_reset_check(proc)) return;
+
+        /*Send CLICK if no scrolling*/
+        if(scroll_obj == NULL) {
+            if(proc->long_pr_sent == 0) {
+                lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, indev_act);
+                if(indev_reset_check(proc)) return;
+            }
+
+            lv_event_send(indev_obj_act, LV_EVENT_CLICKED, indev_act);
+            if(indev_reset_check(proc)) return;
+        }
+
+        proc->types.pointer.act_obj = NULL;
+        proc->pr_timestamp          = 0;
+        proc->longpr_rep_timestamp  = 0;
+
+    }
+
+    /*The reset can be set in the Call the ancestor's event handler function.
+     * In case of reset query ignore the remaining parts.*/
+    if(scroll_obj) {
+        _lv_indev_scroll_throw_handler(proc);
+        if(indev_reset_check(proc)) return;
+    }
+}
+
+/**
+ * Process a new point from LV_INDEV_TYPE_BUTTON input device
+ * @param i pointer to an input device
+ * @param data pointer to the data read from the input device
+ * Reset input device if a reset query has been sent to it
+ * @param indev pointer to an input device
+ */
+static void indev_proc_reset_query_handler(lv_indev_t * indev)
+{
+    if(indev->proc.reset_query) {
+        indev->proc.types.pointer.act_obj           = NULL;
+        indev->proc.types.pointer.last_obj          = NULL;
+        indev->proc.types.pointer.scroll_obj          = NULL;
+        indev->proc.long_pr_sent                    = 0;
+        indev->proc.pr_timestamp                    = 0;
+        indev->proc.longpr_rep_timestamp            = 0;
+        indev->proc.types.pointer.scroll_sum.x        = 0;
+        indev->proc.types.pointer.scroll_sum.y        = 0;
+        indev->proc.types.pointer.scroll_dir = LV_DIR_NONE;
+        indev->proc.types.pointer.scroll_throw_vect.x = 0;
+        indev->proc.types.pointer.scroll_throw_vect.y = 0;
+        indev->proc.types.pointer.gesture_sum.x     = 0;
+        indev->proc.types.pointer.gesture_sum.y     = 0;
+        indev->proc.reset_query                     = 0;
+        indev_obj_act                               = NULL;
+    }
+}
+
+/**
+ * Handle focus/defocus on click for POINTER input devices
+ * @param proc pointer to the state of the indev
+ */
+static void indev_click_focus(_lv_indev_proc_t * proc)
+{
+    /*Handle click focus*/
+    lv_obj_t * obj_to_focus = indev_obj_act;
+    if(lv_obj_has_flag(obj_to_focus, LV_OBJ_FLAG_CLICK_FOCUSABLE) &&
+       proc->types.pointer.last_pressed != obj_to_focus) {
+        lv_group_t * g_act = lv_obj_get_group(obj_to_focus);
+        lv_group_t * g_prev = proc->types.pointer.last_pressed ? lv_obj_get_group(proc->types.pointer.last_pressed) : NULL;
+
+        /*If both the last and act. obj. are in the same group (or no group but it's also the same)*/
+        if(g_act == g_prev) {
+            /*The objects are in a group*/
+            if(g_act) {
+                lv_group_focus_obj(obj_to_focus);
+                if(indev_reset_check(proc)) return;
+            }
+            /*The object are not in group*/
+            else {
+                if(proc->types.pointer.last_pressed) {
+                    lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, indev_act);
+                    if(indev_reset_check(proc)) return;
+                }
+
+                lv_event_send(obj_to_focus, LV_EVENT_FOCUSED, indev_act);
+                if(indev_reset_check(proc)) return;
+            }
+        }
+        /*The object are not in the same group (in different group or one in not a group)*/
+        else {
+            /*If the prev. obj. is not in a group then defocus it.*/
+            if(g_prev == NULL && proc->types.pointer.last_pressed) {
+                lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, indev_act);
+                if(indev_reset_check(proc)) return;
+            }
+            /*Focus on a non-group object*/
+            else {
+                if(proc->types.pointer.last_pressed) {
+                    /*If the prev. object also wasn't in a group defocus it*/
+                    if(g_prev == NULL) {
+                        lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, indev_act);
+                        if(indev_reset_check(proc)) return;
+                    }
+                    /*If the prev. object also was in a group at least "LEAVE" it instead of defocus*/
+                    else {
+                        lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_LEAVE, indev_act);
+                        if(indev_reset_check(proc)) return;
+                    }
+                }
+            }
+
+            /*Focus to the act. in its group*/
+            if(g_act) {
+                lv_group_focus_obj(obj_to_focus);
+                if(indev_reset_check(proc)) return;
+            }
+            else {
+                lv_event_send(obj_to_focus, LV_EVENT_FOCUSED, indev_act);
+                if(indev_reset_check(proc)) return;
+            }
+        }
+        proc->types.pointer.last_pressed = obj_to_focus;
+    }
+
+}
+
+/**
+* Handle the gesture of indev_proc_p->types.pointer.act_obj
+* @param indev pointer to a input device state
+*/
+void indev_gesture(_lv_indev_proc_t * proc)
+{
+
+    if(proc->types.pointer.scroll_obj) return;
+    if(proc->types.pointer.gesture_sent) return;
+
+    lv_obj_t * gesture_obj = proc->types.pointer.act_obj;
+
+    /*If gesture parent is active check recursively the gesture attribute*/
+    while(gesture_obj && lv_obj_has_flag(gesture_obj, LV_OBJ_FLAG_GESTURE_BUBBLE)) {
+        gesture_obj = lv_obj_get_parent(gesture_obj);
+    }
+
+    if(gesture_obj == NULL) return;
+
+    if((LV_ABS(proc->types.pointer.vect.x) < indev_act->driver->gesture_min_velocity) &&
+       (LV_ABS(proc->types.pointer.vect.y) < indev_act->driver->gesture_min_velocity)) {
+        proc->types.pointer.gesture_sum.x = 0;
+        proc->types.pointer.gesture_sum.y = 0;
+    }
+
+    /*Count the movement by gesture*/
+    proc->types.pointer.gesture_sum.x += proc->types.pointer.vect.x;
+    proc->types.pointer.gesture_sum.y += proc->types.pointer.vect.y;
+
+    if((LV_ABS(proc->types.pointer.gesture_sum.x) > indev_act->driver->gesture_limit) ||
+       (LV_ABS(proc->types.pointer.gesture_sum.y) > indev_act->driver->gesture_limit)) {
+
+        proc->types.pointer.gesture_sent = 1;
+
+        if(LV_ABS(proc->types.pointer.gesture_sum.x) > LV_ABS(proc->types.pointer.gesture_sum.y)) {
+            if(proc->types.pointer.gesture_sum.x > 0)
+                proc->types.pointer.gesture_dir = LV_DIR_RIGHT;
+            else
+                proc->types.pointer.gesture_dir = LV_DIR_LEFT;
+        }
+        else {
+            if(proc->types.pointer.gesture_sum.y > 0)
+                proc->types.pointer.gesture_dir = LV_DIR_BOTTOM;
+            else
+                proc->types.pointer.gesture_dir = LV_DIR_TOP;
+        }
+
+        lv_event_send(gesture_obj, LV_EVENT_GESTURE, indev_act);
+        if(indev_reset_check(proc)) return;
+    }
+}
+
+/**
+ * Checks if the reset_query flag has been set. If so, perform necessary global indev cleanup actions
+ * @param proc pointer to an input device 'proc'
+ * @return true if indev query should be immediately truncated.
+ */
+static bool indev_reset_check(_lv_indev_proc_t * proc)
+{
+    if(proc->reset_query) {
+        indev_obj_act = NULL;
+    }
+
+    return proc->reset_query ? true : false;
+}

+ 31 - 42
components/lvgl/src/lv_core/lv_indev.h → components/lvgl/src/core/lv_indev.h

@@ -14,8 +14,8 @@ extern "C" {
  *      INCLUDES
  *********************/
 #include "lv_obj.h"
-#include "../lv_hal/lv_hal_indev.h"
-#include "../lv_core/lv_group.h"
+#include "../hal/lv_hal_indev.h"
+#include "lv_group.h"
 
 /*********************
  *      DEFINES
@@ -29,16 +29,14 @@ extern "C" {
  * GLOBAL PROTOTYPES
  **********************/
 
-/**
- * Initialize the display input device subsystem
- */
-void _lv_indev_init(void);
-
 /**
  * Called periodically to read the input devices
- * @param task pointer to the task itself
+ * @param param pointer to and input device to read
  */
-void _lv_indev_read_task(lv_task_t * task);
+void lv_indev_read_timer_cb(lv_timer_t * timer);
+
+
+void lv_indev_enable(lv_indev_t * indev, bool en);
 
 /**
  * Get the currently processed input device. Can be used in action functions too.
@@ -63,16 +61,9 @@ void lv_indev_reset(lv_indev_t * indev, lv_obj_t * obj);
 
 /**
  * Reset the long press state of an input device
- * @param indev_proc pointer to an input device
- */
-void lv_indev_reset_long_press(lv_indev_t * indev);
-
-/**
- * Enable or disable an input devices
  * @param indev pointer to an input device
- * @param en true: enable; false: disable
  */
-void lv_indev_enable(lv_indev_t * indev, bool en);
+void lv_indev_reset_long_press(lv_indev_t * indev);
 
 /**
  * Set a cursor for a pointer input device (for LV_INPUT_TYPE_POINTER and LV_INPUT_TYPE_BUTTON)
@@ -81,14 +72,12 @@ void lv_indev_enable(lv_indev_t * indev, bool en);
  */
 void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj);
 
-#if LV_USE_GROUP
 /**
  * Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD)
  * @param indev pointer to an input device
  * @param group point to a group
  */
 void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group);
-#endif
 
 /**
  * Set the an array of points for LV_INDEV_TYPE_BUTTON.
@@ -110,7 +99,7 @@ void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point);
 * @param indev pointer to an input device
 * @return current gesture direct
 */
-lv_gesture_dir_t lv_indev_get_gesture_dir(const lv_indev_t * indev);
+lv_dir_t lv_indev_get_gesture_dir(const lv_indev_t * indev);
 
 /**
  * Get the last pressed key of an input device (for LV_INDEV_TYPE_KEYPAD)
@@ -120,28 +109,29 @@ lv_gesture_dir_t lv_indev_get_gesture_dir(const lv_indev_t * indev);
 uint32_t lv_indev_get_key(const lv_indev_t * indev);
 
 /**
- * Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and
+ * Check the current scroll direction of an input device (for LV_INDEV_TYPE_POINTER and
  * LV_INDEV_TYPE_BUTTON)
  * @param indev pointer to an input device
- * @return true: drag is in progress
+ * @return LV_DIR_NONE: no scrolling now
+ *         LV_DIR_HOR/VER
  */
-bool lv_indev_is_dragging(const lv_indev_t * indev);
+lv_dir_t lv_indev_get_scroll_dir(const lv_indev_t * indev);
 
 /**
- * Get the vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and
+ * Get the currently scrolled object (for LV_INDEV_TYPE_POINTER and
  * LV_INDEV_TYPE_BUTTON)
  * @param indev pointer to an input device
- * @param point pointer to a point to store the vector
+ * @return pointer to the currently scrolled object or NULL if no scrolling by this indev
  */
-void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point);
+lv_obj_t * lv_indev_get_scroll_obj(const lv_indev_t * indev);
 
 /**
- * Manually finish dragging.
- * `LV_SIGNAL_DRAG_END` and `LV_EVENT_DRAG_END` will be sent.
+ * Get the movement vector of an input device (for LV_INDEV_TYPE_POINTER and
+ * LV_INDEV_TYPE_BUTTON)
  * @param indev pointer to an input device
- * @return `LV_RES_INV` if the object being dragged was deleted. Else `LV_RES_OK`.
+ * @param point pointer to a point to store the types.pointer.vector
  */
-lv_res_t lv_indev_finish_drag(lv_indev_t * indev);
+void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point);
 
 /**
  * Do nothing until the next release
@@ -150,12 +140,19 @@ lv_res_t lv_indev_finish_drag(lv_indev_t * indev);
 void lv_indev_wait_release(lv_indev_t * indev);
 
 /**
- * Gets a pointer to the currently active object in indev proc functions.
- * NULL if no object is currently being handled or if groups aren't used.
- * @return pointer to currently active object
+ * Gets a pointer to the currently active object in the currently processed input device.
+ * @return pointer to currently active object or NULL if no active object
  */
 lv_obj_t * lv_indev_get_obj_act(void);
 
+/**
+ * Get a pointer to the indev read timer to
+ * modify its parameters with `lv_timer_...` functions.
+ * @param indev pointer to an input device
+ * @return pointer to the indev read refresher timer. (NULL on error)
+ */
+lv_timer_t * lv_indev_get_read_timer(lv_disp_t * indev);
+
 /**
  * Search the most top, clickable object by a point
  * @param obj pointer to a start object, typically the screen
@@ -164,20 +161,12 @@ lv_obj_t * lv_indev_get_obj_act(void);
  */
 lv_obj_t * lv_indev_search_obj(lv_obj_t * obj, lv_point_t * point);
 
-/**
- * Get a pointer to the indev read task to
- * modify its parameters with `lv_task_...` functions.
- * @param indev pointer to an inout device
- * @return pointer to the indev read refresher task. (NULL on error)
- */
-lv_task_t * lv_indev_get_read_task(lv_disp_t * indev);
-
 /**********************
  *      MACROS
  **********************/
 
 #ifdef __cplusplus
-} /* extern "C" */
+} /*extern "C"*/
 #endif
 
 #endif /*LV_INDEV_H*/

+ 642 - 0
components/lvgl/src/core/lv_indev_scroll.c

@@ -0,0 +1,642 @@
+/**
+ * @file lv_indev_scroll.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_indev.h"
+#include "lv_indev_scroll.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define ELASTIC_SLOWNESS_FACTOR 4   /*Scrolling on elastic parts are slower by this factor*/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc);
+static void init_scroll_limits(_lv_indev_proc_t * proc);
+static lv_coord_t find_snap_point_x(const lv_obj_t * obj, lv_coord_t min, lv_coord_t max, lv_coord_t ofs);
+static lv_coord_t find_snap_point_y(const lv_obj_t * obj, lv_coord_t min, lv_coord_t max, lv_coord_t ofs);
+static void scroll_limit_diff(_lv_indev_proc_t * proc, lv_coord_t * diff_x, lv_coord_t * diff_y);
+static lv_coord_t scroll_throw_predict_y(_lv_indev_proc_t * proc);
+static lv_coord_t scroll_throw_predict_x(_lv_indev_proc_t * proc);
+static lv_coord_t elastic_diff(lv_obj_t * scroll_obj, lv_coord_t diff, lv_coord_t scroll_start, lv_coord_t scroll_end, lv_dir_t dir);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+void _lv_indev_scroll_handler(_lv_indev_proc_t * proc)
+{
+    lv_obj_t * scroll_obj = proc->types.pointer.scroll_obj;
+    /*If there is no scroll object yet try to find one*/
+    if(scroll_obj == NULL) {
+        proc->types.pointer.scroll_sum.x += proc->types.pointer.vect.x;
+        proc->types.pointer.scroll_sum.y += proc->types.pointer.vect.y;
+
+        scroll_obj = find_scroll_obj(proc);
+        if(scroll_obj == NULL) return;
+
+        init_scroll_limits(proc);
+
+        lv_indev_t * indev_act = lv_indev_get_act();
+        lv_event_send(scroll_obj, LV_EVENT_SCROLL_BEGIN, indev_act);
+        if(proc->reset_query) return;
+    }
+
+    /*Set new position or scroll if the vector is not zero*/
+    if(proc->types.pointer.vect.x != 0 || proc->types.pointer.vect.y != 0) {
+        lv_coord_t diff_x = 0;
+        lv_coord_t diff_y = 0;
+
+        if(proc->types.pointer.scroll_dir == LV_DIR_HOR) {
+            lv_coord_t sr = lv_obj_get_scroll_right(scroll_obj);
+            lv_coord_t sl = lv_obj_get_scroll_left(scroll_obj);
+            diff_x = elastic_diff(scroll_obj, proc->types.pointer.vect.x, sl, sr, LV_DIR_HOR);
+        } else {
+            lv_coord_t st = lv_obj_get_scroll_top(scroll_obj);
+            lv_coord_t sb = lv_obj_get_scroll_bottom(scroll_obj);
+            diff_y = elastic_diff(scroll_obj, proc->types.pointer.vect.y, st, sb, LV_DIR_VER);
+        }
+
+        lv_dir_t scroll_dir = lv_obj_get_scroll_dir(scroll_obj);
+        if((scroll_dir & LV_DIR_LEFT)   == 0 && diff_x > 0) diff_x = 0;
+        if((scroll_dir & LV_DIR_RIGHT)  == 0 && diff_x < 0) diff_x = 0;
+        if((scroll_dir & LV_DIR_TOP)    == 0 && diff_y > 0) diff_y = 0;
+        if((scroll_dir & LV_DIR_BOTTOM) == 0 && diff_y < 0) diff_y = 0;
+
+        /*Respect the scroll limit area*/
+        scroll_limit_diff(proc, &diff_x, &diff_y);
+
+        lv_obj_scroll_by(scroll_obj, diff_x, diff_y, LV_ANIM_OFF);
+        proc->types.pointer.scroll_sum.x += diff_x;
+        proc->types.pointer.scroll_sum.y += diff_y;
+    }
+}
+
+
+void _lv_indev_scroll_throw_handler(_lv_indev_proc_t * proc)
+{
+    lv_obj_t * scroll_obj = proc->types.pointer.scroll_obj;
+    if(scroll_obj == NULL) return;
+    if(proc->types.pointer.scroll_dir == LV_DIR_NONE) return;
+
+
+    lv_indev_t * indev_act = lv_indev_get_act();
+    lv_coord_t scroll_throw =  indev_act->driver->scroll_throw;
+
+    if(lv_obj_has_flag(scroll_obj, LV_OBJ_FLAG_SCROLL_MOMENTUM) == false) {
+        proc->types.pointer.scroll_throw_vect.y = 0;
+        proc->types.pointer.scroll_throw_vect.x = 0;
+    }
+
+    lv_scroll_snap_t align_x = lv_obj_get_scroll_snap_x(scroll_obj);
+    lv_scroll_snap_t align_y = lv_obj_get_scroll_snap_y(scroll_obj);
+
+    if(proc->types.pointer.scroll_dir == LV_DIR_VER) {
+        proc->types.pointer.scroll_throw_vect.x = 0;
+        /*If no snapping "throw"*/
+        if(align_y == LV_SCROLL_SNAP_NONE) {
+            proc->types.pointer.scroll_throw_vect.y =
+                    proc->types.pointer.scroll_throw_vect.y * (100 - scroll_throw) / 100;
+
+            lv_coord_t sb = lv_obj_get_scroll_bottom(scroll_obj);
+            lv_coord_t st = lv_obj_get_scroll_top(scroll_obj);
+
+             proc->types.pointer.scroll_throw_vect.y = elastic_diff(scroll_obj, proc->types.pointer.scroll_throw_vect.y, st, sb, LV_DIR_VER);
+
+            lv_obj_scroll_by(scroll_obj, 0, proc->types.pointer.scroll_throw_vect.y, LV_ANIM_OFF);
+        }
+        /*With snapping find the nearest snap point and scroll there*/
+        else {
+            lv_coord_t diff_y = scroll_throw_predict_y(proc);
+            proc->types.pointer.scroll_throw_vect.y = 0;
+            scroll_limit_diff(proc, NULL, &diff_y);
+            lv_coord_t y = find_snap_point_y(scroll_obj, LV_COORD_MIN, LV_COORD_MAX, diff_y);
+            lv_obj_scroll_by(scroll_obj, 0, diff_y + y, LV_ANIM_ON);
+        }
+    }
+    else if(proc->types.pointer.scroll_dir == LV_DIR_HOR) {
+        proc->types.pointer.scroll_throw_vect.y = 0;
+        /*If no snapping "throw"*/
+        if(align_x == LV_SCROLL_SNAP_NONE) {
+            proc->types.pointer.scroll_throw_vect.x =
+                    proc->types.pointer.scroll_throw_vect.x * (100 - scroll_throw) / 100;
+
+            lv_coord_t sl = lv_obj_get_scroll_left(scroll_obj);
+            lv_coord_t sr = lv_obj_get_scroll_right(scroll_obj);
+
+            proc->types.pointer.scroll_throw_vect.x = elastic_diff(scroll_obj, proc->types.pointer.scroll_throw_vect.x, sl ,sr, LV_DIR_HOR);
+
+            lv_obj_scroll_by(scroll_obj, proc->types.pointer.scroll_throw_vect.x, 0, LV_ANIM_OFF);
+        }
+        /*With snapping find the nearest snap point and scroll there*/
+        else {
+            lv_coord_t diff_x = scroll_throw_predict_x(proc);
+            proc->types.pointer.scroll_throw_vect.x = 0;
+            scroll_limit_diff(proc, &diff_x, NULL);
+            lv_coord_t x = find_snap_point_x(scroll_obj, LV_COORD_MIN, LV_COORD_MAX, diff_x);
+            lv_obj_scroll_by(scroll_obj, x + diff_x, 0, LV_ANIM_ON);
+        }
+    }
+
+    /*Check if the scroll has finished*/
+    if(proc->types.pointer.scroll_throw_vect.x == 0 && proc->types.pointer.scroll_throw_vect.y == 0) {
+        /*Revert if scrolled in*/
+        /*If vertically scrollable and not controlled by snap*/
+        if(align_y == LV_SCROLL_SNAP_NONE) {
+            lv_coord_t st = lv_obj_get_scroll_top(scroll_obj);
+            lv_coord_t sb = lv_obj_get_scroll_bottom(scroll_obj);
+            if(st > 0 || sb > 0) {
+                if(st < 0) {
+                    lv_obj_scroll_by(scroll_obj, 0, st, LV_ANIM_ON);
+                }
+                else if(sb < 0) {
+                    lv_obj_scroll_by(scroll_obj, 0, -sb, LV_ANIM_ON);
+                }
+            }
+        }
+
+        /*If horizontally scrollable and not controlled by snap*/
+        if(align_x == LV_SCROLL_SNAP_NONE) {
+            lv_coord_t sl = lv_obj_get_scroll_left(scroll_obj);
+            lv_coord_t sr = lv_obj_get_scroll_right(scroll_obj);
+            if (sl > 0 || sr > 0) {
+                if(sl < 0) {
+                    lv_obj_scroll_by(scroll_obj, sl, 0, LV_ANIM_ON);
+                }
+                else if(sr < 0) {
+                    lv_obj_scroll_by(scroll_obj, -sr, 0, LV_ANIM_ON);
+                }
+            }
+        }
+
+        lv_event_send(scroll_obj, LV_EVENT_SCROLL_END, indev_act);
+        if(proc->reset_query) return;
+
+        proc->types.pointer.scroll_dir = LV_DIR_NONE;
+        proc->types.pointer.scroll_obj = NULL;
+    }
+}
+
+/**
+ * Predict where would a scroll throw end
+ * @param indev pointer to an input device
+ * @param dir `LV_DIR_VER` or `LV_DIR_HOR`
+ * @return the difference compared to the current position when the throw would be finished
+ */
+lv_coord_t lv_indev_scroll_throw_predict(lv_indev_t * indev, lv_dir_t dir)
+{
+    if(indev == NULL) return 0;
+    lv_coord_t v;
+    switch(dir) {
+    case LV_DIR_VER:
+        v = indev->proc.types.pointer.scroll_throw_vect_ori.y;
+        break;
+    case LV_DIR_HOR:
+        v = indev->proc.types.pointer.scroll_throw_vect_ori.x;
+        break;
+    default:
+        return 0;
+    }
+
+    lv_coord_t scroll_throw = indev->driver->scroll_throw;
+    lv_coord_t sum = 0;
+    while(v) {
+        sum += v;
+        v = v * (100 - scroll_throw) / 100;
+    }
+
+    return sum;
+}
+
+void lv_indev_scroll_get_snap_dist(lv_obj_t * obj, lv_point_t * p)
+{
+    p->x = find_snap_point_x(obj, obj->coords.x1, obj->coords.x2, 0);
+    p->y = find_snap_point_y(obj, obj->coords.y1, obj->coords.y2, 0);
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
+{
+    lv_obj_t * obj_candidate = NULL;
+    lv_dir_t dir_candidate = LV_DIR_NONE;
+    lv_indev_t * indev_act = lv_indev_get_act();
+    lv_coord_t scroll_limit =  indev_act->driver->scroll_limit;
+
+    /*Go until find an scrollable object in the current direction
+     *More precisely:
+     * 1. Check the pressed object and all of its ancestors and try to find an object which is scrollable
+     * 2. Scrollable means it has some content out of it's area
+     * 3. If an object can be scrolled into the current direction then use it ("real match"")
+     * 4. If can be scrolled on the current axis (hor/ver) save it as candidate (at least show an elastic scroll effect)
+     * 5. Use the last candidate. Always the "deepest" parent or the object from point 3*/
+    lv_obj_t * obj_act = proc->types.pointer.act_obj;
+    while(obj_act) {
+        if(lv_obj_has_flag(obj_act, LV_OBJ_FLAG_SCROLLABLE) == false) {
+            /*If this object don't want to chain the scroll ot the parent stop searching*/
+            if(lv_obj_has_flag(obj_act, LV_OBJ_FLAG_SCROLL_CHAIN) == false) break;
+            obj_act = lv_obj_get_parent(obj_act);
+            continue;
+        }
+
+        /*Decide if it's a horizontal or vertical scroll*/
+        bool hor_en = false;
+        bool ver_en = false;
+        if(LV_ABS(proc->types.pointer.scroll_sum.x) > LV_ABS(proc->types.pointer.scroll_sum.y)) {
+            hor_en = true;
+        }
+        else {
+            ver_en = true;
+        }
+
+        /*Consider both up-down or left/right scrollable according to the current direction*/
+        bool up_en = ver_en;
+        bool down_en = ver_en;
+        bool left_en = hor_en;
+        bool right_en = hor_en;
+
+        /*The object might have disabled some directions.*/
+        lv_dir_t scroll_dir = lv_obj_get_scroll_dir(obj_act);
+        if((scroll_dir & LV_DIR_LEFT) == 0) left_en = false;
+        if((scroll_dir & LV_DIR_RIGHT) == 0) right_en = false;
+        if((scroll_dir & LV_DIR_TOP) == 0) up_en = false;
+        if((scroll_dir & LV_DIR_BOTTOM) == 0) down_en = false;
+
+        /*The object is scrollable to a direction if its content overflow in that direction.*/
+        lv_coord_t st = lv_obj_get_scroll_top(obj_act);
+        lv_coord_t sb = lv_obj_get_scroll_bottom(obj_act);
+        lv_coord_t sl = lv_obj_get_scroll_left(obj_act);
+        lv_coord_t sr = lv_obj_get_scroll_right(obj_act);
+
+        /*If this object is scrollable into the current scroll direction then save it as a candidate.
+         *It's important only to be scrollable on the current axis (hor/ver) because if the scroll
+         *is propagated to this object it can show at least elastic scroll effect.
+         *But if not hor/ver scrollable do not scroll it at all (so it's not a good candidate)*/
+        if((st > 0 || sb > 0)  &&
+                ((up_en    && proc->types.pointer.scroll_sum.y >= scroll_limit) ||
+                        (down_en  && proc->types.pointer.scroll_sum.y <= - scroll_limit)))
+        {
+            obj_candidate = obj_act;
+            dir_candidate = LV_DIR_VER;
+        }
+
+        if((sl > 0 || sr > 0)  &&
+                ((left_en    && proc->types.pointer.scroll_sum.x >=  scroll_limit) ||
+                        (right_en  && proc->types.pointer.scroll_sum.x <= - scroll_limit)))
+        {
+            obj_candidate = obj_act;
+            dir_candidate = LV_DIR_HOR;
+        }
+
+        if(st <= 0) up_en = false;
+        if(sb <= 0) down_en = false;
+        if(sl <= 0) left_en = false;
+        if(sr <= 0) right_en = false;
+
+        /*If the object really can be scrolled into the current direction the use it.*/
+        if((left_en  && proc->types.pointer.scroll_sum.x >=   scroll_limit) ||
+                (right_en && proc->types.pointer.scroll_sum.x <= - scroll_limit) ||
+                (up_en    && proc->types.pointer.scroll_sum.y >=   scroll_limit) ||
+                (down_en  && proc->types.pointer.scroll_sum.y <= - scroll_limit))
+        {
+            proc->types.pointer.scroll_dir = hor_en ? LV_DIR_HOR : LV_DIR_VER;
+            break;
+        }
+
+        /*If this object don't want to chain the scroll ot the parent stop searching*/
+        if(lv_obj_has_flag(obj_act, LV_OBJ_FLAG_SCROLL_CHAIN) == false) break;
+
+        /*Try the parent*/
+        obj_act = lv_obj_get_parent(obj_act);
+    }
+
+    /*Use the last candidate*/
+    if(obj_candidate) {
+        proc->types.pointer.scroll_dir = dir_candidate;
+        proc->types.pointer.scroll_obj = obj_candidate;
+        proc->types.pointer.scroll_sum.x = 0;
+        proc->types.pointer.scroll_sum.y = 0;
+    }
+
+    return obj_candidate;
+}
+
+static void init_scroll_limits(_lv_indev_proc_t * proc)
+{
+    lv_obj_t * obj = proc->types.pointer.scroll_obj;
+    /*If there no STOP allow scrolling anywhere*/
+    if(lv_obj_has_flag(obj, LV_OBJ_FLAG_SCROLL_ONE) == false) {
+        lv_area_set(&proc->types.pointer.scroll_area, LV_COORD_MIN, LV_COORD_MIN, LV_COORD_MAX, LV_COORD_MAX);
+    }
+    /*With STOP limit the scrolling to the perv and next snap point*/
+    else {
+        switch(lv_obj_get_scroll_snap_y(obj)) {
+        case LV_SCROLL_SNAP_START:
+            proc->types.pointer.scroll_area.y1 = find_snap_point_y(obj, obj->coords.y1 + 1, LV_COORD_MAX, 0);
+            proc->types.pointer.scroll_area.y2 = find_snap_point_y(obj, LV_COORD_MIN, obj->coords.y1 - 1, 0);
+            break;
+        case LV_SCROLL_SNAP_END:
+            proc->types.pointer.scroll_area.y1 = find_snap_point_y(obj, obj->coords.y2, LV_COORD_MAX, 0);
+            proc->types.pointer.scroll_area.y2 = find_snap_point_y(obj, LV_COORD_MIN, obj->coords.y2, 0);
+            break;
+        case LV_SCROLL_SNAP_CENTER: {
+            lv_coord_t y_mid = obj->coords.y1 + lv_area_get_height(&obj->coords) / 2;
+            proc->types.pointer.scroll_area.y1 = find_snap_point_y(obj, y_mid + 1, LV_COORD_MAX, 0);
+            proc->types.pointer.scroll_area.y2 = find_snap_point_y(obj, LV_COORD_MIN, y_mid - 1, 0);
+            break;
+        }
+        default:
+            proc->types.pointer.scroll_area.y1 = LV_COORD_MIN;
+            proc->types.pointer.scroll_area.y2 = LV_COORD_MAX;
+            break;
+        }
+
+        switch(lv_obj_get_scroll_snap_x(obj)) {
+        case LV_SCROLL_SNAP_START:
+            proc->types.pointer.scroll_area.x1 = find_snap_point_x(obj, obj->coords.x1, LV_COORD_MAX, 0);
+            proc->types.pointer.scroll_area.x2 = find_snap_point_x(obj, LV_COORD_MIN, obj->coords.x1, 0);
+            break;
+        case LV_SCROLL_SNAP_END:
+            proc->types.pointer.scroll_area.x1 = find_snap_point_x(obj, obj->coords.x2, LV_COORD_MAX, 0);
+            proc->types.pointer.scroll_area.x2 = find_snap_point_x(obj, LV_COORD_MIN, obj->coords.x2, 0);
+            break;
+        case LV_SCROLL_SNAP_CENTER: {
+            lv_coord_t x_mid = obj->coords.x1 + lv_area_get_width(&obj->coords) / 2;
+            proc->types.pointer.scroll_area.x1 = find_snap_point_x(obj, x_mid + 1, LV_COORD_MAX, 0);
+            proc->types.pointer.scroll_area.x2 = find_snap_point_x(obj, LV_COORD_MIN, x_mid - 1, 0);
+            break;
+        }
+        default:
+            proc->types.pointer.scroll_area.x1 = LV_COORD_MIN;
+            proc->types.pointer.scroll_area.x2 = LV_COORD_MAX;
+            break;
+        }
+    }
+
+    /*Allow scrolling on the edges. It will be reverted to the edge due to snapping anyway*/
+    if(proc->types.pointer.scroll_area.x1 == 0) proc->types.pointer.scroll_area.x1 = LV_COORD_MIN;
+    if(proc->types.pointer.scroll_area.x2 == 0) proc->types.pointer.scroll_area.x2 = LV_COORD_MAX;
+    if(proc->types.pointer.scroll_area.y1 == 0) proc->types.pointer.scroll_area.y1 = LV_COORD_MIN;
+    if(proc->types.pointer.scroll_area.y2 == 0) proc->types.pointer.scroll_area.y2 = LV_COORD_MAX;
+}
+
+/**
+ * Search for snap point in the `min` - `max` range.
+ * @param obj the object on which snap point should be found
+ * @param min ignore snap points smaller then this. (Absolute coordinate)
+ * @param max ignore snap points greater then this. (Absolute coordinate)
+ * @param ofs offset to snap points. Useful the get a snap point in an imagined case
+ *            what if children are already moved by this value
+ * @return the distance of the snap point.
+ */
+static lv_coord_t find_snap_point_x(const lv_obj_t * obj, lv_coord_t min, lv_coord_t max, lv_coord_t ofs)
+{
+    lv_scroll_snap_t align = lv_obj_get_scroll_snap_x(obj);
+    if(align == LV_SCROLL_SNAP_NONE) return 0;
+
+    lv_coord_t dist = LV_COORD_MAX;
+
+    lv_coord_t pad_left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+    lv_coord_t pad_right = lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
+
+    uint32_t i;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        lv_obj_t * child = lv_obj_get_child(obj, i);
+        if(lv_obj_has_flag_any(child, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING)) continue;
+        if(lv_obj_has_flag(child, LV_OBJ_FLAG_SNAPABLE)) {
+            lv_coord_t x_child = 0;
+            lv_coord_t x_parent = 0;
+            switch(align) {
+            case LV_SCROLL_SNAP_START:
+                x_child = child->coords.x1;
+                x_parent = obj->coords.x1 + pad_left;
+                break;
+            case LV_SCROLL_SNAP_END:
+                x_child = child->coords.x2;
+                x_parent = obj->coords.x2 - pad_right;
+                break;
+            case LV_SCROLL_SNAP_CENTER:
+                x_child = child->coords.x1 + lv_area_get_width(&child->coords) / 2;
+                x_parent = obj->coords.x1 + pad_left + (lv_area_get_width(&obj->coords) - pad_left - pad_right) / 2;
+                break;
+            default:
+                continue;
+            }
+
+            x_child += ofs;
+            if(x_child >= min && x_child <= max) {
+                lv_coord_t x = x_child -  x_parent;
+                if(LV_ABS(x) < LV_ABS(dist)) dist = x;
+            }
+        }
+    }
+
+    return dist == LV_COORD_MAX ? 0: -dist;
+}
+
+/**
+ * Search for snap point in the `min` - `max` range.
+ * @param obj the object on which snap point should be found
+ * @param min ignore snap points smaller then this. (Absolute coordinate)
+ * @param max ignore snap points greater then this. (Absolute coordinate)
+ * @param ofs offset to snap points. Useful the get a snap point in an imagined case
+ *            what if children are already moved by this value
+ * @return the distance of the snap point.
+ */
+static lv_coord_t find_snap_point_y(const lv_obj_t * obj, lv_coord_t min, lv_coord_t max, lv_coord_t ofs)
+{
+    lv_scroll_snap_t align = lv_obj_get_scroll_snap_y(obj);
+    if(align == LV_SCROLL_SNAP_NONE) return 0;
+
+    lv_coord_t dist = LV_COORD_MAX;
+
+    lv_coord_t pad_top = lv_obj_get_style_pad_top(obj, LV_PART_MAIN);
+    lv_coord_t pad_bottom = lv_obj_get_style_pad_bottom(obj, LV_PART_MAIN);
+
+    uint32_t i;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        lv_obj_t * child = lv_obj_get_child(obj, i);
+        if(lv_obj_has_flag_any(child, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING)) continue;
+        if(lv_obj_has_flag(child, LV_OBJ_FLAG_SNAPABLE)) {
+            lv_coord_t y_child = 0;
+            lv_coord_t y_parent = 0;
+            switch(align) {
+            case LV_SCROLL_SNAP_START:
+                y_child = child->coords.y1;
+                y_parent = obj->coords.y1 + pad_top;
+                break;
+            case LV_SCROLL_SNAP_END:
+                y_child = child->coords.y2;
+                y_parent = obj->coords.y2 - pad_bottom;
+                break;
+            case LV_SCROLL_SNAP_CENTER:
+                y_child = child->coords.y1 + lv_area_get_height(&child->coords) / 2;
+                y_parent = obj->coords.y1 + pad_top + (lv_area_get_height(&obj->coords) - pad_top - pad_bottom) / 2;
+                break;
+            default:
+                continue;
+            }
+
+            y_child += ofs;
+            if(y_child >= min && y_child <= max) {
+                lv_coord_t y = y_child -  y_parent;
+                if(LV_ABS(y) < LV_ABS(dist)) dist = y;
+            }
+        }
+    }
+
+    return dist == LV_COORD_MAX ? 0 : -dist;
+}
+
+static void scroll_limit_diff(_lv_indev_proc_t * proc, lv_coord_t * diff_x, lv_coord_t * diff_y)
+{
+    if(diff_y) {
+        if(proc->types.pointer.scroll_sum.y + *diff_y < proc->types.pointer.scroll_area.y1) {
+           *diff_y = proc->types.pointer.scroll_area.y1 - proc->types.pointer.scroll_sum.y;
+        }
+
+        if(proc->types.pointer.scroll_sum.y + *diff_y > proc->types.pointer.scroll_area.y2) {
+            *diff_y = proc->types.pointer.scroll_area.y2 - proc->types.pointer.scroll_sum.y;
+        }
+    }
+
+    if(diff_x) {
+        if(proc->types.pointer.scroll_sum.x + *diff_x < proc->types.pointer.scroll_area.x1) {
+            *diff_x = proc->types.pointer.scroll_area.x1 - proc->types.pointer.scroll_sum.x;
+        }
+
+        if(proc->types.pointer.scroll_sum.x + *diff_x > proc->types.pointer.scroll_area.x2) {
+            *diff_x = proc->types.pointer.scroll_area.x2 - proc->types.pointer.scroll_sum.x;
+        }
+    }
+}
+
+
+
+static lv_coord_t scroll_throw_predict_y(_lv_indev_proc_t * proc)
+{
+    lv_coord_t y =  proc->types.pointer.scroll_throw_vect.y;
+    lv_coord_t move = 0;
+
+    lv_indev_t * indev_act = lv_indev_get_act();
+    lv_coord_t scroll_throw =  indev_act->driver->scroll_throw;
+
+    while(y) {
+        move += y;
+        y = y * (100 - scroll_throw) / 100;
+    }
+    return move;
+}
+
+
+static lv_coord_t scroll_throw_predict_x(_lv_indev_proc_t * proc)
+{
+    lv_coord_t x =  proc->types.pointer.scroll_throw_vect.x;
+    lv_coord_t move = 0;
+
+    lv_indev_t * indev_act = lv_indev_get_act();
+    lv_coord_t scroll_throw =  indev_act->driver->scroll_throw;
+
+    while(x) {
+        move += x;
+        x = x * (100 - scroll_throw) / 100;
+    }
+    return move;
+}
+
+static lv_coord_t elastic_diff(lv_obj_t * scroll_obj, lv_coord_t diff, lv_coord_t scroll_start, lv_coord_t scroll_end, lv_dir_t dir)
+{
+    if(lv_obj_has_flag(scroll_obj, LV_OBJ_FLAG_SCROLL_ELASTIC)) {
+        /*If there is snapping in the current direction don't use the elastic factor because
+         *it's natural that the first and last items are scrolled (snapped) in.*/
+        lv_scroll_snap_t snap;
+        snap = dir == LV_DIR_HOR ? lv_obj_get_scroll_snap_x(scroll_obj) : lv_obj_get_scroll_snap_y(scroll_obj);
+
+        lv_obj_t * act_obj = lv_indev_get_obj_act();
+        lv_coord_t snap_point = 0;
+        lv_coord_t act_obj_point = 0;
+
+        if(dir == LV_DIR_HOR) {
+            lv_coord_t pad_left = lv_obj_get_style_pad_left(scroll_obj, LV_PART_MAIN);
+            lv_coord_t pad_right = lv_obj_get_style_pad_right(scroll_obj, LV_PART_MAIN);
+
+            switch(snap) {
+            case LV_SCROLL_SNAP_CENTER:
+                snap_point = pad_left + (lv_area_get_width(&scroll_obj->coords) - pad_left - pad_right) / 2 + scroll_obj->coords.x1;
+                act_obj_point = lv_area_get_width(&act_obj->coords) / 2 + act_obj->coords.x1;
+                break;
+            case LV_SCROLL_SNAP_START:
+                snap_point = scroll_obj->coords.x1 + pad_left;
+                act_obj_point = act_obj->coords.x1;
+                break;
+            case LV_SCROLL_SNAP_END:
+                snap_point = scroll_obj->coords.x2 - pad_right;
+                act_obj_point = act_obj->coords.x2;
+                break;
+            }
+        } else {
+            lv_coord_t pad_top = lv_obj_get_style_pad_top(scroll_obj, LV_PART_MAIN);
+            lv_coord_t pad_bottom = lv_obj_get_style_pad_bottom(scroll_obj, LV_PART_MAIN);
+
+            switch(snap) {
+            case LV_SCROLL_SNAP_CENTER:
+                snap_point = pad_top + (lv_area_get_height(&scroll_obj->coords) - pad_top - pad_bottom) / 2 + scroll_obj->coords.y1;
+                act_obj_point = lv_area_get_height(&act_obj->coords) / 2 + act_obj->coords.y1;
+                break;
+            case LV_SCROLL_SNAP_START:
+                snap_point = scroll_obj->coords.y1 + pad_top;
+                act_obj_point = act_obj->coords.y1;
+                break;
+            case LV_SCROLL_SNAP_END:
+                snap_point = scroll_obj->coords.y2 - pad_bottom;
+                act_obj_point = act_obj->coords.y2;
+                break;
+            }
+        }
+
+        if(scroll_end < 0) {
+            if(snap != LV_SCROLL_SNAP_NONE && act_obj_point > snap_point) return diff;
+
+            /*Rounding*/
+            if(diff < 0) diff -= ELASTIC_SLOWNESS_FACTOR / 2;
+            if(diff > 0) diff += ELASTIC_SLOWNESS_FACTOR / 2;
+            return diff / ELASTIC_SLOWNESS_FACTOR;
+        }
+        else if(scroll_start < 0) {
+            if(snap != LV_SCROLL_SNAP_NONE && act_obj_point < snap_point) return diff;
+
+            /*Rounding*/
+            if(diff < 0) diff -= ELASTIC_SLOWNESS_FACTOR / 2;
+            if(diff > 0) diff += ELASTIC_SLOWNESS_FACTOR / 2;
+            return diff / ELASTIC_SLOWNESS_FACTOR;
+        }
+    } else {
+        /*Scroll back to the boundary if required*/
+        if(scroll_end + diff < 0) diff = - scroll_end;
+        if(scroll_start - diff < 0) diff = scroll_start;
+    }
+
+    return diff;
+}
+
+

+ 65 - 0
components/lvgl/src/core/lv_indev_scroll.h

@@ -0,0 +1,65 @@
+/**
+ * @file lv_indev_scroll.h
+ *
+ */
+
+#ifndef LV_INDEV_SCROLL_H
+#define LV_INDEV_SCROLL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Handle scrolling. Called by LVGL during input device processing
+ * @param proc      pointer to an input device's proc field
+ */
+void _lv_indev_scroll_handler(_lv_indev_proc_t * proc);
+
+/**
+ * Handle throwing after scrolling. Called by LVGL during input device processing
+ * @param proc      pointer to an input device's proc field
+ */
+void _lv_indev_scroll_throw_handler(_lv_indev_proc_t * proc);
+
+/**
+ * Predict where would a scroll throw end
+ * @param indev     pointer to an input device
+ * @param dir `     LV_DIR_VER` or `LV_DIR_HOR`
+ * @return          the difference compared to the current position when the throw would be finished
+ */
+lv_coord_t lv_indev_scroll_throw_predict(lv_indev_t * indev, lv_dir_t dir);
+
+/**
+ * Get the distance of the nearest snap point
+ * @param obj       the object on which snap points should be found
+ * @param p         save the distance of the found snap point there
+ */
+void lv_indev_scroll_get_snap_dist(lv_obj_t * obj, lv_point_t * p);
+
+/**********************
+ *      MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_INDEV_SCROLL_H*/

+ 791 - 0
components/lvgl/src/core/lv_obj.c

@@ -0,0 +1,791 @@
+/**
+ * @file lv_obj.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj.h"
+#include "lv_indev.h"
+#include "lv_refr.h"
+#include "lv_group.h"
+#include "lv_disp.h"
+#include "lv_theme.h"
+#include "../misc/lv_assert.h"
+#include "../draw/lv_draw.h"
+#include "../misc/lv_anim.h"
+#include "../misc/lv_timer.h"
+#include "../misc/lv_async.h"
+#include "../misc/lv_fs.h"
+#include "../misc/lv_gc.h"
+#include "../misc/lv_math.h"
+#include "../misc/lv_log.h"
+#include "../hal/lv_hal.h"
+#include "../extra/lv_extra.h"
+#include <stdint.h>
+#include <string.h>
+
+#if LV_USE_GPU_STM32_DMA2D
+    #include "../gpu/lv_gpu_stm32_dma2d.h"
+#endif
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+#define LV_OBJ_DEF_WIDTH    (LV_DPX(100))
+#define LV_OBJ_DEF_HEIGHT   (LV_DPX(50))
+#define GRID_DEBUG          0   /*Draw rectangles on grid cells*/
+#define STYLE_TRANSITION_MAX 32
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static void lv_obj_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
+static void lv_obj_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
+static void lv_obj_draw(lv_event_t * e);
+static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e);
+static void draw_scrollbar(lv_obj_t * obj, const lv_area_t * clip_area);
+static lv_res_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc);
+static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find);
+static void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+static bool lv_initialized = false;
+const lv_obj_class_t lv_obj_class = {
+    .constructor_cb = lv_obj_constructor,
+    .destructor_cb = lv_obj_destructor,
+    .event_cb = lv_obj_event,
+    .width_def = LV_DPI_DEF,
+    .height_def = LV_DPI_DEF,
+    .editable = LV_OBJ_CLASS_EDITABLE_FALSE,
+    .group_def = LV_OBJ_CLASS_GROUP_DEF_FALSE,
+    .instance_size = (sizeof(lv_obj_t)),
+    .base_class = NULL,
+};
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+void lv_init(void)
+{
+    /*Do nothing if already initialized*/
+    if(lv_initialized) {
+        LV_LOG_WARN("lv_init: already inited");
+        return;
+    }
+
+    LV_LOG_INFO("begin");
+
+    /*Initialize the misc modules*/
+    lv_mem_init();
+
+    _lv_timer_core_init();
+
+    _lv_fs_init();
+
+    _lv_anim_core_init();
+
+    _lv_group_init();
+
+#if LV_USE_GPU_STM32_DMA2D
+    /*Initialize DMA2D GPU*/
+    lv_gpu_stm32_dma2d_init();
+#endif
+
+    _lv_obj_style_init();
+    _lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t));
+    _lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t));
+
+    /*Initialize the screen refresh system*/
+    _lv_refr_init();
+
+    _lv_img_decoder_init();
+#if LV_IMG_CACHE_DEF_SIZE
+    lv_img_cache_set_size(LV_IMG_CACHE_DEF_SIZE);
+#endif
+    /*Test if the IDE has UTF-8 encoding*/
+    char * txt = "Á";
+
+    uint8_t * txt_u8 = (uint8_t *)txt;
+    if(txt_u8[0] != 0xc3 || txt_u8[1] != 0x81 || txt_u8[2] != 0x00) {
+        LV_LOG_WARN("The strings has no UTF-8 encoding. Non-ASCII characters won't be displayed.")
+    }
+
+    uint32_t endianess_test = 0x11223344;
+    uint8_t * endianess_test_p = (uint8_t*) &endianess_test;
+    bool big_endian = endianess_test_p[0] == 0x11 ? true : false;
+
+    if(big_endian) {
+        LV_ASSERT_MSG(LV_BIG_ENDIAN_SYSTEM == 1, "It's a big endian system but LV_BIG_ENDIAN_SYSTEM is not enabled in lv_conf.h");
+    } else {
+        LV_ASSERT_MSG(LV_BIG_ENDIAN_SYSTEM == 0, "It's a little endian system but LV_BIG_ENDIAN_SYSTEM is enabled in lv_conf.h");
+    }
+
+#if LV_USE_ASSERT_MEM_INTEGRITY
+    LV_LOG_WARN("Memory integrity checks are enabled via LV_USE_ASSERT_MEM_INTEGRITY which makes LVGL much slower")
+#endif
+
+#if LV_USE_ASSERT_OBJ
+    LV_LOG_WARN("Object sanity checks are enabled via LV_USE_ASSERT_OBJ which makes LVGL much slower")
+#endif
+
+#if LV_LOG_LEVEL == LV_LOG_LEVEL_TRACE
+    LV_LOG_WARN("Log level is set the Trace which makes LVGL much slower")
+#endif
+
+    lv_extra_init();
+
+    lv_initialized = true;
+
+    LV_LOG_TRACE("finished");
+}
+
+#if LV_ENABLE_GC || !LV_MEM_CUSTOM
+
+void lv_deinit(void)
+{
+    _lv_gc_clear_roots();
+
+    lv_disp_set_default(NULL);
+    lv_mem_deinit();
+    lv_initialized = false;
+
+    LV_LOG_INFO("lv_deinit done");
+
+#if LV_USE_LOG
+    lv_log_register_print_cb(NULL);
+#endif
+}
+#endif
+
+lv_obj_t * lv_obj_create(lv_obj_t * parent)
+{
+    LV_LOG_INFO("begin")
+    lv_obj_t * obj = lv_obj_class_create_obj(MY_CLASS, parent);
+    lv_obj_class_init_obj(obj);
+    return obj;
+}
+
+/*=====================
+ * Setter functions
+ *====================*/
+
+/*-----------------
+ * Attribute set
+ *----------------*/
+
+void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    bool was_on_layout = lv_obj_is_layout_positioned(obj);
+
+    if(f & LV_OBJ_FLAG_HIDDEN) lv_obj_invalidate(obj);
+
+    obj->flags |= f;
+
+    if(f & LV_OBJ_FLAG_HIDDEN) {
+        lv_obj_invalidate(obj);
+    }
+
+    if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 |  LV_OBJ_FLAG_LAYOUT_2))) {
+        lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
+    }
+}
+
+void lv_obj_clear_flag(lv_obj_t * obj, lv_obj_flag_t f)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    bool was_on_layout = lv_obj_is_layout_positioned(obj);
+
+    obj->flags &= (~f);
+
+    if(f & LV_OBJ_FLAG_HIDDEN) {
+        lv_obj_invalidate(obj);
+        if(lv_obj_is_layout_positioned(obj)) {
+            lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
+        }
+    }
+
+    if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 |  LV_OBJ_FLAG_LAYOUT_2))) {
+        lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
+    }
+}
+
+void lv_obj_add_state(lv_obj_t * obj, lv_state_t state)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_state_t new_state = obj->state | state;
+    if(obj->state != new_state) {
+        lv_obj_set_state(obj, new_state);
+    }
+}
+
+void lv_obj_clear_state(lv_obj_t * obj, lv_state_t state)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_state_t new_state = obj->state & (~state);
+    if(obj->state != new_state) {
+        lv_obj_set_state(obj, new_state);
+    }
+}
+
+/*=======================
+ * Getter functions
+ *======================*/
+
+bool lv_obj_has_flag(const lv_obj_t * obj, lv_obj_flag_t f)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return (obj->flags & f)  == f ? true : false;
+}
+
+bool lv_obj_has_flag_any(const lv_obj_t * obj, lv_obj_flag_t f)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return (obj->flags & f) ? true : false;
+}
+
+lv_state_t lv_obj_get_state(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return obj->state;
+}
+
+bool lv_obj_has_state(const lv_obj_t * obj, lv_state_t state)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return obj->state & state ? true : false;
+}
+
+void * lv_obj_get_group(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    if(obj->spec_attr) return obj->spec_attr->group_p;
+    else return NULL;
+}
+
+/*-------------------
+ * OTHER FUNCTIONS
+ *------------------*/
+
+void lv_obj_allocate_spec_attr(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    if(obj->spec_attr == NULL) {
+        static uint32_t x = 0;
+        x++;
+        obj->spec_attr = lv_mem_alloc(sizeof(_lv_obj_spec_attr_t));
+        LV_ASSERT_MALLOC(obj->spec_attr);
+        if(obj->spec_attr == NULL) return;
+
+        lv_memset_00(obj->spec_attr, sizeof(_lv_obj_spec_attr_t));
+
+        obj->spec_attr->scroll_dir = LV_DIR_ALL;
+        obj->spec_attr->scrollbar_mode = LV_SCROLLBAR_MODE_AUTO;
+    }
+}
+
+bool lv_obj_check_type(const lv_obj_t * obj, const lv_obj_class_t * class_p)
+{
+    if(obj == NULL) return false;
+    return obj->class_p == class_p ? true : false;
+}
+
+bool lv_obj_has_class(const lv_obj_t * obj, const lv_obj_class_t * class_p)
+{
+    const lv_obj_class_t * obj_class = obj->class_p;
+    while(obj_class) {
+        if(obj_class == class_p) return true;
+        obj_class = obj_class->base_class;
+    }
+
+    return false;
+}
+
+const lv_obj_class_t * lv_obj_get_class(const lv_obj_t * obj)
+{
+    return obj->class_p;
+}
+
+bool lv_obj_is_valid(const lv_obj_t * obj)
+{
+    lv_disp_t * disp = lv_disp_get_next(NULL);
+    while(disp) {
+        uint32_t i;
+        for(i = 0; i < disp->screen_cnt; i++) {
+            if(disp->screens[i] == obj) return true;
+            bool found = obj_valid_child(disp->screens[i], obj);
+            if(found) return true;
+        }
+
+        disp = lv_disp_get_next(disp);
+    }
+
+    return false;
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+static void lv_obj_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
+{
+    LV_UNUSED(class_p);
+    LV_TRACE_OBJ_CREATE("begin");
+
+    lv_obj_t * parent = obj->parent;
+    if(parent) {
+        lv_coord_t sl = lv_obj_get_scroll_left(parent);
+        lv_coord_t st = lv_obj_get_scroll_top(parent);
+
+        obj->coords.y1 = parent->coords.y1 + lv_obj_get_style_pad_top(parent, LV_PART_MAIN) - st;
+        obj->coords.y2 = obj->coords.y1 - 1;
+        obj->coords.x1  = parent->coords.x1 + lv_obj_get_style_pad_left(parent, LV_PART_MAIN) - sl;
+        obj->coords.x2  = obj->coords.x1 - 1;
+    }
+
+    /*Set attributes*/
+    obj->flags = LV_OBJ_FLAG_CLICKABLE;
+    obj->flags |= LV_OBJ_FLAG_SNAPABLE;
+    if(parent) obj->flags |= LV_OBJ_FLAG_PRESS_LOCK;
+    if(parent) obj->flags |= LV_OBJ_FLAG_SCROLL_CHAIN;
+    obj->flags |= LV_OBJ_FLAG_CLICK_FOCUSABLE;
+    obj->flags |= LV_OBJ_FLAG_SCROLLABLE;
+    obj->flags |= LV_OBJ_FLAG_SCROLL_ELASTIC;
+    obj->flags |= LV_OBJ_FLAG_SCROLL_MOMENTUM;
+    if(parent) obj->flags |= LV_OBJ_FLAG_GESTURE_BUBBLE;
+
+    LV_TRACE_OBJ_CREATE("finished");
+}
+
+static void lv_obj_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
+{
+    LV_UNUSED(class_p);
+
+    if(obj->spec_attr) {
+        if(obj->spec_attr->children) {
+            lv_mem_free(obj->spec_attr->children);
+            obj->spec_attr->children = NULL;
+        }
+        if(obj->spec_attr->event_dsc) {
+            lv_mem_free(obj->spec_attr->event_dsc);
+            obj->spec_attr->event_dsc = NULL;
+        }
+
+        lv_mem_free(obj->spec_attr);
+        obj->spec_attr = NULL;
+    }
+
+}
+
+static void lv_obj_draw(lv_event_t * e)
+{
+    lv_event_code_t code = lv_event_get_code(e);
+    lv_obj_t * obj = lv_event_get_target(e);
+    if(code == LV_EVENT_COVER_CHECK) {
+        lv_cover_check_info_t * info = lv_event_get_param(e);
+        if(info->res == LV_COVER_RES_MASKED) return;
+        if(lv_obj_get_style_clip_corner(obj, LV_PART_MAIN)) {
+            info->res = LV_COVER_RES_MASKED;
+            return;
+        }
+
+        /*Most trivial test. Is the mask fully IN the object? If no it surely doesn't cover it*/
+        lv_coord_t r = lv_obj_get_style_radius(obj, LV_PART_MAIN);
+        lv_coord_t w = lv_obj_get_style_transform_width(obj, LV_PART_MAIN);
+        lv_coord_t h = lv_obj_get_style_transform_height(obj, LV_PART_MAIN);
+        lv_area_t coords;
+        lv_area_copy(&coords, &obj->coords);
+        coords.x1 -= w;
+        coords.x2 += w;
+        coords.y1 -= h;
+        coords.y2 += h;
+
+        if(_lv_area_is_in(info->area, &coords, r) == false) {
+            info->res = LV_COVER_RES_NOT_COVER;
+           return;
+        }
+
+        if(lv_obj_get_style_bg_opa(obj, LV_PART_MAIN) < LV_OPA_MAX) {
+            info->res = LV_COVER_RES_NOT_COVER;
+            return;
+        }
+
+#if LV_DRAW_COMPLEX
+        if(lv_obj_get_style_blend_mode(obj, LV_PART_MAIN) != LV_BLEND_MODE_NORMAL) {
+            info->res = LV_COVER_RES_NOT_COVER;
+            return;
+        }
+#endif
+        if(lv_obj_get_style_opa(obj, LV_PART_MAIN) < LV_OPA_MAX) {
+            info->res = LV_COVER_RES_NOT_COVER;
+            return;
+        }
+
+        info->res = LV_COVER_RES_COVER;
+
+    }
+    else if(code == LV_EVENT_DRAW_MAIN) {
+        const lv_area_t * clip_area = lv_event_get_param(e);
+        lv_draw_rect_dsc_t draw_dsc;
+        lv_draw_rect_dsc_init(&draw_dsc);
+        /*If the border is drawn later disable loading its properties*/
+        if(lv_obj_get_style_border_post(obj, LV_PART_MAIN)) {
+            draw_dsc.border_post = 1;
+        }
+
+        lv_obj_init_draw_rect_dsc(obj, LV_PART_MAIN, &draw_dsc);
+
+        lv_coord_t w = lv_obj_get_style_transform_width(obj, LV_PART_MAIN);
+        lv_coord_t h = lv_obj_get_style_transform_height(obj, LV_PART_MAIN);
+        lv_area_t coords;
+        lv_area_copy(&coords, &obj->coords);
+        coords.x1 -= w;
+        coords.x2 += w;
+        coords.y1 -= h;
+        coords.y2 += h;
+
+        lv_draw_rect(&coords, clip_area, &draw_dsc);
+
+#if LV_DRAW_COMPLEX
+        if(lv_obj_get_style_clip_corner(obj, LV_PART_MAIN)) {
+            lv_draw_mask_radius_param_t * mp = lv_mem_buf_get(sizeof(lv_draw_mask_radius_param_t));
+            lv_coord_t r = lv_obj_get_style_radius(obj, LV_PART_MAIN);
+            lv_draw_mask_radius_init(mp, &obj->coords, r, false);
+            /*Add the mask and use `obj+8` as custom id. Don't use `obj` directly because it might be used by the user*/
+            lv_draw_mask_add(mp, obj + 8);
+        }
+#endif
+    }
+    else if(code == LV_EVENT_DRAW_POST) {
+        const lv_area_t * clip_area = lv_event_get_param(e);
+        draw_scrollbar(obj, clip_area);
+
+#if LV_DRAW_COMPLEX
+        if(lv_obj_get_style_clip_corner(obj, LV_PART_MAIN)) {
+            lv_draw_mask_radius_param_t * param = lv_draw_mask_remove_custom(obj + 8);
+            lv_mem_buf_release(param);
+        }
+#endif
+
+        /*If the border is drawn later disable loading other properties*/
+        if(lv_obj_get_style_border_post(obj, LV_PART_MAIN)) {
+            lv_draw_rect_dsc_t draw_dsc;
+            lv_draw_rect_dsc_init(&draw_dsc);
+            draw_dsc.bg_opa = LV_OPA_TRANSP;
+            draw_dsc.outline_opa = LV_OPA_TRANSP;
+            draw_dsc.shadow_opa = LV_OPA_TRANSP;
+            lv_obj_init_draw_rect_dsc(obj, LV_PART_MAIN, &draw_dsc);
+
+            lv_coord_t w = lv_obj_get_style_transform_width(obj, LV_PART_MAIN);
+            lv_coord_t h = lv_obj_get_style_transform_height(obj, LV_PART_MAIN);
+            lv_area_t coords;
+            lv_area_copy(&coords, &obj->coords);
+            coords.x1 -= w;
+            coords.x2 += w;
+            coords.y1 -= h;
+            coords.y2 += h;
+            lv_draw_rect(&coords, clip_area, &draw_dsc);
+        }
+    }
+}
+
+static void draw_scrollbar(lv_obj_t * obj, const lv_area_t * clip_area)
+{
+
+    lv_area_t hor_area;
+    lv_area_t ver_area;
+    lv_obj_get_scrollbar_area(obj, &hor_area, &ver_area);
+
+    if(lv_area_get_size(&hor_area) <= 0 && lv_area_get_size(&ver_area) <= 0) return;
+
+    lv_draw_rect_dsc_t draw_dsc;
+    lv_res_t sb_res = scrollbar_init_draw_dsc(obj, &draw_dsc);
+    if(sb_res != LV_RES_OK) return;
+
+    if(lv_area_get_size(&hor_area) > 0) lv_draw_rect(&hor_area, clip_area, &draw_dsc);
+    if(lv_area_get_size(&ver_area) > 0) lv_draw_rect(&ver_area, clip_area, &draw_dsc);
+}
+
+/**
+ * Initialize the draw descriptor for the scrollbar
+ * @param obj pointer to an object
+ * @param dsc the draw descriptor to initialize
+ * @return LV_RES_OK: the scrollbar is visible; LV_RES_INV: the scrollbar is not visible
+ */
+static lv_res_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc)
+{
+    lv_draw_rect_dsc_init(dsc);
+    dsc->bg_opa = lv_obj_get_style_bg_opa(obj, LV_PART_SCROLLBAR);
+    if(dsc->bg_opa > LV_OPA_MIN) {
+        dsc->bg_color = lv_obj_get_style_bg_color(obj, LV_PART_SCROLLBAR);
+    }
+
+    dsc->border_opa = lv_obj_get_style_border_opa(obj, LV_PART_SCROLLBAR);
+    if(dsc->border_opa > LV_OPA_MIN) {
+        dsc->border_width = lv_obj_get_style_border_width(obj, LV_PART_SCROLLBAR);
+        if(dsc->border_width > 0) {
+            dsc->border_color = lv_obj_get_style_border_color(obj, LV_PART_SCROLLBAR);
+        } else {
+            dsc->border_opa = LV_OPA_TRANSP;
+        }
+    }
+
+#if LV_DRAW_COMPLEX
+    dsc->shadow_opa = lv_obj_get_style_shadow_opa(obj, LV_PART_SCROLLBAR);
+    if(dsc->shadow_opa > LV_OPA_MIN) {
+        dsc->shadow_width = lv_obj_get_style_shadow_width(obj, LV_PART_SCROLLBAR);
+        if(dsc->shadow_width > 0) {
+            dsc->shadow_spread = lv_obj_get_style_shadow_spread(obj, LV_PART_SCROLLBAR);
+            dsc->shadow_color = lv_obj_get_style_shadow_color(obj, LV_PART_SCROLLBAR);
+        } else {
+            dsc->shadow_opa = LV_OPA_TRANSP;
+        }
+    }
+
+    lv_opa_t opa = lv_obj_get_style_opa(obj, LV_PART_SCROLLBAR);
+    if(opa < LV_OPA_MAX) {
+        dsc->bg_opa = (dsc->bg_opa * opa) >> 8;
+        dsc->border_opa = (dsc->bg_opa * opa) >> 8;
+        dsc->shadow_opa = (dsc->bg_opa * opa) >> 8;
+    }
+
+    if(dsc->bg_opa != LV_OPA_TRANSP || dsc->border_opa != LV_OPA_TRANSP || dsc->shadow_opa != LV_OPA_TRANSP ) {
+        dsc->radius = lv_obj_get_style_radius(obj, LV_PART_SCROLLBAR);
+        return LV_RES_OK;
+    } else {
+        return LV_RES_INV;
+    }
+#else
+    if(dsc->bg_opa != LV_OPA_TRANSP || dsc->border_opa != LV_OPA_TRANSP) return LV_RES_OK;
+    else return LV_RES_INV;
+#endif
+}
+
+static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
+{
+    LV_UNUSED(class_p);
+
+    lv_event_code_t code = lv_event_get_code(e);
+    lv_obj_t * obj = lv_event_get_target(e);
+    if(code == LV_EVENT_PRESSED) {
+        lv_obj_add_state(obj, LV_STATE_PRESSED);
+    }
+    else if(code == LV_EVENT_RELEASED) {
+        lv_obj_clear_state(obj, LV_STATE_PRESSED);
+        void * param = lv_event_get_param(e);
+        /*Go the checked state if enabled*/
+        if(lv_indev_get_scroll_obj(param) == NULL && lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
+            if(!(lv_obj_get_state(obj) & LV_STATE_CHECKED)) lv_obj_add_state(obj, LV_STATE_CHECKED);
+            else lv_obj_clear_state(obj, LV_STATE_CHECKED);
+
+            lv_res_t res = lv_event_send(obj, LV_EVENT_VALUE_CHANGED, NULL);
+            if(res != LV_RES_OK) return;
+        }
+    }
+    else if(code == LV_EVENT_PRESS_LOST) {
+        lv_obj_clear_state(obj, LV_STATE_PRESSED);
+    }
+    else if(code == LV_EVENT_KEY) {
+        if(lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
+            char c = *((char *)lv_event_get_param(e));
+            if(c == LV_KEY_RIGHT || c == LV_KEY_UP) {
+                lv_obj_add_state(obj, LV_STATE_CHECKED);
+            }
+            else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) {
+                lv_obj_clear_state(obj, LV_STATE_CHECKED);
+            }
+            lv_res_t res = lv_event_send(obj, LV_EVENT_VALUE_CHANGED, NULL);
+            if(res != LV_RES_OK) return;
+        }
+    }
+    else if(code == LV_EVENT_FOCUSED) {
+        if(lv_obj_has_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS)) {
+            lv_obj_scroll_to_view_recursive(obj, LV_ANIM_ON);
+        }
+
+        bool editing = false;
+        editing = lv_group_get_editing(lv_obj_get_group(obj));
+        lv_state_t state = LV_STATE_FOCUSED;
+
+        lv_indev_t * indev = lv_indev_get_act();
+        lv_indev_type_t indev_type = lv_indev_get_type(indev);
+        if(indev_type == LV_INDEV_TYPE_KEYPAD || indev_type == LV_INDEV_TYPE_ENCODER) state |= LV_STATE_FOCUS_KEY;
+        if(editing) {
+            state |= LV_STATE_EDITED;
+            lv_obj_add_state(obj, state);
+        }
+        else {
+            lv_obj_add_state(obj, state);
+            lv_obj_clear_state(obj, LV_STATE_EDITED);
+        }
+    }
+    else if(code == LV_EVENT_SCROLL_BEGIN) {
+        lv_obj_add_state(obj, LV_STATE_SCROLLED);
+    }
+    else if(code == LV_EVENT_SCROLL_END) {
+        lv_obj_clear_state(obj, LV_STATE_SCROLLED);
+    }
+    else if(code == LV_EVENT_DEFOCUSED) {
+        lv_obj_clear_state(obj, LV_STATE_FOCUSED | LV_STATE_EDITED | LV_STATE_FOCUS_KEY);
+    }
+    else if(code == LV_EVENT_SIZE_CHANGED) {
+        lv_coord_t align = lv_obj_get_style_align(obj, LV_PART_MAIN);
+        uint16_t layout = lv_obj_get_style_layout(obj, LV_PART_MAIN);
+        if(layout || align) {
+            lv_obj_mark_layout_as_dirty(obj);
+        }
+
+        uint32_t i;
+        for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+            lv_obj_t * child = lv_obj_get_child(obj, i);
+            lv_obj_mark_layout_as_dirty(child);
+        }
+    }
+    else if(code == LV_EVENT_CHILD_CHANGED) {
+        lv_coord_t w = lv_obj_get_style_width(obj, LV_PART_MAIN);
+        lv_coord_t h = lv_obj_get_style_height(obj, LV_PART_MAIN);
+        lv_coord_t align = lv_obj_get_style_align(obj, LV_PART_MAIN);
+        uint16_t layout = lv_obj_get_style_layout(obj, LV_PART_MAIN);
+        if(layout || align || w == LV_SIZE_CONTENT || h == LV_SIZE_CONTENT) {
+            lv_obj_mark_layout_as_dirty(obj);
+        }
+    }
+    else if(code == LV_EVENT_SCROLL_END) {
+        if(lv_obj_get_scrollbar_mode(obj) == LV_SCROLLBAR_MODE_ACTIVE) {
+            lv_obj_invalidate(obj);
+        }
+    }
+    else if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) {
+        lv_coord_t * s = lv_event_get_param(e);
+        lv_coord_t d = lv_obj_calculate_ext_draw_size(obj, LV_PART_MAIN);
+        *s = LV_MAX(*s, d);
+    }
+    else if(code == LV_EVENT_DRAW_MAIN || code == LV_EVENT_DRAW_POST || code == LV_EVENT_COVER_CHECK) {
+        lv_obj_draw(e);
+    }
+}
+
+/**
+ * Set the state (fully overwrite) of an object.
+ * If specified in the styles, transition animations will be started from the previous state to the current.
+ * @param obj       pointer to an object
+ * @param state     the new state
+ */
+static void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
+{
+    if(obj->state == new_state) return;
+
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_state_t prev_state = obj->state;
+    obj->state = new_state;
+
+    _lv_style_state_cmp_t cmp_res = _lv_obj_style_state_compare(obj, prev_state, new_state);
+    /*If there is no difference in styles there is nothing else to do*/
+    if(cmp_res == _LV_STYLE_STATE_CMP_SAME) return;
+
+    _lv_obj_style_transition_dsc_t * ts = lv_mem_buf_get(sizeof(_lv_obj_style_transition_dsc_t) * STYLE_TRANSITION_MAX);
+    lv_memset_00(ts, sizeof(_lv_obj_style_transition_dsc_t) * STYLE_TRANSITION_MAX);
+    uint32_t tsi = 0;
+    uint32_t i;
+    for(i = 0; i < obj->style_cnt && tsi < STYLE_TRANSITION_MAX; i++) {
+        _lv_obj_style_t * obj_style = &obj->styles[i];
+        lv_state_t state_act = lv_obj_style_get_selector_state(obj->styles[i].selector);
+        lv_part_t part_act = lv_obj_style_get_selector_part(obj->styles[i].selector);
+        if(state_act & (~new_state)) continue; /*Skip unrelated styles*/
+        if(obj_style->is_trans) continue;
+
+        lv_style_value_t v;
+        if(lv_style_get_prop_inlined(obj_style->style, LV_STYLE_TRANSITION, &v) == false) continue;
+        const lv_style_transition_dsc_t * tr = v.ptr;
+
+        /*Add the props to the set if not added yet or added but with smaller weight*/
+        uint32_t j;
+        for(j = 0; tr->props[j] != 0 && tsi < STYLE_TRANSITION_MAX; j++) {
+            uint32_t t;
+            for(t = 0; t < tsi; t++) {
+                lv_style_selector_t selector = ts[t].selector;
+                lv_state_t state_ts = lv_obj_style_get_selector_state(selector);
+                lv_part_t part_ts = lv_obj_style_get_selector_part(selector);
+                if(ts[t].prop == tr->props[j] && part_ts == part_act && state_ts >= state_act) break;
+            }
+
+            /*If not found  add it*/
+            if(t == tsi) {
+                ts[tsi].time = tr->time;
+                ts[tsi].delay = tr->delay;
+                ts[tsi].path_cb = tr->path_xcb;
+                ts[tsi].prop = tr->props[j];
+#if LV_USE_USER_DATA
+                ts[tsi].user_data = tr->user_data;
+#endif
+                ts[tsi].selector = obj_style->selector;
+                tsi++;
+            }
+        }
+    }
+
+    for(i = 0;i < tsi; i++) {
+        lv_part_t part_act = lv_obj_style_get_selector_part(ts[i].selector);
+        _lv_obj_style_create_transition(obj, part_act, prev_state, new_state, &ts[i]);
+    }
+
+    lv_mem_buf_release(ts);
+
+    if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_REDRAW) {
+        lv_obj_invalidate(obj);
+    }
+    else if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_LAYOUT) {
+        lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY);
+    }
+    else if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD) {
+        lv_obj_invalidate(obj);
+        lv_obj_refresh_ext_draw_size(obj);
+    }
+}
+
+static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find)
+{
+
+    /*Check all children of `parent`*/
+    uint32_t child_cnt = 0;
+    if(parent->spec_attr) child_cnt = parent->spec_attr->child_cnt;
+    uint32_t i;
+    for(i = 0; i < child_cnt; i++) {
+        lv_obj_t * child = parent->spec_attr->children[i];
+        if(child == obj_to_find) {
+            return true;
+        }
+
+        /*Check the children*/
+        bool found = obj_valid_child(child, obj_to_find);
+        if(found) {
+            return true;
+        }
+    }
+    return false;
+}

+ 387 - 0
components/lvgl/src/core/lv_obj.h

@@ -0,0 +1,387 @@
+/**
+ * @file lv_obj.h
+ *
+ */
+
+#ifndef LV_OBJ_H
+#define LV_OBJ_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "../lv_conf_internal.h"
+
+#include <stddef.h>
+#include <stdbool.h>
+#include "../misc/lv_style.h"
+#include "../misc/lv_types.h"
+#include "../misc/lv_area.h"
+#include "../misc/lv_color.h"
+#include "../misc/lv_assert.h"
+#include "../hal/lv_hal.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+struct _lv_obj_t;
+
+/**
+ * Possible states of a widget.
+ * OR-ed values are possible
+ */
+enum {
+    LV_STATE_DEFAULT     =  0x0000,
+    LV_STATE_CHECKED     =  0x0001,
+    LV_STATE_FOCUSED     =  0x0002,
+    LV_STATE_FOCUS_KEY   =  0x0004,
+    LV_STATE_EDITED      =  0x0008,
+    LV_STATE_HOVERED     =  0x0010,
+    LV_STATE_PRESSED     =  0x0020,
+    LV_STATE_SCROLLED    =  0x0040,
+    LV_STATE_DISABLED    =  0x0080,
+
+    LV_STATE_USER_1      =  0x1000,
+    LV_STATE_USER_2      =  0x2000,
+    LV_STATE_USER_3      =  0x4000,
+    LV_STATE_USER_4      =  0x8000,
+
+    LV_STATE_ANY = 0xFFFF,    /**< Special value can be used in some functions to target all states*/
+};
+
+typedef uint16_t lv_state_t;
+
+/**
+ * The possible parts of widgets.
+ * The parts can be considered as the internal building block of the widgets.
+ * E.g. slider = background + indicator + knob
+ * Note every part is used by every widget
+ */
+enum {
+    LV_PART_MAIN         = 0x000000,   /**< A background like rectangle*/
+    LV_PART_SCROLLBAR    = 0x010000,   /**< The scrollbar(s)*/
+    LV_PART_INDICATOR    = 0x020000,   /**< Indicator, e.g. for slider, bar, switch, or the tick box of the checkbox*/
+    LV_PART_KNOB         = 0x030000,   /**< Like handle to grab to adjust the value*/
+    LV_PART_SELECTED     = 0x040000,   /**< Indicate the currently selected option or section*/
+    LV_PART_ITEMS        = 0x050000,   /**< Used if the widget has multiple similar elements (e.g. tabel cells)*/
+    LV_PART_TICKS        = 0x060000,   /**< Ticks on scale e.g. for a chart or meter*/
+    LV_PART_CURSOR       = 0x070000,   /**< Mark a specific place e.g. for text area's cursor or on a chart*/
+
+    LV_PART_CUSTOM_FIRST = 0x080000,    /**< Extension point for custom widgets*/
+
+    LV_PART_ANY          = 0x0F0000,    /**< Special value can be used in some functions to target all parts*/
+};
+
+typedef uint32_t lv_part_t;
+
+/**
+ * On/Off features controlling the object's behavior.
+ * OR-ed values are possible
+ */
+enum {
+    LV_OBJ_FLAG_HIDDEN          = (1 << 0),  /**< Make the object hidden. (Like it wasn't there at all)*/
+    LV_OBJ_FLAG_CLICKABLE       = (1 << 1),  /**< Make the object clickable by the input devices*/
+    LV_OBJ_FLAG_CLICK_FOCUSABLE = (1 << 2),  /**< Add focused state to the object when clicked*/
+    LV_OBJ_FLAG_CHECKABLE       = (1 << 3),  /**< Toggle checked state when the object is clicked*/
+    LV_OBJ_FLAG_SCROLLABLE      = (1 << 4),  /**< Make the object scrollable*/
+    LV_OBJ_FLAG_SCROLL_ELASTIC  = (1 << 5),  /**< Allow scrolling inside but with slower speed*/
+    LV_OBJ_FLAG_SCROLL_MOMENTUM = (1 << 6),  /**< Make the object scroll further when "thrown"*/
+    LV_OBJ_FLAG_SCROLL_ONE      = (1 << 7),   /**< Allow scrolling only one snapable children*/
+    LV_OBJ_FLAG_SCROLL_CHAIN    = (1 << 8),  /**< Allow propagating the scroll to a parent*/
+    LV_OBJ_FLAG_SCROLL_ON_FOCUS = (1 << 9),  /**< Automatically scroll object to make it visible when focused*/
+    LV_OBJ_FLAG_SNAPABLE        = (1 << 10), /**< If scroll snap is enabled on the parent it can snap to this object*/
+    LV_OBJ_FLAG_PRESS_LOCK      = (1 << 11), /**< Keep the object pressed even if the press slid from the object*/
+    LV_OBJ_FLAG_EVENT_BUBBLE    = (1 << 12), /**< Propagate the events to the parent too*/
+    LV_OBJ_FLAG_GESTURE_BUBBLE  = (1 << 13), /**< Propagate the gestures to the parent*/
+    LV_OBJ_FLAG_ADV_HITTEST     = (1 << 14), /**< Allow performing more accurate hit (click) test. E.g. consider rounded corners.*/
+    LV_OBJ_FLAG_IGNORE_LAYOUT   = (1 << 15), /**< Make the object position-able by the layouts*/
+    LV_OBJ_FLAG_FLOATING        = (1 << 16), /**< Do not scroll the object when the parent scrolls and ignore layout*/
+
+    LV_OBJ_FLAG_LAYOUT_1        = (1 << 23), /** Custom flag, free to use by layouts*/
+    LV_OBJ_FLAG_LAYOUT_2        = (1 << 24), /** Custom flag, free to use by layouts*/
+
+    LV_OBJ_FLAG_WIDGET_1        = (1 << 25), /** Custom flag, free to use by widget*/
+    LV_OBJ_FLAG_WIDGET_2        = (1 << 26), /** Custom flag, free to use by widget*/
+
+    LV_OBJ_FLAG_USER_1          = (1 << 27), /** Custom flag, free to use by user*/
+    LV_OBJ_FLAG_USER_2          = (1 << 28), /** Custom flag, free to use by user*/
+    LV_OBJ_FLAG_USER_3          = (1 << 29), /** Custom flag, free to use by user*/
+    LV_OBJ_FLAG_USER_4          = (1 << 30), /** Custom flag, free to use by user*/
+};
+typedef uint32_t lv_obj_flag_t;
+
+#include "lv_obj_tree.h"
+#include "lv_obj_pos.h"
+#include "lv_obj_scroll.h"
+#include "lv_obj_style.h"
+#include "lv_obj_draw.h"
+#include "lv_obj_class.h"
+#include "lv_event.h"
+#include "lv_group.h"
+
+/**
+ * Make the base object's class publicly available.
+ */
+extern const lv_obj_class_t lv_obj_class;
+
+/**
+ * Special, rarely used attributes.
+ * They are allocated automatically if any elements is set.
+ */
+typedef struct {
+    struct _lv_obj_t ** children;       /**< Store the pointer of the children in an array.*/
+    uint32_t child_cnt;                 /**< Number of children*/
+    lv_group_t * group_p;
+
+    struct _lv_event_dsc_t * event_dsc;             /**< Dynamically allocated event callback and user data array*/
+    lv_point_t scroll;                      /**< The current X/Y scroll offset*/
+
+    lv_coord_t ext_click_pad;              /**< Extra click padding in all direction*/
+    lv_coord_t ext_draw_size;           /**< EXTend the size in every direction for drawing.*/
+
+    lv_scrollbar_mode_t scrollbar_mode :2; /**< How to display scrollbars*/
+    lv_scroll_snap_t scroll_snap_x : 2;      /**< Where to align the snapable children horizontally*/
+    lv_scroll_snap_t scroll_snap_y : 2;      /**< Where to align the snapable children horizontally*/
+    lv_dir_t scroll_dir :4;                /**< The allowed scroll direction(s)*/
+    uint8_t event_dsc_cnt;           /**< Number of event callabcks stored in `event_cb` array*/
+}_lv_obj_spec_attr_t;
+
+typedef struct _lv_obj_t {
+    const lv_obj_class_t * class_p;
+    struct _lv_obj_t * parent;
+    _lv_obj_spec_attr_t * spec_attr;
+    _lv_obj_style_t * styles;
+#if LV_USE_USER_DATA
+    void * user_data;
+#endif
+    lv_area_t coords;
+    lv_obj_flag_t flags;
+    lv_state_t state;
+    uint16_t layout_inv :1;
+    uint16_t scr_layout_inv :1;
+    uint16_t skip_trans :1;
+    uint16_t style_cnt  :6;
+    uint16_t h_layout   :1;
+    uint16_t w_layout   :1;
+}lv_obj_t;
+
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Initialize LVGL library.
+ * Should be called before any other LVGL related function.
+ */
+void lv_init(void);
+
+#if LV_ENABLE_GC || !LV_MEM_CUSTOM
+
+/**
+ * Deinit the 'lv' library
+ * Currently only implemented when not using custom allocators, or GC is enabled.
+ */
+void lv_deinit(void);
+
+#endif
+
+/**
+ * Create a base object (a rectangle)
+ * @param parent    pointer to a parent object. If NULL then a screen will be created.
+ * @return pointer to the new object
+ */
+lv_obj_t * lv_obj_create(lv_obj_t * parent);
+
+
+/*=====================
+ * Setter functions
+ *====================*/
+
+/**
+ * Set one or more flags
+ * @param obj   pointer to an object
+ * @param f     R-ed values from `lv_obj_flag_t` to set.
+ */
+void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f);
+
+/**
+ * Clear one or more flags
+ * @param obj   pointer to an object
+ * @param f     OR-ed values from `lv_obj_flag_t` to set.
+ */
+void lv_obj_clear_flag(lv_obj_t * obj, lv_obj_flag_t f);
+
+
+/**
+ * Add one or more states to the object. The other state bits will remain unchanged.
+ * If specified in the styles, transition animation will be started from the previous state to the current.
+ * @param obj       pointer to an object
+ * @param state     the states to add. E.g `LV_STATE_PRESSED | LV_STATE_FOCUSED`
+ */
+void lv_obj_add_state(lv_obj_t * obj, lv_state_t state);
+
+/**
+ * Remove one or more states to the object. The other state bits will remain unchanged.
+ * If specified in the styles, transition animation will be started from the previous state to the current.
+ * @param obj       pointer to an object
+ * @param state     the states to add. E.g `LV_STATE_PRESSED | LV_STATE_FOCUSED`
+ */
+void lv_obj_clear_state(lv_obj_t * obj, lv_state_t state);
+
+/**
+ * Set the user_data field of the object
+ * @param obj   pointer to an object
+ * @param user_data   pointer to the new user_data.
+ */
+#if LV_USE_USER_DATA
+static inline void lv_obj_set_user_data(lv_obj_t * obj, void * user_data)
+{
+    obj->user_data = user_data;
+}
+#endif
+
+/*=======================
+ * Getter functions
+ *======================*/
+
+/**
+ * Check if a given flag or all the given flags are set on an object.
+ * @param obj   pointer to an object
+ * @param f     the flag(s) to check (OR-ed values can be used)
+ * @return      true: all flags are set; false: not all flags are set
+ */
+bool lv_obj_has_flag(const lv_obj_t * obj, lv_obj_flag_t f);
+
+/**
+ * Check if a given flag or any of the flags are set on an object.
+ * @param obj   pointer to an object
+ * @param f     the flag(s) to check (OR-ed values can be used)
+ * @return      true: at lest one flag flag is set; false: none of the flags are set
+ */
+bool lv_obj_has_flag_any(const lv_obj_t * obj, lv_obj_flag_t f);
+
+/**
+ * Get the state of an object
+ * @param obj   pointer to an object
+ * @return      the state (OR-ed values from `lv_state_t`)
+ */
+lv_state_t lv_obj_get_state(const lv_obj_t * obj);
+
+/**
+ * Check if the object is in a given state or not.
+ * @param obj       pointer to an object
+ * @param state     a state or combination of states to check
+ * @return          true: `obj` is in `state`; false: `obj` is not in `state`
+ */
+bool lv_obj_has_state(const lv_obj_t * obj, lv_state_t state);
+
+/**
+ * Get the group of the object
+ * @param       obj pointer to an object
+ * @return      the pointer to group of the object
+ */
+void * lv_obj_get_group(const lv_obj_t * obj);
+
+/**
+ * Get the user_data field of the object
+ * @param obj   pointer to an object
+ * @return      the pointer to the user_data of the object
+ */
+#if LV_USE_USER_DATA
+static inline void * lv_obj_get_user_data(lv_obj_t * obj)
+{
+    return obj->user_data;
+}
+#endif
+
+/*=======================
+ * Other functions
+ *======================*/
+
+/**
+ * Allocate special data for an object if not allocated yet.
+ * @param obj   pointer to an object
+ */
+void lv_obj_allocate_spec_attr(lv_obj_t * obj);
+
+/**
+ * Get object's and its ancestors type. Put their name in `type_buf` starting with the current type.
+ * E.g. buf.type[0]="lv_btn", buf.type[1]="lv_cont", buf.type[2]="lv_obj"
+ * @param obj   pointer to an object which type should be get
+ * @param buf   pointer to an `lv_obj_type_t` buffer to store the types
+ */
+bool lv_obj_check_type(const lv_obj_t * obj, const lv_obj_class_t * class_p);
+
+/**
+ * Check if any object has a given class (type).
+ * It checks the ancestor classes too.
+ * @param obj       pointer to an object
+ * @param class_p   a class to check (e.g. `lv_slider_class`)
+ * @return          true: `obj` has the given class
+ */
+bool lv_obj_has_class(const lv_obj_t * obj, const lv_obj_class_t * class_p);
+
+/**
+ * Get the class (type) of the object
+ * @param obj       pointer to an object
+ * @return the class (type) of the object
+ */
+const lv_obj_class_t * lv_obj_get_class(const lv_obj_t * obj);
+
+/**
+ * Check if any object is still "alive", and part of the hierarchy
+ * @param obj       pointer to an object
+ * @param obj_type  type of the object. (e.g. "lv_btn")
+ * @return          true: valid
+ */
+bool lv_obj_is_valid(const lv_obj_t * obj);
+
+/**
+ * Scale the given number of pixels (a distance or size) relative to a 160 DPI display
+ * considering the DPI of the `obj`'s display.
+ * It ensures that e.g. `lv_dpx(100)` will have the same physical size regardless to the
+ * DPI of the display.
+ * @param obj   an object whose display's dpi should be considered
+ * @param n     the number of pixels to scale
+ * @return      `n x current_dpi/160`
+ */
+static inline lv_coord_t lv_obj_dpx(const lv_obj_t * obj, lv_coord_t n)
+{
+    return _LV_DPX_CALC(lv_disp_get_dpi(lv_obj_get_disp(obj)), n);
+}
+
+/**********************
+ *      MACROS
+ **********************/
+
+#if LV_USE_ASSERT_OBJ
+#  define LV_ASSERT_OBJ(obj_p, obj_class)                                    \
+            LV_ASSERT_MSG(obj_p != NULL, "The object is NULL");               \
+            LV_ASSERT_MSG(lv_obj_has_class(obj_p, obj_class) == true, "Incompatible object type."); \
+            LV_ASSERT_MSG(lv_obj_is_valid(obj_p)  == true, "The object is invalid, deleted or corrupted?");
+
+# else
+# define LV_ASSERT_OBJ(obj_p, obj_class) do{}while(0)
+#endif
+
+#if LV_USE_LOG && LV_LOG_TRACE_OBJ_CREATE
+#  define LV_TRACE_OBJ_CREATE(...) LV_LOG_TRACE( __VA_ARGS__)
+#else
+#  define LV_TRACE_OBJ_CREATE(...)
+#endif
+
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_OBJ_H*/

+ 197 - 0
components/lvgl/src/core/lv_obj_class.c

@@ -0,0 +1,197 @@
+/**
+ * @file lv_obj_class.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj.h"
+#include "lv_theme.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  GLOBAL PROTOTYPES
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static void lv_obj_construct(lv_obj_t * obj);
+static uint32_t get_instance_size(const lv_obj_class_t * class_p);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+lv_obj_t * lv_obj_class_create_obj(const lv_obj_class_t * class_p, lv_obj_t * parent)
+{
+    LV_TRACE_OBJ_CREATE("Creating object with %p class on %p parent", class_p, parent);
+    uint32_t s = get_instance_size(class_p);
+    lv_obj_t * obj = lv_mem_alloc(s);
+    if(obj == NULL) return NULL;
+    lv_memset_00(obj, s);
+    obj->class_p = class_p;
+    obj->parent = parent;
+
+    /*Create a screen*/
+    if(parent == NULL) {
+        LV_TRACE_OBJ_CREATE("creating a screen");
+        lv_disp_t * disp = lv_disp_get_default();
+        if(!disp) {
+            LV_LOG_WARN("No display created to so far. No place to assign the new screen");
+            return NULL;
+        }
+
+        if(disp->screens == NULL) {
+            disp->screens = lv_mem_alloc(sizeof(lv_obj_t *));
+            disp->screens[0] = obj;
+            disp->screen_cnt = 1;
+        } else {
+            disp->screen_cnt++;
+            disp->screens = lv_mem_realloc(disp->screens, sizeof(lv_obj_t *) * disp->screen_cnt);
+            disp->screens[disp->screen_cnt - 1] = obj;
+        }
+
+        /*Set coordinates to full screen size*/
+        obj->coords.x1 = 0;
+        obj->coords.y1 = 0;
+        obj->coords.x2 = lv_disp_get_hor_res(NULL) - 1;
+        obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1;
+    }
+    /*Create a normal object*/
+    else {
+        LV_TRACE_OBJ_CREATE("creating normal object");
+        LV_ASSERT_OBJ(parent, MY_CLASS);
+        if(parent->spec_attr == NULL) {
+            lv_obj_allocate_spec_attr(parent);
+        }
+
+        if(parent->spec_attr->children == NULL) {
+            parent->spec_attr->children = lv_mem_alloc(sizeof(lv_obj_t *));
+            parent->spec_attr->children[0] = obj;
+            parent->spec_attr->child_cnt = 1;
+        } else {
+            parent->spec_attr->child_cnt++;
+            parent->spec_attr->children = lv_mem_realloc(parent->spec_attr->children, sizeof(lv_obj_t *) * parent->spec_attr->child_cnt);
+            parent->spec_attr->children[parent->spec_attr->child_cnt - 1] = obj;
+        }
+    }
+
+    return obj;
+}
+
+void lv_obj_class_init_obj(lv_obj_t * obj)
+{
+    lv_obj_mark_layout_as_dirty(obj);
+    lv_obj_enable_style_refresh(false);
+
+    lv_theme_apply(obj);
+    lv_obj_construct(obj);
+
+    lv_obj_enable_style_refresh(true);
+    lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY);
+
+    lv_obj_refresh_self_size(obj);
+
+    lv_group_t * def_group = lv_group_get_default();
+    if(def_group && lv_obj_is_group_def(obj)) {
+
+        lv_group_add_obj(def_group, obj);
+    }
+
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+    if(parent) {
+        /*Call the ancestor's event handler to the parent to notify it about the new child.
+         *Also triggers layout update*/
+        lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj);
+
+        /*Invalidate the area if not screen created*/
+        lv_obj_invalidate(obj);
+    }
+}
+
+void _lv_obj_destructor(lv_obj_t * obj)
+{
+    if(obj->class_p->destructor_cb) obj->class_p->destructor_cb(obj->class_p, obj);
+
+    if(obj->class_p->base_class) {
+        /*Don't let the descendant methods run during destructing the ancestor type*/
+        obj->class_p = obj->class_p->base_class;
+
+        /*Call the base class's destructor too*/
+        _lv_obj_destructor(obj);
+    }
+}
+
+bool lv_obj_is_editable(lv_obj_t * obj)
+{
+    const lv_obj_class_t * class_p = obj->class_p;
+
+    /*Find a base in which editable is set*/
+    while(class_p && class_p->editable == LV_OBJ_CLASS_EDITABLE_INHERIT) class_p = class_p->base_class;
+
+    if(class_p == NULL) return false;
+
+    return class_p->editable == LV_OBJ_CLASS_EDITABLE_TRUE ? true : false;
+}
+
+bool lv_obj_is_group_def(lv_obj_t * obj)
+{
+    const lv_obj_class_t * class_p = obj->class_p;
+
+    /*Find a base in which group_def is set*/
+    while(class_p && class_p->group_def == LV_OBJ_CLASS_GROUP_DEF_INHERIT) class_p = class_p->base_class;
+
+    if(class_p == NULL) return false;
+
+    return class_p->group_def == LV_OBJ_CLASS_GROUP_DEF_TRUE ? true : false;
+}
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+static void lv_obj_construct(lv_obj_t * obj)
+{
+    const lv_obj_class_t * original_class_p = obj->class_p;
+
+    if(obj->class_p->base_class) {
+        /*Don't let the descendant methods run during constructing the ancestor type*/
+        obj->class_p = obj->class_p->base_class;
+
+        /*Construct the base first*/
+        lv_obj_construct(obj);
+    }
+
+    /*Restore the original class*/
+    obj->class_p = original_class_p;
+
+    if(obj->class_p->constructor_cb) obj->class_p->constructor_cb(obj->class_p, obj);
+}
+
+static uint32_t get_instance_size(const lv_obj_class_t * class_p)
+{
+    /*Find a base in which instance size is set*/
+    const lv_obj_class_t * base = class_p;
+    while(base && base->instance_size == 0) base = base->base_class;
+
+    if(base == NULL) return 0;  /*Never happens: set at least in `lv_obj` class*/
+
+    return base->instance_size;
+}

+ 93 - 0
components/lvgl/src/core/lv_obj_class.h

@@ -0,0 +1,93 @@
+/**
+ * @file lv_obj_class.h
+ *
+ */
+
+#ifndef LV_OBJ_CLASS_H
+#define LV_OBJ_CLASS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include <stdint.h>
+#include <stdbool.h>
+
+/*********************
+ *      DEFINES
+ *********************/
+
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+struct _lv_obj_t;
+struct _lv_obj_class_t;
+struct _lv_event_t;
+
+typedef enum {
+    LV_OBJ_CLASS_EDITABLE_INHERIT,      /**< Check the base class. Must have 0 value to let zero initialized class inherit*/
+    LV_OBJ_CLASS_EDITABLE_TRUE,
+    LV_OBJ_CLASS_EDITABLE_FALSE,
+}lv_obj_class_editable_t;
+
+typedef enum {
+    LV_OBJ_CLASS_GROUP_DEF_INHERIT,      /**< Check the base class. Must have 0 value to let zero initialized class inherit*/
+    LV_OBJ_CLASS_GROUP_DEF_TRUE,
+    LV_OBJ_CLASS_GROUP_DEF_FALSE,
+}lv_obj_class_group_def_t;
+
+typedef void (*lv_obj_class_event_cb_t)(struct _lv_obj_class_t * class_p, struct _lv_event_t * e);
+/**
+ * Describe the common methods of every object.
+ * Similar to a C++ class.
+ */
+typedef struct _lv_obj_class_t {
+    const struct _lv_obj_class_t * base_class;
+    void (*constructor_cb)(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * obj);
+    void (*destructor_cb)(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * obj);
+#if LV_USE_USER_DATA
+    void * user_data;
+#endif
+    void (*event_cb)(const struct _lv_obj_class_t * class_p, struct _lv_event_t * e);  /**< Widget type specific event function*/
+    lv_coord_t width_def;
+    lv_coord_t height_def;
+    uint32_t editable : 2;             /**< Value from ::lv_obj_class_editable_t*/
+    uint32_t group_def : 2;            /**< Value from ::lv_obj_class_group_def_t*/
+    uint32_t instance_size : 16;
+}lv_obj_class_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Create an object form a class descriptor
+ * @param class_p   pointer to a class
+ * @param parent    pointer to an object where the new object should be created
+ * @return          pointer to the created object
+ */
+struct _lv_obj_t * lv_obj_class_create_obj(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * parent);
+
+void lv_obj_class_init_obj(struct _lv_obj_t * obj);
+
+void _lv_obj_destructor(struct _lv_obj_t * obj);
+
+bool lv_obj_is_editable(struct _lv_obj_t * obj);
+
+bool lv_obj_is_group_def(struct _lv_obj_t * obj);
+
+/**********************
+ *      MACROS
+ **********************/
+
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_OBJ_CLASS_H*/

+ 365 - 0
components/lvgl/src/core/lv_obj_draw.c

@@ -0,0 +1,365 @@
+/**
+ * @file lv_obj_draw.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj_draw.h"
+#include "lv_obj.h"
+#include "lv_disp.h"
+#include "lv_indev.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t * draw_dsc)
+{
+
+#if LV_DRAW_COMPLEX
+    draw_dsc->radius = lv_obj_get_style_radius(obj, part);
+
+    lv_opa_t main_opa = part != LV_PART_MAIN ? lv_obj_get_style_opa(obj, part) : LV_OPA_COVER;
+    lv_opa_t opa = lv_obj_get_style_opa(obj, part);
+    if(opa <= LV_OPA_MIN || main_opa <= LV_OPA_MIN) {
+        draw_dsc->bg_opa = LV_OPA_TRANSP;
+        draw_dsc->border_opa = LV_OPA_TRANSP;
+        draw_dsc->shadow_opa = LV_OPA_TRANSP;
+        draw_dsc->outline_opa = LV_OPA_TRANSP;
+        return;
+    }
+
+    draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+
+    if(draw_dsc->bg_opa != LV_OPA_TRANSP) {
+        draw_dsc->bg_opa = lv_obj_get_style_bg_opa(obj, part);
+        if(draw_dsc->bg_opa > LV_OPA_MIN) {
+            draw_dsc->bg_color = lv_obj_get_style_bg_color_filtered(obj, part);
+            draw_dsc->bg_grad_dir =  lv_obj_get_style_bg_grad_dir(obj, part);
+            if(draw_dsc->bg_grad_dir != LV_GRAD_DIR_NONE) {
+                draw_dsc->bg_grad_color = lv_obj_get_style_bg_grad_color_filtered(obj, part);
+                draw_dsc->bg_main_color_stop =  lv_obj_get_style_bg_main_stop(obj, part);
+                draw_dsc->bg_grad_color_stop =  lv_obj_get_style_bg_grad_stop(obj, part);
+            }
+        }
+    }
+
+    draw_dsc->border_width = lv_obj_get_style_border_width(obj, part);
+    if(draw_dsc->border_width) {
+        if(draw_dsc->border_opa != LV_OPA_TRANSP) {
+            draw_dsc->border_opa = lv_obj_get_style_border_opa(obj, part);
+            if(draw_dsc->border_opa > LV_OPA_MIN) {
+                draw_dsc->border_side = lv_obj_get_style_border_side(obj, part);
+                draw_dsc->border_color = lv_obj_get_style_border_color_filtered(obj, part);
+            }
+        }
+    }
+
+    draw_dsc->outline_width = lv_obj_get_style_outline_width(obj, part);
+    if(draw_dsc->outline_width) {
+        if(draw_dsc->outline_opa != LV_OPA_TRANSP) {
+            draw_dsc->outline_opa = lv_obj_get_style_outline_opa(obj, part);
+            if(draw_dsc->outline_opa > LV_OPA_MIN) {
+                draw_dsc->outline_pad = lv_obj_get_style_outline_pad(obj, part);
+                draw_dsc->outline_color = lv_obj_get_style_outline_color(obj, part);
+            }
+        }
+    }
+
+    if(draw_dsc->bg_img_opa != LV_OPA_TRANSP) {
+        draw_dsc->bg_img_src = lv_obj_get_style_bg_img_src(obj, part);
+        if(draw_dsc->bg_img_src) {
+            draw_dsc->bg_img_opa = lv_obj_get_style_bg_img_opa(obj, part);
+            if(draw_dsc->bg_img_opa > LV_OPA_MIN) {
+                if(lv_img_src_get_type(draw_dsc->bg_img_src) == LV_IMG_SRC_SYMBOL) {
+                    draw_dsc->bg_img_symbol_font= lv_obj_get_style_text_font(obj, part);
+                    draw_dsc->bg_img_recolor = lv_obj_get_style_text_color(obj, part);
+                } else {
+                    draw_dsc->bg_img_recolor = lv_obj_get_style_bg_img_recolor(obj, part);
+                    draw_dsc->bg_img_recolor_opa = lv_obj_get_style_bg_img_recolor_opa(obj, part);
+                    draw_dsc->bg_img_tiled = lv_obj_get_style_bg_img_tiled(obj, part);
+                }
+            }
+        }
+    }
+
+    if(draw_dsc->shadow_opa) {
+        draw_dsc->shadow_width = lv_obj_get_style_shadow_width(obj, part);
+        if(draw_dsc->shadow_width) {
+            if(draw_dsc->shadow_opa > LV_OPA_MIN) {
+                draw_dsc->shadow_opa = lv_obj_get_style_shadow_opa(obj, part);
+                if(draw_dsc->shadow_opa > LV_OPA_MIN) {
+                    draw_dsc->shadow_ofs_x = lv_obj_get_style_shadow_ofs_x(obj, part);
+                    draw_dsc->shadow_ofs_y = lv_obj_get_style_shadow_ofs_y(obj, part);
+                    draw_dsc->shadow_spread = lv_obj_get_style_shadow_spread(obj, part);
+                    draw_dsc->shadow_color = lv_obj_get_style_shadow_color_filtered(obj, part);
+                }
+            }
+        }
+    }
+
+    if(main_opa < LV_OPA_MAX) {
+        opa = (uint16_t)((uint16_t) main_opa * opa) >> 8;
+    }
+
+    if(opa < LV_OPA_MAX) {
+        draw_dsc->bg_opa = (uint16_t)((uint16_t)draw_dsc->bg_opa * opa) >> 8;
+        draw_dsc->border_opa = (uint16_t)((uint16_t)draw_dsc->border_opa * opa) >> 8;
+        draw_dsc->shadow_opa = (uint16_t)((uint16_t)draw_dsc->shadow_opa * opa) >> 8;
+        draw_dsc->outline_opa = (uint16_t)((uint16_t)draw_dsc->outline_opa * opa) >> 8;
+    }
+#else /*LV_DRAW_COMPLEX*/
+    if(draw_dsc->bg_opa != LV_OPA_TRANSP) {
+        draw_dsc->bg_opa = lv_obj_get_style_bg_opa(obj, part);
+        if(draw_dsc->bg_opa > LV_OPA_MIN) {
+            draw_dsc->bg_color = lv_obj_get_style_bg_color_filtered(obj, part);
+        }
+    }
+
+    draw_dsc->border_width = lv_obj_get_style_border_width(obj, part);
+    if(draw_dsc->border_width) {
+        if(draw_dsc->border_opa != LV_OPA_TRANSP) {
+            draw_dsc->border_opa = lv_obj_get_style_border_opa(obj, part);
+            if(draw_dsc->border_opa > LV_OPA_MIN) {
+                draw_dsc->border_color = lv_obj_get_style_border_color_filtered(obj, part);
+                draw_dsc->border_side = lv_obj_get_style_border_side(obj, part);
+            }
+        }
+    }
+
+    draw_dsc->outline_width = lv_obj_get_style_outline_width(obj, part);
+    if(draw_dsc->outline_width) {
+        if(draw_dsc->outline_opa != LV_OPA_TRANSP) {
+            draw_dsc->outline_opa = lv_obj_get_style_outline_opa(obj, part);
+            if(draw_dsc->outline_opa > LV_OPA_MIN) {
+                draw_dsc->outline_pad = lv_obj_get_style_outline_pad(obj, part);
+                draw_dsc->outline_color = lv_obj_get_style_outline_color(obj, part);
+            }
+        }
+    }
+
+    if(draw_dsc->bg_img_opa != LV_OPA_TRANSP) {
+        draw_dsc->bg_img_src = lv_obj_get_style_bg_img_src(obj, part);
+        if(draw_dsc->bg_img_src) {
+            draw_dsc->bg_img_opa = lv_obj_get_style_bg_img_opa(obj, part);
+            if(draw_dsc->bg_img_opa > LV_OPA_MIN) {
+                if(lv_img_src_get_type(draw_dsc->bg_img_src) == LV_IMG_SRC_SYMBOL) {
+                   draw_dsc->bg_img_symbol_font= lv_obj_get_style_text_font(obj, part);
+                   draw_dsc->bg_img_recolor = lv_obj_get_style_text_color(obj, part);
+               } else {
+                   draw_dsc->bg_img_recolor = lv_obj_get_style_bg_img_recolor(obj, part);
+                   draw_dsc->bg_img_recolor_opa = lv_obj_get_style_bg_img_recolor_opa(obj, part);
+                   draw_dsc->bg_img_tiled = lv_obj_get_style_bg_img_tiled(obj, part);
+               }
+            }
+        }
+    }
+#endif
+}
+
+void lv_obj_init_draw_label_dsc(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc_t * draw_dsc)
+{
+    draw_dsc->opa = lv_obj_get_style_text_opa(obj, part);
+    if(draw_dsc->opa <= LV_OPA_MIN) return;
+
+    lv_opa_t opa = lv_obj_get_style_opa(obj, part);
+    if(opa < LV_OPA_MAX) {
+        draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa) >> 8;
+    }
+    if(draw_dsc->opa <= LV_OPA_MIN) return;
+
+    draw_dsc->color = lv_obj_get_style_text_color_filtered(obj, part);
+    draw_dsc->letter_space = lv_obj_get_style_text_letter_space(obj, part);
+    draw_dsc->line_space = lv_obj_get_style_text_line_space(obj, part);
+    draw_dsc->decor = lv_obj_get_style_text_decor(obj, part);
+#if LV_DRAW_COMPLEX
+    draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+#endif
+
+    draw_dsc->font = lv_obj_get_style_text_font(obj, part);
+
+#if LV_USE_BIDI
+    draw_dsc->bidi_dir = lv_obj_get_style_base_dir(obj, LV_PART_MAIN);
+#endif
+
+    draw_dsc->align = lv_obj_get_style_text_align(obj, part);
+    if(draw_dsc->align == LV_TEXT_ALIGN_AUTO) {
+        if(draw_dsc->bidi_dir == LV_BASE_DIR_RTL) draw_dsc->align = LV_TEXT_ALIGN_RIGHT;
+        else draw_dsc->align = LV_TEXT_ALIGN_LEFT;
+    }
+}
+
+void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc)
+{
+    draw_dsc->opa = lv_obj_get_style_img_opa(obj, part);
+    if(draw_dsc->opa <= LV_OPA_MIN)  return;
+
+    lv_opa_t opa_scale = lv_obj_get_style_opa(obj, part);
+    if(opa_scale < LV_OPA_MAX) {
+        draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa_scale) >> 8;
+    }
+    if(draw_dsc->opa <= LV_OPA_MIN)  return;
+
+    draw_dsc->angle = 0;
+    draw_dsc->zoom = LV_IMG_ZOOM_NONE;
+    draw_dsc->pivot.x = lv_area_get_width(&obj->coords) / 2;
+    draw_dsc->pivot.y = lv_area_get_height(&obj->coords) / 2;
+
+    draw_dsc->recolor_opa = lv_obj_get_style_img_recolor_opa(obj, part);
+    if(draw_dsc->recolor_opa > 0) {
+        draw_dsc->recolor = lv_obj_get_style_img_recolor(obj, part);
+    }
+#if LV_DRAW_COMPLEX
+    draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+#endif
+}
+
+void lv_obj_init_draw_line_dsc(lv_obj_t * obj, uint32_t part, lv_draw_line_dsc_t * draw_dsc)
+{
+    draw_dsc->width = lv_obj_get_style_line_width(obj, part);
+    if(draw_dsc->width == 0) return;
+
+    draw_dsc->opa = lv_obj_get_style_line_opa(obj, part);
+    if(draw_dsc->opa <= LV_OPA_MIN)  return;
+
+    lv_opa_t opa = lv_obj_get_style_opa(obj, part);
+    if(opa < LV_OPA_MAX) {
+        draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa) >> 8;
+    }
+    if(draw_dsc->opa <= LV_OPA_MIN)  return;
+
+    draw_dsc->color = lv_obj_get_style_line_color(obj, part);
+
+    draw_dsc->dash_width = lv_obj_get_style_line_dash_width(obj, part);
+    if(draw_dsc->dash_width) {
+        draw_dsc->dash_gap = lv_obj_get_style_line_dash_gap(obj, part);
+    }
+
+    draw_dsc->round_start = lv_obj_get_style_line_rounded(obj, part);
+    draw_dsc->round_end = draw_dsc->round_start;
+
+#if LV_DRAW_COMPLEX
+    draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+#endif
+}
+
+void lv_obj_init_draw_arc_dsc(lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t * draw_dsc)
+{
+    draw_dsc->width = lv_obj_get_style_arc_width(obj, part);
+    if(draw_dsc->width == 0) return;
+
+    draw_dsc->opa = lv_obj_get_style_arc_opa(obj, part);
+    if(draw_dsc->opa <= LV_OPA_MIN)  return;
+
+    lv_opa_t opa = lv_obj_get_style_opa(obj, part);
+    if(opa < LV_OPA_MAX) {
+        draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa) >> 8;
+    }
+    if(draw_dsc->opa <= LV_OPA_MIN)  return;
+
+    draw_dsc->color = lv_obj_get_style_arc_color(obj, part);
+    draw_dsc->img_src = lv_obj_get_style_arc_img_src(obj, part);
+
+    draw_dsc->rounded = lv_obj_get_style_arc_rounded(obj, part);
+
+#if LV_DRAW_COMPLEX
+    draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+#endif
+}
+
+lv_coord_t lv_obj_calculate_ext_draw_size(lv_obj_t * obj, uint32_t part)
+{
+    lv_coord_t s = 0;
+
+    lv_coord_t sh_width = lv_obj_get_style_shadow_width(obj, part);
+    if(sh_width) {
+        lv_opa_t sh_opa = lv_obj_get_style_shadow_opa(obj, part);
+        if(sh_opa > LV_OPA_MIN) {
+            sh_width = sh_width / 2 + 1;    /*The blur adds only half width*/
+            sh_width += lv_obj_get_style_shadow_spread(obj, part);
+            lv_coord_t sh_ofs_x = lv_obj_get_style_shadow_ofs_x(obj, part);
+            lv_coord_t sh_ofs_y = lv_obj_get_style_shadow_ofs_y(obj, part);
+            sh_width += LV_MAX(LV_ABS(sh_ofs_x), LV_ABS(sh_ofs_y));
+            s = LV_MAX(s, sh_width);
+        }
+    }
+
+    lv_coord_t outline_width = lv_obj_get_style_outline_width(obj, part);
+    if(outline_width) {
+        lv_opa_t outline_opa = lv_obj_get_style_outline_opa(obj, part);
+        if(outline_opa > LV_OPA_MIN) {
+            lv_coord_t outline_pad = lv_obj_get_style_outline_pad(obj, part);
+            s = LV_MAX(s, outline_pad + outline_width);
+        }
+    }
+
+    lv_coord_t w = lv_obj_get_style_transform_width(obj, part);
+    lv_coord_t h = lv_obj_get_style_transform_height(obj, part);
+    lv_coord_t wh = LV_MAX(w, h);
+    if(wh > 0) s += wh;
+
+    return s;
+}
+
+void lv_obj_draw_dsc_init(lv_obj_draw_part_dsc_t * dsc, const lv_area_t * clip_area)
+{
+    lv_memset_00(dsc, sizeof(lv_obj_draw_part_dsc_t));
+    dsc->clip_area = clip_area;
+}
+
+void lv_obj_refresh_ext_draw_size(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_coord_t s_old = _lv_obj_get_ext_draw_size(obj);
+    lv_coord_t s_new = 0;
+    lv_event_send(obj, LV_EVENT_REFR_EXT_DRAW_SIZE, &s_new);
+
+    if(s_new != s_old) lv_obj_invalidate(obj);
+
+    /*Store the result if the special attrs already allocated*/
+    if(obj->spec_attr) {
+        obj->spec_attr->ext_draw_size = s_new;
+    }
+    /*Allocate spec. attrs. only if the result is not zero.
+     *Zero is the default value if the spec. attr. are not defined.*/
+    else if(s_new != 0) {
+        lv_obj_allocate_spec_attr(obj);
+        obj->spec_attr->ext_draw_size = s_new;
+    }
+
+    if(s_new != s_old) lv_obj_invalidate(obj);
+}
+
+lv_coord_t _lv_obj_get_ext_draw_size(const lv_obj_t * obj)
+{
+    if(obj->spec_attr) return obj->spec_attr->ext_draw_size;
+    else return 0;
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/

+ 145 - 0
components/lvgl/src/core/lv_obj_draw.h

@@ -0,0 +1,145 @@
+/**
+ * @file lv_obj_draw.h
+ *
+ */
+
+#ifndef LV_OBJ_DRAW_H
+#define LV_OBJ_DRAW_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "../draw/lv_draw.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+struct _lv_obj_t;
+
+/** Cover check results.*/
+typedef enum {
+    LV_COVER_RES_COVER      = 0,
+    LV_COVER_RES_NOT_COVER  = 1,
+    LV_COVER_RES_MASKED     = 2,
+}lv_cover_res_t;
+
+typedef struct
+{
+    const lv_area_t * clip_area;        /**< The current clip area, required if you need to draw something in the event*/
+    lv_area_t * draw_area;              /**< The area of the part being drawn*/
+    lv_draw_rect_dsc_t * rect_dsc;      /**< A draw descriptor that can be modified to changed what LVGL will draw. Set only for rectangle-like parts*/
+    lv_draw_label_dsc_t * label_dsc;    /**< A draw descriptor that can be modified to changed what LVGL will draw. Set only for text-like parts*/
+    lv_draw_line_dsc_t * line_dsc;      /**< A draw descriptor that can be modified to changed what LVGL will draw. Set only for line-like parts*/
+    lv_draw_img_dsc_t *  img_dsc;       /**< A draw descriptor that can be modified to changed what LVGL will draw. Set only for image-like parts*/
+    lv_draw_arc_dsc_t *  arc_dsc;       /**< A draw descriptor that can be modified to changed what LVGL will draw. Set only for arc-like parts*/
+    const lv_point_t * p1;              /**< A point calculated during drawing. E.g. a point of chart or the center of an arc.*/
+    const lv_point_t * p2;              /**< A point calculated during drawing. E.g. a point of chart.*/
+    char text[16];                      /**< A text calculated during drawing. Can be modified. E.g. tick labels on a chart axis.*/
+    uint32_t part;                      /**< The current part for which the event is sent*/
+    uint32_t id;                        /**< The index of the part. E.g. a button's index on button matrix or table cell index.*/
+    lv_coord_t radius;                  /**< E.g. the radius of an arc (not the corner radius).*/
+    int32_t value;                      /**< A value calculated during drawing. E.g. Chart's tick line value.*/
+    const void * sub_part_ptr;          /**< A pointer the identifies something in the part. E.g. chart series. */
+}lv_obj_draw_part_dsc_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Initialize a rectangle draw descriptor from an object's styles in its current state
+ * @param obj pointer to an object
+ * @param part part of the object. E.g.  `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor the initialize.
+ *                 If an `..._opa` filed is set to `LV_OPA_TRANSP` the related properties won't be initialized.
+ *                 Should be initialized with `lv_draw_rect_dsc_init(draw_dsc)`.
+ * @note Only the relevant fields will be set.
+ *       E.g. if `border width == 0` the other border properties won't be evaluated.
+ */
+void lv_obj_init_draw_rect_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t * draw_dsc);
+
+/**
+ * Initialize a label draw descriptor from an object's styles in its current state
+ * @param obj pointer to an object
+ * @param part part of the object. E.g.  `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor the initialize.
+ *                 If the `opa` filed is set to or the property is equal to `LV_OPA_TRANSP` the rest won't be initialized.
+ *                 Should be initialized with `lv_draw_label_dsc_init(draw_dsc)`.
+ */
+void lv_obj_init_draw_label_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_label_dsc_t * draw_dsc);
+
+/**
+ * Initialize an image draw descriptor from an object's styles in its current state
+ * @param obj pointer to an object
+ * @param part part of the object. E.g.  `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor the initialize.
+ *                 Should be initialized with `lv_draw_image_dsc_init(draw_dsc)`.
+ */
+void lv_obj_init_draw_img_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc);
+
+
+/**
+ * Initialize a line draw descriptor from an object's styles in its current state
+ * @param obj pointer to an object
+ * @param part part of the object. E.g.  `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor the initialize.
+ *                 Should be initialized with `lv_draw_line_dsc_init(draw_dsc)`.
+ */
+void lv_obj_init_draw_line_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_line_dsc_t * draw_dsc);
+
+/**
+ * Initialize an arc draw descriptor from an object's styles in its current state
+ * @param obj pointer to an object
+ * @param part part of the object. E.g.  `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor the initialize.
+ *                 Should be initialized with `lv_draw_arc_dsc_init(draw_dsc)`.
+ */
+void lv_obj_init_draw_arc_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t * draw_dsc);
+
+/**
+ * Get the required extra size (around the object's part) to draw shadow, outline, value etc.
+ * @param obj pointer to an object
+ * @param part part of the object
+ * @return the extra size required around the object
+ */
+lv_coord_t lv_obj_calculate_ext_draw_size(struct _lv_obj_t * obj, uint32_t part);
+
+/**
+ * Initialize a draw descriptor used in events.
+ * @param dsc pointer to a descriptor. Later it should be passed as parameter to an `LV_EEVNT_DRAW_PART_BEGIN/END` event.
+ * @param clip_area the current clip area of the drawing
+ */
+void lv_obj_draw_dsc_init(lv_obj_draw_part_dsc_t * dsc, const lv_area_t * clip_area);
+
+/**
+ * Send a 'LV_EVENT_REFR_EXT_DRAW_SIZE' Call the ancestor's event handler to the object to refresh the value of the extended draw size.
+ * The result will be saved in `obj`.
+ * @param obj pointer to an object
+ */
+void lv_obj_refresh_ext_draw_size(struct _lv_obj_t * obj);
+
+/**
+ * Get the extended draw area of an object.
+ * @param obj pointer to an object
+ * @return the size extended draw area around the real coordinates
+ */
+lv_coord_t _lv_obj_get_ext_draw_size(const struct _lv_obj_t * obj);
+
+/**********************
+ *      MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_OBJ_DRAW_H*/

+ 980 - 0
components/lvgl/src/core/lv_obj_pos.c

@@ -0,0 +1,980 @@
+/**
+ * @file lv_obj_pos.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj.h"
+#include "lv_disp.h"
+#include "lv_refr.h"
+#include "../misc/lv_gc.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static void calc_auto_size(lv_obj_t * obj, lv_coord_t * w_out, lv_coord_t * h_out);
+static void layout_update_core(lv_obj_t * obj);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+static uint32_t layout_cnt;
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_set_x(obj, x);
+    lv_obj_set_y(obj, y);
+}
+
+void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    if(lv_obj_is_layout_positioned(obj)) {
+        return;
+    }
+
+    lv_res_t res_x;
+    lv_style_value_t v_x;
+
+    res_x = lv_obj_get_local_style_prop(obj, LV_STYLE_X, &v_x, 0);
+
+    if((res_x == LV_RES_OK && v_x.num != x) || res_x == LV_RES_INV) {
+        lv_obj_set_style_x(obj, x, 0);
+    }
+}
+
+void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y)
+{
+    if(lv_obj_is_layout_positioned(obj)) {
+        return;
+    }
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_res_t res_y;
+    lv_style_value_t v_y;
+
+    res_y = lv_obj_get_local_style_prop(obj, LV_STYLE_Y, &v_y, 0);
+
+    if((res_y == LV_RES_OK && v_y.num != y) || res_y == LV_RES_INV) {
+        lv_obj_set_style_y(obj, y, 0);
+    }
+}
+
+bool lv_obj_refr_size(lv_obj_t * obj)
+{
+
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    /*If the width or height is set by a layout do not modify them*/
+    if(obj->w_layout && obj->h_layout) return false;
+
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+    if(parent == NULL) return false;
+
+    lv_coord_t w;
+    lv_coord_t sl_ori = lv_obj_get_scroll_left(obj);
+    bool w_content = false;
+    if(obj->w_layout) {
+        w = lv_obj_get_width(obj);
+    } else {
+        w = lv_obj_get_style_width(obj, LV_PART_MAIN);
+        w_content = w == LV_SIZE_CONTENT ? true : false;
+
+        /*Be sure the object is not scrolled when it has auto size*/
+        if(w_content) {
+            lv_obj_scroll_to_x(obj, 0, LV_ANIM_OFF);
+            calc_auto_size(obj, &w, NULL);
+        }
+
+        /*Calculate the sizes in percentage*/
+        bool pct_w = LV_COORD_IS_PCT(w) ? true : false;
+
+        lv_coord_t parent_w = lv_obj_get_content_width(parent);
+        if(pct_w) w = (LV_COORD_GET_PCT(w) * parent_w) / 100;
+
+        lv_coord_t minw = lv_obj_get_style_min_width(obj, LV_PART_MAIN);
+        lv_coord_t maxw = lv_obj_get_style_max_width(obj, LV_PART_MAIN);
+        w = lv_clamp_width(w, minw, maxw, parent_w);
+    }
+
+    lv_coord_t h;
+    lv_coord_t st_ori = lv_obj_get_scroll_top(obj);
+    bool h_content = false;
+    if(obj->h_layout) {
+        h = lv_obj_get_height(obj);
+    } else {
+        h = lv_obj_get_style_height(obj, LV_PART_MAIN);
+        h_content = h == LV_SIZE_CONTENT ? true : false;
+
+        /*Be sure the object is not scrolled when it has auto size*/
+        if(h_content) {
+            lv_obj_scroll_to_y(obj, 0, LV_ANIM_OFF);
+            calc_auto_size(obj, NULL, &h);
+        }
+
+        /*Calculate the sizes in percentage*/
+        bool pct_h = LV_COORD_IS_PCT(h) ? true : false;
+        lv_coord_t parent_h = lv_obj_get_content_height(parent);
+        if(pct_h) h = (LV_COORD_GET_PCT(h) * parent_h) / 100;
+
+        lv_coord_t minh = lv_obj_get_style_min_height(obj, LV_PART_MAIN);
+        lv_coord_t maxh = lv_obj_get_style_max_height(obj, LV_PART_MAIN);
+        h = lv_clamp_height(h, minh, maxh, parent_h);
+    }
+
+    /*calc_auto_size set the scroll x/y to 0 so revert the original value*/
+    if(w_content || h_content) {
+        lv_obj_scroll_to(obj, sl_ori, st_ori, LV_ANIM_OFF);
+    }
+
+    /*Do nothing if the size is not changed*/
+    /*It is very important else recursive resizing can occur without size change*/
+    if(lv_obj_get_width(obj) == w && lv_obj_get_height(obj) == h) return false;
+
+    /*Invalidate the original area*/
+    lv_obj_invalidate(obj);
+
+    /*Save the original coordinates*/
+    lv_area_t ori;
+    lv_obj_get_coords(obj, &ori);
+
+    /*Check if the object inside the parent or not*/
+    lv_area_t parent_fit_area;
+    lv_obj_get_content_coords(parent, &parent_fit_area);
+
+    /*If the object is already out of the parent and its position is changes
+     *surely the scrollbars also changes so invalidate them*/
+    bool on1 = _lv_area_is_in(&ori, &parent_fit_area, 0);
+    if(!on1) lv_obj_scrollbar_invalidate(parent);
+
+    /*Set the length and height
+     *Be sure the content is not scrolled in an invalid position on the new size*/
+    obj->coords.y2 = obj->coords.y1 + h - 1;
+    if(lv_obj_get_style_base_dir(obj, LV_PART_MAIN) == LV_BASE_DIR_RTL) {
+        obj->coords.x1 = obj->coords.x2 - w + 1;
+    }
+    else {
+        obj->coords.x2 = obj->coords.x1 + w - 1;
+    }
+
+    /*Call the ancestor's event handler to the object with its new coordinates*/
+    lv_event_send(obj, LV_EVENT_SIZE_CHANGED, &ori);
+
+    /*Call the ancestor's event handler to the parent too*/
+    lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj);
+
+    /*Invalidate the new area*/
+    lv_obj_invalidate(obj);
+
+    /*Be sure the bottom side is not remains scrolled in*/
+    /*With snapping the content can't be scrolled in*/
+    if(lv_obj_get_scroll_snap_y(obj) == LV_SCROLL_SNAP_NONE) {
+        lv_coord_t st = lv_obj_get_scroll_top(obj);
+        lv_coord_t sb = lv_obj_get_scroll_bottom(obj);
+        if(sb < 0 && st > 0) {
+            sb = LV_MIN(st, -sb);
+            lv_obj_scroll_by(obj, 0, sb, LV_ANIM_OFF);
+        }
+    }
+
+    if(lv_obj_get_scroll_snap_x(obj) == LV_SCROLL_SNAP_NONE) {
+        lv_coord_t sl = lv_obj_get_scroll_left(obj);
+        lv_coord_t sr = lv_obj_get_scroll_right(obj);
+        if(lv_obj_get_style_base_dir(obj, LV_PART_MAIN) != LV_BASE_DIR_RTL) {
+            /*Be sure the left side is not remains scrolled in*/
+            if(sr < 0 && sl > 0) {
+                sr = LV_MIN(sl, -sr);
+                lv_obj_scroll_by(obj, sr, 0, LV_ANIM_OFF);
+            }
+        } else {
+            /*Be sure the right side is not remains scrolled in*/
+            if(sl < 0 && sr > 0) {
+                sr = LV_MIN(sr, -sl);
+                lv_obj_scroll_by(obj, sl, 0, LV_ANIM_OFF);
+            }
+        }
+    }
+
+    /*If the object was out of the parent invalidate the new scrollbar area too.
+     *If it wasn't out of the parent but out now, also invalidate the srollbars*/
+    bool on2 = _lv_area_is_in(&obj->coords, &parent_fit_area, 0);
+    if(on1 || (!on1 && on2)) lv_obj_scrollbar_invalidate(parent);
+
+
+
+
+
+    return true;
+}
+
+void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_set_width(obj, w);
+    lv_obj_set_height(obj, h);
+}
+
+void lv_obj_set_width(lv_obj_t * obj, lv_coord_t w)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    lv_res_t res_w;
+    lv_style_value_t v_w;
+
+    res_w = lv_obj_get_local_style_prop(obj, LV_STYLE_WIDTH, &v_w, 0);
+
+    if((res_w == LV_RES_OK && v_w.num != w) || res_w == LV_RES_INV) {
+        lv_obj_set_style_width(obj, w, 0);
+    }
+}
+
+void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    lv_res_t res_h;
+    lv_style_value_t v_h;
+
+    res_h = lv_obj_get_local_style_prop(obj, LV_STYLE_HEIGHT, &v_h, 0);
+
+    if((res_h == LV_RES_OK && v_h.num != h) || res_h == LV_RES_INV) {
+        lv_obj_set_style_height(obj, h, 0);
+    }
+}
+
+void lv_obj_set_content_width(lv_obj_t * obj, lv_coord_t w)
+{
+    lv_coord_t pleft = lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+    lv_coord_t pright = lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    lv_obj_set_width(obj, w + pleft + pright + 2 * border_width);
+}
+
+void lv_obj_set_content_height(lv_obj_t * obj, lv_coord_t h)
+{
+    lv_coord_t ptop = lv_obj_get_style_pad_top(obj, LV_PART_MAIN);
+    lv_coord_t pbottom = lv_obj_get_style_pad_bottom(obj, LV_PART_MAIN);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    lv_obj_set_height(obj, h + ptop + pbottom + 2 * border_width);
+}
+
+void lv_obj_set_layout(lv_obj_t * obj, uint32_t layout)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_set_style_layout(obj, layout, 0);
+
+    lv_obj_mark_layout_as_dirty(obj);
+}
+
+bool lv_obj_is_layout_positioned(const lv_obj_t * obj)
+{
+    if(lv_obj_has_flag_any(obj, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_IGNORE_LAYOUT | LV_OBJ_FLAG_FLOATING)) return false;
+
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+    if(parent == NULL) return false;
+
+    uint32_t layout = lv_obj_get_style_layout(parent, LV_PART_MAIN);
+    if(layout) return true;
+    else return false;
+}
+
+void lv_obj_mark_layout_as_dirty(lv_obj_t * obj)
+{
+    obj->layout_inv = 1;
+
+    /*Mark the screen as dirty too to mark that there is an something to do on this screen*/
+    lv_obj_t * scr = lv_obj_get_screen(obj);
+    scr->scr_layout_inv = 1;
+
+    /*Make the display refreshing*/
+    lv_disp_t * disp = lv_obj_get_disp(scr);
+    lv_timer_resume(disp->refr_timer);
+}
+
+void lv_obj_update_layout(const lv_obj_t * obj)
+{
+    static bool mutex = false;
+    if(mutex) {
+        LV_LOG_TRACE("Already running, returning")
+        return;
+    }
+    mutex = true;
+
+    lv_obj_t * scr = lv_obj_get_screen(obj);
+
+    /*Repeat until there where layout invalidations*/
+    while(scr->scr_layout_inv) {
+        LV_LOG_INFO("Layout update begin")
+        scr->scr_layout_inv = 0;
+        layout_update_core(scr);
+        LV_LOG_TRACE("Layout update end")
+    }
+
+    mutex = false;
+}
+
+uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data)
+{
+    layout_cnt++;
+    LV_GC_ROOT(_lv_layout_list) = lv_mem_realloc(LV_GC_ROOT(_lv_layout_list), layout_cnt * sizeof(lv_layout_dsc_t));
+    LV_ASSERT_MALLOC(LV_GC_ROOT(_lv_layout_list));
+
+    LV_GC_ROOT(_lv_layout_list)[layout_cnt - 1].cb = cb;
+    LV_GC_ROOT(_lv_layout_list)[layout_cnt - 1].user_data = user_data;
+    return layout_cnt;  /*No -1 to skip 0th index*/
+}
+
+void lv_obj_set_align(lv_obj_t * obj, lv_align_t align)
+{
+    lv_obj_set_style_align(obj, align, 0);
+}
+
+void lv_obj_align(lv_obj_t * obj, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs)
+{
+    lv_obj_set_style_align(obj, align, 0);
+    lv_obj_set_pos(obj, x_ofs, y_ofs);
+}
+
+void lv_obj_align_to(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_update_layout(obj);
+    if(base == NULL) base = lv_obj_get_parent(obj);
+
+    LV_ASSERT_OBJ(base, MY_CLASS);
+
+    lv_coord_t x = 0;
+    lv_coord_t y = 0;
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+
+    lv_coord_t border_width = lv_obj_get_style_border_width(parent, LV_PART_MAIN);
+    lv_coord_t pleft = lv_obj_get_style_pad_left(parent, LV_PART_MAIN) + border_width;
+    lv_coord_t ptop = lv_obj_get_style_pad_top(parent, LV_PART_MAIN) + border_width;
+
+    if(align == LV_ALIGN_DEFAULT) {
+        if(lv_obj_get_style_base_dir(parent, LV_PART_MAIN) == LV_BASE_DIR_RTL) align = LV_ALIGN_TOP_RIGHT;
+        else align = LV_ALIGN_TOP_LEFT;
+    }
+
+    switch(align) {
+    case LV_ALIGN_CENTER:
+        x = lv_obj_get_content_width(base) / 2 - lv_obj_get_width(obj) / 2;
+        y = lv_obj_get_content_height(base) / 2 - lv_obj_get_height(obj) / 2;
+        break;
+    case LV_ALIGN_TOP_LEFT:
+        x = 0;
+        y = 0;
+        break;
+    case LV_ALIGN_TOP_MID:
+        x = lv_obj_get_content_width(base) / 2 - lv_obj_get_width(obj) / 2;
+        y = 0;
+        break;
+
+    case LV_ALIGN_TOP_RIGHT:
+        x = lv_obj_get_content_width(base) - lv_obj_get_width(obj);
+        y = 0;
+        break;
+
+    case LV_ALIGN_BOTTOM_LEFT:
+        x = 0;
+        y = lv_obj_get_content_height(base) - lv_obj_get_height(obj);
+        break;
+    case LV_ALIGN_BOTTOM_MID:
+        x = lv_obj_get_content_width(base) / 2 - lv_obj_get_width(obj) / 2;
+        y = lv_obj_get_content_height(base) - lv_obj_get_height(obj);
+        break;
+
+    case LV_ALIGN_BOTTOM_RIGHT:
+        x = lv_obj_get_content_width(base) - lv_obj_get_width(obj);
+        y = lv_obj_get_content_height(base) - lv_obj_get_height(obj);
+        break;
+
+    case LV_ALIGN_LEFT_MID:
+        x = 0;
+        y = lv_obj_get_content_height(base) / 2 - lv_obj_get_height(obj) / 2;
+        break;
+
+    case LV_ALIGN_RIGHT_MID:
+        x = lv_obj_get_content_width(base) - lv_obj_get_width(obj);
+        y = lv_obj_get_content_height(base) / 2 - lv_obj_get_height(obj) / 2;
+        break;
+
+    case LV_ALIGN_OUT_TOP_LEFT:
+        x = -pleft;
+        y = -lv_obj_get_height(obj) - ptop;
+        break;
+
+    case LV_ALIGN_OUT_TOP_MID:
+        x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2 - pleft;
+        y = -lv_obj_get_height(obj) - ptop;
+        break;
+
+    case LV_ALIGN_OUT_TOP_RIGHT:
+        x = lv_obj_get_width(base) - lv_obj_get_width(obj) - pleft;
+        y = -lv_obj_get_height(obj) - ptop;
+        break;
+
+    case LV_ALIGN_OUT_BOTTOM_LEFT:
+        x = - pleft;
+        y = lv_obj_get_height(base) - ptop;
+        break;
+
+    case LV_ALIGN_OUT_BOTTOM_MID:
+        x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2 - pleft;
+        y = lv_obj_get_height(base) - ptop;
+        break;
+
+    case LV_ALIGN_OUT_BOTTOM_RIGHT:
+        x = lv_obj_get_width(base) - lv_obj_get_width(obj) - pleft;
+        y = lv_obj_get_height(base) - ptop;
+        break;
+
+    case LV_ALIGN_OUT_LEFT_TOP:
+        x = -lv_obj_get_width(obj) - pleft;
+        y = - ptop;
+        break;
+
+    case LV_ALIGN_OUT_LEFT_MID:
+        x = -lv_obj_get_width(obj) - pleft;
+        y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2 - ptop;
+        break;
+
+    case LV_ALIGN_OUT_LEFT_BOTTOM:
+        x = -lv_obj_get_width(obj) - pleft;
+        y = lv_obj_get_height(base) - lv_obj_get_height(obj) - ptop;
+        break;
+
+    case LV_ALIGN_OUT_RIGHT_TOP:
+        x = lv_obj_get_width(base) - pleft;
+        y = - ptop;
+        break;
+
+    case LV_ALIGN_OUT_RIGHT_MID:
+        x = lv_obj_get_width(base) - pleft;
+        y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2 - ptop;
+        break;
+
+    case LV_ALIGN_OUT_RIGHT_BOTTOM:
+        x = lv_obj_get_width(base) - pleft;
+        y = lv_obj_get_height(base) - lv_obj_get_height(obj) - ptop;
+        break;
+    }
+
+    x += x_ofs + base->coords.x1 - parent->coords.x1 + lv_obj_get_scroll_left(parent);
+    y += y_ofs + base->coords.y1 - parent->coords.y1 + lv_obj_get_scroll_top(parent);
+    lv_obj_set_style_align(obj, LV_ALIGN_TOP_LEFT, 0);
+    lv_obj_set_pos(obj, x, y);
+
+}
+
+void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * coords)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_area_copy(coords, &obj->coords);
+}
+
+lv_coord_t lv_obj_get_x(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_coord_t rel_x;
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+    if(parent) {
+        rel_x  = obj->coords.x1 - parent->coords.x1;
+        rel_x += lv_obj_get_scroll_x(parent);
+        rel_x -= lv_obj_get_style_pad_left(parent, LV_PART_MAIN);
+        rel_x -= lv_obj_get_style_border_width(parent, LV_PART_MAIN);
+    }
+    else {
+        rel_x = obj->coords.x1;
+    }
+    return rel_x;
+}
+
+lv_coord_t lv_obj_get_x2(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return lv_obj_get_x(obj) + lv_obj_get_width(obj);
+}
+
+lv_coord_t lv_obj_get_y(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_coord_t rel_y;
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+    if(parent) {
+        rel_y = obj->coords.y1 - parent->coords.y1;
+        rel_y += lv_obj_get_scroll_y(parent);
+        rel_y -= lv_obj_get_style_pad_top(parent, LV_PART_MAIN);
+        rel_y -= lv_obj_get_style_border_width(parent, LV_PART_MAIN);
+    }
+    else {
+        rel_y = obj->coords.y1;
+    }
+    return rel_y;
+}
+
+lv_coord_t lv_obj_get_y2(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return lv_obj_get_y(obj) + lv_obj_get_height(obj);
+}
+
+lv_coord_t lv_obj_get_width(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return lv_area_get_width(&obj->coords);
+}
+
+lv_coord_t lv_obj_get_height(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return lv_area_get_height(&obj->coords);
+}
+
+lv_coord_t lv_obj_get_content_width(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_coord_t left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+    lv_coord_t right = lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    return lv_obj_get_width(obj) - left - right - 2 * border_width;
+}
+
+lv_coord_t lv_obj_get_content_height(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_coord_t top = lv_obj_get_style_pad_top((lv_obj_t *)obj, LV_PART_MAIN);
+    lv_coord_t bottom =  lv_obj_get_style_pad_bottom((lv_obj_t *)obj, LV_PART_MAIN);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    return lv_obj_get_height(obj) - top - bottom - 2 * border_width;
+}
+
+void lv_obj_get_content_coords(const lv_obj_t * obj, lv_area_t * area)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    lv_obj_get_coords(obj, area);
+    lv_area_increase(area, -border_width, -border_width);
+    area->x1 += lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+    area->x2 -= lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
+    area->y1 += lv_obj_get_style_pad_top(obj, LV_PART_MAIN);
+    area->y2 -= lv_obj_get_style_pad_bottom(obj, LV_PART_MAIN);
+
+}
+
+lv_coord_t lv_obj_get_self_width(const lv_obj_t * obj)
+{
+    lv_point_t p = {0, LV_COORD_MIN};
+    lv_event_send((lv_obj_t * )obj, LV_EVENT_GET_SELF_SIZE, &p);
+    return p.x;
+}
+
+lv_coord_t lv_obj_get_self_height(const lv_obj_t * obj)
+{
+    lv_point_t p = {LV_COORD_MIN, 0};
+    lv_event_send((lv_obj_t * )obj, LV_EVENT_GET_SELF_SIZE, &p);
+    return p.y;
+}
+
+bool lv_obj_refresh_self_size(lv_obj_t * obj)
+{
+    lv_coord_t w_set = lv_obj_get_style_width(obj, LV_PART_MAIN);
+    lv_coord_t h_set = lv_obj_get_style_height(obj, LV_PART_MAIN);
+    if(w_set != LV_SIZE_CONTENT && h_set != LV_SIZE_CONTENT) return false;
+
+    lv_obj_mark_layout_as_dirty(obj);
+    return true;
+}
+
+void lv_obj_refr_pos(lv_obj_t * obj)
+{
+    if(lv_obj_is_layout_positioned(obj)) return;
+
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+    lv_coord_t x = lv_obj_get_style_x(obj, LV_PART_MAIN);
+    lv_coord_t y = lv_obj_get_style_y(obj, LV_PART_MAIN);
+
+    if(parent == NULL) {
+        lv_obj_move_to(obj, x, y);
+        return;
+    }
+
+    /*Handle percentage value*/
+    lv_coord_t pw = lv_obj_get_content_width(parent);
+    lv_coord_t ph = lv_obj_get_content_height(parent);
+    if(LV_COORD_IS_PCT(x)) x = (pw * LV_COORD_GET_PCT(x)) / 100;
+    if(LV_COORD_IS_PCT(y)) y = (ph * LV_COORD_GET_PCT(y)) / 100;
+
+    /*Handle percentage value of translate*/
+    lv_coord_t tr_x = lv_obj_get_style_translate_x(obj, LV_PART_MAIN);
+    lv_coord_t tr_y = lv_obj_get_style_translate_y(obj, LV_PART_MAIN);
+    lv_coord_t w = lv_obj_get_width(obj);
+    lv_coord_t h = lv_obj_get_height(obj);
+    if(LV_COORD_IS_PCT(tr_x)) tr_x = (w * LV_COORD_GET_PCT(tr_x)) / 100;
+    if(LV_COORD_IS_PCT(tr_y)) tr_y = (h * LV_COORD_GET_PCT(tr_y)) / 100;
+
+    /*Use the translation*/
+    x += tr_x;
+    y += tr_y;
+
+    lv_align_t align = lv_obj_get_style_align(obj, LV_PART_MAIN);
+
+    if(align == LV_ALIGN_DEFAULT) {
+        if(lv_obj_get_style_base_dir(parent, LV_PART_MAIN) == LV_BASE_DIR_RTL) align = LV_ALIGN_TOP_RIGHT;
+        else align = LV_ALIGN_TOP_LEFT;
+    }
+
+    if(align == LV_ALIGN_TOP_LEFT) {
+        lv_obj_move_to(obj, x, y);
+    }
+    else {
+
+        switch(align) {
+        case LV_ALIGN_TOP_MID:
+            x += pw / 2 - w / 2;
+            break;
+        case LV_ALIGN_TOP_RIGHT:
+            x += pw - w;
+            break;
+        case LV_ALIGN_LEFT_MID:
+            y += ph / 2 - h / 2;
+            break;
+        case LV_ALIGN_BOTTOM_LEFT:
+            y += ph - h;
+            break;
+        case LV_ALIGN_BOTTOM_MID:
+            x += pw / 2 - w / 2;
+            y += ph - h;
+            break;
+        case LV_ALIGN_BOTTOM_RIGHT:
+            x += pw - w;
+            y += ph - h;
+            break;
+        case LV_ALIGN_RIGHT_MID:
+            x += pw - w;
+            y += ph / 2 - h / 2;
+            break;
+        case LV_ALIGN_CENTER:
+            x += pw / 2 - w / 2;
+            y += ph / 2 - h / 2;
+            break;
+        default:
+            break;
+        }
+        lv_obj_move_to(obj, x, y);
+    }
+}
+
+void lv_obj_move_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
+{
+    /*Convert x and y to absolute coordinates*/
+    lv_obj_t * parent = obj->parent;
+
+    if(parent) {
+        lv_coord_t pad_left = lv_obj_get_style_pad_left(parent, LV_PART_MAIN);
+        lv_coord_t pad_top = lv_obj_get_style_pad_top(parent, LV_PART_MAIN);
+
+        if(lv_obj_has_flag(obj, LV_OBJ_FLAG_FLOATING)) {
+            x += pad_left + parent->coords.x1;
+            y += pad_top + parent->coords.y1;
+        } else {
+            x += pad_left + parent->coords.x1 - lv_obj_get_scroll_x(parent);
+            y += pad_top + parent->coords.y1 - lv_obj_get_scroll_y(parent);
+        }
+
+        lv_coord_t border_width = lv_obj_get_style_border_width(parent, LV_PART_MAIN);
+        x += border_width;
+        y += border_width;
+    }
+
+    /*Calculate and set the movement*/
+    lv_point_t diff;
+    diff.x = x - obj->coords.x1;
+    diff.y = y - obj->coords.y1;
+
+    /*Do nothing if the position is not changed*/
+    /*It is very important else recursive positioning can
+     *occur without position change*/
+    if(diff.x == 0 && diff.y == 0) return;
+
+    /*Invalidate the original area*/
+    lv_obj_invalidate(obj);
+
+    /*Save the original coordinates*/
+    lv_area_t ori;
+    lv_obj_get_coords(obj, &ori);
+
+    /*Check if the object inside the parent or not*/
+    lv_area_t parent_fit_area;
+    bool on1 = false;
+    if(parent) {
+        lv_obj_get_content_coords(parent, &parent_fit_area);
+
+        /*If the object is already out of the parent and its position is changes
+         *surely the scrollbars also changes so invalidate them*/
+        on1 = _lv_area_is_in(&ori, &parent_fit_area, 0);
+        if(!on1) lv_obj_scrollbar_invalidate(parent);
+    }
+
+    obj->coords.x1 += diff.x;
+    obj->coords.y1 += diff.y;
+    obj->coords.x2 += diff.x;
+    obj->coords.y2 += diff.y;
+
+    lv_obj_move_children_by(obj, diff.x, diff.y, false);
+
+    /*Call the ancestor's event handler to the parent too*/
+    if(parent) lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj);
+
+    /*Invalidate the new area*/
+    lv_obj_invalidate(obj);
+
+    /*If the object was out of the parent invalidate the new scrollbar area too.
+     *If it wasn't out of the parent but out now, also invalidate the srollbars*/
+    if(parent) {
+        bool on2 = _lv_area_is_in(&obj->coords, &parent_fit_area, 0);
+        if(on1 || (!on1 && on2)) lv_obj_scrollbar_invalidate(parent);
+    }
+}
+
+void lv_obj_move_children_by(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff, bool ignore_floating)
+{
+    uint32_t i;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        lv_obj_t * child = lv_obj_get_child(obj, i);
+        if(ignore_floating && lv_obj_has_flag(child, LV_OBJ_FLAG_FLOATING)) continue;
+        child->coords.x1 += x_diff;
+        child->coords.y1 += y_diff;
+        child->coords.x2 += x_diff;
+        child->coords.y2 += y_diff;
+
+        lv_obj_move_children_by(child, x_diff, y_diff, false);
+    }
+}
+
+
+void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_area_t area_tmp;
+    lv_area_copy(&area_tmp, area);
+    bool visible = lv_obj_area_is_visible(obj, &area_tmp);
+
+    if(visible) _lv_inv_area(lv_obj_get_disp(obj), &area_tmp);
+}
+
+void lv_obj_invalidate(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    /*Truncate the area to the object*/
+    lv_area_t obj_coords;
+    lv_coord_t ext_size = _lv_obj_get_ext_draw_size(obj);
+    lv_area_copy(&obj_coords, &obj->coords);
+    obj_coords.x1 -= ext_size;
+    obj_coords.y1 -= ext_size;
+    obj_coords.x2 += ext_size;
+    obj_coords.y2 += ext_size;
+
+    lv_obj_invalidate_area(obj, &obj_coords);
+
+}
+
+bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
+{
+    if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) return false;
+
+    /*Invalidate the object only if it belongs to the current or previous'*/
+    lv_obj_t * obj_scr = lv_obj_get_screen(obj);
+    lv_disp_t * disp   = lv_obj_get_disp(obj_scr);
+    if(obj_scr != lv_disp_get_scr_act(disp) &&
+       obj_scr != lv_disp_get_scr_prev(disp) &&
+       obj_scr != lv_disp_get_layer_top(disp) &&
+       obj_scr != lv_disp_get_layer_sys(disp))
+    {
+        return false;
+    }
+
+    /*Truncate the area to the object*/
+    lv_area_t obj_coords;
+    lv_coord_t ext_size = _lv_obj_get_ext_draw_size(obj);
+    lv_area_copy(&obj_coords, &obj->coords);
+    obj_coords.x1 -= ext_size;
+    obj_coords.y1 -= ext_size;
+    obj_coords.x2 += ext_size;
+    obj_coords.y2 += ext_size;
+
+    bool is_common;
+
+    is_common = _lv_area_intersect(area, area, &obj_coords);
+    if(is_common == false) return false;  /*The area is not on the object*/
+
+    /*Truncate recursively to the parents*/
+    lv_obj_t * par = lv_obj_get_parent(obj);
+    while(par != NULL) {
+        is_common = _lv_area_intersect(area, area, &par->coords);
+        if(is_common == false) return false;       /*If no common parts with parent break;*/
+        if(lv_obj_has_flag(par, LV_OBJ_FLAG_HIDDEN)) return false; /*If the parent is hidden then the child is hidden and won't be drawn*/
+
+        par = lv_obj_get_parent(par);
+    }
+
+    return true;
+}
+
+bool lv_obj_is_visible(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_area_t obj_coords;
+    lv_coord_t ext_size = _lv_obj_get_ext_draw_size(obj);
+    lv_area_copy(&obj_coords, &obj->coords);
+    obj_coords.x1 -= ext_size;
+    obj_coords.y1 -= ext_size;
+    obj_coords.x2 += ext_size;
+    obj_coords.y2 += ext_size;
+
+    return lv_obj_area_is_visible(obj, &obj_coords);
+
+}
+
+void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t size)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_allocate_spec_attr(obj);
+    obj->spec_attr->ext_click_pad = size;
+}
+
+void lv_obj_get_click_area(const lv_obj_t * obj, lv_area_t * area)
+{
+    lv_area_copy(area, &obj->coords);
+    if(obj->spec_attr) {
+        area->x1 -= obj->spec_attr->ext_click_pad;
+        area->x2 += obj->spec_attr->ext_click_pad;
+        area->y1 -= obj->spec_attr->ext_click_pad;
+        area->y2 += obj->spec_attr->ext_click_pad;
+    }
+}
+
+bool lv_obj_hit_test(lv_obj_t * obj, const lv_point_t * point)
+{
+    lv_area_t a;
+    lv_obj_get_click_area(obj, &a);
+    bool res = _lv_area_is_point_on(&a, point, 0);
+    if(res == false) return false;
+
+    if(lv_obj_has_flag(obj, LV_OBJ_FLAG_ADV_HITTEST)) {
+        lv_hit_test_info_t hit_info;
+        hit_info.point = point;
+        hit_info.res = true;
+        lv_event_send(obj, LV_EVENT_HIT_TEST, &hit_info);
+        return hit_info.res;
+    }
+
+    return res;
+}
+
+lv_coord_t lv_clamp_width(lv_coord_t width, lv_coord_t min_width, lv_coord_t max_width, lv_coord_t ref_width)
+{
+    if(LV_COORD_IS_PCT(min_width)) min_width = (ref_width * LV_COORD_GET_PCT(min_width)) / 100;
+    if(LV_COORD_IS_PCT(max_width)) max_width = (ref_width * LV_COORD_GET_PCT(max_width)) / 100;
+    return LV_CLAMP(min_width, width, max_width);
+}
+
+lv_coord_t lv_clamp_height(lv_coord_t height, lv_coord_t min_height, lv_coord_t max_height, lv_coord_t ref_height)
+{
+    if(LV_COORD_IS_PCT(min_height)) min_height = (ref_height * LV_COORD_GET_PCT(min_height)) / 100;
+    if(LV_COORD_IS_PCT(max_height)) max_height = (ref_height * LV_COORD_GET_PCT(max_height)) / 100;
+    return LV_CLAMP(min_height, height, max_height);
+}
+
+
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+/**
+ * Calculate the "auto size". It's `auto_size = max(children_size, self_size)`
+ * @param obj pointer to an object
+ * @param w_out store the width here. NULL to not calculate width
+ * @param h_out store the height here. NULL to not calculate height
+ */
+static void calc_auto_size(lv_obj_t * obj, lv_coord_t * w_out, lv_coord_t * h_out)
+{
+    if(!w_out && !h_out) return;
+    /*Get the bounding box of the children*/
+    if(w_out) {
+        lv_coord_t scroll_right = lv_obj_get_scroll_right(obj);
+        lv_coord_t scroll_left = lv_obj_get_scroll_left(obj);
+        *w_out = lv_obj_get_width(obj) + scroll_right + scroll_left;
+    }
+
+    if(h_out) {
+        lv_coord_t scroll_bottom = lv_obj_get_scroll_bottom(obj);
+        lv_coord_t scroll_top = lv_obj_get_scroll_top(obj);
+        *h_out = lv_obj_get_height(obj) + scroll_bottom + scroll_top;
+    }
+}
+
+static void layout_update_core(lv_obj_t * obj)
+{
+    uint32_t i;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        lv_obj_t * child = lv_obj_get_child(obj, i);
+        layout_update_core(child);
+    }
+
+    if(obj->layout_inv == 0) return;
+
+    obj->layout_inv = 0;
+
+    lv_obj_refr_size(obj);
+    lv_obj_refr_pos(obj);
+
+    if(lv_obj_get_child_cnt(obj) > 0) {
+        uint32_t layout_id = lv_obj_get_style_layout(obj, LV_PART_MAIN);
+        if(layout_id > 0 && layout_id <= layout_cnt) {
+            void  * user_data = LV_GC_ROOT(_lv_layout_list)[layout_id -1].user_data;
+            LV_GC_ROOT(_lv_layout_list)[layout_id -1].cb(obj, user_data);
+        }
+    }
+}

+ 386 - 0
components/lvgl/src/core/lv_obj_pos.h

@@ -0,0 +1,386 @@
+/**
+ * @file lv_obj_pos.h
+ *
+ */
+
+#ifndef LV_OBJ_POS_H
+#define LV_OBJ_POS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "../misc/lv_area.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+struct _lv_obj_t;
+
+typedef void (*lv_layout_update_cb_t)(struct _lv_obj_t *, void * user_data);
+typedef struct {
+    lv_layout_update_cb_t cb;
+    void * user_data;
+}lv_layout_dsc_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Set the relative the position of an object (relative to the parent's top left corner)
+ * @param obj       pointer to an object
+ * @param x         new distance from the left side of the parent plus the parent's left padding
+ * @param y         new distance from the top side of the parent  plus the parent's right padding
+ */
+void lv_obj_set_pos(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
+
+/**
+ * Set the x coordinate of a object
+ * @param obj       pointer to an object
+ * @param x         new distance from the left side from the parent plus the parent's left padding
+ */
+void lv_obj_set_x(struct _lv_obj_t * obj, lv_coord_t x);
+
+/**
+ * Set the y coordinate of a object
+ * @param obj       pointer to an object
+ * @param y         new distance from the top of the parent  plus the parent's top padding
+ */
+void lv_obj_set_y(struct _lv_obj_t * obj, lv_coord_t y);
+
+/**
+ * Set the size of an object.
+ * @param obj       pointer to an object
+ * @param w         the new width
+ * @param h         the new height
+ * @note            possible values are:
+ *                  pixel               simple set the size accordingly
+ *                  LV_SIZE_CONTENT     set the size to involve all children in the given direction
+ *                  LV_SIZE_PCT(x)     to set size in percentage of the parent's content area size (the size without paddings).
+ *                                      x should be in [0..1000]% range
+ */
+void lv_obj_set_size(struct _lv_obj_t * obj, lv_coord_t w, lv_coord_t h);
+
+/**
+ * Recalculate the size of the object
+ * @param obj       pointer to an object
+ * @return          true: the size has been changed
+ */
+bool lv_obj_refr_size(struct _lv_obj_t * obj);
+
+/**
+ * Set the width of an object
+ * @param obj       pointer to an object
+ * @param w         the new width
+ * @note            possible values are:
+ *                  pixel               simple set the size accordingly
+ *                  LV_SIZE_CONTENT     set the size to involve all children in the given direction
+ *                  lv_pct(x)           to set size in percentage of the parent's content area size (the size without paddings).
+ *                                      x should be in [0..1000]% range
+ */
+void lv_obj_set_width(struct _lv_obj_t * obj, lv_coord_t w);
+
+/**
+ * Set the height of an object
+ * @param obj       pointer to an object
+ * @param h         the new height
+ * @note            possible values are:
+ *                  pixel               simple set the size accordingly
+ *                  LV_SIZE_CONTENT     set the size to involve all children in the given direction
+ *                  lv_pct(x)           to set size in percentage of the parent's content area size (the size without paddings).
+ *                                      x should be in [0..1000]% range
+ */
+void lv_obj_set_height(struct _lv_obj_t * obj, lv_coord_t h);
+
+/**
+ * Set the width reduced by the left and right padding and the border width.
+ * @param obj       pointer to an object
+ * @param w         the width without paddings in pixels
+ */
+void lv_obj_set_content_width(struct _lv_obj_t * obj, lv_coord_t w);
+
+/**
+ * Set the height reduced by the top and bottom padding and the border width.
+ * @param obj       pointer to an object
+ * @param h         the height without paddings in pixels
+ */
+void lv_obj_set_content_height(struct _lv_obj_t * obj, lv_coord_t h);
+
+/**
+ * Set a layout for an object
+ * @param obj       pointer to an object
+ * @param layout    pointer to a layout descriptor to set
+ */
+void lv_obj_set_layout(struct _lv_obj_t * obj, uint32_t layout);
+
+/**
+ * Test whether the and object is positioned by a layout or not
+ * @param obj       pointer to an object to test
+ * @return true:    positioned by a layout; false: not positioned by a layout
+ */
+bool lv_obj_is_layout_positioned(const struct _lv_obj_t * obj);
+
+/**
+ * Mark the object for layout update.
+ * @param obj      pointer to an object whose children needs to be updated
+ */
+void lv_obj_mark_layout_as_dirty(struct _lv_obj_t * obj);
+
+/**
+ * Update the layout of an object.
+ * @param obj      pointer to an object whose children needs to be updated
+ */
+void lv_obj_update_layout(const struct _lv_obj_t * obj);
+
+/**
+ * Regsiter a new layout
+ * @param cb        the layout update callback
+ * @param user_data custom data that will be passed to `cb`
+ * @return          the ID of the new layout
+ */
+uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data);
+
+/**
+ * Change the alignment of an object.
+ * @param obj       pointer to an object to align
+ * @param align     type of alignment (see 'lv_align_t' enum) `LV_ALIGN_OUT_...` can't be used.
+ */
+void lv_obj_set_align(struct _lv_obj_t * obj, lv_align_t align);
+
+/**
+ * Change the alignment of an object and set new coordinates.
+ * Equivalent to:
+ * lv_obj_set_align(obj, align);
+ * lv_obj_set_pos(obj, x_ofs, y_ofs);
+ * @param obj       pointer to an object to align
+ * @param align     type of alignment (see 'lv_align_t' enum) `LV_ALIGN_OUT_...` can't be used.
+ * @param x_ofs     x coordinate offset after alignment
+ * @param y_ofs     y coordinate offset after alignment
+ */
+void lv_obj_align(struct _lv_obj_t * obj, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs);
+
+/**
+ * Align an object to an other object.
+ * @param obj       pointer to an object to align
+ * @param base      pointer to an other object (if NULL `obj`s parent is used). 'obj' will be aligned to it.
+ * @param align     type of alignment (see 'lv_align_t' enum)
+ * @param x_ofs     x coordinate offset after alignment
+ * @param y_ofs     y coordinate offset after alignment
+ * @note            if the position or size of `base` changes `obj` needs to be aligned manually again
+ */
+void lv_obj_align_to(struct _lv_obj_t * obj, const struct _lv_obj_t * base, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs);
+
+/**
+ * Align an object to the center on its parent.
+ * @param obj       pointer to an object to align
+ * @note            if the parent size changes `obj` needs to be aligned manually again
+ */
+static inline void lv_obj_center(struct _lv_obj_t * obj)
+{
+    lv_obj_align(obj, LV_ALIGN_CENTER, 0, 0);
+}
+
+
+/**
+ * Copy the coordinates of an object to an area
+ * @param obj       pointer to an object
+ * @param coords    pointer to an area to store the coordinates
+ */
+void lv_obj_get_coords(const struct _lv_obj_t * obj, lv_area_t * coords);
+
+/**
+ * Get the x coordinate of object.
+ * @param obj       pointer to an object
+ * @return          distance of `obj` from the left side of its parent plus the parent's left padding
+ * @note            Zero return value means the object is on the left padding of the parent, and not on the left edge.
+ * @note            Scrolling of the parent doesn't change the returned value.
+ * @note            The returned value is always the distance from the parent even if `obj` is positioned by a layout.
+ */
+lv_coord_t lv_obj_get_x(const struct _lv_obj_t * obj);
+
+/**
+ * Get the x2 coordinate of object.
+ * @param obj       pointer to an object
+ * @return          distance of `obj` from the right side of its parent plus the parent's right padding
+ * @note            Zero return value means the object is on the right padding of the parent, and not on the right edge.
+ * @note            Scrolling of the parent doesn't change the returned value.
+ * @note            The returned value is always the distance from the parent even if `obj` is positioned by a layout.
+ */
+lv_coord_t lv_obj_get_x2(const struct _lv_obj_t * obj);
+
+/**
+ * Get the y coordinate of object.
+ * @param obj       pointer to an object
+ * @return          distance of `obj` from the top side of its parent plus the parent's top padding
+ * @note            Zero return value means the object is on the top padding of the parent, and not on the top edge.
+ * @note            Scrolling of the parent doesn't change the returned value.
+ * @note            The returned value is always the distance from the parent even if `obj` is positioned by a layout.
+ */
+lv_coord_t lv_obj_get_y(const struct _lv_obj_t * obj);
+
+/**
+ * Get the y2 coordinate of object.
+ * @param obj       pointer to an object
+ * @return          distance of `obj` from the bottom side of its parent plus the parent's bottom padding
+ * @note            Zero return value means the object is on the bottom padding of the parent, and not on the bottom edge.
+ * @note            Scrolling of the parent doesn't change the returned value.
+ * @note            The returned value is always the distance from the parent even if `obj` is positioned by a layout.
+ */
+lv_coord_t lv_obj_get_y2(const struct _lv_obj_t * obj);
+
+/**
+ * Get the width of an object
+ * @param obj       pointer to an object
+ * @return          the width in pixels
+ */
+lv_coord_t lv_obj_get_width(const struct _lv_obj_t * obj);
+
+/**
+ * Get the height of an object
+ * @param obj       pointer to an object
+ * @return          the height in pixels
+ */
+lv_coord_t lv_obj_get_height(const struct _lv_obj_t * obj);
+
+/**
+ * Get the width reduced by the left and right padding and the border width.
+ * @param obj       pointer to an object
+ * @return          the width which still fits into its parent without causing overflow (making the parent scrollable)
+ */
+lv_coord_t lv_obj_get_content_width(const struct _lv_obj_t * obj);
+
+/**
+ * Get the height reduced by the top an bottom padding and the border width.
+ * @param obj       pointer to an object
+ * @return          the height which still fits into the parent without causing overflow (making the parent scrollable)
+ */
+lv_coord_t lv_obj_get_content_height(const struct _lv_obj_t * obj);
+
+/**
+ * Get the area reduced by the paddings and the border width.
+ * @param obj       pointer to an object
+ * @param area      the area which still fits into the parent without causing overflow (making the parent scrollable)
+ */
+void lv_obj_get_content_coords(const struct _lv_obj_t * obj, lv_area_t * area);
+
+/**
+ * Get the width occupied by the "parts" of the widget. E.g. the width of all columns of a table.
+ * @param obj       pointer to an objects
+ * @return          the width of the virtually drawn content
+ * @note            This size independent from the real size of the widget.
+ *                  It just tells how large the internal ("virtual") content is.
+ */
+lv_coord_t lv_obj_get_self_width(const struct _lv_obj_t * obj);
+
+/**
+ * Get the height occupied by the "parts" of the widget. E.g. the height of all rows of a table.
+ * @param obj       pointer to an objects
+ * @return          the width of the virtually drawn content
+ * @note            This size independent from the real size of the widget.
+ *                  It just tells how large the internal ("virtual") content is.
+ */
+lv_coord_t lv_obj_get_self_height(const struct _lv_obj_t * obj);
+
+/**
+ * Handle if the size of the internal ("virtual") content of an object has changed.
+ * @param obj       pointer to an object
+ * @return          false: nothing happened; true: refresh happened
+ */
+bool lv_obj_refresh_self_size(struct _lv_obj_t * obj);
+
+void lv_obj_refr_pos(struct _lv_obj_t * obj);
+
+void lv_obj_move_to(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
+
+
+void lv_obj_move_children_by(struct _lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff, bool ignore_floating);
+
+/**
+ * Mark an area of an object as invalid.
+ * The area will be truncated to the object's area and marked for redraw.
+ * @param obj       pointer to an object
+ * @param           area the area to redraw
+ */
+void lv_obj_invalidate_area(const struct _lv_obj_t * obj, const lv_area_t * area);
+
+/**
+ * Mark the object as invalid to redrawn its area
+ * @param obj       pointer to an object
+ */
+void lv_obj_invalidate(const struct _lv_obj_t * obj);
+
+/**
+ * Tell whether an area of an object is visible (even partially) now or not
+ * @param obj       pointer to an object
+ * @param area      the are to check. The visible part of the area will be written back here.
+ * @return true     visible; false not visible (hidden, out of parent, on other screen, etc)
+ */
+bool lv_obj_area_is_visible(const struct _lv_obj_t * obj, lv_area_t * area);
+
+/**
+ * Tell whether an object is visible (even partially) now or not
+ * @param obj       pointer to an object
+ * @return      true: visible; false not visible (hidden, out of parent, on other screen, etc)
+ */
+bool lv_obj_is_visible(const struct _lv_obj_t * obj);
+
+/**
+ * Set the size of an extended clickable area
+ * @param obj       pointer to an object
+ * @param size      extended clickable area in all 4 directions [px]
+ */
+void lv_obj_set_ext_click_area(struct _lv_obj_t * obj, lv_coord_t size);
+
+/**
+ * Get the an area where to object can be clicked.
+ * It's the object's normal area plus the extended click area.
+ * @param obj       pointer to an object
+ * @param area      store the result area here
+ */
+void lv_obj_get_click_area(const struct _lv_obj_t * obj, lv_area_t * area);
+
+/**
+ * Hit-test an object given a particular point in screen space.
+ * @param obj       object to hit-test
+ * @param point     screen-space point (absolute coordinate)
+ * @return          true: if the object is considered under the point
+ */
+bool lv_obj_hit_test(struct _lv_obj_t * obj, const lv_point_t * point);
+
+/**
+ * Clamp a width between min and max width. If the min/max width is in percentage value use the ref_width
+ * @param width         width to clamp
+ * @param min_width     the minimal width
+ * @param max_width     the maximal width
+ * @param ref_width     the reference width used when min/max width is in percentage
+ * @return              the clampled width
+ */
+lv_coord_t lv_clamp_width(lv_coord_t width, lv_coord_t min_width, lv_coord_t max_width, lv_coord_t ref_width);
+
+/**
+ * Clamp a height between min and max height. If the min/max height is in percentage value use the ref_height
+ * @param height         height to clamp
+ * @param min_height     the minimal height
+ * @param max_height     the maximal height
+ * @param ref_height     the reference height used when min/max height is in percentage
+ * @return              the clampled height
+ */
+lv_coord_t lv_clamp_height(lv_coord_t height, lv_coord_t min_height, lv_coord_t max_height, lv_coord_t ref_height);
+
+/**********************
+ *      MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_OBJ_POS_H*/

+ 678 - 0
components/lvgl/src/core/lv_obj_scroll.c

@@ -0,0 +1,678 @@
+/**
+ * @file lv_obj_scroll.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj_scroll.h"
+#include "lv_obj.h"
+#include "lv_indev.h"
+#include "lv_disp.h"
+#include "lv_indev_scroll.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+#define SCROLL_ANIM_TIME_MIN    200    /*ms*/
+#define SCROLL_ANIM_TIME_MAX    400    /*ms*/
+#define SCROLLBAR_MIN_SIZE      (LV_DPX(10))
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  GLOBAL PROTOTYPES
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static void scroll_by_raw(lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
+static void scroll_x_anim(void * obj, int32_t v);
+static void scroll_y_anim(void * obj, int32_t v);
+static void scroll_anim_ready_cb(lv_anim_t * a);
+static void scroll_area_into_view(const lv_area_t * area, lv_obj_t * child, lv_point_t * scroll_value, lv_anim_enable_t anim_en);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+/*=====================
+ * Setter functions
+ *====================*/
+
+void lv_obj_set_scrollbar_mode(lv_obj_t * obj, lv_scrollbar_mode_t mode)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_allocate_spec_attr(obj);
+
+    if(obj->spec_attr->scrollbar_mode == mode) return;
+    obj->spec_attr->scrollbar_mode = mode;
+    lv_obj_invalidate(obj);
+}
+
+void lv_obj_set_scroll_dir(lv_obj_t * obj, lv_dir_t dir)
+{
+    lv_obj_allocate_spec_attr(obj);
+
+    if(dir != obj->spec_attr->scroll_dir) {
+        obj->spec_attr->scroll_dir = dir;
+    }
+}
+
+void lv_obj_set_scroll_snap_x(lv_obj_t * obj, lv_scroll_snap_t align)
+{
+    lv_obj_allocate_spec_attr(obj);
+    obj->spec_attr->scroll_snap_x = align;
+}
+
+void lv_obj_set_scroll_snap_y(lv_obj_t * obj, lv_scroll_snap_t align)
+{
+    lv_obj_allocate_spec_attr(obj);
+    obj->spec_attr->scroll_snap_y = align;
+}
+
+/*=====================
+ * Getter functions
+ *====================*/
+
+lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t * obj)
+{
+    if(obj->spec_attr) return obj->spec_attr->scrollbar_mode;
+    else return LV_SCROLLBAR_MODE_AUTO;
+}
+
+lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t * obj)
+{
+    if(obj->spec_attr) return obj->spec_attr->scroll_dir;
+    else return LV_DIR_ALL;
+}
+
+lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t * obj)
+{
+    if(obj->spec_attr) return obj->spec_attr->scroll_snap_x;
+    else return LV_SCROLL_SNAP_NONE;
+}
+
+lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t * obj)
+{
+    if(obj->spec_attr) return obj->spec_attr->scroll_snap_y;
+    else return LV_SCROLL_SNAP_NONE;
+}
+
+lv_coord_t lv_obj_get_scroll_x(const lv_obj_t * obj)
+{
+    if(obj->spec_attr == NULL) return 0;
+    return -obj->spec_attr->scroll.x;
+}
+
+lv_coord_t lv_obj_get_scroll_y(const lv_obj_t * obj)
+{
+    if(obj->spec_attr == NULL) return 0;
+    return -obj->spec_attr->scroll.y;
+}
+
+lv_coord_t lv_obj_get_scroll_top(lv_obj_t * obj)
+{
+    if(obj->spec_attr == NULL) return 0;
+    return -obj->spec_attr->scroll.y;
+}
+
+lv_coord_t lv_obj_get_scroll_bottom(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_coord_t child_res = LV_COORD_MIN;
+    uint32_t i;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        lv_obj_t * child = lv_obj_get_child(obj, i);
+        if(lv_obj_has_flag_any(child,  LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING)) continue;
+        child_res = LV_MAX(child_res, child->coords.y2);
+    }
+
+    lv_coord_t pad_top = lv_obj_get_style_pad_top(obj, LV_PART_MAIN);
+    lv_coord_t pad_bottom = lv_obj_get_style_pad_bottom(obj, LV_PART_MAIN);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    if(child_res != LV_COORD_MIN) {
+        child_res -= (obj->coords.y2 - pad_bottom - border_width);
+    }
+
+    lv_coord_t self_h = lv_obj_get_self_height(obj);
+    self_h = self_h - (lv_obj_get_height(obj) - pad_top - pad_bottom - 2 * border_width);
+    self_h -= lv_obj_get_scroll_y(obj);
+    return LV_MAX(child_res, self_h);
+}
+
+lv_coord_t lv_obj_get_scroll_left(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    /*Normally can't scroll the object out on the left.
+     *So simply use the current scroll position as "left size"*/
+    if(lv_obj_get_style_base_dir(obj, LV_PART_MAIN) != LV_BASE_DIR_RTL) {
+        if(obj->spec_attr == NULL) return 0;
+        return -obj->spec_attr->scroll.x;
+    }
+
+    /*With RTL base direction scrolling the left is normal so find the left most coordinate*/
+    lv_coord_t pad_right = lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
+    lv_coord_t pad_left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    lv_coord_t child_res = 0;
+
+    uint32_t i;
+    lv_coord_t x1 = LV_COORD_MAX;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+       lv_obj_t * child = lv_obj_get_child(obj, i);
+       if(lv_obj_has_flag_any(child,  LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING)) continue;
+        x1 = LV_MIN(x1, child->coords.x1);
+
+    }
+
+    if(x1 != LV_COORD_MAX) {
+        child_res = x1;
+        child_res = (obj->coords.x1 + pad_left + border_width) - child_res;
+    } else {
+        child_res = LV_COORD_MIN;
+    }
+
+    lv_coord_t self_w = lv_obj_get_self_width(obj);
+    self_w = self_w - (lv_obj_get_width(obj) - pad_right - pad_left - 2 * border_width);
+    self_w += lv_obj_get_scroll_x(obj);
+
+    return LV_MAX(child_res, self_w);
+}
+
+lv_coord_t lv_obj_get_scroll_right(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    /*With RTL base dir can't scroll to the object out on the right.
+     *So simply use the current scroll position as "right size"*/
+    if(lv_obj_get_style_base_dir(obj, LV_PART_MAIN) == LV_BASE_DIR_RTL) {
+        if(obj->spec_attr == NULL) return 0;
+        return obj->spec_attr->scroll.x;
+    }
+
+    /*With other base direction (LTR) scrolling to the right is normal so find the right most coordinate*/
+    lv_coord_t child_res = LV_COORD_MIN;
+    uint32_t i;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        lv_obj_t * child = lv_obj_get_child(obj, i);
+        if(lv_obj_has_flag_any(child,  LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING)) continue;
+        child_res = LV_MAX(child_res, child->coords.x2);
+    }
+
+    lv_coord_t pad_right = lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
+    lv_coord_t pad_left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+    lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+
+    child_res -= (obj->coords.x2 - pad_right - border_width);
+
+    lv_coord_t self_w;
+    self_w = lv_obj_get_self_width(obj);
+    self_w = self_w - (lv_obj_get_width(obj) - pad_right - pad_left - 2 * border_width);
+    self_w -= lv_obj_get_scroll_x(obj);
+    return LV_MAX(child_res, self_w);
+}
+
+void lv_obj_get_scroll_end(struct _lv_obj_t  * obj, lv_point_t * end)
+{
+    lv_anim_t * a;
+    a = lv_anim_get(obj, scroll_x_anim);
+    end->x = a ? -a->end_value : lv_obj_get_scroll_x(obj);
+
+    a = lv_anim_get(obj, scroll_y_anim);
+    end->y = a ? -a->end_value : lv_obj_get_scroll_y(obj);
+}
+
+/*=====================
+ * Other functions
+ *====================*/
+
+void lv_obj_scroll_by(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en)
+{
+    if(x == 0 && y == 0) return;
+    if(anim_en == LV_ANIM_ON) {
+        lv_disp_t * d = lv_obj_get_disp(obj);
+        lv_anim_t a;
+        lv_anim_init(&a);
+        lv_anim_set_var(&a, obj);
+        lv_anim_set_ready_cb(&a, scroll_anim_ready_cb);
+
+        if(x) {
+            lv_res_t res;
+            res = lv_event_send(obj, LV_EVENT_SCROLL_BEGIN, NULL);
+            if(res != LV_RES_OK) return;
+
+            uint32_t t = lv_anim_speed_to_time((lv_disp_get_hor_res(d) * 2) >> 2, 0, x);
+            if(t < SCROLL_ANIM_TIME_MIN) t = SCROLL_ANIM_TIME_MIN;
+            if(t > SCROLL_ANIM_TIME_MAX) t = SCROLL_ANIM_TIME_MAX;
+            lv_anim_set_time(&a, t);
+            lv_coord_t sx = lv_obj_get_scroll_x(obj);
+            lv_anim_set_values(&a, -sx, -sx + x);
+            lv_anim_set_exec_cb(&a, scroll_x_anim);
+            lv_anim_set_path_cb(&a, lv_anim_path_ease_out);
+            lv_anim_start(&a);
+        }
+
+        if(y) {
+            lv_res_t res;
+            res = lv_event_send(obj, LV_EVENT_SCROLL_BEGIN, NULL);
+            if(res != LV_RES_OK) return;
+
+            uint32_t t = lv_anim_speed_to_time((lv_disp_get_ver_res(d) * 2) >> 2, 0, y);
+            if(t < SCROLL_ANIM_TIME_MIN) t = SCROLL_ANIM_TIME_MIN;
+            if(t > SCROLL_ANIM_TIME_MAX) t = SCROLL_ANIM_TIME_MAX;
+            lv_anim_set_time(&a, t);
+            lv_coord_t sy = lv_obj_get_scroll_y(obj);
+            lv_anim_set_values(&a, -sy, -sy + y);
+            lv_anim_set_exec_cb(&a,  scroll_y_anim);
+            lv_anim_set_path_cb(&a, lv_anim_path_ease_out);
+            lv_anim_start(&a);
+        }
+    } else {
+        /*Remove pending animations*/
+        lv_anim_del(obj, scroll_y_anim);
+        lv_anim_del(obj, scroll_x_anim);
+        scroll_by_raw(obj, x, y);
+    }
+}
+
+void lv_obj_scroll_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en)
+{
+    lv_obj_scroll_to_x(obj, x, anim_en);
+    lv_obj_scroll_to_y(obj, y, anim_en);
+}
+
+void lv_obj_scroll_to_x(lv_obj_t * obj, lv_coord_t x, lv_anim_enable_t anim_en)
+{
+    lv_anim_del(obj, scroll_x_anim);
+
+    /*Don't let scroll more then naturally possible by the size of the content*/
+    if(lv_obj_get_style_base_dir(obj, LV_PART_MAIN) != LV_BASE_DIR_RTL) {
+        if(x < 0) x = 0;
+        if(x > 0) {
+            lv_coord_t  scroll_max = lv_obj_get_scroll_left(obj) + lv_obj_get_scroll_right(obj);
+            if(scroll_max < 0) scroll_max = 0;
+
+            if(x > scroll_max) x = scroll_max;
+        }
+    } else {
+        if(x > 0) x = 0;
+        if(x < 0) {
+            lv_coord_t  scroll_max = lv_obj_get_scroll_left(obj) + lv_obj_get_scroll_right(obj);
+            if(scroll_max < 0) scroll_max = 0;
+
+            if(x < -scroll_max) x = -scroll_max;
+        }
+    }
+
+    lv_coord_t scroll_x = lv_obj_get_scroll_x(obj);
+    lv_coord_t diff = -x + scroll_x;
+
+    lv_obj_scroll_by(obj, diff, 0, anim_en);
+}
+
+void lv_obj_scroll_to_y(lv_obj_t * obj, lv_coord_t y, lv_anim_enable_t anim_en)
+{
+    lv_anim_del(obj, scroll_y_anim);
+
+    /*Don't let scroll more then naturally possible by the size of the content*/
+    if(y < 0) y = 0;
+    if(y > 0) {
+        lv_coord_t  scroll_max = lv_obj_get_scroll_top(obj) + lv_obj_get_scroll_bottom(obj);
+        if(scroll_max < 0) scroll_max = 0;
+        if(y > scroll_max) y = scroll_max;
+    }
+
+    lv_coord_t scroll_y = lv_obj_get_scroll_y(obj);
+    lv_coord_t diff = -y + scroll_y;
+
+    lv_obj_scroll_by(obj, 0, diff, anim_en);
+}
+
+void lv_obj_scroll_to_view(lv_obj_t * obj, lv_anim_enable_t anim_en)
+{
+    /*Be sure the screens layout is correct*/
+    lv_obj_update_layout(obj);
+
+    lv_point_t p = {0, 0};
+    scroll_area_into_view(&obj->coords, obj, &p, anim_en);
+}
+
+void lv_obj_scroll_to_view_recursive(lv_obj_t * obj, lv_anim_enable_t anim_en)
+{
+    /*Be sure the screens layout is correct*/
+    lv_obj_update_layout(obj);
+
+    lv_point_t p = {0, 0};
+    lv_obj_t * child = obj;
+    lv_obj_t * parent = lv_obj_get_parent(child);
+    while(parent) {
+        scroll_area_into_view(&obj->coords, child, &p, anim_en);
+        child = parent;
+        parent = lv_obj_get_parent(parent);
+    }
+}
+
+bool lv_obj_is_scrolling(const lv_obj_t * obj)
+{
+    lv_indev_t * indev = lv_indev_get_next(NULL);
+    while(indev) {
+        if(lv_indev_get_scroll_obj(indev) == obj) return true;
+        indev = lv_indev_get_next(indev);
+    }
+
+    return false;
+}
+
+void lv_obj_update_snap(lv_obj_t * obj, lv_anim_enable_t anim_en)
+{
+    lv_obj_update_layout(obj);
+    lv_point_t p;
+    lv_indev_scroll_get_snap_dist(obj, &p);
+    lv_obj_scroll_by(obj, p.x, p.y, anim_en);
+}
+
+void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t * ver_area)
+{
+    lv_area_set(hor_area, 0, 0, -1, -1);
+    lv_area_set(ver_area, 0, 0, -1, -1);
+
+    if(lv_obj_has_flag(obj, LV_OBJ_FLAG_SCROLLABLE) == false) return;
+
+    lv_dir_t sm = lv_obj_get_scrollbar_mode(obj);
+    if(sm == LV_SCROLLBAR_MODE_OFF)  return;
+
+    /*If there is no indev scrolling this object but `mode==active` return*/
+    lv_indev_t * indev = lv_indev_get_next(NULL);
+    if(sm == LV_SCROLLBAR_MODE_ACTIVE) {
+        while(indev) {
+            if(lv_indev_get_scroll_obj(indev) == obj) break;
+            indev = lv_indev_get_next(indev);
+        }
+        if(indev == NULL)  return;
+    }
+
+    lv_coord_t st = lv_obj_get_scroll_top(obj);
+    lv_coord_t sb = lv_obj_get_scroll_bottom(obj);
+    lv_coord_t sl = lv_obj_get_scroll_left(obj);
+    lv_coord_t sr = lv_obj_get_scroll_right(obj);
+
+    lv_dir_t dir = lv_obj_get_scroll_dir(obj);
+
+    bool ver_draw = false;
+    if((dir & LV_DIR_VER) &&
+            ((sm == LV_SCROLLBAR_MODE_ON) ||
+                    (sm == LV_SCROLLBAR_MODE_AUTO && (st > 0 || sb > 0)) ||
+                    (sm == LV_SCROLLBAR_MODE_ACTIVE && lv_indev_get_scroll_dir(indev) == LV_DIR_VER))) {
+        ver_draw = true;
+    }
+
+
+    bool hor_draw = false;
+    if((dir & LV_DIR_HOR) &&
+            ((sm == LV_SCROLLBAR_MODE_ON) ||
+                    (sm == LV_SCROLLBAR_MODE_AUTO && (sl > 0 || sr > 0)) ||
+                    (sm == LV_SCROLLBAR_MODE_ACTIVE && lv_indev_get_scroll_dir(indev) == LV_DIR_HOR))) {
+        hor_draw = true;
+    }
+
+    if(!hor_draw && !ver_draw) return;
+
+    lv_coord_t end_space = lv_obj_get_style_pad_top(obj, LV_PART_SCROLLBAR);
+    lv_coord_t side_space = lv_obj_get_style_pad_right(obj, LV_PART_SCROLLBAR);
+    lv_coord_t tickness = lv_obj_get_style_width(obj, LV_PART_SCROLLBAR);
+
+    lv_coord_t obj_h = lv_obj_get_height(obj);
+    lv_coord_t obj_w = lv_obj_get_width(obj);
+
+    lv_coord_t ver_reg_space = ver_draw ? tickness + side_space : 0;
+    lv_coord_t hor_req_space = hor_draw ? tickness + side_space : 0;
+    lv_coord_t rem;
+
+    if(lv_obj_get_style_bg_opa(obj, LV_PART_SCROLLBAR) < LV_OPA_MIN &&
+       lv_obj_get_style_border_opa(obj, LV_PART_SCROLLBAR) < LV_OPA_MIN) {
+        return;
+    }
+
+    /*Draw horizontal scrollbar if the mode is ON or can be scrolled in this direction*/
+    lv_coord_t content_h = obj_h + st + sb;
+    if(ver_draw && content_h) {
+       ver_area->y1 = obj->coords.y1;
+       ver_area->y2 = obj->coords.y2;
+       ver_area->x2 = obj->coords.x2 - side_space;
+       ver_area->x1 =ver_area->x2 - tickness;
+
+        lv_coord_t sb_h = ((obj_h - end_space * 2 - hor_req_space) * obj_h) / content_h;
+        sb_h = LV_MAX(sb_h, SCROLLBAR_MIN_SIZE);
+        rem = (obj_h - end_space * 2 - hor_req_space) - sb_h;  /*Remaining size from the scrollbar track that is not the scrollbar itself*/
+        lv_coord_t scroll_h = content_h - obj_h; /*The size of the content which can be really scrolled*/
+        if(scroll_h <= 0) {
+           ver_area->y1 = obj->coords.y1 + end_space;
+           ver_area->y2 = obj->coords.y2 - end_space - hor_req_space - 1;
+           ver_area->x2 = obj->coords.x2 - side_space;
+           ver_area->x1 =ver_area->x2 - tickness + 1;
+        } else {
+            lv_coord_t sb_y = (rem * sb) / scroll_h;
+            sb_y = rem - sb_y;
+
+           ver_area->y1 = obj->coords.y1 + sb_y + end_space;
+           ver_area->y2 =ver_area->y1 + sb_h - 1;
+           ver_area->x2 = obj->coords.x2 - side_space;
+           ver_area->x1 =ver_area->x2 - tickness;
+            if(ver_area->y1 < obj->coords.y1 + end_space) {
+               ver_area->y1 = obj->coords.y1 + end_space;
+                if(ver_area->y1 + SCROLLBAR_MIN_SIZE >ver_area->y2)ver_area->y2 =ver_area->y1 + SCROLLBAR_MIN_SIZE;
+            }
+            if(ver_area->y2 > obj->coords.y2 - hor_req_space - end_space) {
+               ver_area->y2 = obj->coords.y2 - hor_req_space - end_space;
+                if(ver_area->y2 - SCROLLBAR_MIN_SIZE <ver_area->y1)ver_area->y1 =ver_area->y2 - SCROLLBAR_MIN_SIZE;
+            }
+        }
+    }
+
+    /*Draw horizontal scrollbar if the mode is ON or can be scrolled in this direction*/
+    lv_coord_t content_w = obj_w + sl + sr;
+    if(hor_draw && content_w) {
+        hor_area->y2 = obj->coords.y2 - side_space;
+        hor_area->y1 = hor_area->y2 - tickness;
+        hor_area->x1 = obj->coords.x1;
+        hor_area->x2 = obj->coords.x2;
+
+        lv_coord_t sb_w = ((obj_w - end_space * 2 - ver_reg_space) * obj_w) / content_w;
+        sb_w = LV_MAX(sb_w, SCROLLBAR_MIN_SIZE);
+        rem = (obj_w - end_space * 2 - ver_reg_space) - sb_w;  /*Remaining size from the scrollbar track that is not the scrollbar itself*/
+        lv_coord_t scroll_w = content_w - obj_w; /*The size of the content which can be really scrolled*/
+        if(scroll_w <= 0) {
+            hor_area->y2 = obj->coords.y2 - side_space;
+            hor_area->y1 = hor_area->y2 - tickness + 1;
+            hor_area->x1 = obj->coords.x1 + end_space;
+            hor_area->x2 = obj->coords.x2 - end_space - ver_reg_space - 1;
+        } else {
+            lv_coord_t sb_x = (rem * sr) / scroll_w;
+            sb_x = rem - sb_x;
+
+            hor_area->x1 = obj->coords.x1 + sb_x + end_space;
+            hor_area->x2 = hor_area->x1 + sb_w - 1;
+            hor_area->y2 = obj->coords.y2 - side_space;
+            hor_area->y1 = hor_area->y2 - tickness;
+            if(hor_area->x1 < obj->coords.x1 + end_space) {
+                hor_area->x1 = obj->coords.x1 + end_space;
+                if(hor_area->x1 + SCROLLBAR_MIN_SIZE > hor_area->x2) hor_area->x2 = hor_area->x1 + SCROLLBAR_MIN_SIZE;
+            }
+            if(hor_area->x2 > obj->coords.x2 - ver_reg_space - end_space) {
+                hor_area->x2 = obj->coords.x2 - ver_reg_space - end_space;
+                if(hor_area->x2 - SCROLLBAR_MIN_SIZE < hor_area->x1) hor_area->x1 = hor_area->x2 - SCROLLBAR_MIN_SIZE;
+            }
+        }
+    }
+}
+
+void lv_obj_scrollbar_invalidate(lv_obj_t * obj)
+{
+    lv_area_t hor_area;
+    lv_area_t ver_area;
+    lv_obj_get_scrollbar_area(obj, &hor_area, &ver_area);
+
+    if(lv_area_get_size(&hor_area) <= 0 && lv_area_get_size(&ver_area) <= 0) return;
+
+    if(lv_area_get_size(&hor_area) > 0) lv_obj_invalidate_area(obj, &hor_area);
+    if(lv_area_get_size(&ver_area) > 0) lv_obj_invalidate_area(obj, &ver_area);
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+static void scroll_by_raw(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
+{
+    if(x == 0 && y == 0) return;
+
+    lv_obj_allocate_spec_attr(obj);
+
+    obj->spec_attr->scroll.x += x;
+    obj->spec_attr->scroll.y += y;
+
+    lv_obj_move_children_by(obj, x, y, true);
+    lv_res_t res = lv_event_send(obj, LV_EVENT_SCROLL, NULL);
+    if(res != LV_RES_OK) return;
+    lv_obj_invalidate(obj);
+}
+
+static void scroll_x_anim(void * obj, int32_t v)
+{
+    scroll_by_raw(obj, v + lv_obj_get_scroll_x(obj), 0);
+}
+
+static void scroll_y_anim(void * obj, int32_t v)
+{
+    scroll_by_raw(obj, 0, v + lv_obj_get_scroll_y(obj));
+}
+
+static void scroll_anim_ready_cb(lv_anim_t * a)
+{
+    lv_event_send(a->var, LV_EVENT_SCROLL_END, NULL);
+}
+
+static void scroll_area_into_view(const lv_area_t * area, lv_obj_t * child, lv_point_t * scroll_value, lv_anim_enable_t anim_en)
+{
+    lv_obj_t * parent = lv_obj_get_parent(child);
+    lv_dir_t scroll_dir = lv_obj_get_scroll_dir(parent);
+    lv_coord_t snap_goal = 0;
+    lv_coord_t act = 0;
+    const lv_area_t * area_tmp;
+
+    lv_coord_t y_scroll = 0;
+    lv_scroll_snap_t snap_y = lv_obj_get_scroll_snap_y(parent);
+    if(snap_y != LV_SCROLL_SNAP_NONE) area_tmp = &child->coords;
+    else area_tmp = area;
+
+    lv_coord_t ptop = lv_obj_get_style_pad_top(parent, LV_PART_MAIN);
+    lv_coord_t pbottom = lv_obj_get_style_pad_bottom(parent, LV_PART_MAIN);
+    lv_coord_t top_diff = parent->coords.y1 + ptop - area_tmp->y1 - scroll_value->y;
+    lv_coord_t bottom_diff = -(parent->coords.y2 - pbottom - area_tmp->y2 - scroll_value->y);
+    lv_coord_t parent_h = lv_obj_get_height(parent) - ptop - pbottom;
+    if((top_diff > 0 && bottom_diff > 0)) y_scroll = 0;
+    else if(top_diff > 0) {
+        y_scroll = top_diff;
+        /*Do not let scrolling in*/
+        lv_coord_t st = lv_obj_get_scroll_top(parent);
+        if(st - y_scroll < 0) y_scroll = 0;
+    }
+    else if(bottom_diff > 0) {
+        y_scroll = -bottom_diff;
+        /*Do not let scrolling in*/
+        lv_coord_t sb = lv_obj_get_scroll_bottom(parent);
+        if(sb + y_scroll < 0) y_scroll = 0;
+    }
+
+    switch(snap_y) {
+    case LV_SCROLL_SNAP_START:
+        snap_goal = parent->coords.y1 + ptop;
+        act = area_tmp->y1 + y_scroll;
+        y_scroll += snap_goal - act;
+        break;
+    case LV_SCROLL_SNAP_END:
+        snap_goal = parent->coords.y2 - pbottom;
+        act = area_tmp->y2 + y_scroll;
+        y_scroll += snap_goal - act;
+        break;
+    case LV_SCROLL_SNAP_CENTER:
+        snap_goal = parent->coords.y1 + ptop + parent_h / 2;
+        act = lv_area_get_height(area_tmp) / 2 + area_tmp->y1 + y_scroll;
+        y_scroll += snap_goal - act;
+        break;
+    }
+
+    lv_coord_t x_scroll = 0;
+    lv_scroll_snap_t snap_x = lv_obj_get_scroll_snap_x(parent);
+    if(snap_x != LV_SCROLL_SNAP_NONE) area_tmp = &child->coords;
+    else area_tmp = area;
+
+    lv_coord_t pleft = lv_obj_get_style_pad_left(parent, LV_PART_MAIN);
+    lv_coord_t pright = lv_obj_get_style_pad_right(parent, LV_PART_MAIN);
+    lv_coord_t left_diff = parent->coords.x1 + pleft - area_tmp->x1 - scroll_value->x;
+    lv_coord_t right_diff = -(parent->coords.x2 - pright - area_tmp->x2- scroll_value->x);
+    if((left_diff > 0 && right_diff > 0)) x_scroll = 0;
+    else if(left_diff > 0) {
+        x_scroll = left_diff;
+        /*Do not let scrolling in*/
+        lv_coord_t sl = lv_obj_get_scroll_left(parent);
+        if(sl + x_scroll > 0) x_scroll = 0;
+    }
+    else if(right_diff > 0) {
+        x_scroll = -right_diff;
+        /*Do not let scrolling in*/
+        lv_coord_t sr = lv_obj_get_scroll_right(parent);
+        if(sr + x_scroll < 0) x_scroll = 0;
+    }
+
+    lv_coord_t parent_w = lv_obj_get_width(parent) - pleft - pright;
+    switch(snap_x) {
+    case LV_SCROLL_SNAP_START:
+        snap_goal = parent->coords.x1 + pleft;
+        act = area_tmp->x1 + x_scroll;
+        x_scroll += snap_goal - act;
+        break;
+    case LV_SCROLL_SNAP_END:
+        snap_goal = parent->coords.x2 - pright;
+        act = area_tmp->x2 + x_scroll;
+        x_scroll += snap_goal - act;
+        break;
+    case LV_SCROLL_SNAP_CENTER:
+        snap_goal = parent->coords.x1 + pleft + parent_w / 2;
+        act = lv_area_get_width(area_tmp) / 2 + area_tmp->x1 + x_scroll;
+        x_scroll += snap_goal - act;
+        break;
+    }
+
+    /*Remove any pending scroll animations.*/
+    lv_anim_del(parent, scroll_x_anim);
+    lv_anim_del(parent, scroll_y_anim);
+
+    if((scroll_dir & LV_DIR_LEFT) == 0 && x_scroll < 0) x_scroll = 0;
+    if((scroll_dir & LV_DIR_RIGHT) == 0 && x_scroll > 0) x_scroll = 0;
+    if((scroll_dir & LV_DIR_TOP) == 0 && y_scroll < 0) y_scroll = 0;
+    if((scroll_dir & LV_DIR_BOTTOM) == 0 && y_scroll > 0) y_scroll = 0;
+
+    scroll_value->x += anim_en == LV_ANIM_OFF ? 0 : x_scroll;
+    scroll_value->y += anim_en == LV_ANIM_OFF ? 0 : y_scroll;
+    lv_obj_scroll_by(parent, x_scroll, y_scroll, anim_en);
+}

+ 277 - 0
components/lvgl/src/core/lv_obj_scroll.h

@@ -0,0 +1,277 @@
+/**
+ * @file lv_obj_scroll.h
+ *
+ */
+
+#ifndef LV_OBJ_SCROLL_H
+#define LV_OBJ_SCROLL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "../misc/lv_area.h"
+#include "../misc/lv_anim.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/*Can't include lv_obj.h because it includes this header file*/
+struct _lv_obj_t;
+
+/** Scrollbar modes: shows when should the scrollbars be visible*/
+enum {
+    LV_SCROLLBAR_MODE_OFF,      /**< Never show scrollbars*/
+    LV_SCROLLBAR_MODE_ON,       /**< Always show scrollbars*/
+    LV_SCROLLBAR_MODE_ACTIVE,   /**< Show scroll bars when object is being scrolled*/
+    LV_SCROLLBAR_MODE_AUTO,     /**< Show scroll bars when the content is large enough to be scrolled*/
+};
+typedef uint8_t lv_scrollbar_mode_t;
+
+
+/** Scroll span align options. Tells where to align the snapable children when scroll stops.*/
+enum {
+    LV_SCROLL_SNAP_NONE,    /**< Do not align, leave where it is*/
+    LV_SCROLL_SNAP_START,   /**< Align to to the left/top*/
+    LV_SCROLL_SNAP_END,     /**< Align to to the right/bottom*/
+    LV_SCROLL_SNAP_CENTER   /**< Align to to the center*/
+};
+typedef uint8_t lv_scroll_snap_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/*=====================
+ * Setter functions
+ *====================*/
+
+/**
+ * Set how the scrollbars should behave.
+ * @param obj       pointer to an object
+ * @param mode      LV_SCROLL_MODE_ON/OFF/AUTO/ACTIVE
+ */
+void lv_obj_set_scrollbar_mode(struct _lv_obj_t * obj, lv_scrollbar_mode_t mode);
+
+/**
+ * Set the object in which directions can be scrolled
+ * @param obj       pointer to an object
+ * @param dir       the allow scroll directions. An element or OR-ed values of `lv_dir_t`
+ */
+void lv_obj_set_scroll_dir(struct _lv_obj_t * obj, lv_dir_t dir);
+
+/**
+ * Set where to snap the children when scrolling ends horizontally
+ * @param obj       pointer to an object
+ * @param align     the snap align to set from `lv_snap_align_t`
+ */
+void lv_obj_set_scroll_snap_x(struct _lv_obj_t * obj, lv_scroll_snap_t align);
+
+/**
+ * Set where to snap the children when scrolling ends vertically
+ * @param obj       pointer to an object
+ * @param align     the snap align to set from `lv_snap_align_t`
+ */
+void lv_obj_set_scroll_snap_y(struct _lv_obj_t * obj, lv_scroll_snap_t align);
+
+/*=====================
+ * Getter functions
+ *====================*/
+
+/**
+ * Get the current scroll mode (when to hide the scrollbars)
+ * @param obj       pointer to an object
+ * @return          the current scroll mode from `lv_scroll_mode_t`
+ */
+lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const struct _lv_obj_t * obj);
+
+/**
+ * Get the object in which directions can be scrolled
+ * @param obj       pointer to an object
+ * @param dir       the allow scroll directions. An element or OR-ed values of `lv_dir_t`
+ */
+lv_dir_t lv_obj_get_scroll_dir(const struct _lv_obj_t * obj);
+
+/**
+ * Get where to snap the children when scrolling ends horizontally
+ * @param obj       pointer to an object
+ * @return          the current snap align from `lv_snap_align_t`
+ */
+lv_scroll_snap_t lv_obj_get_scroll_snap_x(const struct _lv_obj_t * obj);
+
+/**
+ * Get where to snap the children when scrolling ends vertically
+ * @param  obj      pointer to an object
+ * @return          the current snap align from `lv_snap_align_t`
+ */
+lv_scroll_snap_t lv_obj_get_scroll_snap_y(const struct _lv_obj_t * obj);
+
+/**
+ * Get current X scroll position.
+ * @param obj       pointer to an object
+ * @return          the current scroll position from the left edge.
+ *                  If the object is not scrolled return 0
+ *                  If scrolled return > 0
+ *                  If scrolled in (elastic scroll) return < 0
+ */
+lv_coord_t lv_obj_get_scroll_x(const struct _lv_obj_t * obj);
+
+/**
+ * Get current Y scroll position.
+ * @param obj       pointer to an object
+ * @return          the current scroll position from the top edge.
+ *                  If the object is not scrolled return 0
+ *                  If scrolled return > 0
+ *                  If scrolled inside return < 0
+ */
+lv_coord_t lv_obj_get_scroll_y(const struct _lv_obj_t * obj);
+
+/**
+ * Return the height of the area above the object.
+ * That is the number of pixels the object can be scrolled down.
+ * Normally positive but can be negative when scrolled inside.
+ * @param obj       pointer to an object
+ * @return          the scrollable area above the object in pixels
+ */
+lv_coord_t lv_obj_get_scroll_top(struct _lv_obj_t * obj);
+
+/**
+ * Return the height of the area below the object.
+ * That is the number of pixels the object can be scrolled down.
+ * Normally positive but can be negative when scrolled inside.
+ * @param obj       pointer to an object
+ * @return          the scrollable area below the object in pixels
+ */
+lv_coord_t lv_obj_get_scroll_bottom(struct _lv_obj_t * obj);
+
+/**
+ * Return the width of the area on the left the object.
+ * That is the number of pixels the object can be scrolled down.
+ * Normally positive but can be negative when scrolled inside.
+ * @param obj       pointer to an object
+ * @return          the scrollable area on the left the object in pixels
+ */
+lv_coord_t lv_obj_get_scroll_left(struct _lv_obj_t * obj);
+
+/**
+ * Return the width of the area on the right the object.
+ * That is the number of pixels the object can be scrolled down.
+ * Normally positive but can be negative when scrolled inside.
+ * @param obj       pointer to an object
+ * @return          the scrollable area on the right the object in pixels
+ */
+lv_coord_t lv_obj_get_scroll_right(struct _lv_obj_t * obj);
+
+/**
+ * Get the X and Y coordinates where the scrolling will end for this object if a scrolling animation is in progress.
+ * In no scrolling animation give the current `x` or `y` scroll position.
+ * @param obj       pointer to an object
+ * @param           end poinr to point to store the result
+ */
+void lv_obj_get_scroll_end(struct _lv_obj_t  * obj, lv_point_t * end);
+
+/*=====================
+ * Other functions
+ *====================*/
+
+/**
+ *
+ * Scroll by a given amount of pixels
+ * @param obj       pointer to an object to scroll
+ * @param x         pixels to scroll horizontally
+ * @param y         pixels to scroll vertically
+ * @param anim_en   LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
+ * @note            > 0 value means scroll right/bottom (show the more content on the right/bottom)
+ * @note
+ */
+void lv_obj_scroll_by(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en);
+
+/**
+ * Scroll to a given coordinate on an object.
+ * `x` and `y` will be limited internally to allow scrolling only on the content area.
+ * @param obj       pointer to an object to scroll
+ * @param x         pixels to scroll horizontally
+ * @param y         pixels to scroll vertically
+ * @param anim_en   LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
+ */
+void lv_obj_scroll_to(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en);
+
+/**
+ * Scroll to a given X coordinate on an object.
+ * `x` will be limited internally to allow scrolling only on the content area.
+ * @param obj       pointer to an object to scroll
+ * @param x         pixels to scroll horizontally
+ * @param anim_en   LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
+ */
+void lv_obj_scroll_to_x(struct _lv_obj_t * obj, lv_coord_t x, lv_anim_enable_t anim_en);
+
+/**
+ * Scroll to a given Y coordinate on an object
+ * `y` will be limited internally to allow scrolling only on the content area.
+ * @param obj       pointer to an object to scroll
+ * @param y         pixels to scroll vertically
+ * @param anim_en   LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
+ */
+void lv_obj_scroll_to_y(struct _lv_obj_t * obj, lv_coord_t y, lv_anim_enable_t anim_en);
+
+/**
+ * Scroll to an object until it becomes visible on its parent
+ * @param obj       pointer to an object to scroll into view
+ * @param anim_en   LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
+ */
+void lv_obj_scroll_to_view(struct _lv_obj_t * obj, lv_anim_enable_t anim_en);
+
+/**
+ * Scroll to an object until it becomes visible on its parent.
+ * Do the same on the parent's parent, and so on.
+ * Therefore the object will be scrolled into view even it has nested scrollable parents
+ * @param obj       pointer to an object to scroll into view
+ * @param anim_en   LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
+ */
+void lv_obj_scroll_to_view_recursive(struct _lv_obj_t * obj, lv_anim_enable_t anim_en);
+
+/**
+ * Tell whether an object is being scrolled or not at this moment
+ * @param obj   pointer to an object
+ * @return      true: `obj` is being scrolled
+ */
+bool lv_obj_is_scrolling(const struct _lv_obj_t * obj);
+
+/**
+ * Check the children of `obj` and scroll `obj` to fulfill the scroll_snap settings
+ * @param obj       an object whose children needs to checked and snapped
+ * @param anim_en   LV_ANIM_ON/OFF
+ */
+void lv_obj_update_snap(struct _lv_obj_t * obj, lv_anim_enable_t anim_en);
+
+/**
+ * Get the area of the scrollbars
+ * @param obj       pointer to an object
+ * @param hor_area  pointer to store the area of the horizontal scrollbar
+ * @param ver_area  pointer to store the area of the vertical  scrollbar
+ */
+void lv_obj_get_scrollbar_area(struct _lv_obj_t * obj, lv_area_t * hor, lv_area_t * ver);
+
+/**
+ * Invalidate the area of the scrollbars
+ * @param obj       pointer to an object
+ */
+void lv_obj_scrollbar_invalidate(struct _lv_obj_t * obj);
+
+/**********************
+ *      MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_OBJ_SCROLL_H*/

+ 811 - 0
components/lvgl/src/core/lv_obj_style.c

@@ -0,0 +1,811 @@
+/**
+ * @file lv_obj_style.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj.h"
+#include "lv_disp.h"
+#include "../misc/lv_gc.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+typedef struct {
+    lv_obj_t * obj;
+    lv_style_prop_t prop;
+    lv_style_selector_t selector;
+    lv_style_value_t start_value;
+    lv_style_value_t end_value;
+} trans_t;
+
+typedef enum {
+    CACHE_ZERO = 0,
+    CACHE_TRUE = 1,
+    CACHE_UNSET = 2,
+    CACHE_255 = 3,
+    CACHE_NEED_CHECK = 4,
+}cache_t;
+
+/**********************
+ *  GLOBAL PROTOTYPES
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static lv_style_t * get_local_style(lv_obj_t * obj, lv_style_selector_t selector);
+static _lv_obj_style_t * get_trans_style(lv_obj_t * obj, uint32_t part);
+static bool get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, lv_style_value_t * v);
+static lv_style_value_t apply_color_filter(const lv_obj_t * obj, uint32_t part, lv_style_value_t v);
+static void report_style_change_core(void * style, lv_obj_t * obj);
+static void refresh_children_style(lv_obj_t * obj);
+static bool trans_del(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, trans_t * tr_limit);
+static void trans_anim_cb(void * _tr, int32_t v);
+static void trans_anim_start_cb(lv_anim_t * a);
+static void trans_anim_ready_cb(lv_anim_t * a);
+static void fade_anim_cb(void * obj, int32_t v);
+static void fade_in_anim_ready(lv_anim_t * a);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+static bool style_refr = true;
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+void _lv_obj_style_init(void)
+{
+    _lv_ll_init(&LV_GC_ROOT(_lv_obj_style_trans_ll), sizeof(trans_t));
+}
+
+void lv_obj_add_style(lv_obj_t * obj, lv_style_t * style, lv_style_selector_t selector)
+{
+    trans_del(obj, selector, LV_STYLE_PROP_ANY, NULL);
+
+    uint32_t i;
+    /*Go after the transition and local styles*/
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(obj->styles[i].is_trans) continue;
+        if(obj->styles[i].is_local) continue;
+        break;
+    }
+
+    /*Now `i` is at the first normal style. Insert the new style before this*/
+
+    /*Allocate space for the new style and shift the rest of the style to the end*/
+    obj->style_cnt++;
+    obj->styles = lv_mem_realloc(obj->styles, obj->style_cnt * sizeof(_lv_obj_style_t));
+
+    uint32_t j;
+    for(j = obj->style_cnt - 1; j > i ; j--) {
+        obj->styles[j] = obj->styles[j - 1];
+    }
+
+    lv_memset_00(&obj->styles[i], sizeof(_lv_obj_style_t));
+    obj->styles[i].style = style;
+    obj->styles[i].selector = selector;
+
+    lv_obj_refresh_style(obj, selector, LV_STYLE_PROP_ANY);
+}
+
+void lv_obj_remove_style(lv_obj_t * obj, lv_style_t * style, lv_style_selector_t selector)
+{
+    lv_state_t state = lv_obj_style_get_selector_state(selector);
+    lv_part_t part = lv_obj_style_get_selector_part(selector);
+    lv_style_prop_t prop = LV_STYLE_PROP_ANY;
+    if(style && style->prop_cnt == 0) prop = LV_STYLE_PROP_INV;
+
+    uint32_t i = 0;
+    bool deleted = false;
+    while(i <  obj->style_cnt) {
+        lv_state_t state_act = lv_obj_style_get_selector_state(obj->styles[i].selector);
+        lv_part_t part_act = lv_obj_style_get_selector_part(obj->styles[i].selector);
+        if((state != LV_STATE_ANY && state_act != state) ||
+           (part != LV_PART_ANY && part_act != part) ||
+           (style != NULL && style != obj->styles[i].style))
+        {
+            i++;
+            continue;
+        }
+
+        if(obj->styles[i].is_trans) {
+            trans_del(obj, part, LV_STYLE_PROP_ANY, NULL);
+        }
+
+        if(obj->styles[i].is_local || obj->styles[i].is_trans) {
+            lv_style_reset(obj->styles[i].style);
+            lv_mem_free(obj->styles[i].style);
+            obj->styles[i].style = NULL;
+        }
+
+        /*Shift the styles after `i` by one*/
+        uint32_t j;
+        for(j = i; j < (uint32_t)obj->style_cnt - 1 ; j++) {
+            obj->styles[j] = obj->styles[j + 1];
+        }
+
+        obj->style_cnt--;
+        obj->styles = lv_mem_realloc(obj->styles, obj->style_cnt * sizeof(_lv_obj_style_t));
+
+        deleted = true;
+        /*The style from the current `i` index is removed, so `i` points to the next style.
+         *Therefore it doesn't needs to be incremented*/
+    }
+    if(deleted && prop != LV_STYLE_PROP_INV) {
+        lv_obj_refresh_style(obj, part, prop);
+    }
+}
+
+void lv_obj_report_style_change(lv_style_t * style)
+{
+    if(!style_refr) return;
+    lv_disp_t * d = lv_disp_get_next(NULL);
+
+    while(d) {
+        uint32_t i;
+        for(i = 0; i < d->screen_cnt; i++) {
+            report_style_change_core(style, d->screens[i]);
+        }
+        d = lv_disp_get_next(d);
+    }
+}
+
+void lv_obj_refresh_style(lv_obj_t * obj, lv_style_selector_t selector, lv_style_prop_t prop)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    if(!style_refr) return;
+
+    lv_obj_invalidate(obj);
+
+    lv_part_t part = lv_obj_style_get_selector_part(selector);
+
+    if((part == LV_PART_ANY || part == LV_PART_MAIN) && (prop == LV_STYLE_PROP_ANY || (prop & LV_STYLE_PROP_LAYOUT_REFR))) {
+        lv_event_send(obj, LV_EVENT_STYLE_CHANGED, NULL);
+        lv_obj_mark_layout_as_dirty(obj);
+    }
+    if((part == LV_PART_ANY || part == LV_PART_MAIN) && (prop == LV_STYLE_PROP_ANY || (prop & LV_STYLE_PROP_PARENT_LAYOUT_REFR))) {
+        lv_obj_t * parent = lv_obj_get_parent(obj);
+        if(parent) lv_obj_mark_layout_as_dirty(parent);
+    }
+
+    if(prop == LV_STYLE_PROP_ANY || (prop & LV_STYLE_PROP_EXT_DRAW)) {
+        lv_obj_refresh_ext_draw_size(obj);
+    }
+    lv_obj_invalidate(obj);
+
+    if(prop == LV_STYLE_PROP_ANY ||
+      ((prop & LV_STYLE_PROP_INHERIT) && ((prop & LV_STYLE_PROP_EXT_DRAW) || (prop & LV_STYLE_PROP_LAYOUT_REFR))))
+    {
+        if(part != LV_PART_SCROLLBAR) {
+            refresh_children_style(obj);
+        }
+    }
+}
+
+void lv_obj_enable_style_refresh(bool en)
+{
+    style_refr = en;
+}
+
+lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop)
+{
+    lv_style_value_t value_act;
+    bool inherit = prop & LV_STYLE_PROP_INHERIT ? true : false;
+    bool filter = prop & LV_STYLE_PROP_FILTER ? true : false;
+    if(filter) {
+        prop &= ~LV_STYLE_PROP_FILTER;
+    }
+    bool found = false;
+    while(obj) {
+        found = get_prop_core(obj, part, prop, &value_act);
+        if(found) break;
+        if(!inherit) break;
+
+        /*If not found, check the `MAIN` style first*/
+        if(part != LV_PART_MAIN) {
+            part = LV_PART_MAIN;
+            continue;
+        }
+
+        /*Check the parent too.*/
+        obj = lv_obj_get_parent(obj);
+    }
+
+    if(!found) {
+        if(part == LV_PART_MAIN && (prop == LV_STYLE_WIDTH || prop == LV_STYLE_HEIGHT)) {
+            const lv_obj_class_t * cls = obj->class_p;
+            while(cls) {
+                if(prop == LV_STYLE_WIDTH) {
+                    if(cls->width_def != 0) break;
+                } else {
+                    if(cls->height_def != 0) break;
+                }
+                cls = cls->base_class;
+            }
+
+            value_act.num = prop == LV_STYLE_WIDTH ? cls->width_def : cls->height_def;
+        } else {
+            value_act = lv_style_prop_get_default(prop);
+        }
+    }
+    if(filter) value_act = apply_color_filter(obj, part, value_act);
+    return value_act;
+}
+
+void lv_obj_set_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector)
+{
+    lv_style_t * style = get_local_style(obj, selector);
+    lv_style_set_prop(style, prop, value);
+    lv_obj_refresh_style(obj, selector, prop);
+}
+
+
+lv_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value, lv_style_selector_t selector)
+{
+    uint32_t i;
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(obj->styles[i].is_local &&
+           obj->styles[i].selector ==  selector)
+        {
+            return lv_style_get_prop(obj->styles[i].style, prop, value);
+        }
+    }
+
+    return LV_RES_INV;
+}
+
+bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_selector_t selector)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    uint32_t i;
+    /*Find the style*/
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(obj->styles[i].is_local &&
+           obj->styles[i].selector == selector) {
+            break;
+        }
+    }
+
+    /*The style is not found*/
+    if(i == obj->style_cnt) return false;
+
+    return lv_style_remove_prop(obj->styles[i].style, prop);
+}
+
+void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const _lv_obj_style_transition_dsc_t * tr_dsc)
+{
+    trans_t * tr;
+
+    /*Get the previous and current values*/
+    obj->skip_trans = 1;
+    obj->state = prev_state;
+    lv_style_value_t v1 = lv_obj_get_style_prop(obj, part, tr_dsc->prop);
+    obj->state = new_state;
+    lv_style_value_t v2 = lv_obj_get_style_prop(obj, part, tr_dsc->prop);
+    obj->skip_trans = 0;
+
+    if(v1.ptr == v2.ptr && v1.num == v2.num && v1.color.full == v2.color.full)  return;
+    obj->state = prev_state;
+    v1 = lv_obj_get_style_prop(obj, part, tr_dsc->prop);
+    obj->state = new_state;
+
+    _lv_obj_style_t * style_trans = get_trans_style(obj, part);
+    lv_style_set_prop(style_trans->style, tr_dsc->prop, v1);   /*Be sure `trans_style` has a valid value*/
+
+    if(tr_dsc->prop == LV_STYLE_RADIUS) {
+        if(v1.num == LV_RADIUS_CIRCLE || v2.num == LV_RADIUS_CIRCLE) {
+            lv_coord_t whalf = lv_obj_get_width(obj) / 2;
+            lv_coord_t hhalf = lv_obj_get_width(obj) / 2;
+            if(v1.num == LV_RADIUS_CIRCLE) v1.num = LV_MIN(whalf + 1, hhalf + 1);
+            if(v2.num == LV_RADIUS_CIRCLE) v2.num = LV_MIN(whalf + 1, hhalf + 1);
+        }
+    }
+
+    tr = _lv_ll_ins_head(&LV_GC_ROOT(_lv_obj_style_trans_ll));
+    LV_ASSERT_MALLOC(tr);
+    if(tr == NULL) return;
+    tr->start_value = v1;
+    tr->end_value = v2;
+
+    if(tr) {
+        tr->obj = obj;
+        tr->prop = tr_dsc->prop;
+        tr->selector = part;
+
+        lv_anim_t a;
+        lv_anim_init(&a);
+        lv_anim_set_var(&a, tr);
+        lv_anim_set_exec_cb(&a, trans_anim_cb);
+        lv_anim_set_start_cb(&a, trans_anim_start_cb);
+        lv_anim_set_ready_cb(&a, trans_anim_ready_cb);
+        lv_anim_set_values(&a, 0x00, 0xFF);
+        lv_anim_set_time(&a, tr_dsc->time);
+        lv_anim_set_delay(&a, tr_dsc->delay);
+        lv_anim_set_path_cb(&a, tr_dsc->path_cb);
+        lv_anim_set_early_apply(&a, false);
+#if LV_USE_USER_DATA
+        a.user_data = tr_dsc->user_data;
+#endif
+        lv_anim_start(&a);
+    }
+}
+
+_lv_style_state_cmp_t _lv_obj_style_state_compare(lv_obj_t * obj, lv_state_t state1, lv_state_t state2)
+{
+    _lv_style_state_cmp_t res = _LV_STYLE_STATE_CMP_SAME;
+
+    /*Are there any new styles for the new state?*/
+    uint32_t i;
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(obj->styles[i].is_trans) continue;
+
+        lv_state_t state_act = lv_obj_style_get_selector_state(obj->styles[i].selector);
+        lv_part_t part_act = lv_obj_style_get_selector_part(obj->styles[i].selector);
+        /*The style is valid for a stat but not the other*/
+        bool valid1 = state_act & (~state1) ? false : true;
+        bool valid2 = state_act & (~state2) ? false : true;
+        if(valid1 != valid2) {
+            lv_style_t * style = obj->styles[i].style;
+            lv_style_value_t v;
+            /*If there is layout difference on the main part, return immediately. There is no more serious difference*/
+            bool layout_diff = false;
+            if(lv_style_get_prop(style, LV_STYLE_PAD_TOP, &v))layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_PAD_BOTTOM, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_PAD_LEFT, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_PAD_RIGHT, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_PAD_COLUMN, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_PAD_ROW, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_LAYOUT, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_TRANSLATE_X, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_TRANSLATE_Y, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_WIDTH, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_HEIGHT, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_MIN_WIDTH, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_MAX_WIDTH, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_MIN_HEIGHT, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_MAX_HEIGHT, &v)) layout_diff = true;
+            else if(lv_style_get_prop(style, LV_STYLE_BORDER_WIDTH, &v)) layout_diff = true;
+
+            if(layout_diff) {
+                if(part_act == LV_PART_MAIN) {
+                    return _LV_STYLE_STATE_CMP_DIFF_LAYOUT;
+                }
+                else {
+                    res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+                    continue;
+                }
+            }
+
+            /*Check for draw pad changes*/
+            if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_WIDTH, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_HEIGHT, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_ANGLE, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_ZOOM, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_OPA, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_PAD, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_WIDTH, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_SHADOW_WIDTH, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OPA, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OFS_X, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OFS_Y, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_SHADOW_SPREAD, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(lv_style_get_prop(style, LV_STYLE_LINE_WIDTH, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD;
+            else if(res == _LV_STYLE_STATE_CMP_SAME) res = _LV_STYLE_STATE_CMP_DIFF_REDRAW;
+        }
+    }
+
+    return res;
+}
+
+void lv_obj_fade_in(lv_obj_t * obj, uint32_t time, uint32_t delay)
+{
+    lv_anim_t a;
+    lv_anim_init(&a);
+    lv_anim_set_var(&a, obj);
+    lv_anim_set_values(&a, LV_OPA_TRANSP, LV_OPA_COVER);
+    lv_anim_set_exec_cb(&a, fade_anim_cb);
+    lv_anim_set_ready_cb(&a, fade_in_anim_ready);
+    lv_anim_set_time(&a, time);
+    lv_anim_set_delay(&a, delay);
+    lv_anim_start(&a);
+}
+
+void lv_obj_fade_out(lv_obj_t * obj, uint32_t time, uint32_t delay)
+{
+    lv_anim_t a;
+    lv_anim_init(&a);
+    lv_anim_set_var(&a, obj);
+    lv_anim_set_values(&a, LV_OPA_COVER, LV_OPA_TRANSP);
+    lv_anim_set_exec_cb(&a, fade_anim_cb);
+    lv_anim_set_time(&a, time);
+    lv_anim_set_delay(&a, delay);
+    lv_anim_start(&a);
+}
+
+lv_state_t lv_obj_style_get_selector_state(lv_style_selector_t selector)
+{
+    return selector & 0xFFFF;
+}
+
+lv_part_t lv_obj_style_get_selector_part(lv_style_selector_t selector)
+{
+    return selector & 0xFF0000;
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+/**
+ * Get the local style of an object for a given part and for a given state.
+ * If the local style for the part-state pair doesn't exist allocate and return it.
+ * @param obj   pointer to an object
+ * @param part  the part in whose local style to get
+ * @param state the state in whose local style to get
+ * @return pointer to the local style
+ */
+static lv_style_t * get_local_style(lv_obj_t * obj,  lv_style_selector_t selector)
+{
+    uint32_t i;
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(obj->styles[i].is_local &&
+           obj->styles[i].selector == selector)
+        {
+            return obj->styles[i].style;
+        }
+    }
+
+    obj->style_cnt++;
+    obj->styles = lv_mem_realloc(obj->styles, obj->style_cnt * sizeof(_lv_obj_style_t));
+    LV_ASSERT_MALLOC(obj->styles);
+
+    for(i = obj->style_cnt - 1; i > 0 ; i--) {
+        /*Copy only normal styles (not local and transition).
+         *The new local style will be added as the last local style*/
+        if(obj->styles[i - 1].is_local || obj->styles[i - 1].is_trans) break;
+        obj->styles[i] = obj->styles[i - 1];
+    }
+
+    lv_memset_00(&obj->styles[i], sizeof(_lv_obj_style_t));
+    obj->styles[i].style = lv_mem_alloc(sizeof(lv_style_t));
+    lv_style_init(obj->styles[i].style);
+    obj->styles[i].is_local = 1;
+    obj->styles[i].selector = selector;
+    return obj->styles[i].style;
+}
+
+/**
+ * Get the transition style of an object for a given part and for a given state.
+ * If the transition style for the part-state pair doesn't exist allocate and return it.
+ * @param obj   pointer to an object
+ * @param part  the part in whose local style to get
+ * @param state the state in whose local style to get
+ * @return pointer to the transition style
+ */
+static _lv_obj_style_t * get_trans_style(lv_obj_t * obj,  lv_style_selector_t selector)
+{
+    uint32_t i;
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(obj->styles[i].is_trans && obj->styles[i].selector == selector) break;
+    }
+
+    /*Already have a transition style for it*/
+    if(i != obj->style_cnt) return &obj->styles[i];
+
+    obj->style_cnt++;
+    obj->styles = lv_mem_realloc(obj->styles, obj->style_cnt * sizeof(_lv_obj_style_t));
+
+    for(i = obj->style_cnt - 1; i > 0 ; i--) {
+        obj->styles[i] = obj->styles[i - 1];
+    }
+
+    lv_memset_00(&obj->styles[0], sizeof(_lv_obj_style_t));
+    obj->styles[0].style = lv_mem_alloc(sizeof(lv_style_t));
+    lv_style_init(obj->styles[0].style);
+    obj->styles[0].is_trans = 1;
+    obj->styles[0].selector = selector;
+    return &obj->styles[0];
+}
+
+
+static bool get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, lv_style_value_t * v)
+{
+    uint8_t group = 1 << _lv_style_get_prop_group(prop);
+    int32_t weight = -1;
+    lv_state_t state = obj->state;
+    lv_state_t state_inv = ~state;
+    lv_style_value_t value_tmp;
+    bool skip_trans = obj->skip_trans;
+    uint32_t i;
+    bool found;
+    for(i = 0; i < obj->style_cnt; i++) {
+        _lv_obj_style_t * obj_style = &obj->styles[i];
+        if(obj_style->is_trans == false) break;
+        if(skip_trans) continue;
+
+        lv_part_t part_act = lv_obj_style_get_selector_part(obj->styles[i].selector);
+
+        if(part_act != part) continue;
+        if((obj_style->style->has_group & group) == 0) continue;
+        found = lv_style_get_prop(obj_style->style, prop, &value_tmp);
+        if(found) {
+            *v = value_tmp;
+            return true;
+        }
+    }
+
+    for(; i < obj->style_cnt; i++) {
+        _lv_obj_style_t * obj_style = &obj->styles[i];
+        lv_part_t part_act = lv_obj_style_get_selector_part(obj->styles[i].selector);
+        lv_state_t state_act = lv_obj_style_get_selector_state(obj->styles[i].selector);
+        if(part_act != part) continue;
+
+        if((obj_style->style->has_group & group) == 0) continue;
+
+        /*Be sure the style not specifies other state than the requested.
+         *E.g. For HOVER+PRESS object state, HOVER style only is OK, but HOVER+FOCUS style is not*/
+        if((state_act & state_inv)) continue;
+
+        /*Check only better candidates*/
+        if(state_act <= weight) continue;
+
+        found = lv_style_get_prop(obj_style->style, prop, &value_tmp);
+
+        if(found) {
+            if(state_act == state) {
+                *v = value_tmp;
+                return true;
+            }
+            if(weight < state_act) {
+                weight = state_act;
+                *v = value_tmp;
+            }
+        }
+    }
+
+    if(weight >= 0) {
+        *v = value_tmp;
+        return true;
+    }
+    else return false;
+}
+
+static lv_style_value_t apply_color_filter(const lv_obj_t * obj, uint32_t part, lv_style_value_t v)
+{
+    if(obj == NULL) return v;
+    const lv_color_filter_dsc_t * f = lv_obj_get_style_color_filter_dsc(obj, part);
+    if(f && f->filter_cb) {
+        lv_opa_t f_opa = lv_obj_get_style_color_filter_opa(obj, part);
+        if(f_opa != 0) v.color = f->filter_cb(f, v.color, f_opa);
+    }
+    return v;
+}
+
+/**
+ * Refresh the style of all children of an object. (Called recursively)
+ * @param style refresh objects only with this
+ * @param obj pointer to an object
+ */
+static void report_style_change_core(void * style, lv_obj_t * obj)
+{
+    uint32_t i;
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(style == NULL || obj->styles[i].style == style) {
+            lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY);
+            break;
+        }
+    }
+
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        report_style_change_core(style, lv_obj_get_child(obj, i));
+    }
+}
+
+/**
+ * Recursively refresh the style of the children. Go deeper until a not NULL style is found
+ * because the NULL styles are inherited from the parent
+ * @param obj pointer to an object
+ */
+static void refresh_children_style(lv_obj_t * obj)
+{
+    uint32_t i;
+    for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+        lv_obj_t * child = lv_obj_get_child(obj, i);
+        lv_obj_invalidate(child);
+        lv_event_send(child, LV_EVENT_STYLE_CHANGED, NULL);
+        lv_obj_invalidate(child);
+
+        refresh_children_style(child); /*Check children too*/
+    }
+}
+
+/**
+ * Remove the transition from object's part's property.
+ * - Remove the transition from `_lv_obj_style_trans_ll` and free it
+ * - Delete pending transitions
+ * @param obj pointer to an object which transition(s) should be removed
+ * @param part a part of object or 0xFF to remove from all parts
+ * @param prop a property or 0xFF to remove all properties
+ * @param tr_limit delete transitions only "older" than this. `NULL` if not used
+ */
+static bool trans_del(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, trans_t * tr_limit)
+{
+    trans_t * tr;
+    trans_t * tr_prev;
+    bool removed = false;
+    tr = _lv_ll_get_tail(&LV_GC_ROOT(_lv_obj_style_trans_ll));
+    while(tr != NULL) {
+        if(tr == tr_limit) break;
+
+        /*'tr' might be deleted, so get the next object while 'tr' is valid*/
+        tr_prev = _lv_ll_get_prev(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr);
+
+        if(tr->obj == obj && (part == tr->selector || part == LV_PART_ANY) && (prop == tr->prop || prop == LV_STYLE_PROP_ANY)) {
+            /*Remove the transitioned property from trans. style
+             *to allow changing it by normal styles*/
+            uint32_t i;
+            for(i = 0; i < obj->style_cnt; i++) {
+                if(obj->styles[i].is_trans && (part == LV_PART_ANY || obj->styles[i].selector == part)) {
+                    lv_style_remove_prop(obj->styles[i].style, tr->prop);
+                    lv_anim_del(tr, NULL);
+                    _lv_ll_remove(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr);
+                    lv_mem_free(tr);
+                    removed = true;
+                }
+            }
+
+        }
+        tr = tr_prev;
+    }
+    return removed;
+}
+
+static void trans_anim_cb(void * _tr, int32_t v)
+{
+    trans_t * tr = _tr;
+    lv_obj_t * obj = tr->obj;
+
+    uint32_t i;
+    for(i = 0; i < obj->style_cnt; i++) {
+        if(obj->styles[i].is_trans == 0 || obj->styles[i].selector != tr->selector) continue;
+
+        lv_style_value_t value_final;
+        switch (tr->prop) {
+
+            case LV_STYLE_BORDER_SIDE:
+            case LV_STYLE_BORDER_POST:
+            case LV_STYLE_BLEND_MODE:
+                if(v < 255) value_final.num = tr->start_value.num;
+                else value_final.num = tr->end_value.num;
+                break;
+            case LV_STYLE_TRANSITION:
+            case LV_STYLE_TEXT_FONT:
+                if(v < 255) value_final.ptr = tr->start_value.ptr;
+                else value_final.ptr = tr->end_value.ptr;
+                break;
+            case LV_STYLE_COLOR_FILTER_DSC:
+                if(tr->start_value.ptr == NULL) value_final.ptr = tr->end_value.ptr;
+                else if(tr->end_value.ptr == NULL) value_final.ptr = tr->start_value.ptr;
+                else if(v < 128) value_final.ptr = tr->start_value.ptr;
+                else value_final.ptr = tr->end_value.ptr;
+                break;
+            case LV_STYLE_BG_COLOR:
+            case LV_STYLE_BORDER_COLOR:
+            case LV_STYLE_TEXT_COLOR:
+            case LV_STYLE_SHADOW_COLOR:
+            case LV_STYLE_OUTLINE_COLOR:
+            case LV_STYLE_IMG_RECOLOR:
+                if(v <= 0) value_final.color = tr->start_value.color;
+                else if(v >= 255) value_final.color = tr->end_value.color;
+                else value_final.color = lv_color_mix(tr->end_value.color, tr->start_value.color, v);
+                break;
+
+            default:
+                if(v == 0) value_final.num = tr->start_value.num;
+                else if(v == 255) value_final.num = tr->end_value.num;
+                else value_final.num = tr->start_value.num + ((int32_t)((int32_t)(tr->end_value.num - tr->start_value.num) * v) >> 8);
+                break;
+        }
+
+        lv_style_value_t old_value;
+        bool refr = true;
+        if(lv_style_get_prop(obj->styles[i].style, tr->prop, &old_value)) {
+            if(value_final.ptr == old_value.ptr && value_final.color.full == old_value.color.full && value_final.num == old_value.num) {
+                refr = false;
+            }
+        }
+        lv_style_set_prop(obj->styles[i].style, tr->prop, value_final);
+        if (refr) lv_obj_refresh_style(tr->obj, tr->selector, tr->prop);
+        break;
+
+    }
+
+}
+
+static void trans_anim_start_cb(lv_anim_t * a)
+{
+    trans_t * tr = a->var;
+
+    lv_part_t part = lv_obj_style_get_selector_part(tr->selector);
+    tr->start_value = lv_obj_get_style_prop(tr->obj, part, tr->prop);
+
+    /*Init prop to an invalid values to be sure `trans_del` won't delete this added `tr`*/
+    lv_style_prop_t prop_tmp = tr->prop;
+    tr->prop = LV_STYLE_PROP_INV;
+
+    /*Delete the related transitions if any*/
+    trans_del(tr->obj, part, prop_tmp, tr);
+
+    tr->prop = prop_tmp;
+
+    _lv_obj_style_t * style_trans = get_trans_style(tr->obj, tr->selector);
+    lv_style_set_prop(style_trans->style, tr->prop, tr->start_value);   /*Be sure `trans_style` has a valid value*/
+
+}
+
+static void trans_anim_ready_cb(lv_anim_t * a)
+{
+    trans_t * tr = a->var;
+    lv_obj_t * obj = tr->obj;
+    lv_style_prop_t prop = tr->prop;
+
+    /*Remove the transitioned property from trans. style
+     *if there no more transitions for this property
+     *It allows changing it by normal styles*/
+    bool running = false;
+    trans_t * tr_i;
+    _LV_LL_READ(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr_i) {
+        if(tr_i != tr && tr_i->obj == tr->obj && tr_i->selector == tr->selector && tr_i->prop == tr->prop) {
+            running = true;
+            break;
+        }
+    }
+
+    if(!running) {
+        uint32_t i;
+        for(i = 0; i < obj->style_cnt; i++) {
+            if(obj->styles[i].is_trans && obj->styles[i].selector == tr->selector) {
+                _lv_ll_remove(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr);
+                lv_mem_free(tr);
+
+                _lv_obj_style_t * obj_style = &obj->styles[i];
+                lv_style_remove_prop(obj_style->style, prop);
+
+                if(lv_style_is_empty(obj->styles[i].style)) {
+                    lv_obj_remove_style(obj, obj_style->style, obj_style->selector);
+
+                }
+                break;
+            }
+        }
+    }
+}
+
+static void fade_anim_cb(void * obj, int32_t v)
+{
+    lv_obj_set_style_opa(obj, v, 0);
+}
+
+static void fade_in_anim_ready(lv_anim_t * a)
+{
+    lv_obj_remove_local_style_prop(a->var, LV_STYLE_OPA, 0);
+}
+
+

+ 231 - 0
components/lvgl/src/core/lv_obj_style.h

@@ -0,0 +1,231 @@
+/**
+ * @file lv_obj_style.h
+ *
+ */
+
+#ifndef LV_OBJ_STYLE_H
+#define LV_OBJ_STYLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include <stdint.h>
+#include <stdbool.h>
+#include "../misc/lv_bidi.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+/*Can't include lv_obj.h because it includes this header file*/
+struct _lv_obj_t;
+
+typedef enum {
+    _LV_STYLE_STATE_CMP_SAME,           /*The style properties in the 2 states are identical*/
+    _LV_STYLE_STATE_CMP_DIFF_REDRAW,    /*The differences can be shown with a simple redraw*/
+    _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD,  /*The differences can be shown with a simple redraw*/
+    _LV_STYLE_STATE_CMP_DIFF_LAYOUT,    /*The differences can be shown with a simple redraw*/
+} _lv_style_state_cmp_t;
+
+typedef uint32_t lv_style_selector_t;
+
+typedef struct {
+    lv_style_t * style;
+    uint32_t selector :24;
+    uint32_t is_local :1;
+    uint32_t is_trans :1;
+}_lv_obj_style_t;
+
+typedef struct {
+    uint16_t time;
+    uint16_t delay;
+    lv_style_selector_t selector;
+    lv_style_prop_t prop;
+    lv_anim_path_cb_t path_cb;
+#if LV_USE_USER_DATA
+    void * user_data;
+#endif
+}_lv_obj_style_transition_dsc_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Initialize the object related style manager module.
+ * Called by LVGL in `lv_init()`
+ */
+void _lv_obj_style_init(void);
+
+/**
+ * Add a style to an object.
+ * @param obj       pointer to an object
+ * @param part      a part of the object to which the style should be added E.g. `LV_PART_MAIN` or `LV_PART_KNOB`
+ * @param state     a state or combination of states to which the style should be assigned
+ * @param style     pointer to a style to add
+ * @example         lv_obj_add_style_no_refresh(slider, LV_PART_KNOB, LV_STATE_PRESSED, &style1);
+ */
+void lv_obj_add_style(struct _lv_obj_t * obj, lv_style_t * style, lv_style_selector_t selector);
+
+/**
+ * Add a style to an object.
+ * @param obj       pointer to an object
+ * @param style     pointer to a style to remove. Can be NULL to check only the selector
+ * @param selector  OR-ed values of states and a part to remove only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used
+ * @example lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, &style); //Remove a specific style
+ * @example lv_obj_remove_style(obj, LV_PART_MAIN, LV_STATE_ANY, &style); //Remove all styles from the main part
+ * @example lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, NULL); //Remove all styles
+ */
+void lv_obj_remove_style(struct _lv_obj_t * obj, lv_style_t * style, lv_style_selector_t selector);
+
+/**
+ * Remove all styles from an object
+ * @param obj       pointer to an object
+ */
+static inline void lv_obj_remove_style_all(struct _lv_obj_t * obj)
+{
+    lv_obj_remove_style(obj, NULL, LV_PART_ANY | LV_STATE_ANY);
+}
+
+/**
+ * Notify all object if a style is modified
+ * @param style     pointer to a style. Only the objects with this style will be notified
+ *                  (NULL to notify all objects)
+ */
+void lv_obj_report_style_change(lv_style_t * style);
+
+/**
+ * Notify an object and its children about its style is modified.
+ * @param obj       pointer to an object
+ * @param part      the part whose style was changed. E.g. `LV_PART_ANY`, `LV_PART_MAIN`
+ * @param prop      `LV_STYLE_PROP_ANY` or an `LV_STYLE_...` property.
+ *                  It is used to optimize what needs to be refreshed.
+ *                  `LV_STYLE_PROP_INV` to perform only a style cache update
+ */
+void lv_obj_refresh_style(struct _lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop);
+
+/**
+ * Enable or disable automatic style refreshing when a new style is added/removed to/from an object
+ * or any other style change happens.
+ * @param en        true: enable refreshing; false: disable refreshing
+ */
+void lv_obj_enable_style_refresh(bool en);
+
+/**
+ * Get the value of a style property. The current state of the object will be considered.
+ * Inherited properties will be inherited.
+ * If a property is not set a default value will be returned.
+ * @param obj       pointer to an object
+ * @param part      a part from which the property should be get
+ * @param prop      the property to get
+ * @return          the value of the property.
+ *                  Should be read from the correct field of the `lv_style_value_t` according to the type of the property.
+ */
+lv_style_value_t lv_obj_get_style_prop(const struct _lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop);
+
+/**
+ * Set local style property on an object's part and state.
+ * @param obj       pointer to an object
+ * @param part      a part to which the property should be added
+ * @param state     a state to which the property should be added
+ * @param prop      the property
+ * @param value     value of the property. The correct element should be set according to the type of the property
+ */
+void lv_obj_set_local_style_prop(struct _lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector);
+
+lv_res_t lv_obj_get_local_style_prop(struct _lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value, lv_style_selector_t selector);
+
+/**
+ * Remove a local style property from a part of an object with a given state.
+ * @param obj       pointer to an object
+ * @param part      the part of the object which style property should be removed.
+ * @param state     the state from which the property should be removed.
+ * @param prop      a style property to remove.
+ * @return true     the property was found and removed; false: the property was not found
+ */
+bool lv_obj_remove_local_style_prop(struct _lv_obj_t * obj, lv_style_prop_t prop, lv_style_selector_t selector);
+
+/**
+ * Used internally to create a style tarnsition
+ * @param obj
+ * @param part
+ * @param prev_state
+ * @param new_state
+ * @param tr
+ */
+void _lv_obj_style_create_transition(struct _lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const _lv_obj_style_transition_dsc_t * tr);
+
+/**
+ * Used internally to compare the appearance of an object in 2 states
+ * @param obj
+ * @param state1
+ * @param state2
+ * @return
+ */
+_lv_style_state_cmp_t _lv_obj_style_state_compare(struct _lv_obj_t * obj, lv_state_t state1, lv_state_t state2);
+
+/**
+ * Fade in an an object and all its children.
+ * @param obj       the object to fade in
+ * @param time      time of fade
+ * @param delay     delay to start the animation
+ */
+void lv_obj_fade_in(struct _lv_obj_t * obj, uint32_t time, uint32_t delay);
+
+/**
+ * Fade out an an object and all its children.
+ * @param obj       the object to fade out
+ * @param time      time of fade
+ * @param delay     delay to start the animation
+ */
+void lv_obj_fade_out(struct _lv_obj_t * obj, uint32_t time, uint32_t delay);
+
+lv_state_t lv_obj_style_get_selector_state(lv_style_selector_t selector);
+
+lv_part_t lv_obj_style_get_selector_part(lv_style_selector_t selector);
+
+#include "lv_obj_style_gen.h"
+
+static inline void lv_obj_set_style_pad_all(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) {
+    lv_obj_set_style_pad_left(obj, value, selector);
+    lv_obj_set_style_pad_right(obj, value, selector);
+    lv_obj_set_style_pad_top(obj, value, selector);
+    lv_obj_set_style_pad_bottom(obj, value, selector);
+}
+
+static inline void lv_obj_set_style_pad_hor(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) {
+    lv_obj_set_style_pad_left(obj, value, selector);
+    lv_obj_set_style_pad_right(obj, value, selector);
+}
+
+static inline void lv_obj_set_style_pad_ver(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) {
+    lv_obj_set_style_pad_top(obj, value, selector);
+    lv_obj_set_style_pad_bottom(obj, value, selector);
+}
+
+static inline void lv_obj_set_style_pad_gap(struct _lv_obj_t * obj,  lv_coord_t value, lv_style_selector_t selector) {
+    lv_obj_set_style_pad_row(obj, value, selector);
+    lv_obj_set_style_pad_column(obj, value, selector);
+}
+
+static inline void lv_obj_set_style_size(struct _lv_obj_t * obj,  lv_coord_t value, lv_style_selector_t selector) {
+    lv_obj_set_style_width(obj, value, selector);
+    lv_obj_set_style_height(obj, value, selector);
+}
+
+/**********************
+ *      MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_TEMPL_H*/

+ 713 - 0
components/lvgl/src/core/lv_obj_style_gen.c

@@ -0,0 +1,713 @@
+#include "lv_obj.h"
+void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_min_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_MIN_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_max_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_MAX_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_HEIGHT, v, selector);
+}
+
+void lv_obj_set_style_min_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_MIN_HEIGHT, v, selector);
+}
+
+void lv_obj_set_style_max_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_MAX_HEIGHT, v, selector);
+}
+
+void lv_obj_set_style_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_X, v, selector);
+}
+
+void lv_obj_set_style_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_Y, v, selector);
+}
+
+void lv_obj_set_style_align(struct _lv_obj_t * obj, lv_align_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ALIGN, v, selector);
+}
+
+void lv_obj_set_style_transform_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_transform_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_HEIGHT, v, selector);
+}
+
+void lv_obj_set_style_translate_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSLATE_X, v, selector);
+}
+
+void lv_obj_set_style_translate_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSLATE_Y, v, selector);
+}
+
+void lv_obj_set_style_transform_zoom(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_ZOOM, v, selector);
+}
+
+void lv_obj_set_style_transform_angle(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_ANGLE, v, selector);
+}
+
+void lv_obj_set_style_pad_top(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_TOP, v, selector);
+}
+
+void lv_obj_set_style_pad_bottom(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_BOTTOM, v, selector);
+}
+
+void lv_obj_set_style_pad_left(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_LEFT, v, selector);
+}
+
+void lv_obj_set_style_pad_right(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_RIGHT, v, selector);
+}
+
+void lv_obj_set_style_pad_row(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_ROW, v, selector);
+}
+
+void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_COLUMN, v, selector);
+}
+
+void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_RADIUS, v, selector);
+}
+
+void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_CLIP_CORNER, v, selector);
+}
+
+void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector);
+}
+
+void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .ptr = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_DSC, v, selector);
+}
+
+void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_OPA, v, selector);
+}
+
+void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector);
+}
+
+void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector);
+}
+
+void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .ptr = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSITION, v, selector);
+}
+
+void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BLEND_MODE, v, selector);
+}
+
+void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LAYOUT, v, selector);
+}
+
+void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
+}
+
+void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_COLOR, v, selector);
+}
+
+void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_bg_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_OPA, v, selector);
+}
+
+void lv_obj_set_style_bg_grad_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_COLOR, v, selector);
+}
+
+void lv_obj_set_style_bg_grad_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_bg_grad_dir(struct _lv_obj_t * obj, lv_grad_dir_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_DIR, v, selector);
+}
+
+void lv_obj_set_style_bg_main_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_MAIN_STOP, v, selector);
+}
+
+void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_STOP, v, selector);
+}
+
+void lv_obj_set_style_bg_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .ptr = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_SRC, v, selector);
+}
+
+void lv_obj_set_style_bg_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_OPA, v, selector);
+}
+
+void lv_obj_set_style_bg_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR, v, selector);
+}
+
+void lv_obj_set_style_bg_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_bg_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR_OPA, v, selector);
+}
+
+void lv_obj_set_style_bg_img_tiled(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_TILED, v, selector);
+}
+
+void lv_obj_set_style_border_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_COLOR, v, selector);
+}
+
+void lv_obj_set_style_border_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_border_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_OPA, v, selector);
+}
+
+void lv_obj_set_style_border_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_border_side(struct _lv_obj_t * obj, lv_border_side_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_SIDE, v, selector);
+}
+
+void lv_obj_set_style_border_post(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_POST, v, selector);
+}
+
+void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR, v, selector);
+}
+
+void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_OPA, v, selector);
+}
+
+void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .ptr = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_FONT, v, selector);
+}
+
+void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LETTER_SPACE, v, selector);
+}
+
+void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LINE_SPACE, v, selector);
+}
+
+void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_DECOR, v, selector);
+}
+
+void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_ALIGN, v, selector);
+}
+
+void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_OPA, v, selector);
+}
+
+void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR, v, selector);
+}
+
+void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_OPA, v, selector);
+}
+
+void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_outline_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_COLOR, v, selector);
+}
+
+void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_outline_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_OPA, v, selector);
+}
+
+void lv_obj_set_style_outline_pad(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_PAD, v, selector);
+}
+
+void lv_obj_set_style_shadow_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_shadow_ofs_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OFS_X, v, selector);
+}
+
+void lv_obj_set_style_shadow_ofs_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OFS_Y, v, selector);
+}
+
+void lv_obj_set_style_shadow_spread(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_SPREAD, v, selector);
+}
+
+void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_COLOR, v, selector);
+}
+
+void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OPA, v, selector);
+}
+
+void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_DASH_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_DASH_GAP, v, selector);
+}
+
+void lv_obj_set_style_line_rounded(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_ROUNDED, v, selector);
+}
+
+void lv_obj_set_style_line_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_COLOR, v, selector);
+}
+
+void lv_obj_set_style_line_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_line_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_OPA, v, selector);
+}
+
+void lv_obj_set_style_arc_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_WIDTH, v, selector);
+}
+
+void lv_obj_set_style_arc_rounded(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_ROUNDED, v, selector);
+}
+
+void lv_obj_set_style_arc_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_COLOR, v, selector);
+}
+
+void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .color = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_COLOR_FILTERED, v, selector);
+}
+
+void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .num = (int32_t)value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_OPA, v, selector);
+}
+
+void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector)
+{
+    lv_style_value_t v = {
+        .ptr = value
+    };
+    lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_IMG_SRC, v, selector);
+}
+

+ 623 - 0
components/lvgl/src/core/lv_obj_style_gen.h

@@ -0,0 +1,623 @@
+static inline lv_coord_t lv_obj_get_style_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_min_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MIN_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_max_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MAX_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_height(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_HEIGHT);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_min_height(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MIN_HEIGHT);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_max_height(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MAX_HEIGHT);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_x(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_X);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_y(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_Y);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_align_t lv_obj_get_style_align(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ALIGN);
+    return (lv_align_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_transform_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_transform_height(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_HEIGHT);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_translate_x(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSLATE_X);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_translate_y(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSLATE_Y);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_transform_zoom(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_ZOOM);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_transform_angle(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_ANGLE);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_pad_top(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_TOP);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_pad_bottom(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_BOTTOM);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_pad_left(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_LEFT);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_pad_right(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_RIGHT);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_pad_row(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_ROW);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_pad_column(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_COLUMN);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_radius(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RADIUS);
+    return (lv_coord_t)v.num;
+}
+
+static inline bool lv_obj_get_style_clip_corner(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CLIP_CORNER);
+    return (bool)v.num;
+}
+
+static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
+    return (const lv_color_filter_dsc_t *)v.ptr;
+}
+
+static inline lv_opa_t lv_obj_get_style_color_filter_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline uint32_t lv_obj_get_style_anim_time(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_TIME);
+    return (uint32_t)v.num;
+}
+
+static inline uint32_t lv_obj_get_style_anim_speed(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_SPEED);
+    return (uint32_t)v.num;
+}
+
+static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSITION);
+    return (const lv_style_transition_dsc_t *)v.ptr;
+}
+
+static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLEND_MODE);
+    return (lv_blend_mode_t)v.num;
+}
+
+static inline uint16_t lv_obj_get_style_layout(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LAYOUT);
+    return (uint16_t)v.num;
+}
+
+static inline lv_base_dir_t lv_obj_get_style_base_dir(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BASE_DIR);
+    return (lv_base_dir_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_bg_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_bg_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_bg_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_bg_grad_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_DIR);
+    return (lv_grad_dir_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_bg_main_stop(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_MAIN_STOP);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_bg_grad_stop(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_STOP);
+    return (lv_coord_t)v.num;
+}
+
+static inline const void * lv_obj_get_style_bg_img_src(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_SRC);
+    return (const void *)v.ptr;
+}
+
+static inline lv_opa_t lv_obj_get_style_bg_img_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_bg_img_recolor(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_RECOLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_bg_img_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_RECOLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_bg_img_recolor_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_RECOLOR_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline bool lv_obj_get_style_bg_img_tiled(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_TILED);
+    return (bool)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_border_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_border_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_border_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_border_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_border_side_t lv_obj_get_style_border_side(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_SIDE);
+    return (lv_border_side_t)v.num;
+}
+
+static inline bool lv_obj_get_style_border_post(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_POST);
+    return (bool)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_text_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_text_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_text_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline const lv_font_t * lv_obj_get_style_text_font(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_FONT);
+    return (const lv_font_t *)v.ptr;
+}
+
+static inline lv_coord_t lv_obj_get_style_text_letter_space(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LETTER_SPACE);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_text_line_space(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LINE_SPACE);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_text_decor_t lv_obj_get_style_text_decor(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_DECOR);
+    return (lv_text_decor_t)v.num;
+}
+
+static inline lv_text_align_t lv_obj_get_style_text_align(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_ALIGN);
+    return (lv_text_align_t)v.num;
+}
+
+static inline lv_opa_t lv_obj_get_style_img_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_img_recolor(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_img_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_img_recolor_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_outline_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_outline_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_outline_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_outline_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_outline_pad(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_PAD);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_shadow_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_shadow_ofs_x(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFS_X);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_shadow_ofs_y(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFS_Y);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_shadow_spread(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_SPREAD);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_shadow_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_shadow_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_shadow_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_line_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_line_dash_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_DASH_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_line_dash_gap(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_DASH_GAP);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_line_rounded(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_ROUNDED);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_line_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_line_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_line_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_arc_width(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_WIDTH);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_arc_rounded(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_ROUNDED);
+    return (lv_coord_t)v.num;
+}
+
+static inline lv_color_t lv_obj_get_style_arc_color(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_COLOR);
+    return v.color;
+}
+
+static inline lv_color_t lv_obj_get_style_arc_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_COLOR_FILTERED);
+    return v.color;
+}
+
+static inline lv_opa_t lv_obj_get_style_arc_opa(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_OPA);
+    return (lv_opa_t)v.num;
+}
+
+static inline const void * lv_obj_get_style_arc_img_src(const struct _lv_obj_t * obj, uint32_t part)
+{
+    lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_IMG_SRC);
+    return (const void *)v.ptr;
+}
+
+void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_min_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_max_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_min_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_max_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_align(struct _lv_obj_t * obj, lv_align_t value, lv_style_selector_t selector);
+void lv_obj_set_style_transform_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_transform_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_translate_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_translate_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_transform_zoom(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_transform_angle(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_pad_top(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_pad_bottom(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_pad_left(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_pad_right(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_pad_row(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
+void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
+void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
+void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
+void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
+void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
+void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
+void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_grad_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_grad_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_grad_dir(struct _lv_obj_t * obj, lv_grad_dir_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_main_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_bg_img_tiled(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
+void lv_obj_set_style_border_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_border_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_border_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_border_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_border_side(struct _lv_obj_t * obj, lv_border_side_t value, lv_style_selector_t selector);
+void lv_obj_set_style_border_post(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
+void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector);
+void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector);
+void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector);
+void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_outline_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_outline_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_outline_pad(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_shadow_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_shadow_ofs_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_shadow_ofs_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_shadow_spread(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_line_rounded(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_line_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_line_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_line_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_arc_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_arc_rounded(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_arc_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
+void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector);

+ 438 - 0
components/lvgl/src/core/lv_obj_tree.c

@@ -0,0 +1,438 @@
+/**
+ * @file lv_obj_tree.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "lv_obj.h"
+#include "lv_indev.h"
+#include "../misc/lv_anim.h"
+#include "../misc/lv_gc.h"
+#include "../misc/lv_async.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+#define MY_CLASS &lv_obj_class
+
+#if defined(LV_USER_DATA_FREE_INCLUDE)
+    #include LV_USER_DATA_FREE_INCLUDE
+#endif /*LV_USE_USER_DATA_FREE*/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static void lv_obj_del_async_cb(void * obj);
+static void obj_del_core(lv_obj_t * obj);
+static lv_obj_tree_walk_res_t walk_core(lv_obj_t * obj, lv_obj_tree_walk_cb_t cb, void * user_data);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+void lv_obj_del(lv_obj_t * obj)
+{
+    LV_LOG_TRACE("begin (delete %p)", obj)
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    lv_obj_invalidate(obj);
+
+    lv_obj_t * par = lv_obj_get_parent(obj);
+    if(par) {
+        lv_obj_scrollbar_invalidate(par);
+    }
+
+    lv_disp_t * disp = NULL;
+    bool act_scr_del = false;
+    if(par == NULL) {
+        disp = lv_obj_get_disp(obj);
+        if(!disp) return;   /*Shouldn't happen*/
+        if(disp->act_scr == obj) act_scr_del = true;
+    }
+
+    obj_del_core(obj);
+
+    /*Call the ancestor's event handler to the parent to notify it about the child delete*/
+    if(par) {
+        /*Just to remove scroll animations if any*/
+        lv_obj_scroll_to(par, 0, 0, LV_ANIM_OFF);
+        if(par->spec_attr) {
+                par->spec_attr->scroll.x = 0;
+                par->spec_attr->scroll.y = 0;
+            }
+        lv_event_send(par, LV_EVENT_CHILD_CHANGED, NULL);
+    }
+
+    /*Handle if the active screen was deleted*/
+    if(act_scr_del)  {
+        LV_LOG_WARN("the active screen was deleted")
+        disp->act_scr = NULL;
+    }
+
+    LV_ASSERT_MEM_INTEGRITY();
+    LV_LOG_TRACE("finished (delete %p)", obj)
+}
+
+void lv_obj_clean(lv_obj_t * obj)
+{
+    LV_LOG_TRACE("begin (delete %p)", obj)
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_invalidate(obj);
+
+    lv_obj_t * child = lv_obj_get_child(obj, 0);
+    while(child) {
+        obj_del_core(child);
+        child = lv_obj_get_child(obj, 0);
+    }
+    /*Just to remove scroll animations if any*/
+    lv_obj_scroll_to(obj, 0, 0, LV_ANIM_OFF);
+    if(obj->spec_attr) {
+        obj->spec_attr->scroll.x = 0;
+        obj->spec_attr->scroll.y = 0;
+    }
+
+    LV_ASSERT_MEM_INTEGRITY();
+
+    LV_LOG_TRACE("finished (delete %p)", obj)
+}
+
+void lv_obj_del_anim_ready_cb(lv_anim_t * a)
+{
+    lv_obj_del(a->var);
+}
+
+void lv_obj_del_async(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    lv_async_call(lv_obj_del_async_cb, obj);
+}
+
+void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    LV_ASSERT_OBJ(parent, MY_CLASS);
+
+    if(obj->parent == NULL) {
+        LV_LOG_WARN("Can't set the parent of a screen");
+        return;
+    }
+
+    if(parent == NULL) {
+        LV_LOG_WARN("Can't set parent == NULL to an object");
+        return;
+    }
+
+    lv_obj_invalidate(obj);
+
+    lv_obj_allocate_spec_attr(parent);
+
+    lv_obj_t * old_parent = obj->parent;
+    lv_point_t old_pos;
+    old_pos.y = lv_obj_get_y(obj);
+
+    lv_base_dir_t new_base_dir = lv_obj_get_style_base_dir(parent, LV_PART_MAIN);
+
+    if(new_base_dir != LV_BASE_DIR_RTL) old_pos.x = lv_obj_get_x(obj);
+    else  old_pos.x = old_parent->coords.x2 - obj->coords.x2;
+
+    /*Remove the object from the old parent's child list*/
+    int32_t i;
+    for(i = lv_obj_get_child_id(obj); i <= (int32_t)lv_obj_get_child_cnt(old_parent) - 2; i++) {
+        old_parent->spec_attr->children[i] = old_parent->spec_attr->children[i+1];
+    }
+    old_parent->spec_attr->child_cnt--;
+    if(old_parent->spec_attr->child_cnt) {
+        old_parent->spec_attr->children = lv_mem_realloc(old_parent->spec_attr->children, old_parent->spec_attr->child_cnt * (sizeof(lv_obj_t *)));
+    } else {
+        lv_mem_free(old_parent->spec_attr->children);
+        old_parent->spec_attr->children = NULL;
+    }
+
+    /*Add the child to the new parent as the last (newest child)*/
+    parent->spec_attr->child_cnt++;
+    parent->spec_attr->children = lv_mem_realloc(parent->spec_attr->children, parent->spec_attr->child_cnt * (sizeof(lv_obj_t *)));
+    parent->spec_attr->children[lv_obj_get_child_cnt(parent) - 1] = obj;
+
+    obj->parent = parent;
+
+    if(new_base_dir != LV_BASE_DIR_RTL) {
+        lv_obj_set_pos(obj, old_pos.x, old_pos.y);
+    }
+    else {
+        /*Align to the right in case of RTL base dir*/
+        lv_coord_t new_x = lv_obj_get_width(parent) - old_pos.x - lv_obj_get_width(obj);
+        lv_obj_set_pos(obj, new_x, old_pos.y);
+    }
+
+    /*Notify the original parent because one of its children is lost*/
+    lv_event_send(old_parent, LV_EVENT_CHILD_CHANGED, obj);
+
+    /*Notify the new parent about the child*/
+    lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj);
+
+    lv_obj_invalidate(obj);
+}
+
+void lv_obj_move_foreground(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+
+    lv_obj_invalidate(parent);
+
+    uint32_t i;
+    for(i = lv_obj_get_child_id(obj); i < lv_obj_get_child_cnt(parent) - 1; i++) {
+        parent->spec_attr->children[i] = parent->spec_attr->children[i + 1];
+    }
+    parent->spec_attr->children[lv_obj_get_child_cnt(parent) - 1] = obj;
+
+    /*Notify the new parent about the child*/
+    lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj);
+
+    lv_obj_invalidate(parent);
+}
+
+void lv_obj_move_background(lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+
+    lv_obj_invalidate(parent);
+
+    int32_t i;
+    for(i = lv_obj_get_child_id(obj); i > 0; i--) {
+        parent->spec_attr->children[i] = parent->spec_attr->children[i-1];
+    }
+    parent->spec_attr->children[0] = obj;
+
+    /*Notify the new parent about the child*/
+    lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj);
+
+    lv_obj_invalidate(parent);
+}
+
+lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    const lv_obj_t * par = obj;
+    const lv_obj_t * act_par;
+
+    do {
+        act_par = par;
+        par   = lv_obj_get_parent(act_par);
+    } while(par != NULL);
+
+    return (lv_obj_t*)act_par;
+}
+
+lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    const lv_obj_t * scr;
+
+    if(obj->parent == NULL) scr = obj;  /*`obj` is a screen*/
+    else scr = lv_obj_get_screen(obj);  /*get the screen of `obj`*/
+
+    lv_disp_t * d;
+    _LV_LL_READ(&LV_GC_ROOT(_lv_disp_ll), d) {
+        uint32_t i;
+        for(i = 0; i < d->screen_cnt; i++) {
+            if(d->screens[i] == scr) return d;
+        }
+    }
+
+    LV_LOG_WARN("No screen found")
+    return NULL;
+}
+
+lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj)
+{
+    if(obj == NULL) return NULL;
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    return obj->parent;
+}
+
+lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, int32_t id)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    if(obj->spec_attr == NULL) return NULL;
+
+    uint32_t idu;
+    if(id < 0) {
+        id = obj->spec_attr->child_cnt + id;
+        if(id < 0) return NULL;
+        idu = (uint32_t) id;
+    } else {
+        idu = id;
+    }
+
+    if(idu >= obj->spec_attr->child_cnt) return NULL;
+    else return obj->spec_attr->children[id];
+}
+
+uint32_t lv_obj_get_child_cnt(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+    if(obj->spec_attr == NULL) return 0;
+    return obj->spec_attr->child_cnt;
+}
+
+uint32_t lv_obj_get_child_id(const lv_obj_t * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_t * parent = lv_obj_get_parent(obj);
+    if(parent == NULL) return 0;
+
+    uint32_t i = 0;
+    for(i = 0; i < lv_obj_get_child_cnt(parent); i++) {
+        if(lv_obj_get_child(parent, i) == obj) return i;
+    }
+
+    return 0xFFFFFFFF; /*Shouldn't happen*/
+}
+
+
+void lv_obj_tree_walk(lv_obj_t * start_obj, lv_obj_tree_walk_cb_t cb, void * user_data)
+{
+    walk_core(start_obj, cb, user_data);
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+static void lv_obj_del_async_cb(void * obj)
+{
+    LV_ASSERT_OBJ(obj, MY_CLASS);
+
+    lv_obj_del(obj);
+}
+
+static void obj_del_core(lv_obj_t * obj)
+{
+    /*Let the user free the resources used in `LV_EVENT_DELETE`*/
+    lv_res_t res = lv_event_send(obj, LV_EVENT_DELETE, NULL);
+    if(res == LV_RES_INV) return;
+
+    /*Delete from the group*/
+    lv_group_t * group = lv_obj_get_group(obj);
+    if(group) lv_group_remove_obj(obj);
+
+    /*Remove the animations from this object*/
+    lv_anim_del(obj, NULL);
+
+    /*Recursively delete the children*/
+    lv_obj_t * child = lv_obj_get_child(obj, 0);
+    while(child) {
+        obj_del_core(child);
+        child = lv_obj_get_child(obj, 0);
+    }
+
+    _lv_event_mark_deleted(obj);
+
+    /*Remove all style*/
+    lv_obj_enable_style_refresh(false); /*No need to refresh the style because the object will be deleted*/
+    lv_obj_remove_style_all(obj);
+    lv_obj_enable_style_refresh(true);
+
+    /*Reset all input devices if the object to delete is used*/
+    lv_indev_t * indev = lv_indev_get_next(NULL);
+    while(indev) {
+        if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) {
+            lv_indev_reset(indev, obj);
+        }
+        if(indev->proc.types.pointer.last_pressed == obj) {
+            indev->proc.types.pointer.last_pressed = NULL;
+        }
+
+        if(indev->group == group && obj == lv_indev_get_obj_act()) {
+            lv_indev_reset(indev, obj);
+        }
+        indev = lv_indev_get_next(indev);
+    }
+
+    /*All children deleted. Now clean up the object specific data*/
+    _lv_obj_destructor(obj);
+
+    /*Remove the screen for the screen list*/
+    if(obj->parent == NULL) {
+        lv_disp_t * disp = lv_obj_get_disp(obj);
+        uint32_t i;
+        /*Find the screen in the list*/
+        for(i = 0; i < disp->screen_cnt; i++) {
+            if(disp->screens[i] == obj) break;
+        }
+
+        uint32_t id = i;
+        for(i = id; i < disp->screen_cnt - 1; i++) {
+            disp->screens[i] = disp->screens[i + 1];
+        }
+        disp->screen_cnt--;
+        disp->screens = lv_mem_realloc(disp->screens, disp->screen_cnt * sizeof(lv_obj_t *));
+    }
+    /*Remove the object from the child list of its parent*/
+    else {
+        uint32_t id = lv_obj_get_child_id(obj);
+        uint32_t i;
+        for(i = id; i < obj->parent->spec_attr->child_cnt - 1; i++) {
+            obj->parent->spec_attr->children[i] = obj->parent->spec_attr->children[i + 1];
+        }
+        obj->parent->spec_attr->child_cnt--;
+        obj->parent->spec_attr->children = lv_mem_realloc(obj->parent->spec_attr->children, obj->parent->spec_attr->child_cnt * sizeof(lv_obj_t *));
+    }
+
+    /*Free the object itself*/
+    lv_mem_free(obj);
+}
+
+
+static lv_obj_tree_walk_res_t walk_core(lv_obj_t * obj, lv_obj_tree_walk_cb_t cb, void * user_data)
+{
+    lv_obj_tree_walk_res_t res = LV_OBJ_TREE_WALK_NEXT;
+
+    if(obj == NULL) {
+        lv_disp_t * disp = lv_disp_get_next(NULL);
+        while(disp) {
+            uint32_t i;
+            for(i = 0; i < disp->screen_cnt; i++) {
+                walk_core(disp->screens[i], cb, user_data);
+            }
+            disp = lv_disp_get_next(disp);
+        }
+        return LV_OBJ_TREE_WALK_END;    /*The value doesn't matter as it wasn't called recursively*/
+    }
+
+    res = cb(obj, user_data);
+
+    if(res == LV_OBJ_TREE_WALK_END) return LV_OBJ_TREE_WALK_END;
+
+    if(res != LV_OBJ_TREE_WALK_SKIP_CHILDREN) {
+        uint32_t i;
+        for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+            res = walk_core(lv_obj_get_child(obj, i), cb, user_data);
+            if(res == LV_OBJ_TREE_WALK_END) return LV_OBJ_TREE_WALK_END;
+        }
+    }
+    return LV_OBJ_TREE_WALK_NEXT;
+}

+ 163 - 0
components/lvgl/src/core/lv_obj_tree.h

@@ -0,0 +1,163 @@
+/**
+ * @file struct _lv_obj_tree.h
+ *
+ */
+
+#ifndef LV_OBJ_TREE_H
+#define LV_OBJ_TREE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include <stddef.h>
+#include <stdbool.h>
+
+/*********************
+ *      DEFINES
+ *********************/
+
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+struct _lv_obj_t;
+struct _lv_obj_class_t;
+
+typedef enum {
+    LV_OBJ_TREE_WALK_NEXT,
+    LV_OBJ_TREE_WALK_SKIP_CHILDREN,
+    LV_OBJ_TREE_WALK_END,
+} lv_obj_tree_walk_res_t;
+
+typedef lv_obj_tree_walk_res_t (*lv_obj_tree_walk_cb_t)(struct _lv_obj_t *, void *);
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Delete an object and all of it's children.
+ * Also remove the objects from their group and remove all animations (if any).
+ * Send `LV_EVENT_DELETED` to deleted objects.
+ * @param obj       pointer to an object
+ */
+void lv_obj_del(struct _lv_obj_t * obj);
+
+/**
+ * Delete all children of an object.
+ * Also remove the objects from their group and remove all animations (if any).
+ * Send `LV_EVENT_DELETED` to deleted objects.
+ * @param obj       pointer to an object
+ */
+void lv_obj_clean(struct _lv_obj_t * obj);
+
+/**
+ * A function to be easily used in animation ready callback to delete an object when the animation is ready
+ * @param a         pointer to the animation
+ */
+void lv_obj_del_anim_ready_cb(lv_anim_t * a);
+
+/**
+ * Helper function for asynchronously deleting objects.
+ * Useful for cases where you can't delete an object directly in an `LV_EVENT_DELETE` handler (i.e. parent).
+ * @param obj       object to delete
+ * @see lv_async_call
+ */
+void lv_obj_del_async(struct _lv_obj_t * obj);
+
+/**
+ * Move the parent of an object. The relative coordinates will be kept.
+ *
+ * @param obj       pointer to an object whose parent needs to be changed
+ * @param parent pointer to the new parent
+ */
+void lv_obj_set_parent(struct _lv_obj_t * obj, struct _lv_obj_t * parent);
+
+/**
+ * Move the object to the foreground.
+ * It will look like if it was created as the last child of its parent.
+ * It also means it can cover any of the siblings.
+ * @param obj       pointer to an object
+ */
+void lv_obj_move_foreground(struct _lv_obj_t * obj);
+
+/**
+ * Move the object to the background.
+ * It will look like if it was created as the first child of its parent.
+ * It also means any of the siblings can cover the object.
+ * @param obj       pointer to an object
+ */
+void lv_obj_move_background(struct _lv_obj_t * obj);
+
+/**
+ * Get the screen of an object
+ * @param obj       pointer to an object
+ * @return          pointer to the obejct's screen
+ */
+struct _lv_obj_t * lv_obj_get_screen(const struct _lv_obj_t * obj);
+
+/**
+ * Get the display of the object
+ * @param obj       pointer to an object
+ * @return          pointer to the obejct's display
+ */
+lv_disp_t * lv_obj_get_disp(const struct _lv_obj_t * obj);
+
+/**
+ * Get the parent of an object
+ * @param obj       pointer to an object
+ * @return          the parent of the object. (NULL if `obj` was a screen)
+ */
+struct _lv_obj_t * lv_obj_get_parent(const struct _lv_obj_t * obj);
+
+/**
+ * Get the child of an object by the child's index.
+ * @param obj       pointer to an object whose child should be get
+ * @param id        the index of the child.
+ *                  0: the oldest (firstly created) child
+ *                  1: the second oldest
+ *                  child count-1: the youngest
+ *                  -1: the youngest
+ *                  -2: the second youngest
+ * @return          pointer to the child or NULL if the index was invalid
+ */
+struct _lv_obj_t * lv_obj_get_child(const struct _lv_obj_t * obj, int32_t id);
+
+/**
+ * Get the number of children
+ * @param obj       pointer to an object
+ * @return          the number of children
+ */
+uint32_t lv_obj_get_child_cnt(const struct _lv_obj_t * obj);
+
+/**
+ * Get the index of a child.
+ * @param obj       pointer to an obejct
+ * @return          the child index of the object.
+ *                  E.g. 0: the oldest (firstly created child)
+ */
+uint32_t lv_obj_get_child_id(const struct _lv_obj_t * obj);
+
+/**
+ * Iterate through all children of any object.
+ * @param start_obj     start integrating from this object
+ * @param cb            call this callback on the objects
+ * @param user_data     pointer to any user related data (will be passed to `cb`)
+ */
+void lv_obj_tree_walk(struct _lv_obj_t * start_obj, lv_obj_tree_walk_cb_t cb, void * user_data);
+
+/**********************
+ *      MACROS
+ **********************/
+
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_OBJ_TREE_H*/

+ 267 - 295
components/lvgl/src/lv_core/lv_refr.c → components/lvgl/src/core/lv_refr.c

@@ -9,25 +9,22 @@
 #include <stddef.h>
 #include "lv_refr.h"
 #include "lv_disp.h"
-#include "../lv_hal/lv_hal_tick.h"
-#include "../lv_hal/lv_hal_disp.h"
-#include "../lv_misc/lv_task.h"
-#include "../lv_misc/lv_mem.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_gc.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_font/lv_font_fmt_txt.h"
-#include "../lv_gpu/lv_gpu_stm32_dma2d.h"
-
-#if LV_USE_PERF_MONITOR
-    #include "../lv_widgets/lv_label.h"
+#include "../hal/lv_hal_tick.h"
+#include "../hal/lv_hal_disp.h"
+#include "../misc/lv_timer.h"
+#include "../misc/lv_mem.h"
+#include "../misc/lv_math.h"
+#include "../misc/lv_gc.h"
+#include "../draw/lv_draw.h"
+#include "../font/lv_font_fmt_txt.h"
+
+#if LV_USE_PERF_MONITOR || LV_USE_MEM_MONITOR
+    #include "../widgets/lv_label.h"
 #endif
 
 /*********************
  *      DEFINES
  *********************/
-/* Draw translucent random colored areas on the invalidated (redrawn) areas*/
-#define MASK_AREA_DEBUG 0
 
 /**********************
  *      TYPEDEFS
@@ -43,7 +40,8 @@ static void lv_refr_area_part(const lv_area_t * area_p);
 static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj);
 static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p);
 static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p);
-static void lv_refr_vdb_flush(void);
+static void draw_buf_flush(void);
+static void call_flush_cb(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p);
 
 /**********************
  *  STATIC VARIABLES
@@ -58,6 +56,11 @@ static lv_disp_t * disp_refr; /*Display being refreshed*/
 /**********************
  *      MACROS
  **********************/
+#if LV_LOG_TRACE_DISP_REFR
+#  define TRACE_REFR(...) LV_LOG_TRACE( __VA_ARGS__)
+#else
+#  define TRACE_REFR(...)
+#endif
 
 /**********************
  *   GLOBAL FUNCTIONS
@@ -73,25 +76,23 @@ void _lv_refr_init(void)
 
 /**
  * Redraw the invalidated areas now.
- * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
- * can prevent the call of `lv_task_handler`. In this case if the GUI is updated in the process
+ * Normally the redrawing is periodically executed in `lv_timer_handler` but a long blocking process
+ * can prevent the call of `lv_timer_handler`. In this case if the GUI is updated in the process
  * (e.g. progress bar) this function can be called when the screen should be updated.
  * @param disp pointer to display to refresh. NULL to refresh all displays.
  */
 void lv_refr_now(lv_disp_t * disp)
 {
-#if LV_USE_ANIMATION
     lv_anim_refr_now();
-#endif
 
     if(disp) {
-        _lv_disp_refr_task(disp->refr_task);
+        _lv_disp_refr_timer(disp->refr_timer);
     }
     else {
         lv_disp_t * d;
         d = lv_disp_get_next(NULL);
         while(d) {
-            _lv_disp_refr_task(d->refr_task);
+            _lv_disp_refr_timer(d->refr_timer);
             d = lv_disp_get_next(d);
         }
     }
@@ -124,28 +125,34 @@ void _lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p)
     bool suc;
 
     suc = _lv_area_intersect(&com_area, area_p, &scr_area);
+    if(suc == false)  return; /*Out of the screen*/
 
-    /*The area is truncated to the screen*/
-    if(suc != false) {
-        if(disp->driver.rounder_cb) disp->driver.rounder_cb(&disp->driver, &com_area);
+    /*If there were at least 1 invalid area in full refresh mode, redraw the whole screen*/
+    if(disp->driver->full_refresh) {
+        disp->inv_areas[0] = scr_area;
+        disp->inv_p = 1;
+        lv_timer_resume(disp->refr_timer);
+        return;
+    }
 
-        /*Save only if this area is not in one of the saved areas*/
-        uint16_t i;
-        for(i = 0; i < disp->inv_p; i++) {
-            if(_lv_area_is_in(&com_area, &disp->inv_areas[i], 0) != false) return;
-        }
+    if(disp->driver->rounder_cb) disp->driver->rounder_cb(disp->driver, &com_area);
 
-        /*Save the area*/
-        if(disp->inv_p < LV_INV_BUF_SIZE) {
-            lv_area_copy(&disp->inv_areas[disp->inv_p], &com_area);
-        }
-        else {   /*If no place for the area add the screen*/
-            disp->inv_p = 0;
-            lv_area_copy(&disp->inv_areas[disp->inv_p], &scr_area);
-        }
-        disp->inv_p++;
-        lv_task_set_prio(disp->refr_task, LV_REFR_TASK_PRIO);
+    /*Save only if this area is not in one of the saved areas*/
+    uint16_t i;
+    for(i = 0; i < disp->inv_p; i++) {
+        if(_lv_area_is_in(&com_area, &disp->inv_areas[i], 0) != false) return;
+    }
+
+    /*Save the area*/
+    if(disp->inv_p < LV_INV_BUF_SIZE) {
+        lv_area_copy(&disp->inv_areas[disp->inv_p], &com_area);
     }
+    else {   /*If no place for the area add the screen*/
+        disp->inv_p = 0;
+        lv_area_copy(&disp->inv_areas[disp->inv_p], &scr_area);
+    }
+    disp->inv_p++;
+    lv_timer_resume(disp->refr_timer);
 }
 
 /**
@@ -170,27 +177,37 @@ void _lv_refr_set_disp_refreshing(lv_disp_t * disp)
 
 /**
  * Called periodically to handle the refreshing
- * @param task pointer to the task itself
+ * @param tmr pointer to the timer itself
  */
-void _lv_disp_refr_task(lv_task_t * task)
+void _lv_disp_refr_timer(lv_timer_t * tmr)
 {
-    LV_LOG_TRACE("lv_refr_task: started");
+    TRACE_REFR("begin");
 
     uint32_t start = lv_tick_get();
     uint32_t elaps = 0;
 
-    disp_refr = task->user_data;
+    disp_refr = tmr->user_data;
 
-#if LV_USE_PERF_MONITOR == 0
-    /* Ensure the task does not run again automatically.
+#if LV_USE_PERF_MONITOR == 0 && LV_USE_MEM_MONITOR == 0
+    /**
+     * Ensure the timer does not run again automatically.
      * This is done before refreshing in case refreshing invalidates something else.
      */
-    lv_task_set_prio(task, LV_TASK_PRIO_OFF);
+    lv_timer_pause(tmr);
 #endif
 
+    /*Refresh the screen's layout if required*/
+    lv_obj_update_layout(disp_refr->act_scr);
+    if(disp_refr->prev_scr) lv_obj_update_layout(disp_refr->prev_scr);
+
+    lv_obj_update_layout(disp_refr->top_layer);
+    lv_obj_update_layout(disp_refr->sys_layer);
+
     /*Do nothing if there is no active screen*/
     if(disp_refr->act_scr == NULL) {
         disp_refr->inv_p = 0;
+        LV_LOG_WARN("there is no active screen");
+        TRACE_REFR("finished");
         return;
     }
 
@@ -200,93 +217,39 @@ void _lv_disp_refr_task(lv_task_t * task)
 
     /*If refresh happened ...*/
     if(disp_refr->inv_p != 0) {
-        /* In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date.
-         * With set_px_cb we don't know anything about the buffer (even it's size) so skip copying.*/
-        if(lv_disp_is_true_double_buf(disp_refr)) {
-            if(disp_refr->driver.set_px_cb) {
-                LV_LOG_WARN("Can't handle 2 screen sized buffers with set_px_cb. Display is not refreshed.");
-            }
-            else {
-                lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
-
-                /*Flush the content of the VDB*/
-                lv_refr_vdb_flush();
-
-                /* With true double buffering the flushing should be only the address change of the
-                 * current frame buffer. Wait until the address change is ready and copy the changed
-                 * content to the other frame buffer (new active VDB) to keep the buffers synchronized*/
-                while(vdb->flushing);
-
-                lv_color_t * copy_buf = NULL;
-#if LV_USE_GPU_STM32_DMA2D
-                LV_UNUSED(copy_buf);
-#else
-                copy_buf = _lv_mem_buf_get(disp_refr->driver.hor_res * sizeof(lv_color_t));
-#endif
-
-                uint8_t * buf_act = (uint8_t *)vdb->buf_act;
-                uint8_t * buf_ina = (uint8_t *)vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1;
-
-                lv_coord_t hres = lv_disp_get_hor_res(disp_refr);
-                uint16_t a;
-                for(a = 0; a < disp_refr->inv_p; a++) {
-                    if(disp_refr->inv_area_joined[a] == 0) {
-                        uint32_t start_offs =
-                            (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t);
-#if LV_USE_GPU_STM32_DMA2D
-                        lv_gpu_stm32_dma2d_copy((lv_color_t *)(buf_act + start_offs), disp_refr->driver.hor_res,
-                                                (lv_color_t *)(buf_ina + start_offs), disp_refr->driver.hor_res,
-                                                lv_area_get_width(&disp_refr->inv_areas[a]),
-                                                lv_area_get_height(&disp_refr->inv_areas[a]));
-#else
-
-                        lv_coord_t y;
-                        uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t);
-
-                        for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) {
-                            /* The frame buffer is probably in an external RAM where sequential access is much faster.
-                             * So first copy a line into a buffer and write it back the ext. RAM */
-                            _lv_memcpy(copy_buf, buf_ina + start_offs, line_length);
-                            _lv_memcpy(buf_act + start_offs, copy_buf, line_length);
-                            start_offs += hres * sizeof(lv_color_t);
-                        }
-#endif
-                    }
-                }
-
-                if(copy_buf) _lv_mem_buf_release(copy_buf);
-            }
-        } /*End of true double buffer handling*/
+        if(disp_refr->driver->full_refresh) {
+            draw_buf_flush();
+        }
 
         /*Clean up*/
-        _lv_memset_00(disp_refr->inv_areas, sizeof(disp_refr->inv_areas));
-        _lv_memset_00(disp_refr->inv_area_joined, sizeof(disp_refr->inv_area_joined));
+        lv_memset_00(disp_refr->inv_areas, sizeof(disp_refr->inv_areas));
+        lv_memset_00(disp_refr->inv_area_joined, sizeof(disp_refr->inv_area_joined));
         disp_refr->inv_p = 0;
 
         elaps = lv_tick_elaps(start);
         /*Call monitor cb if present*/
-        if(disp_refr->driver.monitor_cb) {
-            disp_refr->driver.monitor_cb(&disp_refr->driver, elaps, px_num);
+        if(disp_refr->driver->monitor_cb) {
+            disp_refr->driver->monitor_cb(disp_refr->driver, elaps, px_num);
         }
     }
 
-    _lv_mem_buf_free_all();
+    lv_mem_buf_free_all();
     _lv_font_clean_up_fmt_txt();
 
 #if LV_USE_PERF_MONITOR && LV_USE_LABEL
     static lv_obj_t * perf_label = NULL;
     if(perf_label == NULL) {
-        perf_label = lv_label_create(lv_layer_sys(), NULL);
-        lv_label_set_align(perf_label, LV_LABEL_ALIGN_RIGHT);
-        lv_obj_set_style_local_bg_opa(perf_label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_COVER);
-        lv_obj_set_style_local_bg_color(perf_label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
-        lv_obj_set_style_local_text_color(perf_label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
-        lv_obj_set_style_local_pad_top(perf_label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, 3);
-        lv_obj_set_style_local_pad_bottom(perf_label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, 3);
-        lv_obj_set_style_local_pad_left(perf_label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, 3);
-        lv_obj_set_style_local_pad_right(perf_label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, 3);
+        perf_label = lv_label_create(lv_layer_sys());
+        lv_obj_set_style_bg_opa(perf_label, LV_OPA_50, 0);
+        lv_obj_set_style_bg_color(perf_label, lv_color_black(), 0);
+        lv_obj_set_style_text_color(perf_label, lv_color_white(), 0);
+        lv_obj_set_style_pad_top(perf_label, 3, 0);
+        lv_obj_set_style_pad_bottom(perf_label, 3, 0);
+        lv_obj_set_style_pad_left(perf_label, 3, 0);
+        lv_obj_set_style_pad_right(perf_label, 3, 0);
+        lv_obj_set_style_text_align(perf_label, LV_TEXT_ALIGN_RIGHT, 0);
         lv_label_set_text(perf_label, "?");
-        lv_obj_align(perf_label, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
+        lv_obj_align(perf_label, LV_ALIGN_BOTTOM_RIGHT, 0, 0);
     }
 
     static uint32_t perf_last_time = 0;
@@ -300,7 +263,7 @@ void _lv_disp_refr_task(lv_task_t * task)
     }
     else {
         perf_last_time = lv_tick_get();
-        uint32_t fps_limit = 1000 / disp_refr->refr_task->period;
+        uint32_t fps_limit = 1000 / disp_refr->refr_timer->period;
         uint32_t fps;
 
         if(elaps_sum == 0) elaps_sum = 1;
@@ -312,13 +275,39 @@ void _lv_disp_refr_task(lv_task_t * task)
 
         fps_sum_all += fps;
         fps_sum_cnt ++;
-        uint32_t cpu = 100 - lv_task_get_idle();
+        uint32_t cpu = 100 - lv_timer_get_idle();
         lv_label_set_text_fmt(perf_label, "%d FPS\n%d%% CPU", fps, cpu);
-        lv_obj_align(perf_label, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
     }
 #endif
 
-    LV_LOG_TRACE("lv_refr_task: ready");
+#if LV_USE_MEM_MONITOR && LV_MEM_CUSTOM == 0 && LV_USE_LABEL
+    static lv_obj_t * mem_label = NULL;
+    if(mem_label == NULL) {
+        mem_label = lv_label_create(lv_layer_sys());
+        lv_obj_set_style_bg_opa(mem_label, LV_OPA_50, 0);
+        lv_obj_set_style_bg_color(mem_label, lv_color_black(), 0);
+        lv_obj_set_style_text_color(mem_label, lv_color_white(), 0);
+        lv_obj_set_style_pad_top(mem_label, 3, 0);
+        lv_obj_set_style_pad_bottom(mem_label, 3, 0);
+        lv_obj_set_style_pad_left(mem_label, 3, 0);
+        lv_obj_set_style_pad_right(mem_label, 3, 0);
+        lv_label_set_text(mem_label, "?");
+        lv_obj_align(mem_label, LV_ALIGN_BOTTOM_LEFT, 0, 0);
+    }
+
+    static uint32_t mem_last_time = 0;
+    if(lv_tick_elaps(mem_last_time) > 300) {
+        mem_last_time = lv_tick_get();
+        lv_mem_monitor_t mon;
+        lv_mem_monitor(&mon);
+        uint32_t used_size = mon.total_size - mon.free_size;;
+        uint32_t used_kb = used_size / 1024;
+        uint32_t used_kb_tenth = (used_size - (used_kb * 1024)) / 102;
+        lv_label_set_text_fmt(mem_label, "%d.%d kB used (%d %%)\n%d%% frag.", used_kb,  used_kb_tenth, mon.used_pct, mon.frag_pct);
+    }
+#endif
+
+    TRACE_REFR("finished");
 }
 
 #if LV_USE_PERF_MONITOR
@@ -388,15 +377,15 @@ static void lv_refr_areas(void)
         }
     }
 
-    disp_refr->driver.buffer->last_area = 0;
-    disp_refr->driver.buffer->last_part = 0;
+    disp_refr->driver->draw_buf->last_area = 0;
+    disp_refr->driver->draw_buf->last_part = 0;
 
     for(i = 0; i < disp_refr->inv_p; i++) {
         /*Refresh the unjoined areas*/
         if(disp_refr->inv_area_joined[i] == 0) {
 
-            if(i == last_i) disp_refr->driver.buffer->last_area = 1;
-            disp_refr->driver.buffer->last_part = 0;
+            if(i == last_i) disp_refr->driver->draw_buf->last_area = 1;
+            disp_refr->driver->draw_buf->last_part = 0;
             lv_refr_area(&disp_refr->inv_areas[i]);
 
             px_num += lv_area_get_size(&disp_refr->inv_areas[i]);
@@ -406,36 +395,35 @@ static void lv_refr_areas(void)
 
 /**
  * Refresh an area if there is Virtual Display Buffer
- * @param area_p pointer to an area to refresh
+ * @param area_p  pointer to an area to refresh
  */
 static void lv_refr_area(const lv_area_t * area_p)
 {
-    /*True double buffering: there are two screen sized buffers. Just redraw directly into a
-     * buffer*/
-    if(lv_disp_is_true_double_buf(disp_refr)) {
-        lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
-        vdb->area.x1        = 0;
-        vdb->area.x2        = lv_disp_get_hor_res(disp_refr) - 1;
-        vdb->area.y1        = 0;
-        vdb->area.y2        = lv_disp_get_ver_res(disp_refr) - 1;
-        disp_refr->driver.buffer->last_part = 1;
+    /*With full refresh just redraw directly into the buffer*/
+    if(disp_refr->driver->full_refresh) {
+        lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
+        draw_buf->area.x1        = 0;
+        draw_buf->area.x2        = lv_disp_get_hor_res(disp_refr) - 1;
+        draw_buf->area.y1        = 0;
+        draw_buf->area.y2        = lv_disp_get_ver_res(disp_refr) - 1;
+        disp_refr->driver->draw_buf->last_part = 1;
         lv_refr_area_part(area_p);
     }
-    /*The buffer is smaller: refresh the area in parts*/
+    /*Normal refresh: draw the area in parts*/
     else {
-        lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
+        lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
         /*Calculate the max row num*/
         lv_coord_t w = lv_area_get_width(area_p);
         lv_coord_t h = lv_area_get_height(area_p);
         lv_coord_t y2 =
             area_p->y2 >= lv_disp_get_ver_res(disp_refr) ? lv_disp_get_ver_res(disp_refr) - 1 : area_p->y2;
 
-        int32_t max_row = (uint32_t)vdb->size / w;
+        int32_t max_row = (uint32_t)draw_buf->size / w;
 
         if(max_row > h) max_row = h;
 
-        /*Round down the lines of VDB if rounding is added*/
-        if(disp_refr->driver.rounder_cb) {
+        /*Round down the lines of draw_buf if rounding is added*/
+        if(disp_refr->driver->rounder_cb) {
             lv_area_t tmp;
             tmp.x1 = 0;
             tmp.x2 = 0;
@@ -444,7 +432,7 @@ static void lv_refr_area(const lv_area_t * area_p)
             lv_coord_t h_tmp = max_row;
             do {
                 tmp.y2 = h_tmp - 1;
-                disp_refr->driver.rounder_cb(&disp_refr->driver, &tmp);
+                disp_refr->driver->rounder_cb(disp_refr->driver, &tmp);
 
                 /*If this height fits into `max_row` then fine*/
                 if(lv_area_get_height(&tmp) <= max_row) break;
@@ -454,8 +442,8 @@ static void lv_refr_area(const lv_area_t * area_p)
             } while(h_tmp > 0);
 
             if(h_tmp <= 0) {
-                LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to "
-                            "small VDB)");
+                LV_LOG_WARN("Can't set draw_buf height using the round function. (Wrong round_cb or to "
+                            "small draw_buf)");
                 return;
             }
             else {
@@ -467,26 +455,26 @@ static void lv_refr_area(const lv_area_t * area_p)
         lv_coord_t row;
         lv_coord_t row_last = 0;
         for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) {
-            /*Calc. the next y coordinates of VDB*/
-            vdb->area.x1 = area_p->x1;
-            vdb->area.x2 = area_p->x2;
-            vdb->area.y1 = row;
-            vdb->area.y2 = row + max_row - 1;
-            if(vdb->area.y2 > y2) vdb->area.y2 = y2;
-            row_last = vdb->area.y2;
-            if(y2 == row_last) disp_refr->driver.buffer->last_part = 1;
+            /*Calc. the next y coordinates of draw_buf*/
+            draw_buf->area.x1 = area_p->x1;
+            draw_buf->area.x2 = area_p->x2;
+            draw_buf->area.y1 = row;
+            draw_buf->area.y2 = row + max_row - 1;
+            if(draw_buf->area.y2 > y2) draw_buf->area.y2 = y2;
+            row_last = draw_buf->area.y2;
+            if(y2 == row_last) disp_refr->driver->draw_buf->last_part = 1;
             lv_refr_area_part(area_p);
         }
 
         /*If the last y coordinates are not handled yet ...*/
         if(y2 != row_last) {
-            /*Calc. the next y coordinates of VDB*/
-            vdb->area.x1 = area_p->x1;
-            vdb->area.x2 = area_p->x2;
-            vdb->area.y1 = row;
-            vdb->area.y2 = y2;
+            /*Calc. the next y coordinates of draw_buf*/
+            draw_buf->area.x1 = area_p->x1;
+            draw_buf->area.x2 = area_p->x2;
+            draw_buf->area.y1 = row;
+            draw_buf->area.y2 = y2;
 
-            disp_refr->driver.buffer->last_part = 1;
+            disp_refr->driver->draw_buf->last_part = 1;
             lv_refr_area_part(area_p);
         }
     }
@@ -498,23 +486,19 @@ static void lv_refr_area(const lv_area_t * area_p)
  */
 static void lv_refr_area_part(const lv_area_t * area_p)
 {
-    lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
+    lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
 
-    /*In non double buffered mode, before rendering the next part wait until the previous image is
-     * flushed*/
-    if(lv_disp_is_double_buf(disp_refr) == false) {
-        while(vdb->flushing) {
-            if(disp_refr->driver.wait_cb) disp_refr->driver.wait_cb(&disp_refr->driver);
-        }
+    while(draw_buf->flushing) {
+        if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver);
     }
 
     lv_obj_t * top_act_scr = NULL;
     lv_obj_t * top_prev_scr = NULL;
 
-    /*Get the new mask from the original area and the act. VDB
+    /*Get the new mask from the original area and the act. draw_buf
      It will be a part of 'area_p'*/
     lv_area_t start_mask;
-    _lv_area_intersect(&start_mask, area_p, &vdb->area);
+    _lv_area_intersect(&start_mask, area_p, &draw_buf->area);
 
     /*Get the most top object which is not covered by others*/
     top_act_scr = lv_refr_get_top_obj(&start_mask, lv_disp_get_scr_act(disp_refr));
@@ -570,10 +554,10 @@ static void lv_refr_area_part(const lv_area_t * area_p)
     lv_refr_obj_and_children(lv_disp_get_layer_top(disp_refr), &start_mask);
     lv_refr_obj_and_children(lv_disp_get_layer_sys(disp_refr), &start_mask);
 
-    /* In true double buffered mode flush only once when all areas were rendered.
-     * In normal mode flush after every area */
-    if(lv_disp_is_true_double_buf(disp_refr) == false) {
-        lv_refr_vdb_flush();
+    /*In true double buffered mode flush only once when all areas were rendered.
+     *In normal mode flush after every area*/
+    if(disp_refr->driver->full_refresh == false) {
+        draw_buf_flush();
     }
 }
 
@@ -587,20 +571,18 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
 {
     lv_obj_t * found_p = NULL;
 
-    /*If this object is fully cover the draw area check the children too */
-    if(_lv_area_is_in(area_p, &obj->coords, 0) && obj->hidden == 0) {
-        lv_design_res_t design_res = obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK);
-        if(design_res == LV_DESIGN_RES_MASKED) return NULL;
+    /*If this object is fully cover the draw area check the children too*/
+    if(_lv_area_is_in(area_p, &obj->coords, 0) && lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN) == false) {
+        lv_cover_check_info_t info;
+        info.res = LV_COVER_RES_COVER;
+        info.area = area_p;
+        lv_event_send(obj, LV_EVENT_COVER_CHECK, &info);
+        if(info.res == LV_COVER_RES_MASKED) return NULL;
 
-#if LV_USE_OPA_SCALE
-        if(design_res == LV_DESIGN_RES_COVER && lv_obj_get_style_opa_scale(obj, LV_OBJ_PART_MAIN) != LV_OPA_COVER) {
-            design_res = LV_DESIGN_RES_NOT_COVER;
-        }
-#endif
-
-        lv_obj_t * i;
-        _LV_LL_READ(obj->child_ll, i) {
-            found_p = lv_refr_get_top_obj(area_p, i);
+        uint32_t i;
+        for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+            lv_obj_t * child = lv_obj_get_child(obj, i);
+            found_p = lv_refr_get_top_obj(area_p, child);
 
             /*If a children is ok then break*/
             if(found_p != NULL) {
@@ -610,7 +592,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
 
         /*If no better children use this object*/
         if(found_p == NULL) {
-            if(design_res == LV_DESIGN_RES_COVER) {
+            if(info.res == LV_COVER_RES_COVER) {
                 found_p = obj;
             }
         }
@@ -626,16 +608,16 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
  */
 static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
 {
-    /* Normally always will be a top_obj (at least the screen)
-     * but in special cases (e.g. if the screen has alpha) it won't.
-     * In this case use the screen directly */
+    /*Normally always will be a top_obj (at least the screen)
+     *but in special cases (e.g. if the screen has alpha) it won't.
+     *In this case use the screen directly*/
     if(top_p == NULL) top_p = lv_disp_get_scr_act(disp_refr);
     if(top_p == NULL) return;  /*Shouldn't happen*/
 
     /*Refresh the top object and its children*/
     lv_refr_obj(top_p, mask_p);
 
-    /*Draw the 'younger' sibling objects because they can be on top_obj */
+    /*Draw the 'younger' sibling objects because they can be on top_obj*/
     lv_obj_t * par;
     lv_obj_t * border_p = top_p;
 
@@ -643,19 +625,24 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
 
     /*Do until not reach the screen*/
     while(par != NULL) {
-        /*object before border_p has to be redrawn*/
-        lv_obj_t * i = _lv_ll_get_prev(&(par->child_ll), border_p);
-
-        while(i != NULL) {
-            /*Refresh the objects*/
-            lv_refr_obj(i, mask_p);
-            i = _lv_ll_get_prev(&(par->child_ll), i);
+        bool go = false;
+        uint32_t i;
+        for(i = 0; i < lv_obj_get_child_cnt(par); i++) {
+            lv_obj_t * child = lv_obj_get_child(par, i);
+            if(!go) {
+                if(child == border_p) go = true;
+            } else {
+                /*Refresh the objects*/
+                lv_refr_obj(child, mask_p);
+            }
         }
 
-        /*Call the post draw design function of the parents of the to object*/
-        if(par->design_cb) par->design_cb(par, mask_p, LV_DESIGN_DRAW_POST);
+        /*Call the post draw draw function of the parents of the to object*/
+        lv_event_send(par, LV_EVENT_DRAW_POST_BEGIN, (void*)mask_p);
+        lv_event_send(par, LV_EVENT_DRAW_POST, (void*)mask_p);
+        lv_event_send(par, LV_EVENT_DRAW_POST_END, (void*)mask_p);
 
-        /*The new border will be there last parents,
+        /*The new border will be the last parents,
          *so the 'younger' brothers of parent will be refreshed*/
         border_p = par;
         /*Go a level deeper*/
@@ -671,15 +658,15 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
 static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
 {
     /*Do not refresh hidden objects*/
-    if(obj->hidden != 0) return;
+    if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) return;
 
-    bool union_ok; /* Store the return value of area_union */
-    /* Truncate the original mask to the coordinates of the parent
-     * because the parent and its children are visible only here */
+    bool union_ok; /*Store the return value of area_union*/
+    /*Truncate the original mask to the coordinates of the parent
+     *because the parent and its children are visible only here*/
     lv_area_t obj_mask;
     lv_area_t obj_ext_mask;
     lv_area_t obj_area;
-    lv_coord_t ext_size = obj->ext_draw_pad;
+    lv_coord_t ext_size = _lv_obj_get_ext_draw_size(obj);
     lv_obj_get_coords(obj, &obj_area);
     obj_area.x1 -= ext_size;
     obj_area.y1 -= ext_size;
@@ -689,64 +676,61 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
 
     /*Draw the parent and its children only if they ore on 'mask_parent'*/
     if(union_ok != false) {
+        /*Redraw the object*/
+        lv_event_send(obj, LV_EVENT_DRAW_MAIN_BEGIN, &obj_ext_mask);
+        lv_event_send(obj, LV_EVENT_DRAW_MAIN, &obj_ext_mask);
+        lv_event_send(obj, LV_EVENT_DRAW_MAIN_END, &obj_ext_mask);
 
-        /* Redraw the object */
-        if(obj->design_cb) obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);
-
-#if MASK_AREA_DEBUG
-        static lv_color_t debug_color = LV_COLOR_RED;
+#if LV_USE_REFR_DEBUG
+        lv_color_t debug_color = lv_color_make(lv_rand(0, 0xFF), lv_rand(0, 0xFF), lv_rand(0, 0xFF));
         lv_draw_rect_dsc_t draw_dsc;
         lv_draw_rect_dsc_init(&draw_dsc);
         draw_dsc.bg_color.full = debug_color.full;
         draw_dsc.bg_opa = LV_OPA_20;
-        draw_dsc.border_width = 2;
-        draw_dsc.border_opa = LV_OPA_50;
-        draw_dsc.border_color.full = (debug_color.full + 0x13) * 9;
-
+        draw_dsc.border_width = 1;
+        draw_dsc.border_opa = LV_OPA_30;
+        draw_dsc.border_color = debug_color;
         lv_draw_rect(&obj_ext_mask, &obj_ext_mask, &draw_dsc);
-        debug_color.full *= 17;
-        debug_color.full += 0xA1;
-#if LV_COLOR_DEPTH == 32
-        debug_color.ch.alpha = 0xff;
-#endif
 #endif
         /*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/
         lv_obj_get_coords(obj, &obj_area);
         union_ok = _lv_area_intersect(&obj_mask, mask_ori_p, &obj_area);
         if(union_ok != false) {
             lv_area_t mask_child; /*Mask from obj and its child*/
-            lv_obj_t * child_p;
             lv_area_t child_area;
-            _LV_LL_READ_BACK(obj->child_ll, child_p) {
-                lv_obj_get_coords(child_p, &child_area);
-                ext_size = child_p->ext_draw_pad;
+            uint32_t i;
+            for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
+                lv_obj_t * child = lv_obj_get_child(obj, i);
+                lv_obj_get_coords(child, &child_area);
+                ext_size = _lv_obj_get_ext_draw_size(child);
                 child_area.x1 -= ext_size;
                 child_area.y1 -= ext_size;
                 child_area.x2 += ext_size;
                 child_area.y2 += ext_size;
-                /* Get the union (common parts) of original mask (from obj)
-                 * and its child */
+                /*Get the union (common parts) of original mask (from obj)
+                 *and its child*/
                 union_ok = _lv_area_intersect(&mask_child, &obj_mask, &child_area);
 
-                /*If the parent and the child has common area then refresh the child */
+                /*If the parent and the child has common area then refresh the child*/
                 if(union_ok) {
                     /*Refresh the next children*/
-                    lv_refr_obj(child_p, &mask_child);
+                    lv_refr_obj(child, &mask_child);
                 }
             }
         }
 
-        /* If all the children are redrawn make 'post draw' design */
-        if(obj->design_cb) obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST);
+        /*If all the children are redrawn make 'post draw' draw*/
+        lv_event_send(obj, LV_EVENT_DRAW_POST_BEGIN, &obj_ext_mask);
+        lv_event_send(obj, LV_EVENT_DRAW_POST, &obj_ext_mask);
+        lv_event_send(obj, LV_EVENT_DRAW_POST_END, &obj_ext_mask);
     }
 }
 
-static void lv_refr_vdb_rotate_180(lv_disp_drv_t * drv, lv_area_t * area, lv_color_t * color_p)
-{
+static void draw_buf_rotate_180(lv_disp_drv_t *drv, lv_area_t *area, lv_color_t *color_p) {
     lv_coord_t area_w = lv_area_get_width(area);
     lv_coord_t area_h = lv_area_get_height(area);
     uint32_t total = area_w * area_h;
-    /* Swap the beginning and end values */
+    /*Swap the beginning and end values*/
     lv_color_t tmp;
     uint32_t i = total - 1, j = 0;
     while(i > j) {
@@ -765,9 +749,7 @@ static void lv_refr_vdb_rotate_180(lv_disp_drv_t * drv, lv_area_t * area, lv_col
     area->x1 = drv->hor_res - tmp_coord - 1;
 }
 
-static LV_ATTRIBUTE_FAST_MEM void lv_refr_vdb_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h,
-                                                        lv_color_t * orig_color_p, lv_color_t * rot_buf)
-{
+static LV_ATTRIBUTE_FAST_MEM void draw_buf_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h, lv_color_t *orig_color_p, lv_color_t *rot_buf) {
 
     uint32_t invert = (area_w * area_h) - 1;
     uint32_t initial_i = ((area_w - 1) * area_h);
@@ -786,10 +768,9 @@ static LV_ATTRIBUTE_FAST_MEM void lv_refr_vdb_rotate_90(bool invert_i, lv_coord_
 }
 
 /**
- * Helper function for lv_refr_vdb_rotate_90_sqr. Given a list of four numbers, rotate the entire list to the left.
+ * Helper function for draw_buf_rotate_90_sqr. Given a list of four numbers, rotate the entire list to the left.
  */
-static inline void lv_vdb_rotate4(lv_color_t * a, lv_color_t * b, lv_color_t * c, lv_color_t * d)
-{
+static inline void draw_buf_rotate4(lv_color_t *a, lv_color_t *b, lv_color_t * c, lv_color_t * d) {
     lv_color_t tmp;
     tmp = *a;
     *a = *b;
@@ -802,22 +783,20 @@ static inline void lv_vdb_rotate4(lv_color_t * a, lv_color_t * b, lv_color_t * c
  * Rotate a square image 90/270 degrees in place.
  * @note inspired by https://stackoverflow.com/a/43694906
  */
-static void lv_refr_vdb_rotate_90_sqr(bool is_270, lv_coord_t w, lv_color_t * color_p)
-{
-    for(lv_coord_t i = 0; i < w / 2; i++) {
-        for(lv_coord_t j = 0; j < (w + 1) / 2; j++) {
+static void draw_buf_rotate_90_sqr(bool is_270, lv_coord_t w, lv_color_t * color_p) {
+    for(lv_coord_t i = 0; i < w/2; i++) {
+        for(lv_coord_t j = 0; j < (w + 1)/2; j++) {
             lv_coord_t inv_i = (w - 1) - i;
             lv_coord_t inv_j = (w - 1) - j;
             if(is_270) {
-                lv_vdb_rotate4(
+                draw_buf_rotate4(
                     &color_p[i * w + j],
                     &color_p[inv_j * w + i],
                     &color_p[inv_i * w + inv_j],
                     &color_p[j * w + inv_i]
                 );
-            }
-            else {
-                lv_vdb_rotate4(
+            } else {
+                draw_buf_rotate4(
                     &color_p[i * w + j],
                     &color_p[j * w + inv_i],
                     &color_p[inv_i * w + inv_j],
@@ -830,27 +809,25 @@ static void lv_refr_vdb_rotate_90_sqr(bool is_270, lv_coord_t w, lv_color_t * co
 }
 
 /**
- * Rotate the VDB to the display's native orientation.
+ * Rotate the draw_buf to the display's native orientation.
  */
-static void lv_refr_vdb_rotate(lv_area_t * area, lv_color_t * color_p)
-{
-    lv_disp_drv_t * drv = &disp_refr->driver;
-    if(lv_disp_is_true_double_buf(disp_refr) && drv->sw_rotate) {
-        LV_LOG_ERROR("cannot rotate a true double-buffered display!");
+static void draw_buf_rotate(lv_area_t *area, lv_color_t *color_p) {
+    lv_disp_drv_t * drv = disp_refr->driver;
+    if(disp_refr->driver->full_refresh && drv->sw_rotate) {
+        LV_LOG_ERROR("cannot rotate a full refreshed display!");
         return;
     }
     if(drv->rotated == LV_DISP_ROT_180) {
-        lv_refr_vdb_rotate_180(drv, area, color_p);
-        drv->flush_cb(drv, area, color_p);
-    }
-    else if(drv->rotated == LV_DISP_ROT_90 || drv->rotated == LV_DISP_ROT_270) {
-        /*Allocate a temporary buffer to store rotated image */
+        draw_buf_rotate_180(drv, area, color_p);
+        call_flush_cb(drv, area, color_p);
+    } else if(drv->rotated == LV_DISP_ROT_90 || drv->rotated == LV_DISP_ROT_270) {
+        /*Allocate a temporary buffer to store rotated image*/
         lv_color_t * rot_buf = NULL;
-        lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
+        lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
         lv_coord_t area_w = lv_area_get_width(area);
         lv_coord_t area_h = lv_area_get_height(area);
         /*Determine the maximum number of rows that can be rotated at a time*/
-        lv_coord_t max_row = LV_MATH_MIN((lv_coord_t)((LV_DISP_ROT_MAX_BUF / sizeof(lv_color_t)) / area_w), area_h);
+        lv_coord_t max_row = LV_MIN((lv_coord_t)((LV_DISP_ROT_MAX_BUF/sizeof(lv_color_t)) / area_w), area_h);
         lv_coord_t init_y_off;
         init_y_off = area->y1;
         if(drv->rotated == LV_DISP_ROT_90) {
@@ -861,16 +838,16 @@ static void lv_refr_vdb_rotate(lv_area_t * area, lv_color_t * color_p)
             area->y1 = area->x1;
             area->y2 = area->y1 + area_w - 1;
         }
-        vdb->flushing = 0;
+        draw_buf->flushing = 0;
         /*Rotate the screen in chunks, flushing after each one*/
         lv_coord_t row = 0;
         while(row < area_h) {
-            lv_coord_t height = LV_MATH_MIN(max_row, area_h - row);
-            vdb->flushing = 1;
+            lv_coord_t height = LV_MIN(max_row, area_h-row);
+            draw_buf->flushing = 1;
             if((row == 0) && (area_h >= area_w)) {
                 /*Rotate the initial area as a square*/
                 height = area_w;
-                lv_refr_vdb_rotate_90_sqr(drv->rotated == LV_DISP_ROT_270, area_w, color_p);
+                draw_buf_rotate_90_sqr(drv->rotated == LV_DISP_ROT_270, area_w, color_p);
                 if(drv->rotated == LV_DISP_ROT_90) {
                     area->x1 = init_y_off;
                     area->x2 = init_y_off + area_w - 1;
@@ -882,9 +859,8 @@ static void lv_refr_vdb_rotate(lv_area_t * area, lv_color_t * color_p)
             }
             else {
                 /*Rotate other areas using a maximum buffer size*/
-                if(rot_buf == NULL)
-                    rot_buf = _lv_mem_buf_get(LV_DISP_ROT_MAX_BUF);
-                lv_refr_vdb_rotate_90(drv->rotated == LV_DISP_ROT_270, area_w, height, color_p, rot_buf);
+                if(rot_buf == NULL) rot_buf = lv_mem_buf_get(LV_DISP_ROT_MAX_BUF);
+                draw_buf_rotate_90(drv->rotated == LV_DISP_ROT_270, area_w, height, color_p, rot_buf);
 
                 if(drv->rotated == LV_DISP_ROT_90) {
                     area->x1 = init_y_off + row;
@@ -896,58 +872,54 @@ static void lv_refr_vdb_rotate(lv_area_t * area, lv_color_t * color_p)
                 }
             }
             /*Flush the completed area to the display*/
-            drv->flush_cb(drv, area, rot_buf == NULL ? color_p : rot_buf);
+            call_flush_cb(drv, area, rot_buf == NULL ? color_p : rot_buf);
             /*FIXME: Rotation forces legacy behavior where rendering and flushing are done serially*/
-            while(vdb->flushing) {
+            while(draw_buf->flushing) {
                 if(drv->wait_cb) drv->wait_cb(drv);
             }
             color_p += area_w * height;
             row += height;
         }
         /*Free the allocated buffer at the end if necessary*/
-        if(rot_buf != NULL)
-            _lv_mem_buf_release(rot_buf);
+        if(rot_buf != NULL) lv_mem_buf_release(rot_buf);
     }
 }
 
 /**
- * Flush the content of the VDB
+ * Flush the content of the draw buffer
  */
-static void lv_refr_vdb_flush(void)
+static void draw_buf_flush(void)
 {
-    lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
-    lv_color_t * color_p = vdb->buf_act;
-
-    /*In double buffered mode wait until the other buffer is flushed before flushing the current
-     * one*/
-    if(lv_disp_is_double_buf(disp_refr)) {
-        while(vdb->flushing) {
-            if(disp_refr->driver.wait_cb) disp_refr->driver.wait_cb(&disp_refr->driver);
-        }
-    }
+    lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
+    lv_color_t * color_p = draw_buf->buf_act;
 
-    vdb->flushing = 1;
+    draw_buf->flushing = 1;
 
-    if(disp_refr->driver.buffer->last_area && disp_refr->driver.buffer->last_part) vdb->flushing_last = 1;
-    else vdb->flushing_last = 0;
+    if(disp_refr->driver->draw_buf->last_area && disp_refr->driver->draw_buf->last_part) draw_buf->flushing_last = 1;
+    else draw_buf->flushing_last = 0;
 
     /*Flush the rendered content to the display*/
     lv_disp_t * disp = _lv_refr_get_disp_refreshing();
-    if(disp->driver.gpu_wait_cb) disp->driver.gpu_wait_cb(&disp->driver);
+    if(disp->driver->gpu_wait_cb) disp->driver->gpu_wait_cb(disp->driver);
 
-    if(disp->driver.flush_cb) {
+    if(disp->driver->flush_cb) {
         /*Rotate the buffer to the display's native orientation if necessary*/
-        if(disp->driver.rotated != LV_DISP_ROT_NONE && disp->driver.sw_rotate) {
-            lv_refr_vdb_rotate(&vdb->area, vdb->buf_act);
-        }
-        else {
-            disp->driver.flush_cb(&disp->driver, &vdb->area, color_p);
+        if(disp->driver->rotated != LV_DISP_ROT_NONE && disp->driver->sw_rotate) {
+            draw_buf_rotate(&draw_buf->area, draw_buf->buf_act);
+        } else {
+            call_flush_cb(disp->driver, &draw_buf->area, color_p);
         }
     }
-    if(vdb->buf1 && vdb->buf2) {
-        if(vdb->buf_act == vdb->buf1)
-            vdb->buf_act = vdb->buf2;
+    if(draw_buf->buf1 && draw_buf->buf2) {
+        if(draw_buf->buf_act == draw_buf->buf1)
+            draw_buf->buf_act = draw_buf->buf2;
         else
-            vdb->buf_act = vdb->buf1;
+            draw_buf->buf_act = draw_buf->buf1;
     }
 }
+
+static void call_flush_cb(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p)
+{
+    TRACE_REFR("Calling flush_cb on (%d;%d)(%d;%d) area with %p image pointer", area->x1, area->y1, area->x2, area->y2, color_p);
+    drv->flush_cb(drv, area, color_p);
+}

+ 5 - 5
components/lvgl/src/lv_core/lv_refr.h → components/lvgl/src/core/lv_refr.h

@@ -49,8 +49,8 @@ void _lv_refr_init(void);
 
 /**
  * Redraw the invalidated areas now.
- * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
- * can prevent the call of `lv_task_handler`. In this case if the GUI is updated in the process
+ * Normally the redrawing is periodically executed in `lv_timer_handler` but a long blocking process
+ * can prevent the call of `lv_timer_handler`. In this case if the GUI is updated in the process
  * (e.g. progress bar) this function can be called when the screen should be updated.
  * @param disp pointer to display to refresh. NULL to refresh all displays.
  */
@@ -88,16 +88,16 @@ uint32_t lv_refr_get_fps_avg(void);
 
 /**
  * Called periodically to handle the refreshing
- * @param task pointer to the task itself
+ * @param timer pointer to the timer itself
  */
-void _lv_disp_refr_task(lv_task_t * task);
+void _lv_disp_refr_timer(lv_timer_t * timer);
 
 /**********************
  *   STATIC FUNCTIONS
  **********************/
 
 #ifdef __cplusplus
-} /* extern "C" */
+} /*extern "C"*/
 #endif
 
 #endif /*LV_REFR_H*/

+ 118 - 0
components/lvgl/src/core/lv_theme.c

@@ -0,0 +1,118 @@
+/**
+ * @file lv_theme.c
+ *
+ */
+
+/*********************
+ *      INCLUDES
+ *********************/
+#include "../../lvgl.h"
+
+/*********************
+ *      DEFINES
+ *********************/
+
+/**********************
+ *      TYPEDEFS
+ **********************/
+
+/**********************
+ *  STATIC PROTOTYPES
+ **********************/
+static void apply_theme(lv_theme_t * th, lv_obj_t * obj);
+
+/**********************
+ *  STATIC VARIABLES
+ **********************/
+
+/**********************
+ *      MACROS
+ **********************/
+
+/**********************
+ *   GLOBAL FUNCTIONS
+ **********************/
+
+lv_theme_t *  lv_theme_get_from_obj(lv_obj_t * obj)
+{
+    lv_disp_t * disp = obj ? lv_obj_get_disp(obj) : lv_disp_get_default();
+    return lv_disp_get_theme(disp);
+}
+
+/**
+ * Apply the active theme on an object
+ * @param obj pointer to an object
+ * @param name the name of the theme element to apply. E.g. `LV_THEME_BTN`
+ */
+void lv_theme_apply(lv_obj_t * obj)
+{
+    lv_theme_t * th = lv_theme_get_from_obj(obj);
+    if(th == NULL) return;
+
+    lv_obj_remove_style_all(obj);
+
+    apply_theme(th, obj);    /*Apply the theme including the base theme(s)*/
+}
+
+/**
+ * Set a base theme for a theme.
+ * The styles from the base them will be added before the styles of the current theme.
+ * Arbitrary long chain of themes can be created by setting base themes.
+ * @param new_theme pointer to theme which base should be set
+ * @param base pointer to the base theme
+ */
+void lv_theme_set_parent(lv_theme_t * new_theme, lv_theme_t * base)
+{
+    new_theme->parent = base;
+}
+
+/**
+ * Set a callback for a theme.
+ * The callback is used to add styles to different objects
+ * @param theme pointer to theme which callback should be set
+ * @param cb pointer to the callback
+ */
+void lv_theme_set_apply_cb(lv_theme_t * theme, lv_theme_apply_cb_t apply_cb)
+{
+    theme->apply_cb = apply_cb;
+}
+
+const lv_font_t * lv_theme_get_font_small(lv_obj_t * obj)
+{
+    lv_theme_t * th = lv_theme_get_from_obj(obj);
+    return th ? th->font_small : LV_FONT_DEFAULT;
+}
+
+const lv_font_t * lv_theme_get_font_normal(lv_obj_t * obj)
+{
+    lv_theme_t * th = lv_theme_get_from_obj(obj);
+    return th ? th->font_normal : LV_FONT_DEFAULT;
+}
+
+const lv_font_t * lv_theme_get_font_large(lv_obj_t * obj)
+{
+    lv_theme_t * th = lv_theme_get_from_obj(obj);
+    return th ? th->font_large : LV_FONT_DEFAULT;
+}
+
+lv_color_t lv_theme_get_color_primary(lv_obj_t * obj)
+{
+    lv_theme_t * th = lv_theme_get_from_obj(obj);
+    return th ? th->color_primary : lv_palette_main(LV_PALETTE_BLUE_GREY);
+}
+
+lv_color_t lv_theme_get_color_secondary(lv_obj_t * obj)
+{
+    lv_theme_t * th = lv_theme_get_from_obj(obj);
+    return th ? th->color_secondary : lv_palette_main(LV_PALETTE_BLUE);
+}
+
+/**********************
+ *   STATIC FUNCTIONS
+ **********************/
+
+static void apply_theme(lv_theme_t * th, lv_obj_t * obj)
+{
+    if(th->parent) apply_theme(th->parent, obj);
+    if(th->apply_cb) th->apply_cb(th, obj);
+}

+ 115 - 0
components/lvgl/src/core/lv_theme.h

@@ -0,0 +1,115 @@
+/**
+ *@file lv_theme.h
+ *
+ */
+
+#ifndef LV_THEME_H
+#define LV_THEME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ *    INCLUDES
+ *********************/
+#include "../core/lv_obj.h"
+
+/*********************
+ *    DEFINES
+ *********************/
+
+/**********************
+ *    TYPEDEFS
+ **********************/
+
+struct _lv_theme_t;
+struct _lv_disp_t;
+
+typedef void (*lv_theme_apply_cb_t)(struct _lv_theme_t *, lv_obj_t *);
+
+typedef struct _lv_theme_t {
+    lv_theme_apply_cb_t apply_cb;
+    struct _lv_theme_t * parent;    /**< Apply the current theme's style on top of this theme.*/
+    void * user_data;
+    struct _lv_disp_t * disp;
+    lv_color_t color_primary;
+    lv_color_t color_secondary;
+    const lv_font_t * font_small;
+    const lv_font_t * font_normal;
+    const lv_font_t * font_large;
+    uint32_t flags;                 /*Any custom flag used by the theme*/
+} lv_theme_t;
+
+/**********************
+ *  GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Get the theme assigned to the display of the object
+ * @param obj       pointer to object
+ * @return          the theme of the object's display (can be NULL)
+ */
+lv_theme_t *  lv_theme_get_from_obj(lv_obj_t * obj);
+
+/**
+ * Apply the active theme on an object
+ * @param obj pointer to an object
+ */
+void lv_theme_apply(lv_obj_t * obj);
+
+/**
+ * Set a base theme for a theme.
+ * The styles from the base them will be added before the styles of the current theme.
+ * Arbitrary long chain of themes can be created by setting base themes.
+ * @param new_theme pointer to theme which base should be set
+ * @param parent pointer to the base theme
+ */
+void lv_theme_set_parent(lv_theme_t * new_theme, lv_theme_t * parent);
+
+/**
+ * Set an apply callback for a theme.
+ * The apply callback is used to add styles to different objects
+ * @param theme pointer to theme which callback should be set
+ * @param apply_cb pointer to the callback
+ */
+void lv_theme_set_apply_cb(lv_theme_t * theme, lv_theme_apply_cb_t apply_cb);
+
+/**
+ * Get the small font of the theme
+ * @return pointer to the font
+ */
+const lv_font_t * lv_theme_get_font_small(lv_obj_t * obj);
+/**
+ * Get the normal font of the theme
+ * @return pointer to the font
+ */
+const lv_font_t * lv_theme_get_font_normal(lv_obj_t * obj);
+
+/**
+ * Get the subtitle font of the theme
+ * @return pointer to the font
+ */
+const lv_font_t * lv_theme_get_font_large(lv_obj_t * obj);
+
+/**
+ * Get the primary color of the theme
+ * @return the color
+ */
+lv_color_t lv_theme_get_color_primary(lv_obj_t * obj);
+
+/**
+ * Get the secondary color of the theme
+ * @return the color
+ */
+lv_color_t lv_theme_get_color_secondary(lv_obj_t * obj);
+
+/**********************
+ *    MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_THEME_H*/

Некоторые файлы не были показаны из-за большого количества измененных файлов