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/input/InputManager.hpp | 44 ++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 18 deletions(-) (limited to 'src/managers/input/InputManager.hpp') diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index a2caed46..970d53c8 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -9,6 +9,7 @@ #include "../../helpers/signal/Listener.hpp" #include "../../devices/IPointer.hpp" #include "../../devices/ITouch.hpp" +#include "../../devices/Tablet.hpp" class CPointerConstraint; class CWindow; @@ -87,9 +88,15 @@ class CInputManager { void newVirtualMouse(SP); void newTouchDevice(wlr_input_device*); void newSwitch(wlr_input_device*); + void newTabletTool(wlr_tablet_tool*); + void newTabletPad(wlr_input_device*); + void newTablet(wlr_input_device*); void destroyTouchDevice(SP); void destroyKeyboard(SP); void destroyPointer(SP); + void destroyTablet(SP); + void destroyTabletTool(SP); + void destroyTabletPad(SP); void destroySwitch(SSwitchDevice*); void unconstrainMouse(); @@ -116,6 +123,15 @@ class CInputManager { void onTouchUp(ITouch::SUpEvent); void onTouchMove(ITouch::SMotionEvent); + void onSwipeBegin(IPointer::SSwipeBeginEvent); + void onSwipeEnd(IPointer::SSwipeEndEvent); + void onSwipeUpdate(IPointer::SSwipeUpdateEvent); + + void onTabletAxis(CTablet::SAxisEvent); + void onTabletProximity(CTablet::SProximityEvent); + void onTabletTip(CTablet::STipEvent); + void onTabletButton(CTablet::SButtonEvent); + STouchData m_sTouchData; // for dragging floating windows @@ -124,18 +140,17 @@ class CInputManager { bool m_bWasDraggingWindow = false; // for refocus to be forced - PHLWINDOWREF m_pForcedFocus; + PHLWINDOWREF m_pForcedFocus; - SDrag m_sDrag; + SDrag m_sDrag; - std::vector> m_vKeyboards; - std::vector> m_vPointers; - std::vector> m_vTouches; - - // tablets - std::list m_lTablets; - std::list m_lTabletTools; - std::list m_lTabletPads; + std::vector> m_vKeyboards; + std::vector> m_vPointers; + std::vector> m_vTouches; + std::vector> m_vTablets; + std::vector> m_vTabletTools; + std::vector> m_vTabletPads; + std::vector> m_vHIDs; // general container for all HID devices connected to the input manager. // Switches std::list m_lSwitches; @@ -147,16 +162,9 @@ class CInputManager { std::vector> m_vConstraints; // - void newTabletTool(wlr_input_device*); - void newTabletPad(wlr_input_device*); - void focusTablet(STablet*, wlr_tablet_tool*, bool motion = false); void newIdleInhibitor(std::any); void recheckIdleInhibitorStatus(); - void onSwipeBegin(IPointer::SSwipeBeginEvent); - void onSwipeEnd(IPointer::SSwipeEndEvent); - void onSwipeUpdate(IPointer::SSwipeUpdateEvent); - SSwipeGesture m_sActiveSwipe; CTimer m_tmrLastCursorMovement; @@ -223,7 +231,7 @@ class CInputManager { void mouseMoveUnified(uint32_t, bool refocus = false); - STabletTool* ensureTabletToolPresent(wlr_tablet_tool*); + SP ensureTabletToolPresent(wlr_tablet_tool*); void applyConfigToKeyboard(SP); -- cgit v1.2.3