remove LV_USE_USER_DATA_MULTI
This commit is contained in:
@@ -151,9 +151,6 @@ typedef void * lv_img_decoder_user_data_t;
|
|||||||
/*1: Add a `user_data` to drivers and objects*/
|
/*1: Add a `user_data` to drivers and objects*/
|
||||||
#define LV_USE_USER_DATA_SINGLE 1
|
#define LV_USE_USER_DATA_SINGLE 1
|
||||||
|
|
||||||
/*1: Add separate `user_data` for every callback*/
|
|
||||||
#define LV_USE_USER_DATA_MULTI 0
|
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* Compiler settings
|
* Compiler settings
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|||||||
@@ -209,11 +209,6 @@
|
|||||||
#define LV_USE_USER_DATA_SINGLE 1
|
#define LV_USE_USER_DATA_SINGLE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*1: Add separate `user_data` for every callback*/
|
|
||||||
#ifndef LV_USE_USER_DATA_MULTI
|
|
||||||
#define LV_USE_USER_DATA_MULTI 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* Compiler settings
|
* Compiler settings
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|||||||
@@ -78,12 +78,6 @@ lv_group_t * lv_group_create(void)
|
|||||||
memset(&group->user_data, 0, sizeof(lv_group_user_data_t));
|
memset(&group->user_data, 0, sizeof(lv_group_user_data_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
memset(&group->focus_user_data, 0, sizeof(lv_group_user_data_t));
|
|
||||||
memset(&group->style_mod_user_data, 0, sizeof(lv_group_user_data_t));
|
|
||||||
memset(&group->style_mod_edit_user_data, 0, sizeof(lv_group_user_data_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Initialize style modification callbacks from current theme*/
|
/*Initialize style modification callbacks from current theme*/
|
||||||
refresh_theme(group, lv_theme_get_current());
|
refresh_theme(group, lv_theme_get_current());
|
||||||
|
|
||||||
|
|||||||
@@ -65,12 +65,6 @@ typedef struct _lv_group_t
|
|||||||
lv_group_user_data_t user_data;
|
lv_group_user_data_t user_data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
lv_group_user_data_t focus_user_data;
|
|
||||||
lv_group_user_data_t style_mod_user_data;
|
|
||||||
lv_group_user_data_t style_mod_edit_user_data;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t frozen : 1; /*1: can't focus to new object*/
|
uint8_t frozen : 1; /*1: can't focus to new object*/
|
||||||
uint8_t editing : 1; /*1: Edit mode, 0: Navigate mode*/
|
uint8_t editing : 1; /*1: Edit mode, 0: Navigate mode*/
|
||||||
uint8_t click_focus : 1; /*1: If an object in a group is clicked by an indev then it will be
|
uint8_t click_focus : 1; /*1: If an object in a group is clicked by an indev then it will be
|
||||||
|
|||||||
@@ -188,11 +188,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
|
|||||||
#if LV_USE_USER_DATA_SINGLE
|
#if LV_USE_USER_DATA_SINGLE
|
||||||
memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t));
|
memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t));
|
||||||
#endif
|
#endif
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t));
|
|
||||||
memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t));
|
|
||||||
memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LV_USE_GROUP
|
#if LV_USE_GROUP
|
||||||
new_obj->group_p = NULL;
|
new_obj->group_p = NULL;
|
||||||
@@ -275,11 +270,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
|
|||||||
#if LV_USE_USER_DATA_SINGLE
|
#if LV_USE_USER_DATA_SINGLE
|
||||||
memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t));
|
memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t));
|
||||||
#endif
|
#endif
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t));
|
|
||||||
memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t));
|
|
||||||
memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LV_USE_GROUP
|
#if LV_USE_GROUP
|
||||||
new_obj->group_p = NULL;
|
new_obj->group_p = NULL;
|
||||||
@@ -319,12 +309,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
|
|||||||
#if LV_USE_USER_DATA_SINGLE
|
#if LV_USE_USER_DATA_SINGLE
|
||||||
memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t));
|
memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t));
|
||||||
#endif
|
#endif
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
memcpy(&new_obj->event_user_data, ©->event_user_data, sizeof(lv_obj_user_data_t));
|
|
||||||
memcpy(&new_obj->signal_user_data, ©->signal_user_data, sizeof(lv_obj_user_data_t));
|
|
||||||
memcpy(&new_obj->design_user_data, ©->design_user_data, sizeof(lv_obj_user_data_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Copy realign*/
|
/*Copy realign*/
|
||||||
#if LV_USE_OBJ_REALIGN
|
#if LV_USE_OBJ_REALIGN
|
||||||
new_obj->realign.align = copy->realign.align;
|
new_obj->realign.align = copy->realign.align;
|
||||||
|
|||||||
@@ -223,12 +223,6 @@ typedef struct _lv_obj_t
|
|||||||
lv_obj_user_data_t user_data;
|
lv_obj_user_data_t user_data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
lv_obj_user_data_t event_user_data;
|
|
||||||
lv_obj_user_data_t signal_user_data;
|
|
||||||
lv_obj_user_data_t design_user_data;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} lv_obj_t;
|
} lv_obj_t;
|
||||||
|
|
||||||
/*Protect some attributes (max. 8 bit)*/
|
/*Protect some attributes (max. 8 bit)*/
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ CSRCS += lv_draw_line.c
|
|||||||
CSRCS += lv_draw_img.c
|
CSRCS += lv_draw_img.c
|
||||||
CSRCS += lv_draw_arc.c
|
CSRCS += lv_draw_arc.c
|
||||||
CSRCS += lv_draw_triangle.c
|
CSRCS += lv_draw_triangle.c
|
||||||
|
CSRCS += lv_img_decoder.c
|
||||||
|
|
||||||
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_draw
|
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_draw
|
||||||
VPATH += :$(LVGL_DIR)/lvgl/src/lv_draw
|
VPATH += :$(LVGL_DIR)/lvgl/src/lv_draw
|
||||||
|
|||||||
@@ -196,6 +196,8 @@ void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc)
|
|||||||
|
|
||||||
static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header)
|
static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header)
|
||||||
{
|
{
|
||||||
|
(void)decoder; /*Unused*/
|
||||||
|
|
||||||
lv_img_src_t src_type = lv_img_src_get_type(src);
|
lv_img_src_t src_type = lv_img_src_get_type(src);
|
||||||
if(src_type == LV_IMG_SRC_VARIABLE) {
|
if(src_type == LV_IMG_SRC_VARIABLE) {
|
||||||
header->w = ((lv_img_dsc_t *)src)->header.w;
|
header->w = ((lv_img_dsc_t *)src)->header.w;
|
||||||
|
|||||||
@@ -103,15 +103,6 @@ typedef struct _disp_drv_t
|
|||||||
lv_disp_drv_user_data_t user_data;
|
lv_disp_drv_user_data_t user_data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
lv_disp_drv_user_data_t flush_user_data;
|
|
||||||
lv_disp_drv_user_data_t mem_blend_user_data;
|
|
||||||
lv_disp_drv_user_data_t mem_fill_user_data;
|
|
||||||
lv_disp_drv_user_data_t rounder_user_data;
|
|
||||||
lv_disp_drv_user_data_t set_px_user_data;
|
|
||||||
lv_disp_drv_user_data_t monitor_user_data;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} lv_disp_drv_t;
|
} lv_disp_drv_t;
|
||||||
|
|
||||||
struct _lv_obj_t;
|
struct _lv_obj_t;
|
||||||
|
|||||||
@@ -85,12 +85,6 @@ typedef struct _lv_indev_drv_t
|
|||||||
lv_indev_drv_user_data_t user_data;
|
lv_indev_drv_user_data_t user_data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
lv_indev_drv_user_data_t read_user_data;
|
|
||||||
lv_indev_drv_user_data_t feedback_user_data;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*Pointer to the assigned display*/
|
/*Pointer to the assigned display*/
|
||||||
struct _disp_t * disp;
|
struct _disp_t * disp;
|
||||||
|
|
||||||
|
|||||||
@@ -71,12 +71,6 @@ typedef struct _lv_anim_t
|
|||||||
lv_anim_user_data_t user_data; /*Custom user data*/
|
lv_anim_user_data_t user_data; /*Custom user data*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
lv_anim_user_data_t exec_user_data;
|
|
||||||
lv_anim_user_data_t path_user_data;
|
|
||||||
lv_anim_user_data_t ready_user_data;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t playback : 1; /*When the animation is ready play it back*/
|
uint8_t playback : 1; /*When the animation is ready play it back*/
|
||||||
uint8_t repeat : 1; /*Repeat the animation infinitely*/
|
uint8_t repeat : 1; /*Repeat the animation infinitely*/
|
||||||
/*Animation system use these - user shouldn't set*/
|
/*Animation system use these - user shouldn't set*/
|
||||||
|
|||||||
@@ -206,10 +206,6 @@ lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_p
|
|||||||
|
|
||||||
new_lv_task->user_data = user_data;
|
new_lv_task->user_data = user_data;
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
new_lv_task->task_user_data = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
task_created = true;
|
task_created = true;
|
||||||
|
|
||||||
return new_lv_task;
|
return new_lv_task;
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ typedef struct _lv_task_t
|
|||||||
|
|
||||||
void * user_data;
|
void * user_data;
|
||||||
|
|
||||||
#if LV_USE_USER_DATA_MULTI
|
|
||||||
void * task_user_data;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t prio : 3;
|
uint8_t prio : 3;
|
||||||
uint8_t once : 1;
|
uint8_t once : 1;
|
||||||
} lv_task_t;
|
} lv_task_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user