From 1cb57494df5b9477e08703f6e0e22d6175f9d24b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 30 May 2021 15:15:33 +0200 Subject: [PATCH] revert attempts to make struct private feat/priate-struct was create as snapshot before this commit --- src/core/lv_event.h | 24 +- src/core/lv_group.h | 18 +- src/core/lv_obj.h | 8 +- src/core/lv_obj_class.h | 25 +- src/core/lv_obj_draw.h | 18 +- src/core/lv_obj_pos.h | 84 +++-- src/core/lv_obj_scroll.h | 51 ++- src/core/lv_obj_style.h | 37 +- src/core/lv_obj_style_gen.h | 356 +++++++++---------- src/core/lv_obj_tree.h | 32 +- src/core/lv_theme.h | 5 +- src/draw/lv_draw_img.c | 4 +- src/draw/lv_draw_mask.h | 22 +- src/draw/lv_img_buf.c | 6 +- src/draw/lv_img_buf.h | 10 +- src/draw/lv_img_decoder.h | 12 +- src/extra/widgets/animimg/lv_animimg.h | 5 +- src/extra/widgets/calendar/lv_calendar.h | 5 +- src/extra/widgets/chart/lv_chart.h | 19 +- src/extra/widgets/colorwheel/lv_colorwheel.h | 5 +- src/extra/widgets/imgbtn/lv_imgbtn.h | 5 +- src/extra/widgets/keyboard/lv_keyboard.h | 5 +- src/extra/widgets/led/lv_led.h | 5 +- src/extra/widgets/meter/lv_meter.h | 17 +- src/extra/widgets/span/lv_span.h | 10 +- src/extra/widgets/spinbox/lv_spinbox.h | 5 +- src/extra/widgets/tabview/lv_tabview.h | 5 +- src/extra/widgets/tileview/lv_tileview.h | 10 +- src/extra/widgets/win/lv_win.h | 5 +- src/font/lv_font.h | 7 +- src/font/lv_font_fmt_txt.h | 30 +- src/hal/lv_hal_disp.h | 46 +-- src/hal/lv_hal_indev.h | 37 +- src/misc/lv_anim.h | 14 +- src/misc/lv_color.h | 4 +- src/misc/lv_fs.h | 25 +- src/misc/lv_ll.h | 5 +- src/misc/lv_mem.h | 5 +- src/misc/lv_style.h | 12 +- src/misc/lv_timer.h | 9 +- src/widgets/lv_arc.h | 5 +- src/widgets/lv_bar.h | 5 +- src/widgets/lv_btn.h | 5 +- src/widgets/lv_btnmatrix.h | 6 +- src/widgets/lv_canvas.c | 2 +- src/widgets/lv_canvas.h | 5 +- src/widgets/lv_checkbox.h | 5 +- src/widgets/lv_dropdown.h | 10 +- src/widgets/lv_img.h | 5 +- src/widgets/lv_label.h | 5 +- src/widgets/lv_line.h | 5 +- src/widgets/lv_roller.h | 6 +- src/widgets/lv_slider.h | 5 +- src/widgets/lv_switch.h | 5 +- src/widgets/lv_table.h | 5 +- src/widgets/lv_textarea.h | 5 +- 56 files changed, 431 insertions(+), 660 deletions(-) diff --git a/src/core/lv_event.h b/src/core/lv_event.h index 82b4663e9..800c31350 100644 --- a/src/core/lv_event.h +++ b/src/core/lv_event.h @@ -82,18 +82,14 @@ typedef enum { }lv_event_code_t; typedef struct _lv_event_t { - lv_obj_t * target; - lv_obj_t * current_target; + 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; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_event_t lv_event_t; - +}lv_event_t; /** * @brief Event callback. @@ -135,7 +131,7 @@ typedef struct { * @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(lv_obj_t * obj, lv_event_code_t event_code, void * param); +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 @@ -150,7 +146,7 @@ lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e); * @param e pointer to the event descriptor * @return the target of the event_code */ -lv_obj_t * lv_event_get_target(lv_event_t * e); +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. @@ -158,7 +154,7 @@ lv_obj_t * lv_event_get_target(lv_event_t * e); * @param e pointer to the event descriptor * @return pointer to the current target of the event_code */ -lv_obj_t * lv_event_get_current_target(lv_event_t * e); +struct _lv_obj_t * lv_event_get_current_target(lv_event_t * e); /** * Get the event code of an event @@ -200,7 +196,7 @@ uint32_t lv_event_register_id(void); * 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(lv_obj_t * obj); +void _lv_event_mark_deleted(struct _lv_obj_t * obj); /** @@ -213,7 +209,7 @@ void _lv_event_mark_deleted(lv_obj_t * obj); * @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(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data); +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. @@ -221,7 +217,7 @@ struct _lv_event_dsc_t * lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event * @param event_cb the event function to remove * @return true if any event handlers were removed */ -bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); +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. @@ -229,7 +225,7 @@ bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); * @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(lv_obj_t * obj, struct _lv_event_dsc_t * event_dsc); +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. diff --git a/src/core/lv_group.h b/src/core/lv_group.h index ab2c553ed..63dd37800 100644 --- a/src/core/lv_group.h +++ b/src/core/lv_group.h @@ -49,11 +49,7 @@ typedef uint8_t lv_key_t; struct _lv_obj_t; struct _lv_group_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_group_t lv_group_t; -typedef struct _lv_obj_t lv_obj_t; - -typedef void (*lv_group_focus_cb_t)(lv_group_t *); +typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *); /** * Groups can be used to logically hold objects so that they can be individually focused. @@ -61,7 +57,7 @@ typedef void (*lv_group_focus_cb_t)(lv_group_t *); */ 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*/ + 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 @@ -74,7 +70,7 @@ typedef struct _lv_group_t { 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; +} lv_group_t; typedef enum { @@ -121,13 +117,13 @@ lv_group_t * lv_group_get_default(void); * @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 */ -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 @@ -139,7 +135,7 @@ 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 */ -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) @@ -202,7 +198,7 @@ void lv_group_set_wrap(lv_group_t * group, bool en); * @param group pointer to a group * @return pointer to the focused object */ -lv_obj_t * lv_group_get_focused(const lv_group_t * group); +struct _lv_obj_t * lv_group_get_focused(const lv_group_t * group); /** * Get the focus callback function of a group diff --git a/src/core/lv_obj.h b/src/core/lv_obj.h index 96dc94cec..ccd0e5139 100644 --- a/src/core/lv_obj.h +++ b/src/core/lv_obj.h @@ -33,8 +33,6 @@ extern "C" { **********************/ struct _lv_obj_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_obj_t lv_obj_t; /** * Possible states of a widget. @@ -139,7 +137,7 @@ extern const lv_obj_class_t lv_obj_class; * They are allocated automatically if any elements is set. */ typedef struct { - lv_obj_t ** children; /**< Store the pointer of the children in an array.*/ + 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; @@ -158,7 +156,7 @@ typedef struct { typedef struct _lv_obj_t { const lv_obj_class_t * class_p; - lv_obj_t * parent; + struct _lv_obj_t * parent; _lv_obj_spec_attr_t * spec_attr; _lv_obj_style_t * styles; #if LV_USE_USER_DATA @@ -173,7 +171,7 @@ typedef struct _lv_obj_t { uint16_t style_cnt :6; uint16_t h_layout :1; uint16_t w_layout :1; -}_lv_obj_t; +}lv_obj_t; /********************** diff --git a/src/core/lv_obj_class.h b/src/core/lv_obj_class.h index c093e1aee..a2ddd1638 100644 --- a/src/core/lv_obj_class.h +++ b/src/core/lv_obj_class.h @@ -29,11 +29,6 @@ struct _lv_obj_t; struct _lv_obj_class_t; struct _lv_event_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_obj_class_t lv_obj_class_t; -typedef struct _lv_event_t lv_event_t; -typedef struct _lv_obj_t lv_obj_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, @@ -46,21 +41,19 @@ typedef enum { LV_OBJ_CLASS_GROUP_DEF_FALSE, }lv_obj_class_group_def_t; - - -typedef void (*lv_obj_class_event_cb_t)(lv_obj_class_t * class_p, lv_event_t * e); +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 lv_obj_class_t * class_p, lv_obj_t * obj); - void (*destructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj); + 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 lv_obj_class_t * class_p, lv_event_t * e); /**< Widget type specific event function*/ + 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*/ @@ -78,15 +71,15 @@ typedef struct _lv_obj_class_t { * @param parent pointer to an object where the new object should be created * @return pointer to the created object */ -lv_obj_t * lv_obj_class_create_obj(const lv_obj_class_t * class_p, lv_obj_t * parent); +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(lv_obj_t * obj); +void lv_obj_class_init_obj(struct _lv_obj_t * obj); -void _lv_obj_destructor(lv_obj_t * obj); +void _lv_obj_destructor(struct _lv_obj_t * obj); -bool lv_obj_is_editable(lv_obj_t * obj); +bool lv_obj_is_editable(struct _lv_obj_t * obj); -bool lv_obj_is_group_def(lv_obj_t * obj); +bool lv_obj_is_group_def(struct _lv_obj_t * obj); /********************** * MACROS diff --git a/src/core/lv_obj_draw.h b/src/core/lv_obj_draw.h index 59fd05bd4..4858195e8 100644 --- a/src/core/lv_obj_draw.h +++ b/src/core/lv_obj_draw.h @@ -24,8 +24,6 @@ extern "C" { **********************/ struct _lv_obj_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_obj_t lv_obj_t; /** Cover check results.*/ typedef enum { @@ -67,7 +65,7 @@ typedef struct * @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(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t * draw_dsc); +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 @@ -77,7 +75,7 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t * 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(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc_t * 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 @@ -86,7 +84,7 @@ void lv_obj_init_draw_label_dsc(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc * @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(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc); +void lv_obj_init_draw_img_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc); /** @@ -96,7 +94,7 @@ void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * * @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(lv_obj_t * obj, uint32_t part, lv_draw_line_dsc_t * 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 @@ -105,7 +103,7 @@ void lv_obj_init_draw_line_dsc(lv_obj_t * obj, uint32_t part, lv_draw_line_dsc_t * @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(lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t * 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. @@ -113,7 +111,7 @@ void lv_obj_init_draw_arc_dsc(lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t * * @param part part of the object * @return the extra size required around the object */ -lv_coord_t lv_obj_calculate_ext_draw_size(lv_obj_t * obj, uint32_t part); +lv_coord_t lv_obj_calculate_ext_draw_size(struct _lv_obj_t * obj, uint32_t part); /** * Initialize a draw descriptor used in events. @@ -127,14 +125,14 @@ void lv_obj_draw_dsc_init(lv_obj_draw_part_dsc_t * dsc, const lv_area_t * clip_a * The result will be saved in `obj`. * @param obj pointer to an object */ -void lv_obj_refresh_ext_draw_size(lv_obj_t * obj); +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 lv_obj_t * obj); +lv_coord_t _lv_obj_get_ext_draw_size(const struct _lv_obj_t * obj); /********************** * MACROS diff --git a/src/core/lv_obj_pos.h b/src/core/lv_obj_pos.h index e1dbb39fa..2034124bd 100644 --- a/src/core/lv_obj_pos.h +++ b/src/core/lv_obj_pos.h @@ -23,10 +23,8 @@ extern "C" { * TYPEDEFS **********************/ struct _lv_obj_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_obj_t lv_obj_t; -typedef void (*lv_layout_update_cb_t)(lv_obj_t *, void * user_data); +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; @@ -42,21 +40,21 @@ typedef struct { * @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(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); +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(lv_obj_t * obj, lv_coord_t x); +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(lv_obj_t * obj, lv_coord_t y); +void lv_obj_set_y(struct _lv_obj_t * obj, lv_coord_t y); /** * Set the size of an object. @@ -69,14 +67,14 @@ void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y); * 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(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); +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(lv_obj_t * obj); +bool lv_obj_refr_size(struct _lv_obj_t * obj); /** * Set the width of an object @@ -88,7 +86,7 @@ bool lv_obj_refr_size(lv_obj_t * obj); * 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(lv_obj_t * obj, lv_coord_t w); +void lv_obj_set_width(struct _lv_obj_t * obj, lv_coord_t w); /** * Set the height of an object @@ -100,47 +98,47 @@ void lv_obj_set_width(lv_obj_t * obj, lv_coord_t w); * 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(lv_obj_t * obj, lv_coord_t h); +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(lv_obj_t * obj, lv_coord_t w); +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(lv_obj_t * obj, lv_coord_t h); +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(lv_obj_t * obj, uint32_t layout); +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 lv_obj_t * obj); +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(lv_obj_t * obj); +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 lv_obj_t * obj); +void lv_obj_update_layout(const struct _lv_obj_t * obj); /** * Regsiter a new layout @@ -155,7 +153,7 @@ uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data); * @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(lv_obj_t * obj, lv_align_t align); +void lv_obj_set_align(struct _lv_obj_t * obj, lv_align_t align); /** * Change the alignment of an object and set new coordinates. @@ -167,7 +165,7 @@ void lv_obj_set_align(lv_obj_t * obj, lv_align_t align); * @param x_ofs x coordinate offset after alignment * @param y_ofs y coordinate offset after alignment */ -void lv_obj_align(lv_obj_t * obj, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs); +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. @@ -178,14 +176,14 @@ void lv_obj_align(lv_obj_t * obj, lv_align_t align, lv_coord_t x_ofs, lv_coord_t * @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(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_ofs, lv_coord_t y_ofs); +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(lv_obj_t * obj) +static inline void lv_obj_center(struct _lv_obj_t * obj) { lv_obj_align(obj, LV_ALIGN_CENTER, 0, 0); } @@ -196,7 +194,7 @@ static inline void lv_obj_center(lv_obj_t * obj) * @param obj pointer to an object * @param coords pointer to an area to store the coordinates */ -void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * coords); +void lv_obj_get_coords(const struct _lv_obj_t * obj, lv_area_t * coords); /** * Get the x coordinate of object. @@ -206,7 +204,7 @@ void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * coords); * @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 lv_obj_t * obj); +lv_coord_t lv_obj_get_x(const struct _lv_obj_t * obj); /** * Get the x2 coordinate of object. @@ -216,7 +214,7 @@ lv_coord_t lv_obj_get_x(const lv_obj_t * obj); * @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 lv_obj_t * obj); +lv_coord_t lv_obj_get_x2(const struct _lv_obj_t * obj); /** * Get the y coordinate of object. @@ -226,7 +224,7 @@ lv_coord_t lv_obj_get_x2(const lv_obj_t * obj); * @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 lv_obj_t * obj); +lv_coord_t lv_obj_get_y(const struct _lv_obj_t * obj); /** * Get the y2 coordinate of object. @@ -236,42 +234,42 @@ lv_coord_t lv_obj_get_y(const lv_obj_t * obj); * @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 lv_obj_t * obj); +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 lv_obj_t * obj); +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 lv_obj_t * obj); +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 lv_obj_t * obj); +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 lv_obj_t * obj); +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 lv_obj_t * obj, lv_area_t * area); +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. @@ -280,7 +278,7 @@ void lv_obj_get_content_coords(const lv_obj_t * obj, lv_area_t * area); * @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 lv_obj_t * obj); +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. @@ -289,21 +287,21 @@ lv_coord_t lv_obj_get_self_width(const lv_obj_t * obj); * @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 lv_obj_t * obj); +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(lv_obj_t * obj); +bool lv_obj_refresh_self_size(struct _lv_obj_t * obj); -void lv_obj_refr_pos(lv_obj_t * obj); +void lv_obj_refr_pos(struct _lv_obj_t * obj); -void lv_obj_move_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); +void lv_obj_move_to(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y); -void lv_obj_move_children_by(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff, bool ignore_floating); +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. @@ -311,13 +309,13 @@ void lv_obj_move_children_by(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_dif * @param obj pointer to an object * @param area the area to redraw */ -void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area); +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 lv_obj_t * obj); +void lv_obj_invalidate(const struct _lv_obj_t * obj); /** * Tell whether an area of an object is visible (even partially) now or not @@ -325,21 +323,21 @@ void lv_obj_invalidate(const lv_obj_t * obj); * @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 lv_obj_t * obj, lv_area_t * area); +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 lv_obj_t * obj); +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(lv_obj_t * obj, lv_coord_t size); +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. @@ -347,7 +345,7 @@ void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t size); * @param obj pointer to an object * @param area store the result area here */ -void lv_obj_get_click_area(const lv_obj_t * obj, lv_area_t * area); +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. @@ -355,7 +353,7 @@ void lv_obj_get_click_area(const lv_obj_t * obj, lv_area_t * area); * @param point screen-space point (absolute coordinate) * @return true: if the object is considered under the point */ -bool lv_obj_hit_test(lv_obj_t * obj, const lv_point_t * 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 diff --git a/src/core/lv_obj_scroll.h b/src/core/lv_obj_scroll.h index b39fcf0af..2cfa76ac9 100644 --- a/src/core/lv_obj_scroll.h +++ b/src/core/lv_obj_scroll.h @@ -27,9 +27,6 @@ extern "C" { /*Can't include lv_obj.h because it includes this header file*/ struct _lv_obj_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_obj_t lv_obj_t; - /** Scrollbar modes: shows when should the scrollbars be visible*/ enum { LV_SCROLLBAR_MODE_OFF, /**< Never show scrollbars*/ @@ -62,28 +59,28 @@ typedef uint8_t lv_scroll_snap_t; * @param obj pointer to an object * @param mode LV_SCROLL_MODE_ON/OFF/AUTO/ACTIVE */ -void lv_obj_set_scrollbar_mode(lv_obj_t * obj, lv_scrollbar_mode_t mode); +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(lv_obj_t * obj, lv_dir_t dir); +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(lv_obj_t * obj, lv_scroll_snap_t align); +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(lv_obj_t * obj, lv_scroll_snap_t align); +void lv_obj_set_scroll_snap_y(struct _lv_obj_t * obj, lv_scroll_snap_t align); /*===================== * Getter functions @@ -94,28 +91,28 @@ void lv_obj_set_scroll_snap_y(lv_obj_t * obj, lv_scroll_snap_t align); * @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 lv_obj_t * obj); +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 lv_obj_t * obj); +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 lv_obj_t * obj); +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 lv_obj_t * obj); +lv_scroll_snap_t lv_obj_get_scroll_snap_y(const struct _lv_obj_t * obj); /** * Get current X scroll position. @@ -125,7 +122,7 @@ lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t * obj); * If scrolled return > 0 * If scrolled in (elastic scroll) return < 0 */ -lv_coord_t lv_obj_get_scroll_x(const lv_obj_t * obj); +lv_coord_t lv_obj_get_scroll_x(const struct _lv_obj_t * obj); /** * Get current Y scroll position. @@ -135,7 +132,7 @@ lv_coord_t lv_obj_get_scroll_x(const lv_obj_t * obj); * If scrolled return > 0 * If scrolled inside return < 0 */ -lv_coord_t lv_obj_get_scroll_y(const lv_obj_t * obj); +lv_coord_t lv_obj_get_scroll_y(const struct _lv_obj_t * obj); /** * Return the height of the area above the object. @@ -144,7 +141,7 @@ lv_coord_t lv_obj_get_scroll_y(const lv_obj_t * obj); * @param obj pointer to an object * @return the scrollable area above the object in pixels */ -lv_coord_t lv_obj_get_scroll_top(lv_obj_t * obj); +lv_coord_t lv_obj_get_scroll_top(struct _lv_obj_t * obj); /** * Return the height of the area below the object. @@ -153,7 +150,7 @@ lv_coord_t lv_obj_get_scroll_top(lv_obj_t * obj); * @param obj pointer to an object * @return the scrollable area below the object in pixels */ -lv_coord_t lv_obj_get_scroll_bottom(lv_obj_t * obj); +lv_coord_t lv_obj_get_scroll_bottom(struct _lv_obj_t * obj); /** * Return the width of the area on the left the object. @@ -162,7 +159,7 @@ lv_coord_t lv_obj_get_scroll_bottom(lv_obj_t * obj); * @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(lv_obj_t * obj); +lv_coord_t lv_obj_get_scroll_left(struct _lv_obj_t * obj); /** * Return the width of the area on the right the object. @@ -171,7 +168,7 @@ lv_coord_t lv_obj_get_scroll_left(lv_obj_t * obj); * @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(lv_obj_t * obj); +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. @@ -195,7 +192,7 @@ void lv_obj_get_scroll_end(struct _lv_obj_t * obj, lv_point_t * end); * @note > 0 value means scroll right/bottom (show the more content on the right/bottom) * @note */ -void lv_obj_scroll_by(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en); +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. @@ -205,7 +202,7 @@ void lv_obj_scroll_by(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable * @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(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim_en); +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. @@ -214,7 +211,7 @@ void lv_obj_scroll_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable * @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(lv_obj_t * obj, lv_coord_t x, lv_anim_enable_t anim_en); +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 @@ -223,14 +220,14 @@ void lv_obj_scroll_to_x(lv_obj_t * obj, lv_coord_t x, lv_anim_enable_t anim_en); * @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(lv_obj_t * obj, lv_coord_t y, lv_anim_enable_t anim_en); +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(lv_obj_t * obj, lv_anim_enable_t anim_en); +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. @@ -239,21 +236,21 @@ void lv_obj_scroll_to_view(lv_obj_t * obj, lv_anim_enable_t anim_en); * @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(lv_obj_t * obj, lv_anim_enable_t anim_en); +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 lv_obj_t * obj); +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(lv_obj_t * obj, lv_anim_enable_t anim_en); +void lv_obj_update_snap(struct _lv_obj_t * obj, lv_anim_enable_t anim_en); /** * Get the area of the scrollbars @@ -261,13 +258,13 @@ void lv_obj_update_snap(lv_obj_t * obj, lv_anim_enable_t anim_en); * @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(lv_obj_t * obj, lv_area_t * hor, lv_area_t * ver); +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(lv_obj_t * obj); +void lv_obj_scrollbar_invalidate(struct _lv_obj_t * obj); /********************** * MACROS diff --git a/src/core/lv_obj_style.h b/src/core/lv_obj_style.h index 57df464a1..f6d30507e 100644 --- a/src/core/lv_obj_style.h +++ b/src/core/lv_obj_style.h @@ -27,9 +27,6 @@ extern "C" { /*Can't include lv_obj.h because it includes this header file*/ struct _lv_obj_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_obj_t 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*/ @@ -75,7 +72,7 @@ void _lv_obj_style_init(void); * @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(lv_obj_t * obj, lv_style_t * style, lv_style_selector_t selector); +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. @@ -86,13 +83,13 @@ void lv_obj_add_style(lv_obj_t * obj, lv_style_t * style, lv_style_selector_t se * @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(lv_obj_t * obj, lv_style_t * style, lv_style_selector_t selector); +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(lv_obj_t * obj) +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); } @@ -112,7 +109,7 @@ void lv_obj_report_style_change(lv_style_t * style); * 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(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop); +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 @@ -131,7 +128,7 @@ void lv_obj_enable_style_refresh(bool en); * @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 lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop); +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. @@ -141,9 +138,9 @@ lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_ * @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(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector); +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(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. @@ -153,7 +150,7 @@ lv_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_st * @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(lv_obj_t * obj, lv_style_prop_t prop, lv_style_selector_t selector); +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 @@ -163,7 +160,7 @@ bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_sty * @param new_state * @param tr */ -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); +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 @@ -172,7 +169,7 @@ void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t * @param state2 * @return */ -_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 _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. @@ -180,7 +177,7 @@ _lv_style_state_cmp_t _lv_obj_style_state_compare(lv_obj_t * obj, lv_state_t sta * @param time time of fade * @param delay delay to start the animation */ -void lv_obj_fade_in(lv_obj_t * obj, uint32_t time, uint32_t delay); +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. @@ -188,7 +185,7 @@ void lv_obj_fade_in(lv_obj_t * obj, uint32_t time, uint32_t delay); * @param time time of fade * @param delay delay to start the animation */ -void lv_obj_fade_out(lv_obj_t * obj, uint32_t time, uint32_t delay); +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); @@ -196,29 +193,29 @@ 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(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) { +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(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t 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(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t 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(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t 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(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t 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); } diff --git a/src/core/lv_obj_style_gen.h b/src/core/lv_obj_style_gen.h index 283d6f55e..557cb538c 100644 --- a/src/core/lv_obj_style_gen.h +++ b/src/core/lv_obj_style_gen.h @@ -1,538 +1,538 @@ -static inline lv_coord_t lv_obj_get_style_width(const lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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 lv_obj_t * obj, uint32_t part) +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; } -static inline void lv_obj_set_style_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -540,7 +540,7 @@ static inline void lv_obj_set_style_width(lv_obj_t * obj, lv_coord_t value, lv_s lv_obj_set_local_style_prop(obj, LV_STYLE_WIDTH, v, selector); } -static inline void lv_obj_set_style_min_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -548,7 +548,7 @@ static inline void lv_obj_set_style_min_width(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_MIN_WIDTH, v, selector); } -static inline void lv_obj_set_style_max_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -556,7 +556,7 @@ static inline void lv_obj_set_style_max_width(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_MAX_WIDTH, v, selector); } -static inline void lv_obj_set_style_height(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -564,7 +564,7 @@ static inline void lv_obj_set_style_height(lv_obj_t * obj, lv_coord_t value, lv_ lv_obj_set_local_style_prop(obj, LV_STYLE_HEIGHT, v, selector); } -static inline void lv_obj_set_style_min_height(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -572,7 +572,7 @@ static inline void lv_obj_set_style_min_height(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_MIN_HEIGHT, v, selector); } -static inline void lv_obj_set_style_max_height(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -580,7 +580,7 @@ static inline void lv_obj_set_style_max_height(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_MAX_HEIGHT, v, selector); } -static inline void lv_obj_set_style_x(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -588,7 +588,7 @@ static inline void lv_obj_set_style_x(lv_obj_t * obj, lv_coord_t value, lv_style lv_obj_set_local_style_prop(obj, LV_STYLE_X, v, selector); } -static inline void lv_obj_set_style_y(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -596,7 +596,7 @@ static inline void lv_obj_set_style_y(lv_obj_t * obj, lv_coord_t value, lv_style lv_obj_set_local_style_prop(obj, LV_STYLE_Y, v, selector); } -static inline void lv_obj_set_style_align(lv_obj_t * obj, lv_align_t value, lv_style_selector_t selector) +static inline 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 @@ -604,7 +604,7 @@ static inline void lv_obj_set_style_align(lv_obj_t * obj, lv_align_t value, lv_s lv_obj_set_local_style_prop(obj, LV_STYLE_ALIGN, v, selector); } -static inline void lv_obj_set_style_transform_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -612,7 +612,7 @@ static inline void lv_obj_set_style_transform_width(lv_obj_t * obj, lv_coord_t v lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_WIDTH, v, selector); } -static inline void lv_obj_set_style_transform_height(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -620,7 +620,7 @@ static inline void lv_obj_set_style_transform_height(lv_obj_t * obj, lv_coord_t lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_HEIGHT, v, selector); } -static inline void lv_obj_set_style_translate_x(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -628,7 +628,7 @@ static inline void lv_obj_set_style_translate_x(lv_obj_t * obj, lv_coord_t value lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSLATE_X, v, selector); } -static inline void lv_obj_set_style_translate_y(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -636,7 +636,7 @@ static inline void lv_obj_set_style_translate_y(lv_obj_t * obj, lv_coord_t value lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSLATE_Y, v, selector); } -static inline void lv_obj_set_style_transform_zoom(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -644,7 +644,7 @@ static inline void lv_obj_set_style_transform_zoom(lv_obj_t * obj, lv_coord_t va lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_ZOOM, v, selector); } -static inline void lv_obj_set_style_transform_angle(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -652,7 +652,7 @@ static inline void lv_obj_set_style_transform_angle(lv_obj_t * obj, lv_coord_t v lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_ANGLE, v, selector); } -static inline void lv_obj_set_style_pad_top(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -660,7 +660,7 @@ static inline void lv_obj_set_style_pad_top(lv_obj_t * obj, lv_coord_t value, lv lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_TOP, v, selector); } -static inline void lv_obj_set_style_pad_bottom(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -668,7 +668,7 @@ static inline void lv_obj_set_style_pad_bottom(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_BOTTOM, v, selector); } -static inline void lv_obj_set_style_pad_left(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -676,7 +676,7 @@ static inline void lv_obj_set_style_pad_left(lv_obj_t * obj, lv_coord_t value, l lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_LEFT, v, selector); } -static inline void lv_obj_set_style_pad_right(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -684,7 +684,7 @@ static inline void lv_obj_set_style_pad_right(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_RIGHT, v, selector); } -static inline void lv_obj_set_style_pad_row(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -692,7 +692,7 @@ static inline void lv_obj_set_style_pad_row(lv_obj_t * obj, lv_coord_t value, lv lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_ROW, v, selector); } -static inline void lv_obj_set_style_pad_column(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -700,7 +700,7 @@ static inline void lv_obj_set_style_pad_column(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_COLUMN, v, selector); } -static inline void lv_obj_set_style_radius(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -708,7 +708,7 @@ static inline void lv_obj_set_style_radius(lv_obj_t * obj, lv_coord_t value, lv_ lv_obj_set_local_style_prop(obj, LV_STYLE_RADIUS, v, selector); } -static inline void lv_obj_set_style_clip_corner(lv_obj_t * obj, bool value, lv_style_selector_t selector) +static inline 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 @@ -716,7 +716,7 @@ static inline void lv_obj_set_style_clip_corner(lv_obj_t * obj, bool value, lv_s lv_obj_set_local_style_prop(obj, LV_STYLE_CLIP_CORNER, v, selector); } -static inline void lv_obj_set_style_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -724,7 +724,7 @@ static inline void lv_obj_set_style_opa(lv_obj_t * obj, lv_opa_t value, lv_style lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector); } -static inline void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector) +static inline 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 @@ -732,7 +732,7 @@ static inline void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_co lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_DSC, v, selector); } -static inline void lv_obj_set_style_color_filter_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -740,7 +740,7 @@ static inline void lv_obj_set_style_color_filter_opa(lv_obj_t * obj, lv_opa_t va lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_OPA, v, selector); } -static inline void lv_obj_set_style_anim_time(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector) +static inline 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 @@ -748,7 +748,7 @@ static inline void lv_obj_set_style_anim_time(lv_obj_t * obj, uint32_t value, lv lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector); } -static inline void lv_obj_set_style_anim_speed(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector) +static inline 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 @@ -756,7 +756,7 @@ static inline void lv_obj_set_style_anim_speed(lv_obj_t * obj, uint32_t value, l lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector); } -static inline void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector) +static inline 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 @@ -764,7 +764,7 @@ static inline void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_tr lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSITION, v, selector); } -static inline void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector) +static inline 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 @@ -772,7 +772,7 @@ static inline void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t v lv_obj_set_local_style_prop(obj, LV_STYLE_BLEND_MODE, v, selector); } -static inline void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_style_selector_t selector) +static inline 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 @@ -780,7 +780,7 @@ static inline void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_st lv_obj_set_local_style_prop(obj, LV_STYLE_LAYOUT, v, selector); } -static inline void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector) +static inline 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 @@ -788,7 +788,7 @@ static inline void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector); } -static inline void lv_obj_set_style_bg_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -796,7 +796,7 @@ static inline void lv_obj_set_style_bg_color(lv_obj_t * obj, lv_color_t value, l lv_obj_set_local_style_prop(obj, LV_STYLE_BG_COLOR, v, selector); } -static inline void lv_obj_set_style_bg_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -804,7 +804,7 @@ static inline void lv_obj_set_style_bg_color_filtered(lv_obj_t * obj, lv_color_t lv_obj_set_local_style_prop(obj, LV_STYLE_BG_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_bg_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -812,7 +812,7 @@ static inline void lv_obj_set_style_bg_opa(lv_obj_t * obj, lv_opa_t value, lv_st lv_obj_set_local_style_prop(obj, LV_STYLE_BG_OPA, v, selector); } -static inline void lv_obj_set_style_bg_grad_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -820,7 +820,7 @@ static inline void lv_obj_set_style_bg_grad_color(lv_obj_t * obj, lv_color_t val lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_COLOR, v, selector); } -static inline void lv_obj_set_style_bg_grad_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -828,7 +828,7 @@ static inline void lv_obj_set_style_bg_grad_color_filtered(lv_obj_t * obj, lv_co lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_bg_grad_dir(lv_obj_t * obj, lv_grad_dir_t value, lv_style_selector_t selector) +static inline 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 @@ -836,7 +836,7 @@ static inline void lv_obj_set_style_bg_grad_dir(lv_obj_t * obj, lv_grad_dir_t va lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_DIR, v, selector); } -static inline void lv_obj_set_style_bg_main_stop(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -844,7 +844,7 @@ static inline void lv_obj_set_style_bg_main_stop(lv_obj_t * obj, lv_coord_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_BG_MAIN_STOP, v, selector); } -static inline void lv_obj_set_style_bg_grad_stop(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -852,7 +852,7 @@ static inline void lv_obj_set_style_bg_grad_stop(lv_obj_t * obj, lv_coord_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_STOP, v, selector); } -static inline void lv_obj_set_style_bg_img_src(lv_obj_t * obj, const void * value, lv_style_selector_t selector) +static inline 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 @@ -860,7 +860,7 @@ static inline void lv_obj_set_style_bg_img_src(lv_obj_t * obj, const void * valu lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_SRC, v, selector); } -static inline void lv_obj_set_style_bg_img_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -868,7 +868,7 @@ static inline void lv_obj_set_style_bg_img_opa(lv_obj_t * obj, lv_opa_t value, l lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_OPA, v, selector); } -static inline void lv_obj_set_style_bg_img_recolor(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -876,7 +876,7 @@ static inline void lv_obj_set_style_bg_img_recolor(lv_obj_t * obj, lv_color_t va lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR, v, selector); } -static inline void lv_obj_set_style_bg_img_recolor_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -884,7 +884,7 @@ static inline void lv_obj_set_style_bg_img_recolor_filtered(lv_obj_t * obj, lv_c lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_bg_img_recolor_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -892,7 +892,7 @@ static inline void lv_obj_set_style_bg_img_recolor_opa(lv_obj_t * obj, lv_opa_t lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR_OPA, v, selector); } -static inline void lv_obj_set_style_bg_img_tiled(lv_obj_t * obj, bool value, lv_style_selector_t selector) +static inline 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 @@ -900,7 +900,7 @@ static inline void lv_obj_set_style_bg_img_tiled(lv_obj_t * obj, bool value, lv_ lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_TILED, v, selector); } -static inline void lv_obj_set_style_border_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -908,7 +908,7 @@ static inline void lv_obj_set_style_border_color(lv_obj_t * obj, lv_color_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_COLOR, v, selector); } -static inline void lv_obj_set_style_border_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -916,7 +916,7 @@ static inline void lv_obj_set_style_border_color_filtered(lv_obj_t * obj, lv_col lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_border_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -924,7 +924,7 @@ static inline void lv_obj_set_style_border_opa(lv_obj_t * obj, lv_opa_t value, l lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_OPA, v, selector); } -static inline void lv_obj_set_style_border_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -932,7 +932,7 @@ static inline void lv_obj_set_style_border_width(lv_obj_t * obj, lv_coord_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_WIDTH, v, selector); } -static inline void lv_obj_set_style_border_side(lv_obj_t * obj, lv_border_side_t value, lv_style_selector_t selector) +static inline 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 @@ -940,7 +940,7 @@ static inline void lv_obj_set_style_border_side(lv_obj_t * obj, lv_border_side_t lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_SIDE, v, selector); } -static inline void lv_obj_set_style_border_post(lv_obj_t * obj, bool value, lv_style_selector_t selector) +static inline 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 @@ -948,7 +948,7 @@ static inline void lv_obj_set_style_border_post(lv_obj_t * obj, bool value, lv_s lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_POST, v, selector); } -static inline void lv_obj_set_style_text_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -956,7 +956,7 @@ static inline void lv_obj_set_style_text_color(lv_obj_t * obj, lv_color_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR, v, selector); } -static inline void lv_obj_set_style_text_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -964,7 +964,7 @@ static inline void lv_obj_set_style_text_color_filtered(lv_obj_t * obj, lv_color lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_text_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -972,7 +972,7 @@ static inline void lv_obj_set_style_text_opa(lv_obj_t * obj, lv_opa_t value, lv_ lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_OPA, v, selector); } -static inline void lv_obj_set_style_text_font(lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector) +static inline 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 @@ -980,7 +980,7 @@ static inline void lv_obj_set_style_text_font(lv_obj_t * obj, const lv_font_t * lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_FONT, v, selector); } -static inline void lv_obj_set_style_text_letter_space(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -988,7 +988,7 @@ static inline void lv_obj_set_style_text_letter_space(lv_obj_t * obj, lv_coord_t lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LETTER_SPACE, v, selector); } -static inline void lv_obj_set_style_text_line_space(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -996,7 +996,7 @@ static inline void lv_obj_set_style_text_line_space(lv_obj_t * obj, lv_coord_t v lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LINE_SPACE, v, selector); } -static inline void lv_obj_set_style_text_decor(lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector) +static inline 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 @@ -1004,7 +1004,7 @@ static inline void lv_obj_set_style_text_decor(lv_obj_t * obj, lv_text_decor_t v lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_DECOR, v, selector); } -static inline void lv_obj_set_style_text_align(lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector) +static inline 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 @@ -1012,7 +1012,7 @@ static inline void lv_obj_set_style_text_align(lv_obj_t * obj, lv_text_align_t v lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_ALIGN, v, selector); } -static inline void lv_obj_set_style_img_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -1020,7 +1020,7 @@ static inline void lv_obj_set_style_img_opa(lv_obj_t * obj, lv_opa_t value, lv_s lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_OPA, v, selector); } -static inline void lv_obj_set_style_img_recolor(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1028,7 +1028,7 @@ static inline void lv_obj_set_style_img_recolor(lv_obj_t * obj, lv_color_t value lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR, v, selector); } -static inline void lv_obj_set_style_img_recolor_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1036,7 +1036,7 @@ static inline void lv_obj_set_style_img_recolor_filtered(lv_obj_t * obj, lv_colo lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_img_recolor_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -1044,7 +1044,7 @@ static inline void lv_obj_set_style_img_recolor_opa(lv_obj_t * obj, lv_opa_t val lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_OPA, v, selector); } -static inline void lv_obj_set_style_outline_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1052,7 +1052,7 @@ static inline void lv_obj_set_style_outline_width(lv_obj_t * obj, lv_coord_t val lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_WIDTH, v, selector); } -static inline void lv_obj_set_style_outline_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1060,7 +1060,7 @@ static inline void lv_obj_set_style_outline_color(lv_obj_t * obj, lv_color_t val lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_COLOR, v, selector); } -static inline void lv_obj_set_style_outline_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1068,7 +1068,7 @@ static inline void lv_obj_set_style_outline_color_filtered(lv_obj_t * obj, lv_co lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_outline_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -1076,7 +1076,7 @@ static inline void lv_obj_set_style_outline_opa(lv_obj_t * obj, lv_opa_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_OPA, v, selector); } -static inline void lv_obj_set_style_outline_pad(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1084,7 +1084,7 @@ static inline void lv_obj_set_style_outline_pad(lv_obj_t * obj, lv_coord_t value lv_obj_set_local_style_prop(obj, LV_STYLE_OUTLINE_PAD, v, selector); } -static inline void lv_obj_set_style_shadow_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1092,7 +1092,7 @@ static inline void lv_obj_set_style_shadow_width(lv_obj_t * obj, lv_coord_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_WIDTH, v, selector); } -static inline void lv_obj_set_style_shadow_ofs_x(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1100,7 +1100,7 @@ static inline void lv_obj_set_style_shadow_ofs_x(lv_obj_t * obj, lv_coord_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OFS_X, v, selector); } -static inline void lv_obj_set_style_shadow_ofs_y(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1108,7 +1108,7 @@ static inline void lv_obj_set_style_shadow_ofs_y(lv_obj_t * obj, lv_coord_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OFS_Y, v, selector); } -static inline void lv_obj_set_style_shadow_spread(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1116,7 +1116,7 @@ static inline void lv_obj_set_style_shadow_spread(lv_obj_t * obj, lv_coord_t val lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_SPREAD, v, selector); } -static inline void lv_obj_set_style_shadow_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1124,7 +1124,7 @@ static inline void lv_obj_set_style_shadow_color(lv_obj_t * obj, lv_color_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_COLOR, v, selector); } -static inline void lv_obj_set_style_shadow_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1132,7 +1132,7 @@ static inline void lv_obj_set_style_shadow_color_filtered(lv_obj_t * obj, lv_col lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_shadow_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -1140,7 +1140,7 @@ static inline void lv_obj_set_style_shadow_opa(lv_obj_t * obj, lv_opa_t value, l lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OPA, v, selector); } -static inline void lv_obj_set_style_line_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1148,7 +1148,7 @@ static inline void lv_obj_set_style_line_width(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_WIDTH, v, selector); } -static inline void lv_obj_set_style_line_dash_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1156,7 +1156,7 @@ static inline void lv_obj_set_style_line_dash_width(lv_obj_t * obj, lv_coord_t v lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_DASH_WIDTH, v, selector); } -static inline void lv_obj_set_style_line_dash_gap(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1164,7 +1164,7 @@ static inline void lv_obj_set_style_line_dash_gap(lv_obj_t * obj, lv_coord_t val lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_DASH_GAP, v, selector); } -static inline void lv_obj_set_style_line_rounded(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1172,7 +1172,7 @@ static inline void lv_obj_set_style_line_rounded(lv_obj_t * obj, lv_coord_t valu lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_ROUNDED, v, selector); } -static inline void lv_obj_set_style_line_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1180,7 +1180,7 @@ static inline void lv_obj_set_style_line_color(lv_obj_t * obj, lv_color_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_COLOR, v, selector); } -static inline void lv_obj_set_style_line_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1188,7 +1188,7 @@ static inline void lv_obj_set_style_line_color_filtered(lv_obj_t * obj, lv_color lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_line_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -1196,7 +1196,7 @@ static inline void lv_obj_set_style_line_opa(lv_obj_t * obj, lv_opa_t value, lv_ lv_obj_set_local_style_prop(obj, LV_STYLE_LINE_OPA, v, selector); } -static inline void lv_obj_set_style_arc_width(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1204,7 +1204,7 @@ static inline void lv_obj_set_style_arc_width(lv_obj_t * obj, lv_coord_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_WIDTH, v, selector); } -static inline void lv_obj_set_style_arc_rounded(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +static inline 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 @@ -1212,7 +1212,7 @@ static inline void lv_obj_set_style_arc_rounded(lv_obj_t * obj, lv_coord_t value lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_ROUNDED, v, selector); } -static inline void lv_obj_set_style_arc_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1220,7 +1220,7 @@ static inline void lv_obj_set_style_arc_color(lv_obj_t * obj, lv_color_t value, lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_COLOR, v, selector); } -static inline void lv_obj_set_style_arc_color_filtered(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +static inline 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 @@ -1228,7 +1228,7 @@ static inline void lv_obj_set_style_arc_color_filtered(lv_obj_t * obj, lv_color_ lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_COLOR_FILTERED, v, selector); } -static inline void lv_obj_set_style_arc_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +static inline 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 @@ -1236,7 +1236,7 @@ static inline void lv_obj_set_style_arc_opa(lv_obj_t * obj, lv_opa_t value, lv_s lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_OPA, v, selector); } -static inline void lv_obj_set_style_arc_img_src(lv_obj_t * obj, const void * value, lv_style_selector_t selector) +static inline 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 diff --git a/src/core/lv_obj_tree.h b/src/core/lv_obj_tree.h index bffd395ab..7cb241eaf 100644 --- a/src/core/lv_obj_tree.h +++ b/src/core/lv_obj_tree.h @@ -28,17 +28,13 @@ extern "C" { struct _lv_obj_t; struct _lv_obj_class_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_obj_t lv_obj_t; -typedef struct _lv_obj_class_t 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)(lv_obj_t *, void *); +typedef lv_obj_tree_walk_res_t (*lv_obj_tree_walk_cb_t)(struct _lv_obj_t *, void *); /********************** * GLOBAL PROTOTYPES @@ -50,7 +46,7 @@ typedef lv_obj_tree_walk_res_t (*lv_obj_tree_walk_cb_t)(lv_obj_t *, void *); * Send `LV_EVENT_DELETED` to deleted objects. * @param obj pointer to an object */ -void lv_obj_del(lv_obj_t * obj); +void lv_obj_del(struct _lv_obj_t * obj); /** * Delete all children of an object. @@ -58,7 +54,7 @@ void lv_obj_del(lv_obj_t * obj); * Send `LV_EVENT_DELETED` to deleted objects. * @param obj pointer to an object */ -void lv_obj_clean(lv_obj_t * obj); +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 @@ -72,7 +68,7 @@ void lv_obj_del_anim_ready_cb(lv_anim_t * a); * @param obj object to delete * @see lv_async_call */ -void lv_obj_del_async(lv_obj_t * obj); +void lv_obj_del_async(struct _lv_obj_t * obj); /** * Move the parent of an object. The relative coordinates will be kept. @@ -80,7 +76,7 @@ void lv_obj_del_async(lv_obj_t * obj); * @param obj pointer to an object whose parent needs to be changed * @param parent pointer to the new parent */ -void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent); +void lv_obj_set_parent(struct _lv_obj_t * obj, struct _lv_obj_t * parent); /** * Move the object to the foreground. @@ -88,7 +84,7 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent); * It also means it can cover any of the siblings. * @param obj pointer to an object */ -void lv_obj_move_foreground(lv_obj_t * obj); +void lv_obj_move_foreground(struct _lv_obj_t * obj); /** * Move the object to the background. @@ -96,28 +92,28 @@ void lv_obj_move_foreground(lv_obj_t * obj); * It also means any of the siblings can cover the object. * @param obj pointer to an object */ -void lv_obj_move_background(lv_obj_t * obj); +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 */ -lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj); +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 lv_obj_t * obj); +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) */ -lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj); +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. @@ -130,14 +126,14 @@ lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj); * -2: the second youngest * @return pointer to the child or NULL if the index was invalid */ -lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, int32_t id); +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 lv_obj_t * obj); +uint32_t lv_obj_get_child_cnt(const struct _lv_obj_t * obj); /** * Get the index of a child. @@ -145,7 +141,7 @@ uint32_t lv_obj_get_child_cnt(const lv_obj_t * obj); * @return the child index of the object. * E.g. 0: the oldest (firstly created child) */ -uint32_t lv_obj_get_child_id(const lv_obj_t * obj); +uint32_t lv_obj_get_child_id(const struct _lv_obj_t * obj); /** * Iterate through all children of any object. @@ -153,7 +149,7 @@ uint32_t lv_obj_get_child_id(const lv_obj_t * obj); * @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(lv_obj_t * start_obj, lv_obj_tree_walk_cb_t cb, void * user_data); +void lv_obj_tree_walk(struct _lv_obj_t * start_obj, lv_obj_tree_walk_cb_t cb, void * user_data); /********************** * MACROS diff --git a/src/core/lv_theme.h b/src/core/lv_theme.h index 47a8cf897..f287a2c61 100644 --- a/src/core/lv_theme.h +++ b/src/core/lv_theme.h @@ -26,10 +26,7 @@ extern "C" { struct _lv_theme_t; struct _lv_disp_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_theme_t lv_theme_t; - -typedef void (*lv_theme_apply_cb_t)(lv_theme_t *, lv_obj_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; diff --git a/src/draw/lv_draw_img.c b/src/draw/lv_draw_img.c index adfd37c24..ec5799e57 100644 --- a/src/draw/lv_draw_img.c +++ b/src/draw/lv_draw_img.c @@ -477,8 +477,8 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const lv_opa_t * mask_buf = lv_mem_buf_get(mask_buf_size); #if LV_DRAW_COMPLEX - _lv_img_transform_dsc_t trans_dsc; - lv_memset_00(&trans_dsc, sizeof(_lv_img_transform_dsc_t)); + lv_img_transform_dsc_t trans_dsc; + lv_memset_00(&trans_dsc, sizeof(lv_img_transform_dsc_t)); if(transform) { lv_img_cf_t cf = LV_IMG_CF_TRUE_COLOR; if(alpha_byte) cf = LV_IMG_CF_TRUE_COLOR_ALPHA; diff --git a/src/draw/lv_draw_mask.h b/src/draw/lv_draw_mask.h index fe69f9149..893040494 100644 --- a/src/draw/lv_draw_mask.h +++ b/src/draw/lv_draw_mask.h @@ -130,10 +130,7 @@ typedef struct { /*Invert the mask. The default is: Keep the left part. *It is used to select left/right/top/bottom*/ uint8_t inv: 1; -} _lv_draw_mask_line_param_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_draw_mask_line_param_t lv_draw_mask_line_param_t; +} lv_draw_mask_line_param_t; typedef struct { /*The first element must be the common descriptor*/ @@ -148,10 +145,7 @@ typedef struct { lv_draw_mask_line_param_t start_line; lv_draw_mask_line_param_t end_line; uint16_t delta_deg; -} _lv_draw_mask_angle_param_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_draw_mask_angle_param_t lv_draw_mask_angle_param_t; +} lv_draw_mask_angle_param_t; typedef struct { /*The first element must be the common descriptor*/ @@ -166,10 +160,8 @@ typedef struct { int32_t y_prev; lv_sqrt_res_t y_prev_x; -} _lv_draw_mask_radius_param_t; +} lv_draw_mask_radius_param_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_draw_mask_radius_param_t lv_draw_mask_radius_param_t; typedef struct { /*The first element must be the common descriptor*/ @@ -183,10 +175,8 @@ typedef struct { lv_opa_t opa_bottom; } cfg; -} _lv_draw_mask_fade_param_t; +} lv_draw_mask_fade_param_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_draw_mask_fade_param_t lv_draw_mask_fade_param_t; typedef struct _lv_draw_mask_map_param_t { /*The first element must be the common descriptor*/ @@ -196,10 +186,8 @@ typedef struct _lv_draw_mask_map_param_t { lv_area_t coords; const lv_opa_t * map; } cfg; -} _lv_draw_mask_map_param_t; +} lv_draw_mask_map_param_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_draw_mask_map_param_t lv_draw_mask_map_param_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/draw/lv_img_buf.c b/src/draw/lv_img_buf.c index 14d4741cb..e01c77313 100644 --- a/src/draw/lv_img_buf.c +++ b/src/draw/lv_img_buf.c @@ -415,7 +415,7 @@ uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf) * Initialize a descriptor to transform an image * @param dsc pointer to an `lv_img_transform_dsc_t` variable whose `cfg` field is initialized */ -void _lv_img_buf_transform_init(_lv_img_transform_dsc_t * dsc) +void _lv_img_buf_transform_init(lv_img_transform_dsc_t * dsc) { dsc->tmp.pivot_x_256 = dsc->cfg.pivot_x * 256; dsc->tmp.pivot_y_256 = dsc->cfg.pivot_y * 256; @@ -566,7 +566,7 @@ void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t * @return true: there is valid pixel on these x/y coordinates; false: the rotated pixel was out of the image * @note the result is written back to `dsc->res_color` and `dsc->res_opa` */ -bool _lv_img_buf_transform(_lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t y) +bool _lv_img_buf_transform(lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t y) { const uint8_t * src_u8 = (const uint8_t *)dsc->cfg.src; @@ -651,7 +651,7 @@ bool _lv_img_buf_transform(_lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord * Continue transformation by taking the neighbors into account * @param dsc pointer to the transformation descriptor */ -bool _lv_img_buf_transform_anti_alias(_lv_img_transform_dsc_t * dsc) +bool _lv_img_buf_transform_anti_alias(lv_img_transform_dsc_t * dsc) { const uint8_t * src_u8 = dsc->cfg.src; diff --git a/src/draw/lv_img_buf.h b/src/draw/lv_img_buf.h index 8298923e9..984483e5e 100644 --- a/src/draw/lv_img_buf.h +++ b/src/draw/lv_img_buf.h @@ -178,10 +178,8 @@ typedef struct { uint32_t pxi; uint8_t px_size; } tmp; -} _lv_img_transform_dsc_t; +} lv_img_transform_dsc_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_img_transform_dsc_t lv_img_transform_dsc_t; /********************** * GLOBAL PROTOTYPES @@ -270,13 +268,13 @@ uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf); * Initialize a descriptor to rotate an image * @param dsc pointer to an `lv_img_transform_dsc_t` variable whose `cfg` field is initialized */ -void _lv_img_buf_transform_init(_lv_img_transform_dsc_t * dsc); +void _lv_img_buf_transform_init(lv_img_transform_dsc_t * dsc); /** * Continue transformation by taking the neighbors into account * @param dsc pointer to the transformation descriptor */ -bool _lv_img_buf_transform_anti_alias(_lv_img_transform_dsc_t * dsc); +bool _lv_img_buf_transform_anti_alias(lv_img_transform_dsc_t * dsc); /** * Get which color and opa would come to a pixel if it were rotated @@ -286,7 +284,7 @@ bool _lv_img_buf_transform_anti_alias(_lv_img_transform_dsc_t * dsc); * @return true: there is valid pixel on these x/y coordinates; false: the rotated pixel was out of the image * @note the result is written back to `dsc->res_color` and `dsc->res_opa` */ -bool _lv_img_buf_transform(_lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t y); +bool _lv_img_buf_transform(lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t y); #endif /** diff --git a/src/draw/lv_img_decoder.h b/src/draw/lv_img_decoder.h index dd53d144c..ebebf1091 100644 --- a/src/draw/lv_img_decoder.h +++ b/src/draw/lv_img_decoder.h @@ -44,10 +44,6 @@ typedef uint8_t lv_img_src_t; struct _lv_img_decoder_dsc_t; struct _lv_img_decoder_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_img_decoder_dsc_t lv_img_decoder_dsc_t; -typedef struct _lv_img_decoder_t lv_img_decoder_t; - /** * Get info from an image and store in the `header` * @param src the image source. Can be a pointer to a C array or a file name (Use @@ -55,7 +51,7 @@ typedef struct _lv_img_decoder_t lv_img_decoder_t; * @param header store the info here * @return LV_RES_OK: info written correctly; LV_RES_INV: failed */ -typedef lv_res_t (*lv_img_decoder_info_f_t)(lv_img_decoder_t * decoder, const void * src, +typedef lv_res_t (*lv_img_decoder_info_f_t)(struct _lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); /** @@ -63,7 +59,7 @@ typedef lv_res_t (*lv_img_decoder_info_f_t)(lv_img_decoder_t * decoder, const vo * @param decoder pointer to the decoder the function associated with * @param dsc pointer to decoder descriptor. `src`, `color` are already initialized in it. */ -typedef lv_res_t (*lv_img_decoder_open_f_t)(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); +typedef lv_res_t (*lv_img_decoder_open_f_t)(struct _lv_img_decoder_t * decoder, struct _lv_img_decoder_dsc_t * dsc); /** * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`. @@ -76,7 +72,7 @@ typedef lv_res_t (*lv_img_decoder_open_f_t)(lv_img_decoder_t * decoder, lv_img_d * @param buf a buffer to store the decoded pixels * @return LV_RES_OK: ok; LV_RES_INV: failed */ -typedef lv_res_t (*lv_img_decoder_read_line_f_t)(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, +typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder_t * decoder, struct _lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); /** @@ -84,7 +80,7 @@ typedef lv_res_t (*lv_img_decoder_read_line_f_t)(lv_img_decoder_t * decoder, lv_ * @param decoder pointer to the decoder the function associated with * @param dsc pointer to decoder descriptor */ -typedef void (*lv_img_decoder_close_f_t)(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); +typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder_t * decoder, struct _lv_img_decoder_dsc_t * dsc); typedef struct _lv_img_decoder_t { diff --git a/src/extra/widgets/animimg/lv_animimg.h b/src/extra/widgets/animimg/lv_animimg.h index 3397887d4..f1f74484e 100644 --- a/src/extra/widgets/animimg/lv_animimg.h +++ b/src/extra/widgets/animimg/lv_animimg.h @@ -36,10 +36,7 @@ typedef struct { /*picture sequence */ lv_img_dsc_t **dsc; int8_t pic_count; -} _lv_animimg_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_animimg_t lv_animimg_t; +} lv_animimg_t; /*Image parts*/ diff --git a/src/extra/widgets/calendar/lv_calendar.h b/src/extra/widgets/calendar/lv_calendar.h index b62cc2908..1fe0c4654 100644 --- a/src/extra/widgets/calendar/lv_calendar.h +++ b/src/extra/widgets/calendar/lv_calendar.h @@ -44,10 +44,7 @@ typedef struct { uint16_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/ const char * map[8 * 7]; char nums [7 * 6][4]; -} _lv_calendar_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_calendar_t lv_calendar_t; +} lv_calendar_t; extern const lv_obj_class_t lv_calendar_class; diff --git a/src/extra/widgets/chart/lv_chart.h b/src/extra/widgets/chart/lv_chart.h index f8d19d54f..03b85e7d9 100644 --- a/src/extra/widgets/chart/lv_chart.h +++ b/src/extra/widgets/chart/lv_chart.h @@ -74,10 +74,7 @@ typedef struct { uint8_t y_ext_buf_assigned : 1; uint8_t x_axis_sec : 1; uint8_t y_axis_sec : 1; -} _lv_chart_series_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_chart_series_t lv_chart_series_t; +} lv_chart_series_t; typedef struct { lv_point_t pos; @@ -86,10 +83,7 @@ typedef struct { lv_chart_series_t * ser; lv_dir_t dir; uint8_t pos_set:1; /*1: pos is set; 0: point_id is set*/ -} _lv_chart_cursor_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_chart_cursor_t lv_chart_cursor_t; +} lv_chart_cursor_t; typedef struct { lv_coord_t major_len; @@ -98,10 +92,8 @@ typedef struct { uint32_t minor_cnt :15; uint32_t major_cnt :15; uint32_t label_en :1; -}_lv_chart_tick_dsc_t; +}lv_chart_tick_dsc_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_chart_tick_dsc_t lv_chart_tick_dsc_t; typedef struct { lv_obj_t obj; @@ -120,10 +112,7 @@ typedef struct { uint16_t zoom_y; lv_chart_type_t type :3; /**< Line or column chart*/ lv_chart_update_mode_t update_mode : 1; -}_lv_chart_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_chart_t lv_chart_t; +}lv_chart_t; extern const lv_obj_class_t lv_chart_class; diff --git a/src/extra/widgets/colorwheel/lv_colorwheel.h b/src/extra/widgets/colorwheel/lv_colorwheel.h index ad1bbb078..b257af93d 100644 --- a/src/extra/widgets/colorwheel/lv_colorwheel.h +++ b/src/extra/widgets/colorwheel/lv_colorwheel.h @@ -46,10 +46,7 @@ typedef struct { lv_point_t last_press_point; lv_colorwheel_mode_t mode : 2; uint8_t mode_fixed : 1; -} _lv_colorwheel_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_colorwheel_t lv_colorwheel_t; +} lv_colorwheel_t; extern const lv_obj_class_t lv_colorwheel_class; diff --git a/src/extra/widgets/imgbtn/lv_imgbtn.h b/src/extra/widgets/imgbtn/lv_imgbtn.h index 8a30c1821..20eee9ce2 100644 --- a/src/extra/widgets/imgbtn/lv_imgbtn.h +++ b/src/extra/widgets/imgbtn/lv_imgbtn.h @@ -40,10 +40,7 @@ typedef struct { const void * img_src_left[_LV_IMGBTN_STATE_NUM]; /*Store left side images to each state*/ const void * img_src_right[_LV_IMGBTN_STATE_NUM]; /*Store right side images to each state*/ lv_img_cf_t act_cf; /*Color format of the currently active image*/ -} _lv_imgbtn_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_imgbtn_t lv_imgbtn_t; +} lv_imgbtn_t; extern const lv_obj_class_t lv_imgbtn_class; diff --git a/src/extra/widgets/keyboard/lv_keyboard.h b/src/extra/widgets/keyboard/lv_keyboard.h index ba42c3e27..2aa2f3d11 100644 --- a/src/extra/widgets/keyboard/lv_keyboard.h +++ b/src/extra/widgets/keyboard/lv_keyboard.h @@ -49,10 +49,7 @@ typedef struct { lv_btnmatrix_t btnm; lv_obj_t * ta; /*Pointer to the assigned text area*/ lv_keyboard_mode_t mode; /*Key map type*/ -} _lv_keyboard_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_keyboard_t lv_keyboard_t; +} lv_keyboard_t; extern const lv_obj_class_t lv_keyboard_class; diff --git a/src/extra/widgets/led/lv_led.h b/src/extra/widgets/led/lv_led.h index e6d94b7b1..7c9b350cb 100644 --- a/src/extra/widgets/led/lv_led.h +++ b/src/extra/widgets/led/lv_led.h @@ -31,10 +31,7 @@ typedef struct { lv_obj_t obj; lv_color_t color; uint8_t bright; /**< Current brightness of the LED (0..255)*/ -} _lv_led_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_led_t lv_led_t; +} lv_led_t; extern const lv_obj_class_t lv_led_class; diff --git a/src/extra/widgets/meter/lv_meter.h b/src/extra/widgets/meter/lv_meter.h index d91a6e2bf..1151408d7 100644 --- a/src/extra/widgets/meter/lv_meter.h +++ b/src/extra/widgets/meter/lv_meter.h @@ -44,10 +44,7 @@ typedef struct { int16_t r_mod; uint16_t angle_range; int16_t rotation; -}_lv_meter_scale_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_meter_scale_t lv_meter_scale_t; +}lv_meter_scale_t; typedef enum { LV_METER_INDICATOR_TYPE_NEEDLE_IMG, @@ -85,22 +82,14 @@ typedef struct { uint8_t local_grad :1; }scale_lines; } type_data; -}_lv_meter_indicator_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_meter_indicator_t lv_meter_indicator_t; - +}lv_meter_indicator_t; /*Data of line meter*/ typedef struct { lv_obj_t obj; lv_ll_t scale_ll; lv_ll_t indicator_ll; -} _lv_meter_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_meter_t lv_meter_t; - +} lv_meter_t; extern const lv_obj_class_t lv_meter_class; diff --git a/src/extra/widgets/span/lv_span.h b/src/extra/widgets/span/lv_span.h index 2c0304003..1670b3b58 100644 --- a/src/extra/widgets/span/lv_span.h +++ b/src/extra/widgets/span/lv_span.h @@ -44,10 +44,7 @@ typedef struct { char * txt; lv_style_t style; uint8_t static_flag : 1; -} _lv_span_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_span_t lv_span_t; +} lv_span_t; /** Data of label*/ typedef struct { @@ -57,10 +54,7 @@ typedef struct { uint8_t mode : 2; uint8_t align : 2; uint8_t overflow : 1; -} _lv_spangroup_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_spangroup_t lv_spangroup_t; +} lv_spangroup_t; extern const lv_obj_class_t lv_spangroup_class; diff --git a/src/extra/widgets/spinbox/lv_spinbox.h b/src/extra/widgets/spinbox/lv_spinbox.h index 59f35dd14..92000a042 100644 --- a/src/extra/widgets/spinbox/lv_spinbox.h +++ b/src/extra/widgets/spinbox/lv_spinbox.h @@ -42,10 +42,7 @@ typedef struct { uint16_t digit_count : 4; uint16_t dec_point_pos : 4; /*if 0, there is no separator and the number is an integer*/ uint16_t rollover : 1; // Set to true for rollover functionality -} _lv_spinbox_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_spinbox_t lv_spinbox_t; +} lv_spinbox_t; extern const lv_obj_class_t lv_spinbox_class; diff --git a/src/extra/widgets/tabview/lv_tabview.h b/src/extra/widgets/tabview/lv_tabview.h index 811bc4b60..4cfc4971b 100644 --- a/src/extra/widgets/tabview/lv_tabview.h +++ b/src/extra/widgets/tabview/lv_tabview.h @@ -32,10 +32,7 @@ typedef struct uint16_t tab_cnt; uint16_t tab_cur; lv_dir_t tab_pos; -}_lv_tabview_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_tabview_t lv_tabview_t; +}lv_tabview_t; extern const lv_obj_class_t lv_tabview_class; diff --git a/src/extra/widgets/tileview/lv_tileview.h b/src/extra/widgets/tileview/lv_tileview.h index d1c73e956..79f1acd46 100644 --- a/src/extra/widgets/tileview/lv_tileview.h +++ b/src/extra/widgets/tileview/lv_tileview.h @@ -27,18 +27,12 @@ extern "C" { typedef struct { lv_obj_t obj; lv_obj_t * tile_act; -}_lv_tileview_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_tileview_t lv_tileview_t; +}lv_tileview_t; typedef struct { lv_obj_t obj; lv_dir_t dir; -}_lv_tileview_tile_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_tileview_tile_t lv_tileview_tile_t; +}lv_tileview_tile_t; extern const lv_obj_class_t lv_tileview_class; extern const lv_obj_class_t lv_tileview_tile_class; diff --git a/src/extra/widgets/win/lv_win.h b/src/extra/widgets/win/lv_win.h index 1bde470bc..524596339 100644 --- a/src/extra/widgets/win/lv_win.h +++ b/src/extra/widgets/win/lv_win.h @@ -24,10 +24,7 @@ extern "C" { **********************/ typedef struct { lv_obj_t obj; -}_lv_win_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_win_t lv_win_t; +}lv_win_t; extern const lv_obj_class_t lv_win_class; diff --git a/src/font/lv_font.h b/src/font/lv_font.h index 2442c4ee3..b68f5b9a0 100644 --- a/src/font/lv_font.h +++ b/src/font/lv_font.h @@ -55,16 +55,13 @@ typedef uint8_t lv_font_subpx_t; struct _lv_font_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_font_t lv_font_t; - /** Describe the properties of a font*/ typedef struct _lv_font_t { /** Get a glyph's descriptor from a font*/ - bool (*get_glyph_dsc)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); + bool (*get_glyph_dsc)(const struct _lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); /** Get a glyph's bitmap from a font*/ - const uint8_t * (*get_glyph_bitmap)(const lv_font_t *, uint32_t); + const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_t *, uint32_t); /*Pointer to the font in a font pack (must have the same line height)*/ lv_coord_t line_height; /**< The real line height where any text fits*/ diff --git a/src/font/lv_font_fmt_txt.h b/src/font/lv_font_fmt_txt.h index 99750779f..9c9d422a8 100644 --- a/src/font/lv_font_fmt_txt.h +++ b/src/font/lv_font_fmt_txt.h @@ -43,10 +43,7 @@ typedef struct { int16_t ofs_x; /**< x offset of the bounding box*/ int16_t ofs_y; /**< y offset of the bounding box. Measured from the top of the line*/ #endif -} _lv_font_fmt_txt_glyph_dsc_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_font_fmt_txt_glyph_dsc_t lv_font_fmt_txt_glyph_dsc_t; +} lv_font_fmt_txt_glyph_dsc_t; /** Format of font character map.*/ enum { @@ -113,10 +110,7 @@ typedef struct { /** Type of this character map*/ lv_font_fmt_txt_cmap_type_t type; -} _lv_font_fmt_txt_cmap_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_font_fmt_txt_cmap_t lv_font_fmt_txt_cmap_t; +} lv_font_fmt_txt_cmap_t; /** A simple mapping of kern values from pairs*/ typedef struct { @@ -131,10 +125,7 @@ typedef struct { const int8_t * values; uint32_t pair_cnt : 30; uint32_t glyph_ids_size : 2; /*0: `glyph_ids` is stored as `uint8_t`; 1: as `uint16_t`*/ -} _lv_font_fmt_txt_kern_pair_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_font_fmt_txt_kern_pair_t lv_font_fmt_txt_kern_pair_t; +} lv_font_fmt_txt_kern_pair_t; /** More complex but more optimal class based kern value storage*/ typedef struct { @@ -151,10 +142,7 @@ typedef struct { const uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ uint8_t left_class_cnt; uint8_t right_class_cnt; -} _lv_font_fmt_txt_kern_classes_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_font_fmt_txt_kern_classes_t lv_font_fmt_txt_kern_classes_t; +} lv_font_fmt_txt_kern_classes_t; /** Bitmap formats*/ typedef enum { @@ -166,10 +154,7 @@ typedef enum { typedef struct { uint32_t last_letter; uint32_t last_glyph_id; -}_lv_font_fmt_txt_glyph_cache_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_font_fmt_txt_glyph_cache_t lv_font_fmt_txt_glyph_cache_t; +} lv_font_fmt_txt_glyph_cache_t; /*Describe store additional data for fonts*/ typedef struct { @@ -210,10 +195,7 @@ typedef struct { /*Cache the last letter and is glyph id*/ lv_font_fmt_txt_glyph_cache_t * cache; -} _lv_font_fmt_txt_dsc_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_font_fmt_txt_dsc_t lv_font_fmt_txt_dsc_t; +} lv_font_fmt_txt_dsc_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/hal/lv_hal_disp.h b/src/hal/lv_hal_disp.h index 37ccf68ee..9a6315320 100644 --- a/src/hal/lv_hal_disp.h +++ b/src/hal/lv_hal_disp.h @@ -43,10 +43,6 @@ struct _lv_disp_t; struct _lv_disp_drv_t; struct _lv_theme_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_disp_drv_t lv_disp_drv_t; -typedef struct _lv_obj_t lv_obj_t; - /** * Structure for holding display buffer information. */ @@ -64,10 +60,7 @@ typedef struct _lv_disp_draw_buf_t{ volatile int flushing_last; volatile uint32_t last_area : 1; /*1: the last area is being rendered*/ volatile uint32_t last_part : 1; /*1: the last part of the current area is being rendered*/ -} _lv_disp_draw_buf_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_disp_draw_buf_t lv_disp_draw_buf_t; +} lv_disp_draw_buf_t; typedef enum { LV_DISP_ROT_NONE = 0, @@ -101,38 +94,38 @@ typedef struct _lv_disp_drv_t { /** MANDATORY: Write the internal buffer (draw_buf) to the display. 'lv_disp_flush_ready()' has to be * called when finished*/ - void (*flush_cb)(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); + void (*flush_cb)(struct _lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); /** OPTIONAL: Extend the invalidated areas to match with the display drivers requirements * E.g. round `y` to, 8, 16 ..) on a monochrome display*/ - void (*rounder_cb)(lv_disp_drv_t * disp_drv, lv_area_t * area); + void (*rounder_cb)(struct _lv_disp_drv_t * disp_drv, lv_area_t * area); /** OPTIONAL: Set a pixel in a buffer according to the special requirements of the display * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales * @note Much slower then drawing with supported color formats.*/ - void (*set_px_cb)(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, + void (*set_px_cb)(struct _lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); /** OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the * number of flushed pixels*/ - void (*monitor_cb)(lv_disp_drv_t * disp_drv, uint32_t time, uint32_t px); + void (*monitor_cb)(struct _lv_disp_drv_t * disp_drv, uint32_t time, uint32_t px); /** OPTIONAL: Called periodically while lvgl waits for operation to be completed. * For example flushing or GPU * User can execute very simple tasks here or yield the task*/ - void (*wait_cb)(lv_disp_drv_t * disp_drv); + void (*wait_cb)(struct _lv_disp_drv_t * disp_drv); /** OPTIONAL: Called when lvgl needs any CPU cache that affects rendering to be cleaned*/ - void (*clean_dcache_cb)(lv_disp_drv_t * disp_drv); + void (*clean_dcache_cb)(struct _lv_disp_drv_t * disp_drv); /** OPTIONAL: called to wait while the gpu is working*/ - void (*gpu_wait_cb)(lv_disp_drv_t * disp_drv); + void (*gpu_wait_cb)(struct _lv_disp_drv_t * disp_drv); /** OPTIONAL: called when driver parameters are updated */ - void (*drv_update_cb)(lv_disp_drv_t * disp_drv); + void (*drv_update_cb)(struct _lv_disp_drv_t * disp_drv); /** OPTIONAL: Fill a memory with a color (GPU only)*/ - void (*gpu_fill_cb)(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width, + void (*gpu_fill_cb)(struct _lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width, const lv_area_t * fill_area, lv_color_t color); /** On CHROMA_KEYED images this color will be transparent. @@ -151,7 +144,7 @@ typedef struct _lv_disp_drv_t { */ typedef struct _lv_disp_t { /**< Driver to the display*/ - lv_disp_drv_t * driver; + struct _lv_disp_drv_t * driver; /**< A timer which periodically checks the dirty areas and refreshes them*/ lv_timer_t * refr_timer; @@ -160,12 +153,12 @@ typedef struct _lv_disp_t { struct _lv_theme_t * theme; /** Screens of the display*/ - lv_obj_t ** screens; /**< Array of screen objects.*/ - lv_obj_t * act_scr; /**< Currently active screen on this display*/ - lv_obj_t * prev_scr; /**< Previous screen. Used during screen animations*/ - lv_obj_t * scr_to_load; /**< The screen prepared to load in lv_scr_load_anim*/ - lv_obj_t * top_layer; /**< @see lv_disp_get_layer_top*/ - lv_obj_t * sys_layer; /**< @see lv_disp_get_layer_sys*/ + struct _lv_obj_t ** screens; /**< Array of screen objects.*/ + struct _lv_obj_t * act_scr; /**< Currently active screen on this display*/ + struct _lv_obj_t * prev_scr; /**< Previous screen. Used during screen animations*/ + struct _lv_obj_t * scr_to_load; /**< The screen prepared to load in lv_scr_load_anim*/ + struct _lv_obj_t * top_layer; /**< @see lv_disp_get_layer_top*/ + struct _lv_obj_t * sys_layer; /**< @see lv_disp_get_layer_sys*/ uint32_t screen_cnt; uint8_t del_prev : 1; /**< 1: Automatically delete the previous screen when the screen load animation is ready*/ @@ -180,10 +173,7 @@ typedef struct _lv_disp_t { /*Miscellaneous data*/ uint32_t last_activity_time; /**< Last time when there was activity on this display*/ -} _lv_disp_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_disp_t lv_disp_t; +} lv_disp_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/hal/lv_hal_indev.h b/src/hal/lv_hal_indev.h index f28e8a330..7aae53ae4 100644 --- a/src/hal/lv_hal_indev.h +++ b/src/hal/lv_hal_indev.h @@ -58,12 +58,6 @@ struct _lv_group_t; struct _lv_indev_t; struct _lv_indev_drv_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_indev_drv_t lv_indev_drv_t; -typedef struct _lv_indev_t lv_indev_t; -typedef struct _lv_group_t lv_group_t; -typedef struct _lv_obj_t lv_obj_t; - /** Possible input device types*/ typedef enum { LV_INDEV_TYPE_NONE, /**< Uninitialized state*/ @@ -97,11 +91,11 @@ typedef struct _lv_indev_drv_t { lv_indev_type_t type; /**< Function pointer to read input device data.*/ - void (*read_cb)(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); + void (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data); /** Called when an action happened on the input device. * The second parameter is the event from `lv_event_t`*/ - void (*feedback_cb)(lv_indev_drv_t *, uint8_t); + void (*feedback_cb)(struct _lv_indev_drv_t *, uint8_t); #if LV_USE_USER_DATA void * user_data; @@ -130,7 +124,7 @@ typedef struct _lv_indev_drv_t { /**< Repeated trigger period in long press [ms]*/ uint16_t long_press_repeat_time; -} _lv_indev_drv_t; +} lv_indev_drv_t; /** Run time data of input devices * Internally used by the library, you should not need to touch it. @@ -153,10 +147,10 @@ typedef struct _lv_indev_proc_t { lv_point_t scroll_sum; /*Count the dragged pixels to check LV_INDEV_DEF_SCROLL_LIMIT*/ lv_point_t scroll_throw_vect; lv_point_t scroll_throw_vect_ori; - lv_obj_t * act_obj; /*The object being pressed*/ - lv_obj_t * last_obj; /*The last object which was pressed*/ - lv_obj_t * scroll_obj; /*The object being scrolled*/ - lv_obj_t * last_pressed; /*The lastly pressed object*/ + struct _lv_obj_t * act_obj; /*The object being pressed*/ + struct _lv_obj_t * last_obj; /*The last object which was pressed*/ + struct _lv_obj_t * scroll_obj; /*The object being scrolled*/ + struct _lv_obj_t * last_pressed; /*The lastly pressed object*/ lv_area_t scroll_area; lv_point_t gesture_sum; /*Count the gesture pixels to check LV_INDEV_DEF_GESTURE_LIMIT*/ @@ -179,16 +173,13 @@ typedef struct _lv_indev_proc_t { /** The main input device descriptor with driver, runtime data ('proc') and some additional * information*/ typedef struct _lv_indev_t { - lv_indev_drv_t * driver; + struct _lv_indev_drv_t * driver; _lv_indev_proc_t proc; - lv_obj_t * cursor; /**< Cursor for LV_INPUT_TYPE_POINTER*/ - lv_group_t * group; /**< Keypad destination group*/ + struct _lv_obj_t * cursor; /**< Cursor for LV_INPUT_TYPE_POINTER*/ + struct _lv_group_t * group; /**< Keypad destination group*/ const lv_point_t * btn_points; /**< Array points assigned to the button ()screen will be pressed here by the buttons*/ -} _lv_indev_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_indev_t lv_indev_t; +} lv_indev_t; /********************** * GLOBAL PROTOTYPES @@ -200,21 +191,21 @@ typedef _lv_indev_t lv_indev_t; * After it you can set the fields. * @param driver pointer to driver variable to initialize */ -void lv_indev_drv_init(lv_indev_drv_t * driver); +void lv_indev_drv_init(struct _lv_indev_drv_t * driver); /** * Register an initialized input device driver. * @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable) * @return pointer to the new input device or NULL on error */ -lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver); +lv_indev_t * lv_indev_drv_register(struct _lv_indev_drv_t * driver); /** * Update the driver in run time. * @param indev pointer to a input device. (return value of `lv_indev_drv_register`) * @param new_drv pointer to the new driver */ -void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv); +void lv_indev_drv_update(lv_indev_t * indev, struct _lv_indev_drv_t * new_drv); /** * Get the next input device. diff --git a/src/misc/lv_anim.h b/src/misc/lv_anim.h index f572b6d95..fe8644540 100644 --- a/src/misc/lv_anim.h +++ b/src/misc/lv_anim.h @@ -37,11 +37,9 @@ typedef enum { LV_EXPORT_CONST_INT(LV_ANIM_REPEAT_INFINITE); struct _lv_anim_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_anim_t lv_anim_t; /** Get the current value during an animation*/ -typedef int32_t (*lv_anim_path_cb_t)(const lv_anim_t *); +typedef int32_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *); /** Generic prototype of "animator" functions. * First parameter is the variable to animate. @@ -53,16 +51,16 @@ typedef void (*lv_anim_exec_xcb_t)(void *, int32_t); /** Same as `lv_anim_exec_xcb_t` but receives `lv_anim_t *` as the first parameter. * It's more consistent but less convenient. Might be used by binding generator functions.*/ -typedef void (*lv_anim_custom_exec_cb_t)(lv_anim_t *, int32_t); +typedef void (*lv_anim_custom_exec_cb_t)(struct _lv_anim_t *, int32_t); /** Callback to call when the animation is ready*/ -typedef void (*lv_anim_ready_cb_t)(lv_anim_t *); +typedef void (*lv_anim_ready_cb_t)(struct _lv_anim_t *); /** Callback to call when the animation really stars (considering `delay`)*/ -typedef void (*lv_anim_start_cb_t)(lv_anim_t *); +typedef void (*lv_anim_start_cb_t)(struct _lv_anim_t *); /** Callback used when the animation values are relative to get the current value*/ -typedef int32_t (*lv_anim_get_value_cb_t)(lv_anim_t *); +typedef int32_t (*lv_anim_get_value_cb_t)(struct _lv_anim_t *); /** Describes an animation*/ typedef struct _lv_anim_t { @@ -91,7 +89,7 @@ typedef struct _lv_anim_t { uint8_t run_round : 1; /**< Indicates the animation has run in this round*/ uint8_t start_cb_called : 1; /**< Indicates that the `start_cb` was already called*/ uint32_t time_orig; -} _lv_anim_t; +} lv_anim_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/misc/lv_color.h b/src/misc/lv_color.h index 0e3b4e7aa..01d222ce5 100644 --- a/src/misc/lv_color.h +++ b/src/misc/lv_color.h @@ -266,10 +266,8 @@ typedef uint8_t lv_opa_t; //! @endcond struct _lv_color_filter_dsc_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_color_filter_dsc_t lv_color_filter_dsc_t; -typedef lv_color_t (*lv_color_filter_cb_t)(const lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); +typedef lv_color_t (*lv_color_filter_cb_t)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); typedef struct _lv_color_filter_dsc_t { lv_color_filter_cb_t filter_cb; diff --git a/src/misc/lv_fs.h b/src/misc/lv_fs.h index 6039991c8..44aeb9157 100644 --- a/src/misc/lv_fs.h +++ b/src/misc/lv_fs.h @@ -68,25 +68,20 @@ enum { }; typedef uint8_t lv_fs_whence_t; -struct _lv_fs_drv_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_fs_drv_t lv_fs_drv_t; - typedef struct _lv_fs_drv_t { char letter; - bool (*ready_cb)(lv_fs_drv_t * drv); + bool (*ready_cb)(struct _lv_fs_drv_t * drv); - void * (*open_cb)(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode); - lv_fs_res_t (*close_cb)(lv_fs_drv_t * drv, void * file_p); - lv_fs_res_t (*read_cb)(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); - lv_fs_res_t (*write_cb)(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw); - lv_fs_res_t (*seek_cb)(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); - lv_fs_res_t (*tell_cb)(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); + void * (*open_cb)(struct _lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode); + lv_fs_res_t (*close_cb)(struct _lv_fs_drv_t * drv, void * file_p); + lv_fs_res_t (*read_cb)(struct _lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); + lv_fs_res_t (*write_cb)(struct _lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw); + lv_fs_res_t (*seek_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); + lv_fs_res_t (*tell_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); - void * (*dir_open_cb)(lv_fs_drv_t * drv, const char * path); - lv_fs_res_t (*dir_read_cb)(lv_fs_drv_t * drv, void * rddir_p, char * fn); - lv_fs_res_t (*dir_close_cb)(lv_fs_drv_t * drv, void * rddir_p); + void * (*dir_open_cb)(struct _lv_fs_drv_t * drv, const char * path); + lv_fs_res_t (*dir_read_cb)(struct _lv_fs_drv_t * drv, void * rddir_p, char * fn); + lv_fs_res_t (*dir_close_cb)(struct _lv_fs_drv_t * drv, void * rddir_p); #if LV_USE_USER_DATA void * user_data; /**< Custom file user data*/ diff --git a/src/misc/lv_ll.h b/src/misc/lv_ll.h index 20f8e9fc9..f5ce966a6 100644 --- a/src/misc/lv_ll.h +++ b/src/misc/lv_ll.h @@ -33,10 +33,7 @@ typedef struct { uint32_t n_size; lv_ll_node_t * head; lv_ll_node_t * tail; -} _lv_ll_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_ll_t lv_ll_t; +} lv_ll_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/misc/lv_mem.h b/src/misc/lv_mem.h index 7ea1caf1b..bf419f8de 100644 --- a/src/misc/lv_mem.h +++ b/src/misc/lv_mem.h @@ -54,10 +54,7 @@ typedef struct { void * p; uint16_t size; uint8_t used : 1; -} _lv_mem_buf_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_mem_buf_t lv_mem_buf_t; +} lv_mem_buf_t; typedef lv_mem_buf_t lv_mem_buf_arr_t[LV_MEM_BUF_MAX_NUM]; diff --git a/src/misc/lv_style.h b/src/misc/lv_style.h index d457c8f4f..0f4ae1f52 100644 --- a/src/misc/lv_style.h +++ b/src/misc/lv_style.h @@ -234,7 +234,7 @@ typedef enum { /** * Descriptor for style transitions */ -typedef struct _lv_style_transiton_t { +typedef struct { const lv_style_prop_t * props; /**< An array with the properties to animate.*/ #if LV_USE_USER_DATA void * user_data; /**< A custom user data that will be passed to the animation's user_data */ @@ -242,10 +242,7 @@ typedef struct _lv_style_transiton_t { lv_anim_path_cb_t path_xcb; /**< A path for the animation.*/ uint32_t time; /**< Duration of the transition in [ms]*/ uint32_t delay; /**< Delay before the transition in [ms]*/ -}_lv_style_transition_dsc_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_style_transition_dsc_t lv_style_transition_dsc_t; +}lv_style_transition_dsc_t; /** * Descriptor of a constant style property. @@ -276,10 +273,7 @@ typedef struct { uint16_t is_const :1; uint8_t has_group; uint8_t prop_cnt; -} _lv_style_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_style_t lv_style_t; +} lv_style_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/misc/lv_timer.h b/src/misc/lv_timer.h index 839c26ad2..015543734 100644 --- a/src/misc/lv_timer.h +++ b/src/misc/lv_timer.h @@ -33,13 +33,11 @@ extern "C" { **********************/ struct _lv_timer_t; -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef struct _lv_timer_t lv_timer_t; /** * Timers execute this type of functions. */ -typedef void (*lv_timer_cb_t)(lv_timer_t *); +typedef void (*lv_timer_cb_t)(struct _lv_timer_t *); /** * Descriptor of a lv_timer @@ -51,10 +49,7 @@ typedef struct _lv_timer_t { void * user_data; /**< Custom user data*/ int32_t repeat_count; /**< 1: One time; -1 : infinity; n>0: residual times*/ uint32_t paused :1; -} _lv_timer_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_timer_t lv_timer_t; +} lv_timer_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/widgets/lv_arc.h b/src/widgets/lv_arc.h index 27913a793..6fbc9b761 100644 --- a/src/widgets/lv_arc.h +++ b/src/widgets/lv_arc.h @@ -50,10 +50,7 @@ typedef struct { uint16_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/ uint32_t last_tick; /*Last dragging event timestamp of the arc*/ int16_t last_angle; /*Last dragging angle of the arc*/ -}_lv_arc_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_arc_t lv_arc_t; +}lv_arc_t; extern const lv_obj_class_t lv_arc_class; diff --git a/src/widgets/lv_bar.h b/src/widgets/lv_bar.h index fc5fc8ac2..cb3f99d20 100644 --- a/src/widgets/lv_bar.h +++ b/src/widgets/lv_bar.h @@ -54,10 +54,7 @@ typedef struct { _lv_bar_anim_t cur_value_anim; _lv_bar_anim_t start_value_anim; lv_bar_mode_t mode : 2; /**< Type of bar*/ -}_lv_bar_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_bar_t lv_bar_t; +}lv_bar_t; extern const lv_obj_class_t lv_bar_class; diff --git a/src/widgets/lv_btn.h b/src/widgets/lv_btn.h index 6c2dc9e27..8a5af5102 100644 --- a/src/widgets/lv_btn.h +++ b/src/widgets/lv_btn.h @@ -28,10 +28,7 @@ extern "C" { typedef struct { lv_obj_t obj; -}_lv_btn_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_btn_t lv_btn_t; +}lv_btn_t; extern const lv_obj_class_t lv_btn_class; diff --git a/src/widgets/lv_btnmatrix.h b/src/widgets/lv_btnmatrix.h index b556154b6..c13493d2d 100644 --- a/src/widgets/lv_btnmatrix.h +++ b/src/widgets/lv_btnmatrix.h @@ -58,11 +58,7 @@ typedef struct { uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ uint16_t btn_id_sel; /*Index of the active button (being pressed/released etc) or LV_BTNMATRIX_BTN_NONE*/ uint8_t one_check : 1; /*Single button toggled at once*/ -} _lv_btnmatrix_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_btnmatrix_t lv_btnmatrix_t; - +} lv_btnmatrix_t; extern const lv_obj_class_t lv_btnmatrix_class; diff --git a/src/widgets/lv_canvas.c b/src/widgets/lv_canvas.c index c99ddd433..5101276fa 100644 --- a/src/widgets/lv_canvas.c +++ b/src/widgets/lv_canvas.c @@ -178,7 +178,7 @@ void lv_canvas_transform(lv_obj_t * obj, lv_img_dsc_t * img, int16_t angle, uint int32_t y; bool ret; - _lv_img_transform_dsc_t dsc; + lv_img_transform_dsc_t dsc; dsc.cfg.angle = angle; dsc.cfg.zoom = zoom; dsc.cfg.src = img->data; diff --git a/src/widgets/lv_canvas.h b/src/widgets/lv_canvas.h index a2e27d022..d8c3148ea 100644 --- a/src/widgets/lv_canvas.h +++ b/src/widgets/lv_canvas.h @@ -32,10 +32,7 @@ extern "C" { typedef struct { lv_img_t img; lv_img_dsc_t dsc; -} _lv_canvas_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_canvas_t lv_canvas_t; +} lv_canvas_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/widgets/lv_checkbox.h b/src/widgets/lv_checkbox.h index 36f750bbd..a1027a021 100644 --- a/src/widgets/lv_checkbox.h +++ b/src/widgets/lv_checkbox.h @@ -30,10 +30,7 @@ typedef struct { lv_obj_t obj; char * txt; uint32_t static_txt :1; -}_lv_checkbox_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_checkbox_t lv_checkbox_t; +}lv_checkbox_t; extern const lv_obj_class_t lv_checkbox_class; diff --git a/src/widgets/lv_dropdown.h b/src/widgets/lv_dropdown.h index 143602f4a..9cf81a047 100644 --- a/src/widgets/lv_dropdown.h +++ b/src/widgets/lv_dropdown.h @@ -48,18 +48,12 @@ typedef struct { lv_dir_t dir :4; /**< Direction in which the list should open*/ uint8_t static_txt :1; /**< 1: Only a pointer is saved in `options`*/ uint8_t selected_highlight:1; /**< 1: Make the selected option highlighted in the list*/ -}_lv_dropdown_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_dropdown_t lv_dropdown_t; +}lv_dropdown_t; typedef struct { lv_obj_t obj; lv_obj_t * dropdown; -}_lv_dropdown_list_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_dropdown_list_t lv_dropdown_list_t; +}lv_dropdown_list_t; extern const lv_obj_class_t lv_dropdown_class; extern const lv_obj_class_t lv_dropdownlist_class; diff --git a/src/widgets/lv_img.h b/src/widgets/lv_img.h index 0a7e2ee4e..f731eae91 100644 --- a/src/widgets/lv_img.h +++ b/src/widgets/lv_img.h @@ -41,10 +41,7 @@ typedef struct { uint8_t src_type : 2; /*See: lv_img_src_t*/ uint8_t cf : 5; /*Color format from `lv_img_color_format_t`*/ uint8_t antialias : 1; /*Apply anti-aliasing in transformations (rotate, zoom)*/ -} _lv_img_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_img_t lv_img_t; +} lv_img_t; extern const lv_obj_class_t lv_img_class; diff --git a/src/widgets/lv_label.h b/src/widgets/lv_label.h index bf486833c..2bbfc86f3 100644 --- a/src/widgets/lv_label.h +++ b/src/widgets/lv_label.h @@ -73,10 +73,7 @@ typedef struct { uint8_t recolor : 1; /*Enable in-line letter re-coloring*/ uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_SROLL)*/ uint8_t dot_tmp_alloc : 1; /*1: dot_tmp has been allocated;.0: dot_tmp directly holds up to 4 bytes of characters*/ -}_lv_label_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_label_t lv_label_t; +}lv_label_t; extern const lv_obj_class_t lv_label_class; diff --git a/src/widgets/lv_line.h b/src/widgets/lv_line.h index 967ce2c66..4ba05e88f 100644 --- a/src/widgets/lv_line.h +++ b/src/widgets/lv_line.h @@ -33,10 +33,7 @@ typedef struct { const lv_point_t * point_array; /**< Pointer to an array with the points of the line*/ uint16_t point_num; /**< Number of points in 'point_array'*/ uint8_t y_inv : 1; /**< 1: y == 0 will be on the bottom*/ -} _lv_line_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_line_t lv_line_t; +} lv_line_t; extern const lv_obj_class_t lv_line_class; diff --git a/src/widgets/lv_roller.h b/src/widgets/lv_roller.h index c005582d0..24202734b 100644 --- a/src/widgets/lv_roller.h +++ b/src/widgets/lv_roller.h @@ -43,11 +43,7 @@ typedef struct { uint16_t sel_opt_id_ori; /**< Store the original index on focus*/ lv_roller_mode_t mode : 1; uint32_t moved : 1; -}_lv_roller_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_roller_t lv_roller_t; - +}lv_roller_t; extern const lv_obj_class_t lv_roller_class; diff --git a/src/widgets/lv_slider.h b/src/widgets/lv_slider.h index 32ab5d71c..2cf44d4c1 100644 --- a/src/widgets/lv_slider.h +++ b/src/widgets/lv_slider.h @@ -47,10 +47,7 @@ typedef struct { int32_t * value_to_set; /*Which bar value to set*/ uint8_t dragging : 1; /*1: the slider is being dragged*/ uint8_t left_knob_focus : 1; /*1: with encoder now the right knob can be adjusted*/ -}_lv_slider_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_slider_t lv_slider_t; +}lv_slider_t; extern const lv_obj_class_t lv_slider_class; diff --git a/src/widgets/lv_switch.h b/src/widgets/lv_switch.h index 31b82a887..8ff92afb9 100644 --- a/src/widgets/lv_switch.h +++ b/src/widgets/lv_switch.h @@ -34,10 +34,7 @@ extern "C" { typedef struct { lv_obj_t obj; -}_lv_switch_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_switch_t lv_switch_t; +}lv_switch_t; extern const lv_obj_class_t lv_switch_class; diff --git a/src/widgets/lv_table.h b/src/widgets/lv_table.h index d3eab049b..cd87e19b7 100644 --- a/src/widgets/lv_table.h +++ b/src/widgets/lv_table.h @@ -56,10 +56,7 @@ typedef struct { lv_coord_t * col_w; uint16_t col_act; uint16_t row_act; -} _lv_table_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_table_t lv_table_t; +} lv_table_t; extern const lv_obj_class_t lv_table_class; diff --git a/src/widgets/lv_textarea.h b/src/widgets/lv_textarea.h index 479112934..0964416d4 100644 --- a/src/widgets/lv_textarea.h +++ b/src/widgets/lv_textarea.h @@ -63,10 +63,7 @@ typedef struct { #endif uint8_t pwd_mode : 1; /*Replace characters with '*'*/ uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ -} _lv_textarea_t; - -/*Trick to no expose the fields of the struct in the MicroPython binding*/ -typedef _lv_textarea_t lv_textarea_t; +} lv_textarea_t; extern const lv_obj_class_t lv_textarea_class;