Skip to content

Commit

Permalink
[lvgl]: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jiale-gdyd committed Mar 5, 2023
1 parent 36d6e32 commit bd706a9
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion project/gui/lvgl/src/widgets/list/lv_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**********************
Expand All @@ -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*/

0 comments on commit bd706a9

Please sign in to comment.