From 5d345c1d562d7d26fd6398bad05ecb753855e8d6 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 27 Aug 2020 09:39:27 +0200 Subject: [PATCH] start grid --- src/lv_core/lv_align.c | 36 +++++++++++++++++++++++++++ src/lv_core/lv_align.h | 54 +++++++++++++++++++++++++++++++++++++++++ src/lv_core/lv_layout.c | 0 src/lv_core/lv_layout.h | 0 src/lv_core/lv_obj.c | 11 +++------ 5 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 src/lv_core/lv_align.c create mode 100644 src/lv_core/lv_align.h delete mode 100644 src/lv_core/lv_layout.c delete mode 100644 src/lv_core/lv_layout.h diff --git a/src/lv_core/lv_align.c b/src/lv_core/lv_align.c new file mode 100644 index 000000000..580c08a5c --- /dev/null +++ b/src/lv_core/lv_align.c @@ -0,0 +1,36 @@ +/** + * @file lv_align.c + * + */ + +/********************* + * INCLUDES + *********************/ + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/********************** + * STATIC FUNCTIONS + **********************/ diff --git a/src/lv_core/lv_align.h b/src/lv_core/lv_align.h new file mode 100644 index 000000000..74f0af775 --- /dev/null +++ b/src/lv_core/lv_align.h @@ -0,0 +1,54 @@ +/** + * @file lv_templ.h + * + */ + +#ifndef LV_ALIGN_H +#define LV_ALIGN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ +typedef struct { + const lv_coord_t * col_dsc; + const lv_coord_t * row_dsc; + lv_coord_t gap_col; + lv_coord_t gap_row; + uint8_t flow; + uint8_t place_content; + uint8_t place_items; +}lv_grid_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +void lv_grid_init(lv_grid_t * grid); + +void lv_grid_set_template(lv_grid_t * grid, const lv_coord_t * col_dsc, const lv_coord_t * row_dsc); + +void lv_grid_set_place_content(lv_grid_t * grid, uint8_t col_mode, uint8_t row_mode); + +void lv_grid_set_place_items(lv_grid_t * grid, uint8_t col_mode, uint8_t row_mode); + +/********************** + * MACROS + **********************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_ALIGN_H*/ diff --git a/src/lv_core/lv_layout.c b/src/lv_core/lv_layout.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/lv_core/lv_layout.h b/src/lv_core/lv_layout.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 021357ae4..b04278d01 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -106,15 +106,12 @@ static void lv_event_mark_deleted(lv_obj_t * obj); static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find); static void lv_obj_del_async_cb(void * obj); static void obj_del_core(lv_obj_t * obj); -<<<<<<< HEAD static lv_res_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc); static void scrollbar_draw(lv_obj_t * obj, const lv_area_t * clip_area); - -======= static void update_style_cache(lv_obj_t * obj, uint8_t part, uint16_t prop); static void update_style_cache_children(lv_obj_t * obj); static void invalidate_style_cache(lv_obj_t * obj, uint8_t part, lv_style_property_t prop); ->>>>>>> master + /********************** * STATIC VARIABLES **********************/ @@ -4484,7 +4481,7 @@ static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_fin return false; } -<<<<<<< HEAD + static lv_res_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc) { lv_draw_rect_dsc_init(dsc); @@ -4648,7 +4645,7 @@ static void scrollbar_draw(lv_obj_t * obj, const lv_area_t * clip_area) } } -======= + static bool style_prop_is_cacheble(lv_style_property_t prop) { @@ -4846,5 +4843,3 @@ static void invalidate_style_cache(lv_obj_t * obj, uint8_t part, lv_style_proper child = lv_obj_get_child(obj, child); } } ->>>>>>> master -