1 
2 #ifndef LV_TEST_INDEV_H
3 #define LV_TEST_INDEV_H
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 #include <stdio.h>
10 #include "../lvgl.h"
11 
12 void lv_test_mouse_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data);
13 
14 void lv_test_mouse_move_to(lv_coord_t x, lv_coord_t y);
15 void lv_test_mouse_move_by(lv_coord_t x, lv_coord_t y);
16 void lv_test_mouse_press(void);
17 void lv_test_mouse_release(void);
18 void lv_test_mouse_click_at(lv_coord_t x, lv_coord_t y);
19 
20 void lv_test_keypad_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data);
21 
22 void lv_test_key_press(uint32_t k);
23 void lv_test_key_release(void);
24 void lv_test_key_hit(uint32_t k);
25 
26 /* encoder read callback */
27 void lv_test_encoder_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data) ;
28 
29 /* Simulate encoder rotation, use positive parameter to rotate to the right
30  * and negative to rotate to the left */
31 void lv_test_encoder_add_diff(int32_t d);
32 /* Same as lv_test_encoder_add_diff but with additional delay */
33 void lv_test_encoder_turn(int32_t d);
34 /* Set encoder to pressed */
35 void lv_test_encoder_press(void);
36 /* Set encoder to released */
37 void lv_test_encoder_release(void);
38 /* Simulate release+press+release (including delays) */
39 void lv_test_encoder_click(void);
40 
41 /* Simulate delay */
42 void lv_test_indev_wait(uint32_t ms);
43 
44 extern lv_indev_t * lv_test_mouse_indev;
45 extern lv_indev_t * lv_test_keypad_indev;
46 extern lv_indev_t * lv_test_encoder_indev;
47 
48 
49 #ifdef __cplusplus
50 } /*extern "C"*/
51 #endif
52 
53 #endif /*LV_TEST_INDEV_H*/
54 
55