Add MouseButton::PinchIn and PinchOut, ideally will be superceded by TouchWhiz Gestures (LOL)
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m29s

This commit is contained in:
2025-07-14 15:39:59 -05:00
parent 82e4ae39a9
commit edcd5a7fca
3 changed files with 6 additions and 0 deletions

View File

@@ -35,6 +35,9 @@ namespace MouseButtons
static const MouseButton Mouse5 ("5", 9); static const MouseButton Mouse5 ("5", 9);
static const MouseButton Unimplemented ("?", 0); static const MouseButton Unimplemented ("?", 0);
static const MouseButton PinchIn ("+", 6);
static const MouseButton PinchOut("-", 7);
/// NOTE: IsMouseButtonDown will not return correctly for the mouse-wheel-buttons, because the action is effectively instantaneous. /// NOTE: IsMouseButtonDown will not return correctly for the mouse-wheel-buttons, because the action is effectively instantaneous.
static const MouseButton MWheelUp ("U", 4); static const MouseButton MWheelUp ("U", 4);
/// NOTE: IsMouseButtonDown will not return correctly for the mouse-wheel-buttons, because the action is effectively instantaneous. /// NOTE: IsMouseButtonDown will not return correctly for the mouse-wheel-buttons, because the action is effectively instantaneous.

View File

@@ -1,4 +1,5 @@
#include <cstring> #include <cstring>
#include <thread>
#include <ReWindow/types/Window.h> #include <ReWindow/types/Window.h>
#include <ReWindow/types/Cursors.h> #include <ReWindow/types/Cursors.h>
#include <ReWindow/Logger.h> #include <ReWindow/Logger.h>

View File

@@ -25,6 +25,8 @@ MouseButton GetMouseButtonFromXButton(unsigned int button) {
//case 4: return MouseButtons::MWheelUp; //case 4: return MouseButtons::MWheelUp;
//case 5: return MouseButtons::MWheelDown; //case 5: return MouseButtons::MWheelDown;
//For *whatever* reason. These aren't in X.h //For *whatever* reason. These aren't in X.h
case 6: return MouseButtons::PinchIn;
case 7: return MouseButtons::PinchOut;
case 8: return MouseButtons::Mouse4; case 8: return MouseButtons::Mouse4;
case 9: return MouseButtons::Mouse5; case 9: return MouseButtons::Mouse5;
default: { default: {