diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-05-23 15:07:39 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-31 09:13:01 +0200 |
commit | b551d5e4f7d9785baef5c24abb902dafa71350e2 (patch) | |
tree | 5ff65dec7dbd3112e7689418fa0def4432f6aebf /src/gui/kernel/qwindowsysteminterface_qpa_p.h | |
parent | ce7b3c972038636d8026dce949f1bd58e0bdd610 (diff) |
QPA tablet event support
Should be sufficient to allow implementing the actual functionality in
xcb/cocoa/windows to match the Qt 4 level of tablet event support.
Task-number: QTBUG-25864
Change-Id: Iebcca256dfba841d8976b58fda1b76026d3133a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_qpa_p.h')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_qpa_p.h | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa_p.h b/src/gui/kernel/qwindowsysteminterface_qpa_p.h index f026f1ca33..3eebaf2dfc 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa_p.h +++ b/src/gui/kernel/qwindowsysteminterface_qpa_p.h @@ -69,7 +69,10 @@ public: ScreenRefreshRate, ThemeChange, Expose, - FileOpen + FileOpen, + Tablet, + TabletEnterProximity, + TabletLeaveProximity }; class WindowSystemEvent { @@ -266,6 +269,55 @@ public: QString fileName; }; + class TabletEvent : public InputEvent { + public: + static void handleTabletEvent(QWindow *w, bool down, const QPointF &local, const QPointF &global, + int device, int pointerType, qreal pressure, int xTilt, int yTilt, + qreal tangentialPressure, qreal rotation, int z, qint64 uid, + Qt::KeyboardModifiers modifiers = Qt::NoModifier); + + TabletEvent(QWindow *w, ulong time, bool down, const QPointF &local, const QPointF &global, + int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tpressure, + qreal rotation, int z, qint64 uid, Qt::KeyboardModifiers mods) + : InputEvent(w, time, Tablet, Qt::NoModifier), + down(down), local(local), global(global), device(device), pointerType(pointerType), + pressure(pressure), xTilt(xTilt), yTilt(yTilt), tangentialPressure(tpressure), + rotation(rotation), z(z), uid(uid), mods(mods) { } + bool down; + QPointF local; + QPointF global; + int device; + int pointerType; + qreal pressure; + int xTilt; + int yTilt; + qreal tangentialPressure; + qreal rotation; + int z; + qint64 uid; + Qt::KeyboardModifiers mods; + }; + + class TabletEnterProximityEvent : public InputEvent { + public: + TabletEnterProximityEvent(ulong time, int device, int pointerType, qint64 uid) + : InputEvent(0, time, TabletEnterProximity, Qt::NoModifier), + device(device), pointerType(pointerType), uid(uid) { } + int device; + int pointerType; + qint64 uid; + }; + + class TabletLeaveProximityEvent : public InputEvent { + public: + TabletLeaveProximityEvent(ulong time, int device, int pointerType, qint64 uid) + : InputEvent(0, time, TabletLeaveProximity, Qt::NoModifier), + device(device), pointerType(pointerType), uid(uid) { } + int device; + int pointerType; + qint64 uid; + }; + static QList<WindowSystemEvent *> windowSystemEventQueue; static QMutex queueMutex; |