Bug 737984 - win8 dev kit fixup for win widget gesture input headers, r=bbondy.
authorJim Mathies <jmathies@mozilla.com>
Thu, 22 Mar 2012 09:18:49 -0500
changeset 90041 06a882a59dee35d4554268ebba532f1a13434c11
parent 90040 bf7e77b061c598bf192d4b95574c68a3d1504fba
child 90042 323deae312d2fa7070ed37d7d7c447bcf9c55059
push id22308
push usermak77@bonardo.net
push dateFri, 23 Mar 2012 01:00:29 +0000
treeherdermozilla-central@70ac5065caee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs737984
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 737984 - win8 dev kit fixup for win widget gesture input headers, r=bbondy.
widget/windows/nsWinGesture.h
widget/windows/nsWindowDefs.h
--- a/widget/windows/nsWinGesture.h
+++ b/widget/windows/nsWinGesture.h
@@ -40,20 +40,22 @@
 #define WinGesture_h__
 
 /*
  * nsWinGesture - Touch input handling for tablet displays.
  */
 
 #include "nsdefs.h"
 #include <winuser.h>
+#include <tpcshrd.h>
 #include "nsPoint.h"
 #include "nsGUIEvent.h"
 
-#ifndef HGESTUREINFO  // needs WINVER >= 0x0601
+// Desktop builds target apis for 502. Win8 Metro builds target 602.
+#if WINVER < 0x0602
 
 DECLARE_HANDLE(HGESTUREINFO);
 
 /*
  * Gesture flags - GESTUREINFO.dwFlags
  */
 #define GF_BEGIN                        0x00000001
 #define GF_INERTIA                      0x00000002
@@ -151,27 +153,19 @@ typedef struct tagGESTURENOTIFYSTRUCT {
 // in a single call to SetGestureConfig / GetGestureConfig
 #define GESTURECONFIGMAXCOUNT           256
 
 // If specified, GetGestureConfig returns consolidated configuration
 // for the specified window and it's parent window chain
 #define GCF_INCLUDE_ANCESTORS           0x00000001
 
 // Window events we need to respond to or receive
-#define WM_TABLET_QUERYSYSTEMGESTURESTATUS 0x02CC
 #define WM_GESTURE                         0x0119
 #define WM_GESTURENOTIFY                   0x011A
 
-// WM_TABLET_QUERYSYSTEMGESTURESTATUS return values
-#define TABLET_ROTATE_GESTURE_ENABLE    0x02000000
-
-#endif /* #ifndef HGESTUREINFO */
-
-#ifndef HTOUCHINPUT // needs WINVER >= 0x0601
-
 typedef struct _TOUCHINPUT {
   LONG      x;
   LONG      y;
   HANDLE    hSource;
   DWORD     dwID;
   DWORD     dwFlags;
   DWORD     dwMask;
   DWORD     dwTime;
@@ -197,17 +191,20 @@ typedef HANDLE HTOUCHINPUT;
 #define TOUCHINPUTMASKF_EXTRAINFO      0x0002
 #define TOUCHINPUTMASKF_CONTACTAREA    0x0004
 
 #define TOUCH_COORD_TO_PIXEL(C) (C/100)
 
 #define TWF_FINETOUCH          0x0001
 #define TWF_WANTPALM           0x0002
 
-#endif /* #ifndef HTOUCHINPUT */
+#endif // WINVER < 0x0602
+
+// WM_TABLET_QUERYSYSTEMGESTURESTATUS return values
+#define TABLET_ROTATE_GESTURE_ENABLE    0x02000000
 
 class nsPointWin : public nsIntPoint
 {
 public:
    nsPointWin& operator=(const POINTS& aPoint) {
      x = aPoint.x; y = aPoint.y;
      return *this;
    }
--- a/widget/windows/nsWindowDefs.h
+++ b/widget/windows/nsWindowDefs.h
@@ -276,17 +276,17 @@ struct nsModifierKeyState {
 // Used for synthesizing events
 struct KeyPair {
   PRUint8 mGeneral;
   PRUint8 mSpecific;
   KeyPair(PRUint32 aGeneral, PRUint32 aSpecific)
     : mGeneral(PRUint8(aGeneral)), mSpecific(PRUint8(aSpecific)) {}
 };
 
-#ifndef TITLEBARINFOEX
+#if (WINVER < 0x0600)
 struct TITLEBARINFOEX
 {
     DWORD cbSize;
     RECT rcTitleBar;
     DWORD rgstate[CCHILDREN_TITLEBAR + 1];
     RECT rgrect[CCHILDREN_TITLEBAR + 1];
 };
 #endif