fix(obj) move lv_event_dsc_t into lv_obj.c from lv_obj.h

It keeps the list of global types shorter
This commit is contained in:
Gabor Kiss-Vamosi
2021-04-12 12:42:51 +02:00
parent 96bbee0229
commit c587fc4d2a
2 changed files with 8 additions and 7 deletions
+5
View File
@@ -56,6 +56,11 @@ typedef struct {
const lv_anim_path_t * path; const lv_anim_path_t * path;
}trans_set_t; }trans_set_t;
typedef struct _lv_event_dsc_t{
lv_event_cb_t cb;
void * user_data;
}lv_event_dsc_t;
/********************** /**********************
* STATIC PROTOTYPES * STATIC PROTOTYPES
**********************/ **********************/
+3 -7
View File
@@ -34,6 +34,7 @@ extern "C" {
**********************/ **********************/
struct _lv_obj_t; struct _lv_obj_t;
struct _lv_event_dsc_t;
/*--------------------- /*---------------------
* EVENTS * EVENTS
@@ -97,11 +98,6 @@ typedef enum {
*/ */
typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event); typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event);
typedef struct {
lv_event_cb_t cb;
void * user_data;
}lv_event_dsc_t;
/*--------------------- /*---------------------
* EVENTS * EVENTS
*---------------------*/ *---------------------*/
@@ -213,7 +209,7 @@ typedef struct {
uint32_t child_cnt; /**< Number of children*/ uint32_t child_cnt; /**< Number of children*/
lv_group_t * group_p; lv_group_t * group_p;
lv_event_dsc_t * event_dsc; /**< Dynamically allocated event callback and user data array*/ struct _lv_event_dsc_t * event_dsc; /**< Dynamically allocated event callback and user data array*/
lv_point_t scroll; /**< The current X/Y scroll offset*/ lv_point_t scroll; /**< The current X/Y scroll offset*/
uint8_t ext_click_pad; /**< Extra click padding in all direction*/ uint8_t ext_click_pad; /**< Extra click padding in all direction*/
@@ -444,7 +440,7 @@ bool lv_obj_has_state(const lv_obj_t * obj, lv_state_t state);
* @param id the index of the event callback. 0: the firstly added * @param id the index of the event callback. 0: the firstly added
* @return the event descriptor * @return the event descriptor
*/ */
lv_event_dsc_t * lv_obj_get_event_dsc(const lv_obj_t * obj, uint32_t id); struct _lv_event_dsc_t * lv_obj_get_event_dsc(const lv_obj_t * obj, uint32_t id);
/** /**
* Get the group of the object * Get the group of the object