From df88e319a8ef76d8bb03b7a4a025584ba91e59e4 Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 18 Feb 2019 08:34:41 +0100 Subject: [PATCH] fixed compilation errors when USE_LV_GROUP == 0 --- lv_themes/lv_theme.c | 2 ++ lv_themes/lv_theme.h | 2 ++ lv_themes/lv_theme_alien.c | 6 ++++++ lv_themes/lv_theme_default.c | 6 ++++++ lv_themes/lv_theme_material.c | 6 ++++++ lv_themes/lv_theme_mono.c | 6 ++++++ lv_themes/lv_theme_nemo.c | 6 ++++++ lv_themes/lv_theme_night.c | 6 ++++++ lv_themes/lv_theme_templ.c | 6 ++++++ lv_themes/lv_theme_zen.c | 6 ++++++ 10 files changed, 52 insertions(+) diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 4c76cb00e..3db5a4cdc 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -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 USE_LV_GROUP /*Copy group style modification callback functions*/ memcpy(¤t_theme.group, &th->group, sizeof(th->group)); +#endif /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 8d681feae..66bbd3d2d 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -293,11 +293,13 @@ typedef struct { #endif } style; +#if USE_LV_GROUP struct { lv_group_style_mod_func_t style_mod; lv_group_style_mod_func_t style_mod_edit; } group; +#endif } lv_theme_t; /********************** diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 90d699d8a..45f706ee4 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -806,6 +806,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -841,6 +843,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -897,8 +901,10 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index cc6dd3d60..3a65455d4 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -355,6 +355,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -399,6 +401,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -450,8 +454,10 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 2fc54789c..812dfd362 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -785,6 +785,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -829,6 +831,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -887,8 +891,10 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 982e7703f..25ce93f89 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -412,6 +412,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -444,6 +446,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -499,8 +503,10 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index b9bd21fc3..5550a5352 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -781,6 +781,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -800,6 +802,8 @@ static void style_mod(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -855,8 +859,10 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod; +#endif return &theme; } diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index ee99285c9..047c811a6 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -695,6 +695,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -727,6 +729,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -785,8 +789,10 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index 8cbb1b307..46f3793b7 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -364,6 +364,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -408,6 +410,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -463,8 +467,10 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index 4419ebc6b..c55e8c8de 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -758,6 +758,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -796,6 +798,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -854,8 +858,10 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; }