summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/samples/littlevgl/vgl-native-ui-app/lv-drivers/indev/mouse.h
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/samples/littlevgl/vgl-native-ui-app/lv-drivers/indev/mouse.h')
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/samples/littlevgl/vgl-native-ui-app/lv-drivers/indev/mouse.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/samples/littlevgl/vgl-native-ui-app/lv-drivers/indev/mouse.h b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/samples/littlevgl/vgl-native-ui-app/lv-drivers/indev/mouse.h
new file mode 100644
index 000000000..07e492f96
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/samples/littlevgl/vgl-native-ui-app/lv-drivers/indev/mouse.h
@@ -0,0 +1,73 @@
+/**
+ * @file mouse.h
+ *
+ */
+
+#ifndef MOUSE_H
+#define MOUSE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_drv_conf.h"
+
+#if USE_MOUSE
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "lvgl/lv_hal/lv_hal_indev.h"
+
+#ifndef MONITOR_SDL_INCLUDE_PATH
+#define MONITOR_SDL_INCLUDE_PATH <SDL2/SDL.h>
+#endif
+
+#include MONITOR_SDL_INCLUDE_PATH
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Initialize the mouse
+ */
+void
+mouse_init(void);
+/**
+ * Get the current position and state of the mouse
+ * @param data store the mouse data here
+ * @return false: because the points are not buffered, so no more data to be
+ * read
+ */
+bool
+mouse_read(lv_indev_data_t *data);
+
+/**
+ * It will be called from the main SDL thread
+ */
+void
+mouse_handler(SDL_Event *event);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /* USE_MOUSE */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* MOUSE_H */