From 1237732b97fcf21a19aed16f2ef966118a3ca2aa Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 3 May 2024 22:34:10 +0100 Subject: input: Introduce basic hyprland HID classes Implements an intermediary HID class for mice, keyboards and touch devices, removing the old structs from WLClasses.hpp Yes, virtual ones are duplicated a bit, but will likely be de-duped once wlr_input_device is not used anymore. --- src/devices/TouchDevice.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/devices/TouchDevice.hpp (limited to 'src/devices/TouchDevice.hpp') diff --git a/src/devices/TouchDevice.hpp b/src/devices/TouchDevice.hpp new file mode 100644 index 00000000..51eb76d4 --- /dev/null +++ b/src/devices/TouchDevice.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "ITouch.hpp" + +class CTouchDevice : public ITouch { + public: + static SP create(wlr_touch* touch); + + virtual bool isVirtual(); + virtual wlr_touch* wlr(); + + private: + CTouchDevice(wlr_touch* touch); + + wlr_touch* touch = nullptr; + + void disconnectCallbacks(); + + DYNLISTENER(destroy); + DYNLISTENER(down); + DYNLISTENER(up); + DYNLISTENER(motion); + DYNLISTENER(cancel); + DYNLISTENER(frame); +}; \ No newline at end of file -- cgit v1.2.3