Revert "fix how the private struct are handled in function pointer typedefs"

This reverts commit b1bcff6f8f.
This commit is contained in:
Gabor Kiss-Vamosi
2021-05-29 09:11:41 +02:00
parent 8dd33a0041
commit d527ca019a
11 changed files with 62 additions and 62 deletions
+3 -3
View File
@@ -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*/
+8 -8
View File
@@ -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);
+1 -1
View File
@@ -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,
+8 -8
View File
@@ -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;
+3 -3
View File
@@ -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*/
+11 -11
View File
@@ -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.
+4 -4
View File
@@ -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;
+7 -7
View File
@@ -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; /**<Variable to animate*/
lv_anim_exec_xcb_t exec_cb; /**< Function to execute to animate*/
lv_anim_start_cb_t start_cb; /**< Call it when the animation is starts (considering `delay`)*/
+3 -3
View File
@@ -265,11 +265,11 @@ typedef struct {
typedef uint8_t lv_opa_t;
//! @endcond
struct lv_color_filter_dsc_t_struct;
struct _lv_color_filter_dsc_t;
typedef lv_color_t (*lv_color_filter_cb_t)(const struct lv_color_filter_dsc_t_struct *, 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_struct {
typedef struct _lv_color_filter_dsc_t {
lv_color_filter_cb_t filter_cb;
void * user_data;
}lv_color_filter_dsc_t;
+11 -11
View File
@@ -68,20 +68,20 @@ enum {
};
typedef uint8_t lv_fs_whence_t;
typedef struct lv_fs_drv_t_struct {
typedef struct _lv_fs_drv_t {
char letter;
bool (*ready_cb)(struct lv_fs_drv_t_struct * drv);
bool (*ready_cb)(struct _lv_fs_drv_t * drv);
void * (*open_cb)(struct lv_fs_drv_t_struct * drv, const char * path, lv_fs_mode_t mode);
lv_fs_res_t (*close_cb)(struct lv_fs_drv_t_struct * drv, void * file_p);
lv_fs_res_t (*read_cb)(struct lv_fs_drv_t_struct * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
lv_fs_res_t (*write_cb)(struct lv_fs_drv_t_struct * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
lv_fs_res_t (*seek_cb)(struct lv_fs_drv_t_struct * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence);
lv_fs_res_t (*tell_cb)(struct lv_fs_drv_t_struct * 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)(struct lv_fs_drv_t_struct * drv, const char * path);
lv_fs_res_t (*dir_read_cb)(struct lv_fs_drv_t_struct * drv, void * rddir_p, char * fn);
lv_fs_res_t (*dir_close_cb)(struct lv_fs_drv_t_struct * 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*/
+3 -3
View File
@@ -32,17 +32,17 @@ extern "C" {
* TYPEDEFS
**********************/
struct lv_timer_t_struct;
struct _lv_timer_t;
/**
* Timers execute this type of functions.
*/
typedef void (*lv_timer_cb_t)(struct lv_timer_t_struct *);
typedef void (*lv_timer_cb_t)(struct _lv_timer_t *);
/**
* Descriptor of a lv_timer
*/
typedef struct lv_timer_t_struct {
typedef struct _lv_timer_t {
uint32_t period; /**< How often the timer should run*/
uint32_t last_run; /**< Last time the timer ran*/
lv_timer_cb_t timer_cb; /**< Timer function*/