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/VirtualPointer.hpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/devices/VirtualPointer.hpp (limited to 'src/devices/VirtualPointer.hpp') diff --git a/src/devices/VirtualPointer.hpp b/src/devices/VirtualPointer.hpp new file mode 100644 index 00000000..b22c8bf2 --- /dev/null +++ b/src/devices/VirtualPointer.hpp @@ -0,0 +1,38 @@ +#pragma once + +#include "IPointer.hpp" + +class CVirtualPointerV1Resource; + +class CVirtualPointer : public IPointer { + public: + static SP create(SP resource); + + virtual bool isVirtual(); + virtual wlr_pointer* wlr(); + + private: + CVirtualPointer(SP); + + WP pointer; + + void disconnectCallbacks(); + + DYNLISTENER(destroy); + DYNLISTENER(motion); + DYNLISTENER(motionAbsolute); + DYNLISTENER(button); + DYNLISTENER(axis); + DYNLISTENER(frame); + + DYNLISTENER(swipeBegin); + DYNLISTENER(swipeEnd); + DYNLISTENER(swipeUpdate); + + DYNLISTENER(pinchBegin); + DYNLISTENER(pinchEnd); + DYNLISTENER(pinchUpdate); + + DYNLISTENER(holdBegin); + DYNLISTENER(holdEnd); +}; \ No newline at end of file -- cgit v1.2.3