summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_p.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-28 10:25:32 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-28 10:25:32 (GMT)
commitec8654a61e574539f1b948b82a19371b160f4f4e (patch)
tree9e3f6bd91e26cd3fc4bb72a7300ebb53b53244ee /src/gui/kernel/qapplication_p.h
parent9667870db5b929c76656f3a4235b9539a1d5de5b (diff)
downloadQt-ec8654a61e574539f1b948b82a19371b160f4f4e.zip
Qt-ec8654a61e574539f1b948b82a19371b160f4f4e.tar.gz
Qt-ec8654a61e574539f1b948b82a19371b160f4f4e.tar.bz2
Refactor the touch event dispatching code in preparation for allowing external event generators
This introduces QEvent::RawTouch event type, which should be used by the low-level translator. This raw QTouchEvent can be sent to either QApplication or to a window, and Qt will do the rest to dispatch the touch points to the correct place.
Diffstat (limited to 'src/gui/kernel/qapplication_p.h')
-rw-r--r--src/gui/kernel/qapplication_p.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 1424611..55d8fc4 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -435,7 +435,16 @@ public:
QMap<QString, int> grabbedGestures;
QHash<int, QWidget *> widgetForTouchPointId;
+ QList<QTouchEvent::TouchPoint *> appCurrentTouchPoints;
static void updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent);
+ void initializeMultitouch();
+ void initializeMultitouch_sys();
+ void cleanupMultitouch();
+ void cleanupMultitouch_sys();
+ QTouchEvent::TouchPoint *findClosestTouchPoint(const QPointF &screenPos);
+ void appendTouchPoint(QTouchEvent::TouchPoint *touchPoint);
+ void removeTouchPoint(QTouchEvent::TouchPoint *touchPoint);
+ bool translateRawTouchEvent(QWidget *widget, QTouchEvent *rawTouchEvent);
#if defined(Q_WS_WIN)
static qt_RegisterTouchWindowPtr RegisterTouchWindow;
@@ -444,12 +453,6 @@ public:
QHash<DWORD, int> touchInputIDToTouchPointID;
QVector<QTouchEvent::TouchPoint *> appAllTouchPoints;
- QList<QTouchEvent::TouchPoint *> appCurrentTouchPoints;
-
- void initializeMultitouch();
- QTouchEvent::TouchPoint *findClosestTouchPoint(const QPointF &screenPos);
- void appendTouchPoint(QTouchEvent::TouchPoint *touchPoint);
- void removeTouchPoint(QTouchEvent::TouchPoint *touchPoint);
bool translateTouchEvent(const MSG &msg);
#endif