fix(grid,flex): fix compile errors when grid or flex is disabled (#5289)

This commit is contained in:
Gabor Kiss-Vamosi
2024-01-12 03:41:14 +01:00
committed by GitHub
parent 236a2a2672
commit 8df95aaf4b
16 changed files with 180 additions and 63 deletions

View File

@@ -18,6 +18,10 @@
#error "LV_FONT_MONTSERRAT_24 is required for lv_demo_benchmark. Enable it in lv_conf.h."
#endif
#if LV_USE_DEMO_WIDGETS == 0
#error "LV_USE_DEMO_WIDGETS needs to be enabled"
#endif
#include "../../src/display/lv_display_private.h"
#include "../../src/core/lv_global.h"

View File

@@ -15,6 +15,16 @@ extern "C" {
*********************/
#include "../lv_demos.h"
#if LV_USE_DEMO_MULTILANG
#if LV_USE_GRID == 0
#error "LV_USE_GRID needs to be enabled"
#endif
#if LV_USE_FLEX == 0
#error "LV_USE_FLEX needs to be enabled"
#endif
/*********************
* DEFINES
*********************/
@@ -32,6 +42,8 @@ void lv_demo_multilang(void);
* MACROS
**********************/
#endif /*LV_USE_DEMO_MULTILANG*/
#ifdef __cplusplus
} /* extern "C" */
#endif

View File

@@ -14,8 +14,13 @@ extern "C" {
* INCLUDES
*********************/
#include "lv_demo_music.h"
#if LV_USE_DEMO_MUSIC
#if LV_USE_GRID == 0
#error "LV_USE_GRID needs to be enabled"
#endif
/*********************
* DEFINES
*********************/

View File

@@ -9,6 +9,7 @@
#include "lv_demo_render.h"
#if LV_USE_DEMO_RENDER
#include "../../src/display/lv_display_private.h"
#include "../../src/core/lv_global.h"

View File

@@ -17,6 +17,10 @@ extern "C" {
#if LV_USE_DEMO_RENDER
#if LV_USE_GRID == 0
#error "LV_USE_GRID needs to be enabled"
#endif
/*********************
* DEFINES
*********************/

View File

@@ -10,10 +10,6 @@
#if LV_USE_DEMO_TRANSFORM
#if LV_FONT_MONTSERRAT_18 == 0
#error "LV_FONT_MONTSERRAT_18 is required for lv_demo_transform. Enable it in lv_conf.h."
#endif
/*********************
* DEFINES
*********************/

View File

@@ -15,6 +15,16 @@ extern "C" {
*********************/
#include "../lv_demos.h"
#if LV_USE_DEMO_TRANSFORM
#if LV_FONT_MONTSERRAT_18 == 0
#error "LV_FONT_MONTSERRAT_18 is required for lv_demo_transform. Enable it in lv_conf.h."
#endif
#if LV_USE_GRID == 0
#error "LV_USE_GRID needs to be enabled"
#endif
/*********************
* DEFINES
*********************/
@@ -32,6 +42,8 @@ void lv_demo_transform(void);
* MACROS
**********************/
#endif /*LV_USE_DEMO_TRANSFORM*/
#ifdef __cplusplus
} /* extern "C" */
#endif

View File

@@ -15,6 +15,16 @@ extern "C" {
*********************/
#include "../lv_demos.h"
#if LV_USE_DEMO_WIDGETS
#if LV_USE_GRID == 0
#error "LV_USE_GRID needs to be enabled"
#endif
#if LV_USE_FLEX == 0
#error "LV_USE_FLEX needs to be enabled"
#endif
/*********************
* DEFINES
*********************/
@@ -33,6 +43,8 @@ void lv_demo_widgets_start_slideshow(void);
* MACROS
**********************/
#endif /*LV_USE_DEMO_WIDGETS*/
#ifdef __cplusplus
} /* extern "C" */
#endif

View File

@@ -4,7 +4,7 @@
*/
#include "../../lv_examples.h"
#if LV_USE_FRAGMENT && LV_USE_WIN && LV_BUILD_EXAMPLES
#if LV_USE_FRAGMENT && LV_USE_WIN && LV_USE_GRID && LV_BUILD_EXAMPLES
static void sample_fragment_ctor(lv_fragment_t * self, void * args);

View File

@@ -390,8 +390,7 @@ props = [
'dsc': "Set the base direction of the object. The possible values are `LV_BIDI_DIR_LTR/RTL/AUTO`."},
{'section': 'Flex', 'dsc':'Flex layout properties.' },
{'section': 'Flex', 'dsc':'Flex layout properties.', 'guard':'LV_USE_FLEX'},
{'name': 'FLEX_FLOW',
@@ -419,7 +418,7 @@ props = [
{'section': 'Grid', 'dsc':'Grid layout properties.' },
{'section': 'Grid', 'dsc':'Grid layout properties.', 'guard':'LV_USE_GRID'},
{'name': 'GRID_COLUMN_DSC_ARRAY',
@@ -588,6 +587,20 @@ def docs(p):
print("<li " + li_style + "'><strong>Ext. draw</strong> " + e + "</li>")
print("</ul>")
def guard_proc(p):
global guard
if 'section' in p:
if guard:
guard_close()
if 'guard' in p:
guard = p['guard']
print(f"#if {guard}\n")
def guard_close():
global guard
if guard:
print(f"#endif /*{guard}*/\n")
guard = ""
base_dir = os.path.abspath(os.path.dirname(__file__))
sys.stdout = open(base_dir + '/../src/core/lv_obj_style_gen.h', 'w')
@@ -611,11 +624,17 @@ print("#include \"../misc/lv_area.h\"")
print("#include \"../misc/lv_style.h\"")
print("#include \"../core/lv_obj_style.h\"")
print()
guard = ""
for p in props:
guard_proc(p)
obj_style_get(p)
guard_close()
for p in props:
guard_proc(p)
local_style_set_h(p)
guard_close()
print()
print('#endif /* LV_OBJ_STYLE_GEN_H */')
@@ -625,16 +644,22 @@ sys.stdout = open(base_dir + '/../src/core/lv_obj_style_gen.c', 'w')
print(HEADING)
print("#include \"lv_obj.h\"")
print()
for p in props:
guard_proc(p)
local_style_set_c(p)
guard_close()
sys.stdout = open(base_dir + '/../src/misc/lv_style_gen.c', 'w')
print(HEADING)
print("#include \"lv_style.h\"")
print()
for p in props:
guard_proc(p)
style_set_c(p)
guard_close()
sys.stdout = open(base_dir + '/../src/misc/lv_style_gen.h', 'w')
@@ -642,15 +667,20 @@ print(HEADING)
print('#ifndef LV_STYLE_GEN_H')
print('#define LV_STYLE_GEN_H')
print()
for p in props:
style_set_h(p)
for p in props:
guard_proc(p)
style_set_h(p)
guard_close()
for p in props:
guard_proc(p)
style_const_set(p)
guard_close()
print()
print('#endif /* LV_STYLE_GEN_H */')
sys.stdout = open(base_dir + '/../docs/overview/style-props.md', 'w')
print('# Style properties')

View File

@@ -721,8 +721,7 @@ void lv_obj_set_style_anim_time(lv_obj_t * obj, uint32_t value, lv_style_selecto
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector);
}
void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t * value,
lv_style_selector_t selector)
void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
{
lv_style_value_t v = {
.ptr = value
@@ -753,6 +752,7 @@ void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_sel
};
lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
}
#if LV_USE_FLEX
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector)
{
@@ -793,6 +793,9 @@ void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector
};
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_GROW, v, selector);
}
#endif /*LV_USE_FLEX*/
#if LV_USE_GRID
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector)
{
@@ -873,3 +876,4 @@ void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style
};
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_ROW_SPAN, v, selector);
}
#endif /*LV_USE_GRID*/

