diff --git a/src/core/lv_group.h b/src/core/lv_group.h index 62892c4377..c1a29f72a4 100644 --- a/src/core/lv_group.h +++ b/src/core/lv_group.h @@ -47,16 +47,16 @@ typedef uint8_t lv_key_t; **********************/ struct _lv_obj_t; -struct lv_group_t_struct; +struct _lv_group_t; -typedef void (*lv_group_focus_cb_t)(struct lv_group_t_struct *); +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. * They are NOT for laying out objects on a screen (try `lv_cont` for that). */ -typedef struct lv_group_t_struct{ +typedef struct _lv_group_t { lv_ll_t obj_ll; /**< Linked list to store the objects in the group*/ struct _lv_obj_t ** obj_focus; /**< The object in focus*/ diff --git a/src/core/lv_obj_class.h b/src/core/lv_obj_class.h index 3d68553d15..3b51e4d7ab 100644 --- a/src/core/lv_obj_class.h +++ b/src/core/lv_obj_class.h @@ -26,7 +26,7 @@ extern "C" { **********************/ struct _lv_obj_t; -struct lv_obj_class_t_struct; +struct _lv_obj_class_t; struct _lv_event_t; typedef enum { @@ -42,19 +42,19 @@ typedef enum { }lv_obj_class_group_def_t; -typedef void (*lv_obj_class_event_cb_t)(struct lv_obj_class_t_struct * class_p, struct _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_struct { - const struct lv_obj_class_t_struct * base_class; - void (*constructor_cb)(const struct lv_obj_class_t_struct * class_p, struct _lv_obj_t * obj); - void (*destructor_cb)(const struct lv_obj_class_t_struct * class_p, struct _lv_obj_t * obj); +typedef struct _lv_obj_class_t { + const struct _lv_obj_class_t * base_class; + void (*constructor_cb)(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * obj); + void (*destructor_cb)(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * obj); #if LV_USE_USER_DATA void * user_data; #endif - void (*event_cb)(const struct lv_obj_class_t_struct * class_p, struct _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*/ @@ -72,7 +72,7 @@ typedef struct lv_obj_class_t_struct { * @param parent pointer to an object where the new object should be created * @return pointer to the created object */ -struct _lv_obj_t * lv_obj_class_create_obj(const struct lv_obj_class_t_struct * class_p, struct _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(struct _lv_obj_t * obj); diff --git a/src/core/lv_obj_tree.h b/src/core/lv_obj_tree.h index 8076ef06a8..7cb241eaf6 100644 --- a/src/core/lv_obj_tree.h +++ b/src/core/lv_obj_tree.h @@ -26,7 +26,7 @@ extern "C" { **********************/ struct _lv_obj_t; -struct lv_obj_class_t_struct; +struct _lv_obj_class_t; typedef enum { LV_OBJ_TREE_WALK_NEXT, diff --git a/src/draw/lv_img_decoder.h b/src/draw/lv_img_decoder.h index fc90e2e5ae..1167734517 100644 --- a/src/draw/lv_img_decoder.h +++ b/src/draw/lv_img_decoder.h @@ -42,8 +42,8 @@ typedef uint8_t lv_img_src_t; /*Decoder function definitions*/ -struct lv_img_decoder_dsc_t_struct; -struct lv_img_decoder_t_struct; +struct _lv_img_decoder_dsc; +struct _lv_img_decoder; /** * Get info from an image and store in the `header` @@ -52,7 +52,7 @@ struct lv_img_decoder_t_struct; * @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)(struct lv_img_decoder_t_struct * decoder, const void * src, +typedef lv_res_t (*lv_img_decoder_info_f_t)(struct _lv_img_decoder * decoder, const void * src, lv_img_header_t * header); /** @@ -60,7 +60,7 @@ typedef lv_res_t (*lv_img_decoder_info_f_t)(struct lv_img_decoder_t_struct * dec * @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)(struct lv_img_decoder_t_struct * decoder, struct lv_img_decoder_dsc_t_struct * dsc); +typedef lv_res_t (*lv_img_decoder_open_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc); /** * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`. @@ -73,7 +73,7 @@ typedef lv_res_t (*lv_img_decoder_open_f_t)(struct lv_img_decoder_t_struct * dec * @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)(struct lv_img_decoder_t_struct * decoder, struct lv_img_decoder_dsc_t_struct * dsc, +typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); /** @@ -81,10 +81,10 @@ typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct lv_img_decoder_t_struct * @param decoder pointer to the decoder the function associated with * @param dsc pointer to decoder descriptor */ -typedef void (*lv_img_decoder_close_f_t)(struct lv_img_decoder_t_struct * decoder, struct lv_img_decoder_dsc_t_struct * dsc); +typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc); -typedef struct lv_img_decoder_t_struct { +typedef struct _lv_img_decoder { lv_img_decoder_info_f_t info_cb; lv_img_decoder_open_f_t open_cb; lv_img_decoder_read_line_f_t read_line_cb; @@ -97,7 +97,7 @@ typedef struct lv_img_decoder_t_struct { /**Describe an image decoding session. Stores data about the decoding*/ -typedef struct lv_img_decoder_dsc_t_struct { +typedef struct _lv_img_decoder_dsc { /**The decoder which was able to open the image source*/ lv_img_decoder_t * decoder; diff --git a/src/font/lv_font.h b/src/font/lv_font.h index 21c8be3253..e66d7696d0 100644 --- a/src/font/lv_font.h +++ b/src/font/lv_font.h @@ -54,12 +54,12 @@ enum { typedef uint8_t lv_font_subpx_t; /** Describe the properties of a font*/ -typedef struct lv_font_t_struct { +typedef struct _lv_font_struct { /** Get a glyph's descriptor from a font*/ - bool (*get_glyph_dsc)(const struct lv_font_t_struct *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); + bool (*get_glyph_dsc)(const struct _lv_font_struct *, 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 struct lv_font_t_struct *, uint32_t); + const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, 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/hal/lv_hal_disp.h b/src/hal/lv_hal_disp.h index 9d4047970a..d5cbf532f8 100644 --- a/src/hal/lv_hal_disp.h +++ b/src/hal/lv_hal_disp.h @@ -40,7 +40,7 @@ extern "C" { struct _lv_obj_t; struct _lv_disp_t; -struct lv_disp_drv_t_struct; +struct _lv_disp_drv_t; struct _lv_theme_t; /** @@ -77,7 +77,7 @@ typedef enum { * Only its pointer will be saved in `lv_disp_t` so it should be declared as * `static lv_disp_drv_t my_drv` or allocated dynamically. */ -typedef struct lv_disp_drv_t_struct { +typedef struct _lv_disp_drv_t { lv_coord_t hor_res; /**< Horizontal resolution.*/ lv_coord_t ver_res; /**< Vertical resolution.*/ @@ -97,38 +97,38 @@ typedef struct lv_disp_drv_t_struct { /** MANDATORY: Write the internal buffer (draw_buf) to the display. 'lv_disp_flush_ready()' has to be * called when finished*/ - void (*flush_cb)(struct lv_disp_drv_t_struct * 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)(struct lv_disp_drv_t_struct * 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)(struct lv_disp_drv_t_struct * 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)(struct lv_disp_drv_t_struct * 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)(struct lv_disp_drv_t_struct * 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)(struct lv_disp_drv_t_struct * 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)(struct lv_disp_drv_t_struct * disp_drv); + void (*gpu_wait_cb)(struct _lv_disp_drv_t * disp_drv); /** OPTIONAL: called when driver parameters are updated */ - void (*drv_update_cb)(struct lv_disp_drv_t_struct * 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)(struct lv_disp_drv_t_struct * 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. diff --git a/src/hal/lv_hal_indev.h b/src/hal/lv_hal_indev.h index bd1004f265..bc18c2a393 100644 --- a/src/hal/lv_hal_indev.h +++ b/src/hal/lv_hal_indev.h @@ -56,7 +56,7 @@ struct _lv_obj_t; struct _lv_disp_t; struct _lv_group_t; struct _lv_indev_t; -struct lv_indev_drv_t_struct; +struct _lv_indev_drv_t; /** Possible input device types*/ typedef enum { @@ -85,17 +85,17 @@ typedef struct { } lv_indev_data_t; /** Initialized by the user and registered by 'lv_indev_add()'*/ -typedef struct lv_indev_drv_t_struct { +typedef struct _lv_indev_drv_t { /**< Input device type*/ lv_indev_type_t type; /**< Function pointer to read input device data.*/ - void (*read_cb)(struct lv_indev_drv_t_struct * 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)(struct lv_indev_drv_t_struct *, uint8_t); + void (*feedback_cb)(struct _lv_indev_drv_t *, uint8_t); #if LV_USE_USER_DATA void * user_data; diff --git a/src/misc/lv_anim.h b/src/misc/lv_anim.h index e078b680e7..0a8f588a92 100644 --- a/src/misc/lv_anim.h +++ b/src/misc/lv_anim.h @@ -36,10 +36,10 @@ typedef enum { #define LV_ANIM_REPEAT_INFINITE 0xFFFF LV_EXPORT_CONST_INT(LV_ANIM_REPEAT_INFINITE); -struct lv_anim_t_struct; +struct _lv_anim_t; struct _lv_anim_path_t; /** Get the current value during an animation*/ -typedef int32_t (*lv_anim_path_cb_t)(const struct lv_anim_t_struct *); +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. @@ -51,19 +51,19 @@ 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)(struct lv_anim_t_struct *, 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)(struct lv_anim_t_struct *); +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)(struct lv_anim_t_struct *); +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)(struct lv_anim_t_struct *); +typedef int32_t (*lv_anim_get_value_cb_t)(struct _lv_anim_t *); /** Describes an animation*/ -typedef struct lv_anim_t_struct { +typedef struct _lv_anim_t { void * var; /**