lv_roller: add missing action handling

This commit is contained in:
Gabor Kiss-Vamosi
2018-01-16 15:35:35 +01:00
parent c331659026
commit a42b56c7c7
2 changed files with 13 additions and 0 deletions

View File

@@ -71,6 +71,17 @@ static inline void lv_roller_set_options(lv_obj_t * roller, const char * options
*/
void lv_roller_set_selected(lv_obj_t *roller, uint16_t sel_opt, bool anim_en);
/**
* Set a function to call when a new option is chosen
* @param roller pointer to a roller
* @param action pointer to a callback function
*/
static inline void lv_roller_set_action(lv_obj_t * roller, lv_action_t action)
{
lv_ddlist_set_action(roller, action);
}
/**
* Set the height to show the given number of rows (options)
* @param roller pointer to a roller object