1 /**
2  * @file lv_indev_scroll.h
3  *
4  */
5 
6 #ifndef LV_INDEV_SCROLL_H
7 #define LV_INDEV_SCROLL_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "lv_obj.h"
17 
18 /*********************
19  *      DEFINES
20  *********************/
21 
22 /**********************
23  *      TYPEDEFS
24  **********************/
25 
26 /**********************
27  * GLOBAL PROTOTYPES
28  **********************/
29 
30 /**
31  * Handle scrolling. Called by LVGL during input device processing
32  * @param proc      pointer to an input device's proc field
33  */
34 void _lv_indev_scroll_handler(_lv_indev_proc_t * proc);
35 
36 /**
37  * Handle throwing after scrolling. Called by LVGL during input device processing
38  * @param proc      pointer to an input device's proc field
39  */
40 void _lv_indev_scroll_throw_handler(_lv_indev_proc_t * proc);
41 
42 /**
43  * Predict where would a scroll throw end
44  * @param indev     pointer to an input device
45  * @param dir `     LV_DIR_VER` or `LV_DIR_HOR`
46  * @return          the difference compared to the current position when the throw would be finished
47  */
48 lv_coord_t lv_indev_scroll_throw_predict(lv_indev_t * indev, lv_dir_t dir);
49 
50 /**
51  * Get the distance of the nearest snap point
52  * @param obj       the object on which snap points should be found
53  * @param p         save the distance of the found snap point there
54  */
55 void lv_indev_scroll_get_snap_dist(lv_obj_t * obj, lv_point_t * p);
56 
57 /**********************
58  *      MACROS
59  **********************/
60 
61 #ifdef __cplusplus
62 } /*extern "C"*/
63 #endif
64 
65 #endif /*LV_INDEV_SCROLL_H*/
66