From 95149e466f1bda7098812b1892d103eb314bf0aa Mon Sep 17 00:00:00 2001 From: C47D Date: Sun, 7 Jul 2019 12:17:06 -0500 Subject: [PATCH] [lv_list] Add list layout prototypes --- src/lv_objx/lv_list.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index 7b7927841..ba115a808 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -78,6 +78,13 @@ enum { }; typedef uint8_t lv_list_style_t; +/** List layouts. **/ +enum { + LV_LIST_LAYOUT_HOR, + LV_LIST_LAYOUT_VER +} +typedef uint8_t lv_list_layout_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -189,6 +196,13 @@ static inline void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time) */ void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * style); +/** + * Set layout of a list + * @param list pointer to a list object + * @param layout which layout should be used + */ +void lv_list_set_layout(lv_obj_t * list, lv_list_layout_t layout); + /*===================== * Getter functions *====================*/ @@ -259,6 +273,13 @@ uint16_t lv_list_get_size(const lv_obj_t * list); lv_obj_t * lv_list_get_btn_selected(const lv_obj_t * list); #endif +/** + * Get layout of a list + * @param list pointer to a list object + * @return layout which layout should be used + */ +lv_list_layout_t lv_list_get_layout(lv_obj_t * list); + /** * Get the scroll bar mode of a list * @param list pointer to a list object