View File

@@ -589,8 +589,7 @@ static inline lv_opa_t lv_obj_get_style_opa_layered(const lv_obj_t * obj, uint32
return (lv_opa_t)v.num;
}
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const lv_obj_t * obj,
uint32_t part)
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const lv_obj_t * obj, uint32_t part)
{
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
return (const lv_color_filter_dsc_t *)v.ptr;
@@ -638,6 +637,8 @@ static inline lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t * obj, uint
return (lv_base_dir_t)v.num;
}
#if LV_USE_FLEX
static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, uint32_t part)
{
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_FLOW);
@@ -668,6 +669,10 @@ static inline uint8_t lv_obj_get_style_flex_grow(const lv_obj_t * obj, uint32_t
return (uint8_t)v.num;
}
#endif /*LV_USE_FLEX*/
#if LV_USE_GRID
static inline const int32_t * lv_obj_get_style_grid_column_dsc_array(const lv_obj_t * obj, uint32_t part)
{
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_DSC_ARRAY);
@@ -728,6 +733,8 @@ static inline int32_t lv_obj_get_style_grid_cell_row_span(const lv_obj_t * obj,
return (int32_t)v.num;
}
#endif /*LV_USE_GRID*/
void lv_obj_set_style_width(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_min_width(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_max_width(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
@@ -818,26 +825,31 @@ void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc
void lv_obj_set_style_color_filter_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_anim(lv_obj_t * obj, const lv_anim_t * value, lv_style_selector_t selector);
void lv_obj_set_style_anim_time(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t * value,
lv_style_selector_t selector);
void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value,
lv_style_selector_t selector);
void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
#if LV_USE_FLEX
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
#endif /*LV_USE_FLEX*/
#if LV_USE_GRID
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
#endif /*LV_USE_GRID*/
#endif /* LV_OBJ_STYLE_GEN_H */

View File

@@ -137,12 +137,15 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR
[LV_STYLE_LAYOUT] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_BASE_DIR] = LV_STYLE_PROP_FLAG_INHERITABLE | LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
#if LV_USE_FLEX
[LV_STYLE_FLEX_FLOW] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_FLEX_MAIN_PLACE] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_FLEX_CROSS_PLACE] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_FLEX_TRACK_PLACE] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_FLEX_GROW] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
#endif
#if LV_USE_GRID
[LV_STYLE_GRID_COLUMN_DSC_ARRAY] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_GRID_ROW_DSC_ARRAY] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_GRID_COLUMN_ALIGN] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
@@ -153,6 +156,7 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR
[LV_STYLE_GRID_CELL_COLUMN_POS] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_GRID_CELL_X_ALIGN] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
[LV_STYLE_GRID_CELL_Y_ALIGN] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
#endif
};

