diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2013-10-02 08:52:26 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-17 15:58:32 +0200 |
commit | fbfc8ffbf39e2e7a540d4d576ec61bea7db63416 (patch) | |
tree | 5df0b25a1fae3e88a538075c857e5cc3bcc18a03 /src/gui/kernel/qwindowsysteminterface_p.h | |
parent | 73e3d2f6cb002be4ce409c3738db74b61beb12f4 (diff) |
Implement native gestures on OS X.
Add QWindowSystemInterface::GestureEvent and
QNativeGestureEvent to QtGui. These events are copies
of Qt4's QNativeGestureEvent, where it was an implementation
detail of QGestureManager.
Add gesture message handlers to QNSView and bring
back the Mac gesture recognizers for QGestureManager.
Task-number: QTBUG-28126
Change-Id: I1304e09e776fa7c44d133d54ca8b895ca2f544c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_p.h')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_p.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 46479701cc..03e2d420f0 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -91,6 +91,7 @@ public: PlatformPanel = UserInputEvent | 0x17, ContextMenu = UserInputEvent | 0x18, EnterWhatsThisMode = UserInputEvent | 0x19, + Gesture = UserInputEvent | 0x1a, ApplicationStateChanged = 0x19, FlushEvents = 0x20, WindowScreenChanged = 0x21 @@ -398,6 +399,21 @@ public: }; #endif + class GestureEvent : public InputEvent { + public: + GestureEvent(QWindow *window, ulong time, Qt::NativeGestureType type, QPointF pos, QPointF globalPos) + : InputEvent(window, time, Gesture, Qt::NoModifier), type(type), pos(pos), globalPos(globalPos), + realValue(0), sequenceId(0), intValue(0) { } + Qt::NativeGestureType type; + QPointF pos; + QPointF globalPos; + // Mac + qreal realValue; + // Windows + ulong sequenceId; + quint64 intValue; + }; + class WindowSystemEventList { QList<WindowSystemEvent *> impl; mutable QMutex mutex; |