revert parts of making some struct static for Microbinding compatibility (d73e4201)

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-22 14:33:01 +02:00
parent 3fa42f4245
commit 73327b9141
6 changed files with 45 additions and 47 deletions

View File

@@ -17,17 +17,6 @@
/**********************
* TYPEDEFS
**********************/
typedef struct _lv_event_t {
struct _lv_obj_t * target;
struct _lv_obj_t * current_target;
lv_event_code_t code;
void * user_data;
void * param;
struct _lv_event_t * prev;
uint8_t deleted :1;
}lv_event_t;
typedef struct _lv_event_dsc_t{
lv_event_cb_t cb;
void * user_data;

View File

@@ -81,8 +81,15 @@ typedef enum {
_LV_EVENT_LAST /** Number of default events*/
}lv_event_code_t;
struct _lv_event_t;
typedef struct _lv_event_t lv_event_t;
typedef struct _lv_event_t {
struct _lv_obj_t * target;
struct _lv_obj_t * current_target;
lv_event_code_t code;
void * user_data;
void * param;
struct _lv_event_t * prev;
uint8_t deleted :1;
}lv_event_t;
/**
* @brief Event callback.

View File

@@ -20,26 +20,6 @@
/**********************
* TYPEDEFS
**********************/
/**
* 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 {
lv_ll_t obj_ll; /**< Linked list to store the objects in the group*/
struct _lv_obj_t ** obj_focus; /**< The object in focus*/
lv_group_focus_cb_t focus_cb; /**< A function to call when a new object is focused (optional)*/
#if LV_USE_USER_DATA
void * user_data;
#endif
uint8_t frozen : 1; /**< 1: can't focus to new object*/
uint8_t editing : 1; /**< 1: Edit mode, 0: Navigate mode*/
uint8_t refocus_policy : 1; /**< 1: Focus prev if focused on deletion. 0: Focus next if focused on
deletion.*/
uint8_t wrap : 1; /**< 1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end
of list.*/
} lv_group_t;
/**********************
* STATIC PROTOTYPES

View File

@@ -45,13 +45,33 @@ typedef uint8_t lv_key_t;
/**********************
* TYPEDEFS
**********************/
struct _lv_group_t;
typedef struct _lv_group_t lv_group_t;
struct _lv_obj_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.
* They are NOT for laying out objects on a screen (try `lv_cont` for that).
*/
typedef struct _lv_group_t {
lv_ll_t obj_ll; /**< Linked list to store the objects in the group*/
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
void * user_data;
#endif
uint8_t frozen : 1; /**< 1: can't focus to new object*/
uint8_t editing : 1; /**< 1: Edit mode, 0: Navigate mode*/
uint8_t refocus_policy : 1; /**< 1: Focus prev if focused on deletion. 0: Focus next if focused on
deletion.*/
uint8_t wrap : 1; /**< 1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end
of list.*/
} lv_group_t;
typedef enum {
LV_GROUP_REFOCUS_POLICY_NEXT = 0,
LV_GROUP_REFOCUS_POLICY_PREV = 1

View File

@@ -21,16 +21,6 @@
/**********************
* TYPEDEFS
**********************/
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;
lv_img_decoder_close_f_t close_cb;
#if LV_USE_USER_DATA
void * user_data;
#endif
} lv_img_decoder_t;
typedef struct {
lv_fs_file_t f;

View File

@@ -42,9 +42,8 @@ typedef uint8_t lv_img_src_t;
/*Decoder function definitions*/
struct _lv_img_decoder;
typedef struct _lv_img_decoder lv_img_decoder_t;
struct _lv_img_decoder_dsc;
struct _lv_img_decoder;
/**
* Get info from an image and store in the `header`
@@ -84,6 +83,19 @@ typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder * decode
*/
typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc);
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;
lv_img_decoder_close_f_t close_cb;
#if LV_USE_USER_DATA
void * user_data;
#endif
} lv_img_decoder_t;
/**Describe an image decoding session. Stores data about the decoding*/
typedef struct _lv_img_decoder_dsc {
/**The decoder which was able to open the image source*/