View File

@@ -937,6 +937,7 @@ void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value)
}
const lv_style_prop_t _lv_style_const_prop_id_BASE_DIR = LV_STYLE_BASE_DIR;
#if LV_USE_FLEX
void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value)
{
@@ -987,6 +988,9 @@ void lv_style_set_flex_grow(lv_style_t * style, uint8_t value)
}
const lv_style_prop_t _lv_style_const_prop_id_FLEX_GROW = LV_STYLE_FLEX_GROW;
#endif /*LV_USE_FLEX*/
#if LV_USE_GRID
void lv_style_set_grid_column_dsc_array(lv_style_t * style, const int32_t * value)
{
@@ -1087,3 +1091,4 @@ void lv_style_set_grid_cell_row_span(lv_style_t * style, int32_t value)
}
const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN = LV_STYLE_GRID_CELL_ROW_SPAN;
#endif /*LV_USE_GRID*/

View File

@@ -195,36 +195,43 @@ void lv_style_set_layout(lv_style_t * style, uint16_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_LAYOUT;
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_BASE_DIR;
void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_FLOW;
void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_MAIN_PLACE;
void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_CROSS_PLACE;
void lv_style_set_flex_track_place(lv_style_t * style, lv_flex_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_TRACK_PLACE;
void lv_style_set_flex_grow(lv_style_t * style, uint8_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_GROW;
void lv_style_set_grid_column_dsc_array(lv_style_t * style, const int32_t * value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_COLUMN_DSC_ARRAY;
void lv_style_set_grid_column_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_COLUMN_ALIGN;
void lv_style_set_grid_row_dsc_array(lv_style_t * style, const int32_t * value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_ROW_DSC_ARRAY;
void lv_style_set_grid_row_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_ROW_ALIGN;
void lv_style_set_grid_cell_column_pos(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_COLUMN_POS;
void lv_style_set_grid_cell_x_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_X_ALIGN;
void lv_style_set_grid_cell_column_span(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_COLUMN_SPAN;
void lv_style_set_grid_cell_row_pos(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_POS;
void lv_style_set_grid_cell_y_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_Y_ALIGN;
void lv_style_set_grid_cell_row_span(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN;
#if LV_USE_FLEX
void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_FLOW;
void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_MAIN_PLACE;
void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_CROSS_PLACE;
void lv_style_set_flex_track_place(lv_style_t * style, lv_flex_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_TRACK_PLACE;
void lv_style_set_flex_grow(lv_style_t * style, uint8_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_FLEX_GROW;
#endif /*LV_USE_FLEX*/
#if LV_USE_GRID
void lv_style_set_grid_column_dsc_array(lv_style_t * style, const int32_t * value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_COLUMN_DSC_ARRAY;
void lv_style_set_grid_column_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_COLUMN_ALIGN;
void lv_style_set_grid_row_dsc_array(lv_style_t * style, const int32_t * value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_ROW_DSC_ARRAY;
void lv_style_set_grid_row_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_ROW_ALIGN;
void lv_style_set_grid_cell_column_pos(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_COLUMN_POS;
void lv_style_set_grid_cell_x_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_X_ALIGN;
void lv_style_set_grid_cell_column_span(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_COLUMN_SPAN;
void lv_style_set_grid_cell_row_pos(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_POS;
void lv_style_set_grid_cell_y_align(lv_style_t * style, lv_grid_align_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_Y_ALIGN;
void lv_style_set_grid_cell_row_span(lv_style_t * style, int32_t value);
extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN;
#endif /*LV_USE_GRID*/
#define LV_STYLE_CONST_WIDTH(val) \
{ \
@@ -690,6 +697,7 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN;
{ \
.prop_ptr = &_lv_style_const_prop_id_BASE_DIR, .value = { .num = (int32_t)val } \
}
#if LV_USE_FLEX
#define LV_STYLE_CONST_FLEX_FLOW(val) \
{ \
@@ -715,6 +723,9 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN;
{ \
.prop_ptr = &_lv_style_const_prop_id_FLEX_GROW, .value = { .num = (int32_t)val } \
}
#endif /*LV_USE_FLEX*/
#if LV_USE_GRID
#define LV_STYLE_CONST_GRID_COLUMN_DSC_ARRAY(val) \
{ \
@@ -765,5 +776,6 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN;
{ \
.prop_ptr = &_lv_style_const_prop_id_GRID_CELL_ROW_SPAN, .value = { .num = (int32_t)val } \
}
#endif /*LV_USE_GRID*/
#endif /* LV_STYLE_GEN_H */

View File

@@ -17,6 +17,10 @@ extern "C" {
#if LV_USE_MENU
#if LV_USE_FLEX == 0
#error "LV_USE_FLEX needs to be enabled"
#endif
/*********************
* DEFINES
*********************/