summaryrefslogtreecommitdiff
path: root/lib/lvgl/tests/src/lv_test_indev.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lvgl/tests/src/lv_test_indev.h')
m---------lib/lvgl0
-rw-r--r--lib/lvgl/tests/src/lv_test_indev.h54
2 files changed, 54 insertions, 0 deletions
diff --git a/lib/lvgl b/lib/lvgl
deleted file mode 160000
-Subproject 0732400e7b564dd0e7dc4a924619d8e19c5b23a
diff --git a/lib/lvgl/tests/src/lv_test_indev.h b/lib/lvgl/tests/src/lv_test_indev.h
new file mode 100644
index 00000000..2a0508fd
--- /dev/null
+++ b/lib/lvgl/tests/src/lv_test_indev.h
@@ -0,0 +1,54 @@
+
+#ifndef LV_TEST_INDEV_H
+#define LV_TEST_INDEV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+#include "../lvgl.h"
+
+void lv_test_mouse_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data);
+
+void lv_test_mouse_move_to(lv_coord_t x, lv_coord_t y);
+void lv_test_mouse_move_by(lv_coord_t x, lv_coord_t y);
+void lv_test_mouse_press(void);
+void lv_test_mouse_release(void);
+void lv_test_mouse_click_at(lv_coord_t x, lv_coord_t y);
+
+void lv_test_keypad_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data);
+
+void lv_test_key_press(uint32_t k);
+void lv_test_key_release(void);
+void lv_test_key_hit(uint32_t k);
+
+/* encoder read callback */
+void lv_test_encoder_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data) ;
+
+/* Simulate encoder rotation, use positive parameter to rotate to the right
+ * and negative to rotate to the left */
+void lv_test_encoder_add_diff(int32_t d);
+/* Same as lv_test_encoder_add_diff but with additional delay */
+void lv_test_encoder_turn(int32_t d);
+/* Set encoder to pressed */
+void lv_test_encoder_press(void);
+/* Set encoder to released */
+void lv_test_encoder_release(void);
+/* Simulate release+press+release (including delays) */
+void lv_test_encoder_click(void);
+
+/* Simulate delay */
+void lv_test_indev_wait(uint32_t ms);
+
+extern lv_indev_t * lv_test_mouse_indev;
+extern lv_indev_t * lv_test_keypad_indev;
+extern lv_indev_t * lv_test_encoder_indev;
+
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_TEST_INDEV_H*/
+