summaryrefslogtreecommitdiff
path: root/src/managers/PointerManager.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-05-06 02:15:26 +0100
committerVaxry <43317083+vaxerski@users.noreply.github.com>2024-05-09 13:37:39 +0100
commit84e8d1810d57b65a0bc3b5ac2998bc023df880f4 (patch)
treecd313a14333c06765dc149c9339d595c13eafd72 /src/managers/PointerManager.hpp
parented411f53bdcf8d455f9e6ca769693aa84dc8372f (diff)
Tablet: move to new impl
Ring and strip are not implemented. Will I implement this? God fucking knows. Nobody seems to have that anyways.
Diffstat (limited to 'src/managers/PointerManager.hpp')
-rw-r--r--src/managers/PointerManager.hpp18
1 files changed, 15 insertions, 3 deletions
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<IPointer> pointer);
- // touch inputs won't move the cursor, it needs to be done manually
void attachTouch(SP<ITouch> touch);
+ void attachTablet(SP<CTablet> tablet);
void detachPointer(SP<IPointer> pointer);
void detachTouch(SP<ITouch> touch);
+ void detachTablet(SP<CTablet> tablet);
// only clamps to the layout.
void warpTo(const Vector2D& logical);
void move(const Vector2D& deltaLogical);
- void warpAbsolute(const Vector2D& abs, SP<IHID> dev);
+ void warpAbsolute(Vector2D abs, SP<IHID> 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<SP<STouchListener>> touchListeners;
+ struct STabletListener {
+ CHyprSignalListener destroy;
+ CHyprSignalListener axis;
+ CHyprSignalListener proximity;
+ CHyprSignalListener tip;
+ CHyprSignalListener button;
+
+ WP<CTablet> tablet;
+ };
+ std::vector<SP<STabletListener>> tabletListeners;
+
struct {
std::vector<CBox> monitorBoxes;
} currentMonitorLayout;