lv_indev_scroll.h

Functions

void _lv_indev_scroll_handler(lv_indev_t *indev)

Handle scrolling. Called by LVGL during input device processing

参数:

indev -- pointer to an input device

void _lv_indev_scroll_throw_handler(lv_indev_t *indev)

Handle throwing after scrolling. Called by LVGL during input device processing

参数:

indev -- pointer to an input device

int32_t lv_indev_scroll_throw_predict(lv_indev_t *indev, lv_dir_t dir)

Predict where would a scroll throw end

参数:
  • indev -- pointer to an input device

  • dir -- LV_DIR_VER or LV_DIR_HOR

返回:

the difference compared to the current position when the throw would be finished

void lv_indev_scroll_get_snap_dist(lv_obj_t *obj, lv_point_t *p)

Get the distance of the nearest snap point

参数:
  • obj -- the object on which snap points should be found

  • p -- save the distance of the found snap point there