mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
chore(widgets): add comments to the tileview and win (#6856)
Signed-off-by: lhdjply <lhdjply@126.com>
This commit is contained in:
parent
2c2a293f57
commit
4415f6e6de
@ -29,17 +29,44 @@ LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_tileview_tile_class;
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Create a Tileview object
|
||||
* @param parent pointer to an object, it will be the parent of the new tileview
|
||||
* @return pointer to the created tileview
|
||||
* Create a tileview object
|
||||
* @param parent pointer to an object, it will be the parent of the new tileview
|
||||
* @return pointer to the created tileview
|
||||
*/
|
||||
lv_obj_t * lv_tileview_create(lv_obj_t * parent);
|
||||
|
||||
/**
|
||||
* Add a tile to the tileview
|
||||
* @param tv pointer to the tileview object
|
||||
* @param col_id column id of the tile
|
||||
* @param row_id row id of the tile
|
||||
* @param dir direction to move to the next tile
|
||||
* @return pointer to the added tile object
|
||||
*/
|
||||
lv_obj_t * lv_tileview_add_tile(lv_obj_t * tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir);
|
||||
|
||||
/**
|
||||
* Set the active tile in the tileview.
|
||||
* @param parent pointer to the tileview object
|
||||
* @param tile_obj pointer to the tile object to be set as active
|
||||
* @param anim_en animation enable flag (LV_ANIM_ON or LV_ANIM_OFF)
|
||||
*/
|
||||
void lv_tileview_set_tile(lv_obj_t * tv, lv_obj_t * tile_obj, lv_anim_enable_t anim_en);
|
||||
|
||||
/**
|
||||
* Set the active tile by index in the tileview
|
||||
* @param tv pointer to the tileview object
|
||||
* @param col_id column id of the tile to be set as active
|
||||
* @param row_id row id of the tile to be set as active
|
||||
* @param anim_en animation enable flag (LV_ANIM_ON or LV_ANIM_OFF)
|
||||
*/
|
||||
void lv_tileview_set_tile_by_index(lv_obj_t * tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en);
|
||||
|
||||
/**
|
||||
* Get the currently active tile in the tileview
|
||||
* @param obj pointer to the tileview object
|
||||
* @return pointer to the currently active tile object
|
||||
*/
|
||||
lv_obj_t * lv_tileview_get_tile_active(lv_obj_t * obj);
|
||||
|
||||
/*=====================
|
||||
|
@ -26,12 +26,42 @@ LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_win_class;
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Create a window widget
|
||||
* @param parent pointer to a parent widget
|
||||
* @return the created window
|
||||
*/
|
||||
lv_obj_t * lv_win_create(lv_obj_t * parent);
|
||||
|
||||
/**
|
||||
* Add a title to the window
|
||||
* @param obj pointer to a window widget
|
||||
* @param txt the text of the title
|
||||
* @return the widget where the content of the title can be created
|
||||
*/
|
||||
lv_obj_t * lv_win_add_title(lv_obj_t * win, const char * txt);
|
||||
|
||||
/**
|
||||
* Add a button to the window
|
||||
* @param obj pointer to a window widget
|
||||
* @param icon an icon to be displayed on the button
|
||||
* @param btn_w width of the button
|
||||
* @return the widget where the content of the button can be created
|
||||
*/
|
||||
lv_obj_t * lv_win_add_button(lv_obj_t * win, const void * icon, int32_t btn_w);
|
||||
|
||||
/**
|
||||
* Get the header of the window
|
||||
* @param win pointer to a window widget
|
||||
* @return the header of the window
|
||||
*/
|
||||
lv_obj_t * lv_win_get_header(lv_obj_t * win);
|
||||
|
||||
/**
|
||||
* Get the content of the window
|
||||
* @param win pointer to a window widget
|
||||
* @return the content of the window
|
||||
*/
|
||||
lv_obj_t * lv_win_get_content(lv_obj_t * win);
|
||||
/**********************
|
||||
* MACROS
|
||||
|
Loading…
x
Reference in New Issue
Block a user