summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-06-11 12:36:34 +0200
committerJason McDonald <jason.mcdonald@nokia.com>2010-06-30 11:26:47 +1000
commitd7513a5994c734ed48e95ec55d1abd9147c75405 (patch)
treefe28b2acd0813b3eaecd765831f9b3727ea49a56 /src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
parentfd75bec667e011c0700e0e6bcd45ff2fc29beb8d (diff)
Changed the way we detect touch screen on Windows.
Instead of using the IInkTablets interface (which sometimes freezes in the get_Count() call for 10 seconds), we just check if there is digitizer support. Task-number: QTBUG-6007 Reviewed-by: Prasanth (cherry picked from commit 7f338180e88b71e793069e2fbe9a70f3c434e126)
Diffstat (limited to 'src/gui/kernel/qwinnativepangesturerecognizer_win_p.h')
-rw-r--r--src/gui/kernel/qwinnativepangesturerecognizer_win_p.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
index 64addeb2de..eb99b74567 100644
--- a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
+++ b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
@@ -54,6 +54,38 @@
//
#include <QGestureRecognizer>
+#include <objbase.h>
+
+class IInkRectangle;
+class TabletHardwareCapabilities;
+class TabletPropertyMetricUnit;
+DECLARE_INTERFACE_(IInkTablet, IDispatch)
+{
+ STDMETHOD(get_Name)(THIS_ BSTR *Name) PURE;
+ STDMETHOD(get_PlugAndPlayId)(THIS_ BSTR *Id) PURE;
+ STDMETHOD(get_MaximumInputRectangle)(THIS_ IInkRectangle **Rectangle) PURE;
+ STDMETHOD(get_HardwareCapabilities)(THIS_ TabletHardwareCapabilities *Capabilities) PURE;
+ STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName) PURE;
+ STDMETHOD(GetPropertyMetrics)(THIS_ BSTR propertyName, long *Minimum, long *Maximum, TabletPropertyMetricUnit *Units, float *Resolution) PURE;
+};
+enum TabletDeviceKind
+{
+ TDK_Mouse = 0,
+ TDK_Pen = 1,
+ TDK_Touch = 2
+};
+DECLARE_INTERFACE_(IInkTablet2, IDispatch)
+{
+ STDMETHOD(get_DeviceKind)(THIS_ TabletDeviceKind *Kind) PURE;
+};
+DECLARE_INTERFACE_(IInkTablets, IDispatch)
+{
+ STDMETHOD(get_Count)(THIS_ long *Count) PURE;
+ STDMETHOD(get__NewEnum)(THIS_ IUnknown **_NewEnum) PURE;
+ STDMETHOD(get_DefaultTablet)(THIS_ IInkTablet **DefaultTablet) PURE;
+ STDMETHOD(Item)(THIS_ long Index, IInkTablet **Tablet) PURE;
+ STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName, VARIANT_BOOL *Supported) PURE;
+};
#include <objbase.h>