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/Keyboard.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/devices/Keyboard.hpp (limited to 'src/devices/Keyboard.hpp') diff --git a/src/devices/Keyboard.hpp b/src/devices/Keyboard.hpp new file mode 100644 index 00000000..cf01a9a7 --- /dev/null +++ b/src/devices/Keyboard.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "IKeyboard.hpp" + +class CKeyboard : public IKeyboard { + public: + static SP create(wlr_keyboard* keeb); + + virtual bool isVirtual(); + virtual wlr_keyboard* wlr(); + + private: + CKeyboard(wlr_keyboard* keeb); + + wlr_keyboard* keyboard = nullptr; + + void disconnectCallbacks(); + + DYNLISTENER(destroy); + DYNLISTENER(key); + DYNLISTENER(modifiers); + DYNLISTENER(keymap); + DYNLISTENER(repeatInfo); +}; \ No newline at end of file -- cgit v1.2.3