LVGL8.3怎么获取list控件当前选中btn的index接口?

LVGL8.3怎么获取list控件当前选中btn的index接口?


static void event_handler(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * obj = lv_event_get_target(e);
if(code == LV_EVENT_SHORT_CLICKED) {
index1 = lv_obj_get_index(obj);
}


lv_obj_get_index(obj);