summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_p.h')
-rw-r--r--src/gui/kernel/qapplication_p.h141
1 files changed, 48 insertions, 93 deletions
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 3692160..595f220 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -192,99 +192,54 @@ extern "C" {
#endif
#if defined(Q_WS_WIN)
-typedef BOOL (WINAPI *qt_RegisterTouchWindowPtr)(HWND, ULONG);
-typedef BOOL (WINAPI *qt_GetTouchInputInfoPtr)(HANDLE, UINT, PVOID, int);
-typedef BOOL (WINAPI *qt_CloseTouchInputHandlePtr)(HANDLE);
-
-typedef BOOL (WINAPI *PtrGetGestureInfo)(HANDLE hGestureInfo, PVOID pGestureInfo);
-typedef BOOL (WINAPI *PtrGetGestureExtraArgs)(HANDLE hGestureInfo, UINT cbExtraArgs, PBYTE pExtraArgs);
-typedef BOOL (WINAPI *PtrCloseGestureInfoHandle)(HANDLE hGestureInfo);
-typedef BOOL (WINAPI *PtrSetGestureConfig)(HWND hwnd, DWORD dwReserved, UINT cIDs,
- PVOID pGestureConfig,
- UINT cbSize);
-typedef BOOL (WINAPI *PtrGetGestureConfig)(HWND hwnd, DWORD dwReserved,
- DWORD dwFlags, PUINT pcIDs,
- PVOID pGestureConfig,
- UINT cbSize);
-
-typedef BOOL (WINAPI *PtrBeginPanningFeedback)(HWND hwnd);
-typedef BOOL (WINAPI *PtrUpdatePanningFeedback)(HWND hwnd, LONG, LONG, BOOL);
-typedef BOOL (WINAPI *PtrEndPanningFeedback)(HWND hwnd, BOOL);
+typedef BOOL (WINAPI *PtrRegisterTouchWindow)(HWND, ULONG);
+typedef BOOL (WINAPI *PtrGetTouchInputInfo)(HANDLE, UINT, PVOID, int);
+typedef BOOL (WINAPI *PtrCloseTouchInputHandle)(HANDLE);
+
+typedef BOOL (WINAPI *PtrGetGestureInfo)(HANDLE, PVOID);
+typedef BOOL (WINAPI *PtrGetGestureExtraArgs)(HANDLE, UINT, PBYTE);
+typedef BOOL (WINAPI *PtrCloseGestureInfoHandle)(HANDLE);
+typedef BOOL (WINAPI *PtrSetGestureConfig)(HWND, DWORD, UINT, PVOID, UINT);
+typedef BOOL (WINAPI *PtrGetGestureConfig)(HWND, DWORD, DWORD, PUINT, PVOID, UINT);
+
+typedef BOOL (WINAPI *PtrBeginPanningFeedback)(HWND);
+typedef BOOL (WINAPI *PtrUpdatePanningFeedback)(HWND, LONG, LONG, BOOL);
+typedef BOOL (WINAPI *PtrEndPanningFeedback)(HWND, BOOL);
#ifndef WM_GESTURE
+# define WM_GESTURE 0x0119
+
+# define GID_BEGIN 1
+# define GID_END 2
+# define GID_ZOOM 3
+# define GID_PAN 4
+# define GID_ROTATE 5
+# define GID_TWOFINGERTAP 6
+# define GID_ROLLOVER 7
-#define WM_GESTURE 0x0119
-#define WM_GESTURE_NOTIFY 0x011A
-
-DECLARE_HANDLE(HGESTUREINFO);
-
-#define GF_BEGIN 0x00000001
-#define GF_INERTIA 0x00000002
-#define GF_END 0x00000004
-
-/*
- * Gesture IDs
- */
-#define GID_BEGIN 1
-#define GID_END 2
-#define GID_ZOOM 3
-#define GID_PAN 4
-#define GID_ROTATE 5
-#define GID_TWOFINGERTAP 6
-#define GID_ROLLOVER 7
-
-typedef struct tagGESTUREINFO {
- UINT cbSize; // size, in bytes, of this structure (including variable length Args field)
- DWORD dwFlags; // see GF_* flags
- DWORD dwID; // gesture ID, see GID_* defines
- HWND hwndTarget; // handle to window targeted by this gesture
- POINTS ptsLocation; // current location of this gesture
- DWORD dwInstanceID; // internally used
- DWORD dwSequenceID; // internally used
- ULONGLONG ullArguments; // arguments for gestures whose arguments fit in 8 BYTES
- UINT cbExtraArgs; // size, in bytes, of extra arguments, if any, that accompany this gesture
-} GESTUREINFO, *PGESTUREINFO;
-typedef GESTUREINFO const * PCGESTUREINFO;
-
-typedef struct tagGESTURENOTIFYSTRUCT {
- UINT cbSize; // size, in bytes, of this structure
- DWORD dwFlags; // unused
- HWND hwndTarget; // handle to window targeted by the gesture
- POINTS ptsLocation; // starting location
- DWORD dwInstanceID; // internally used
-} GESTURENOTIFYSTRUCT, *PGESTURENOTIFYSTRUCT;
-
-/*
- * Gesture argument helpers
- * - Angle should be a double in the range of -2pi to +2pi
- * - Argument should be an unsigned 16-bit value
- */
-#define GID_ROTATE_ANGLE_TO_ARGUMENT(_arg_) ((USHORT)((((_arg_) + 2.0 * 3.14159265) / (4.0 * 3.14159265)) * 65535.0))
-#define GID_ROTATE_ANGLE_FROM_ARGUMENT(_arg_) ((((double)(_arg_) / 65535.0) * 4.0 * 3.14159265) - 2.0 * 3.14159265)
-
-typedef struct tagGESTURECONFIG {
- DWORD dwID; // gesture ID
- DWORD dwWant; // settings related to gesture ID that are to be turned on
- DWORD dwBlock; // settings related to gesture ID that are to be turned off
-} GESTURECONFIG, *PGESTURECONFIG;
-
-#define GC_ALLGESTURES 0x00000001
-#define GC_ZOOM 0x00000001
-#define GC_PAN 0x00000001
-#define GC_PAN_WITH_SINGLE_FINGER_VERTICALLY 0x00000002
-#define GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY 0x00000004
-#define GC_PAN_WITH_GUTTER 0x00000008
-#define GC_PAN_WITH_INERTIA 0x00000010
-#define GC_ROTATE 0x00000001
-#define GC_TWOFINGERTAP 0x00000001
-#define GC_ROLLOVER 0x00000001
-#define GESTURECONFIGMAXCOUNT 256 // Maximum number of gestures that can be included
- // in a single call to SetGestureConfig / GetGestureConfig
-
-
-
-#define GCF_INCLUDE_ANCESTORS 0x00000001 // If specified, GetGestureConfig returns consolidated configuration
- // for the specified window and it's parent window chain
+typedef struct tagGESTUREINFO
+{
+ UINT cbSize;
+ DWORD dwFlags;
+ DWORD dwID;
+ HWND hwndTarget;
+ POINTS ptsLocation;
+ DWORD dwInstanceID;
+ DWORD dwSequenceID;
+ ULONGLONG ullArguments;
+ UINT cbExtraArgs;
+} GESTUREINFO;
+
+# define GC_PAN 0x00000001
+# define GC_PAN_WITH_SINGLE_FINGER_VERTICALLY 0x00000002
+# define GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY 0x00000004
+
+typedef struct tagGESTURECONFIG
+{
+ DWORD dwID;
+ DWORD dwWant;
+ DWORD dwBlock;
+} GESTURECONFIG;
#endif // WM_GESTURE
@@ -559,9 +514,9 @@ public:
const QList<QTouchEvent::TouchPoint> &touchPoints);
#if defined(Q_WS_WIN)
- static qt_RegisterTouchWindowPtr RegisterTouchWindow;
- static qt_GetTouchInputInfoPtr GetTouchInputInfo;
- static qt_CloseTouchInputHandlePtr CloseTouchInputHandle;
+ static PtrRegisterTouchWindow RegisterTouchWindow;
+ static PtrGetTouchInputInfo GetTouchInputInfo;
+ static PtrCloseTouchInputHandle CloseTouchInputHandle;
QHash<DWORD, int> touchInputIDToTouchPointID;
QList<QTouchEvent::TouchPoint> appAllTouchPoints;