fixed compilation errors when USE_LV_GROUP == 0

This commit is contained in:
manison
2019-02-18 08:34:41 +01:00
parent 5dfac5a92b
commit df88e319a8
10 changed files with 52 additions and 0 deletions
+2
View File
@@ -80,8 +80,10 @@ void lv_theme_set_current(lv_theme_t * th)
if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t)); if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t));
} }
#if USE_LV_GROUP
/*Copy group style modification callback functions*/ /*Copy group style modification callback functions*/
memcpy(&current_theme.group, &th->group, sizeof(th->group)); memcpy(&current_theme.group, &th->group, sizeof(th->group));
#endif
/*Let the object know their style might change*/ /*Let the object know their style might change*/
lv_obj_report_style_mod(NULL); lv_obj_report_style_mod(NULL);
+2
View File
@@ -293,11 +293,13 @@ typedef struct {
#endif #endif
} style; } style;
#if USE_LV_GROUP
struct struct
{ {
lv_group_style_mod_func_t style_mod; lv_group_style_mod_func_t style_mod;
lv_group_style_mod_func_t style_mod_edit; lv_group_style_mod_func_t style_mod_edit;
} group; } group;
#endif
} lv_theme_t; } lv_theme_t;
/********************** /**********************
+6
View File
@@ -806,6 +806,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -841,6 +843,8 @@ static void style_mod_edit(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -897,8 +901,10 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font)
table_init(); table_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit; theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme; return &theme;
} }
+6
View File
@@ -355,6 +355,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -399,6 +401,8 @@ static void style_mod_edit(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -450,8 +454,10 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font)
tabview_init(); tabview_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit; theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme; return &theme;
} }
+6
View File
@@ -785,6 +785,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -829,6 +831,8 @@ static void style_mod_edit(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -887,8 +891,10 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font)
table_init(); table_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit; theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme; return &theme;
} }
+6
View File
@@ -412,6 +412,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -444,6 +446,8 @@ static void style_mod_edit(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -499,8 +503,10 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font)
tabview_init(); tabview_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit; theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme; return &theme;
} }
+6
View File
@@ -781,6 +781,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -800,6 +802,8 @@ static void style_mod(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -855,8 +859,10 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font)
table_init(); table_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod; theme.group.style_mod_edit = style_mod;
#endif
return &theme; return &theme;
} }
+6
View File
@@ -695,6 +695,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -727,6 +729,8 @@ static void style_mod_edit(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -785,8 +789,10 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font)
table_init(); table_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit; theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme; return &theme;
} }
+6
View File
@@ -364,6 +364,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -408,6 +410,8 @@ static void style_mod_edit(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -463,8 +467,10 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font)
tabview_init(); tabview_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit; theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme; return &theme;
} }
+6
View File
@@ -758,6 +758,8 @@ static void win_init(void)
#endif #endif
} }
#if USE_LV_GROUP
static void style_mod(lv_style_t * style) static void style_mod(lv_style_t * style)
{ {
#if LV_COLOR_DEPTH != 1 #if LV_COLOR_DEPTH != 1
@@ -796,6 +798,8 @@ static void style_mod_edit(lv_style_t * style)
#endif #endif
} }
#endif /*USE_LV_GROUP*/
/********************** /**********************
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
@@ -854,8 +858,10 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font)
table_init(); table_init();
win_init(); win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod; theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit; theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme; return &theme;
} }