aboutsummaryrefslogtreecommitdiffhomepage
path: root/evdev.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-01-13 18:31:56 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-09-05 23:39:23 +0300
commit973fa97138a82e98ffded5bd92e0268b2364aa15 (patch)
treecebca749d9eb830647cd8af2189d11ce3be26647 /evdev.h
parent3fc5229269fb01de85e56bacce91f11799e62054 (diff)
downloadapplause2-973fa97138a82e98ffded5bd92e0268b2364aa15.tar.gz
Added HID support via Evdev
* This works for relative, absolute and keyboard devices * devices can be grabbed, so they do not interfere with the rest of the system
Diffstat (limited to 'evdev.h')
-rw-r--r--evdev.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/evdev.h b/evdev.h
new file mode 100644
index 0000000..764b11b
--- /dev/null
+++ b/evdev.h
@@ -0,0 +1,14 @@
+/* This header is included from C and LuaJIT. */
+
+typedef struct applause_evdev_sample {
+ uint16_t type;
+ uint16_t code;
+ int32_t value;
+} applause_evdev_sample;
+
+typedef struct applause_evdev applause_evdev;
+
+char *applause_evdev_getname(const char *node);
+applause_evdev *applause_evdev_new(const char *node, bool grab);
+void applause_evdev_pull(applause_evdev *evdev, applause_evdev_sample *sample);
+void applause_evdev_free(applause_evdev *evdev);