summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-09 12:46:55 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-09 12:46:55 +0200
commit47404534d0cf94b969daee5e0e4dc20c65c35fb2 (patch)
tree87af91c66e810d09f9affcbe577915b62a2fa24d /src/helpers
parent248ce664593feddd84d6897ae6b40a3a5fa145c0 (diff)
added tablet v2 support (alpha alpha)
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/WLClasses.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 461d02e0..723ffdff 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -153,4 +153,54 @@ struct SDrag {
DYNLISTENER(mapIcon);
DYNLISTENER(unmapIcon);
DYNLISTENER(commitIcon);
+};
+
+struct STablet {
+ DYNLISTENER(Tip);
+ DYNLISTENER(Axis);
+ DYNLISTENER(Button);
+ DYNLISTENER(Proximity);
+ DYNLISTENER(Destroy);
+
+ wlr_tablet* wlrTablet = nullptr;
+ wlr_tablet_v2_tablet* wlrTabletV2 = nullptr;
+ wlr_input_device* wlrDevice = nullptr;
+
+ bool operator==(const STablet& b) {
+ return wlrDevice == b.wlrDevice;
+ }
+};
+
+struct STabletTool {
+ wlr_tablet_tool* wlrTabletTool = nullptr;
+ wlr_tablet_v2_tablet_tool* wlrTabletToolV2 = nullptr;
+
+ wlr_tablet_v2_tablet* wlrTabletOwnerV2 = nullptr;
+
+ double tiltX = 0;
+ double tiltY = 0;
+
+ bool active = true;
+
+ DYNLISTENER(TabletToolDestroy);
+ DYNLISTENER(TabletToolSetCursor);
+
+ bool operator==(const STabletTool& b) {
+ return wlrTabletTool == b.wlrTabletTool;
+ }
+};
+
+struct STabletPad {
+ wlr_tablet_v2_tablet_pad* wlrTabletPadV2 = nullptr;
+ STablet* pTabletParent = nullptr;
+
+ DYNLISTENER(Attach);
+ DYNLISTENER(Button);
+ DYNLISTENER(Strip);
+ DYNLISTENER(Ring);
+ DYNLISTENER(Destroy);
+
+ bool operator==(const STabletPad& b) {
+ return wlrTabletPadV2 == b.wlrTabletPadV2;
+ }
}; \ No newline at end of file