From 84e8d1810d57b65a0bc3b5ac2998bc023df880f4 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 6 May 2024 02:15:26 +0100 Subject: Tablet: move to new impl Ring and strip are not implemented. Will I implement this? God fucking knows. Nobody seems to have that anyways. --- src/managers/PointerManager.hpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/managers/PointerManager.hpp') diff --git a/src/managers/PointerManager.hpp b/src/managers/PointerManager.hpp index 2446cde7..71ab0fc2 100644 --- a/src/managers/PointerManager.hpp +++ b/src/managers/PointerManager.hpp @@ -2,6 +2,7 @@ #include "../devices/IPointer.hpp" #include "../devices/ITouch.hpp" +#include "../devices/Tablet.hpp" #include "../helpers/Box.hpp" #include "../helpers/Region.hpp" #include "../desktop/WLSurface.hpp" @@ -22,18 +23,18 @@ class CPointerManager { public: CPointerManager(); - // pointers will move the cursor on their respective events void attachPointer(SP pointer); - // touch inputs won't move the cursor, it needs to be done manually void attachTouch(SP touch); + void attachTablet(SP tablet); void detachPointer(SP pointer); void detachTouch(SP touch); + void detachTablet(SP tablet); // only clamps to the layout. void warpTo(const Vector2D& logical); void move(const Vector2D& deltaLogical); - void warpAbsolute(const Vector2D& abs, SP dev); + void warpAbsolute(Vector2D abs, SP dev); void setCursorBuffer(wlr_buffer* buf, const Vector2D& hotspot, const float& scale); void setCursorSurface(CWLSurface* buf, const Vector2D& hotspot); @@ -111,6 +112,17 @@ class CPointerManager { }; std::vector> touchListeners; + struct STabletListener { + CHyprSignalListener destroy; + CHyprSignalListener axis; + CHyprSignalListener proximity; + CHyprSignalListener tip; + CHyprSignalListener button; + + WP tablet; + }; + std::vector> tabletListeners; + struct { std::vector monitorBoxes; } currentMonitorLayout; -- cgit v1.2.3