From bd706a9f6c9af8f795332f99770e372e9ac5c55a Mon Sep 17 00:00:00 2001 From: lujiale Date: Sun, 5 Mar 2023 20:46:54 +0800 Subject: [PATCH] [lvgl]: add comment --- project/gui/lvgl/src/widgets/list/lv_list.h | 26 ++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/project/gui/lvgl/src/widgets/list/lv_list.h b/project/gui/lvgl/src/widgets/list/lv_list.h index 036f92fdc..946f1a462 100644 --- a/project/gui/lvgl/src/widgets/list/lv_list.h +++ b/project/gui/lvgl/src/widgets/list/lv_list.h @@ -32,12 +32,36 @@ extern const lv_obj_class_t lv_list_btn_class; * GLOBAL PROTOTYPES **********************/ +/** + * Create a list object + * @param parent pointer to an object, it will be the parent of the new list + * @return pointer to the created list + */ lv_obj_t * lv_list_create(lv_obj_t * parent); +/** + * Add text to a list + * @param list pointer to a list, it will be the parent of the new label + * @param txt Text of the new label + * @return pointer to the created label + */ lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt); +/** + * Add button to a list + * @param list pointer to a list, it will be the parent of the new button + * @param icon icon for the button, when NULL it will have no icon + * @param txt Text of the new button, when NULL no text will be added + * @return pointer to the created button + */ lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * icon, const char * txt); +/** + * Get text of a given list button + * @param list pointer to a list + * @param btn pointer to the button + * @return Text of btn, if btn doesn't have text "" will be returned + */ const char * lv_list_get_btn_text(lv_obj_t * list, lv_obj_t * btn); /********************** @@ -50,4 +74,4 @@ const char * lv_list_get_btn_text(lv_obj_t * list, lv_obj_t * btn); } /*extern "C"*/ #endif -#endif /*LV_LIST_H*/ +#endif /*LV_LIST_H*/ \ No newline at end of file