Merge multi-touch gestures event branch

This is a squashed commit of the SOC2017_GESTURES branch from
https://github.com/prashantkn94/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/551
This commit is contained in:
prashantkn94
2017-09-10 21:13:32 +05:30
committed by Vadim Zeitlin
parent aef4edb969
commit 261b04b5a3
21 changed files with 2318 additions and 10 deletions

View File

@@ -143,6 +143,15 @@ public :
void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent);
virtual bool SetupCursor(NSEvent* event);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
virtual void PanGestureEvent(NSPanGestureRecognizer *panGestureRecognizer);
virtual void ZoomGestureEvent(NSMagnificationGestureRecognizer *magnificationGestureRecognizer);
virtual void RotateGestureEvent(NSRotationGestureRecognizer *rotationGestureRecognizer);
virtual void LongPressEvent(NSPressGestureRecognizer *pressGestureRecognizer);
virtual void TouchesBegan(NSEvent *event);
virtual void TouchesMoved(NSEvent *event);
virtual void TouchesEnded(NSEvent *event);
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
#if !wxOSX_USE_NATIVE_FLIPPED
void SetFlipped(bool flipped);
@@ -190,6 +199,21 @@ protected:
// events, don't resend them
bool m_hasEditor;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
NSPanGestureRecognizer *m_panGestureRecognizer;
NSMagnificationGestureRecognizer *m_magnificationGestureRecognizer;
NSRotationGestureRecognizer *m_rotationGestureRecognizer;
NSPressGestureRecognizer *m_pressGestureRecognizer;
int m_allowedGestures;
int m_activeGestures;
unsigned int m_touchCount;
unsigned int m_lastTouchTime;
// Used to keep track of the touch corresponding to "press" in Press and Tap gesture
NSTouch* m_initialTouch;
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxWidgetCocoaImpl);
};