summaryrefslogtreecommitdiffhomepage
path: root/Touchpad.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-06 00:16:49 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-06 00:16:49 +0100
commitc072b661564e1ce3f0f01f1b6ddba0266fbb47b6 (patch)
tree84f44481827db46618911d1298a2fb60292618a2 /Touchpad.h
parentb2f0cb564a296653c83b0a64c0f9a3de0a2f0d5e (diff)
Fixed missing Touchpad
Diffstat (limited to 'Touchpad.h')
-rw-r--r--Touchpad.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Touchpad.h b/Touchpad.h
new file mode 100644
index 0000000..9ee8064
--- /dev/null
+++ b/Touchpad.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <libevdev/libevdev.h>
+
+class Touchpad
+{
+public:
+ Touchpad();
+
+ bool is_valid();
+
+ bool event_available();
+
+ input_event get_event();
+
+ bool event_is_button1(const input_event& ev);
+ bool event_is_button2(const input_event& ev);
+
+private:
+ libevdev* m_dev = nullptr;
+ int m_fd;
+ bool m_valid;
+};
+