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.
This commit is contained in:
parent
1d2acbe193
commit
1237732b97
39 changed files with 1450 additions and 573 deletions
26
src/devices/IHID.hpp
Normal file
26
src/devices/IHID.hpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include "../helpers/signal/Signal.hpp"
|
||||
|
||||
enum eHIDCapabilityType : uint32_t {
|
||||
HID_INPUT_CAPABILITY_KEYBOARD = (1 << 0),
|
||||
HID_INPUT_CAPABILITY_POINTER = (1 << 1),
|
||||
HID_INPUT_CAPABILITY_TOUCH = (1 << 2),
|
||||
};
|
||||
|
||||
/*
|
||||
Base class for a HID device.
|
||||
This could be a keyboard, a mouse, or a touchscreen.
|
||||
*/
|
||||
class IHID {
|
||||
public:
|
||||
virtual uint32_t getCapabilities() = 0;
|
||||
|
||||
struct {
|
||||
CSignal destroy;
|
||||
} events;
|
||||
|
||||
std::string deviceName;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue