diff options
author | Jeremy Huddleston <jeremy@Jeremy-Huddlestons-MacBook-Pro.local> | 2009-01-07 13:34:11 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremy@Jeremy-Huddlestons-MacBook-Pro.local> | 2009-01-07 13:34:11 -0800 |
commit | 9d38df5837a9a2570f974e2d6209cc775a14743b (patch) | |
tree | 0c688b5677a70659eaa573978d93d60268413152 | |
parent | b9b1c4d7faf2b1f1839c63bd333d47dd4110be01 (diff) |
Use sized types to avoid issues on x86_64
-rw-r--r-- | applewm.h | 32 | ||||
-rw-r--r-- | applewmstr.h | 32 |
2 files changed, 64 insertions, 0 deletions
@@ -122,6 +122,24 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _APPLEWM_SERVER_ +/* For the purpose of the structure definitions in this file, +we must redefine the following types in terms of Xmd.h's types, which may +include bit fields. All of these are #undef'd at the end of this file, +restoring the definitions in X.h. */ + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server */ @@ -187,5 +205,19 @@ Bool XAppleWMFrameDraw (Display *dpy, int screen, Window window, _XFUNCPROTOEND +/* restore these definitions back to the typedefs in X.h */ +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + #endif /* _APPLEWM_SERVER_ */ #endif /* _APPLEWM_H_ */ diff --git a/applewmstr.h b/applewmstr.h index 8223260..c9de2fd 100644 --- a/applewmstr.h +++ b/applewmstr.h @@ -39,6 +39,24 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define APPLE_WM_MINOR_VERSION 1 #define APPLE_WM_PATCH_VERSION 1 +/* For the purpose of the structure definitions in this file, +we must redefine the following types in terms of Xmd.h's types, which may +include bit fields. All of these are #undef'd at the end of this file, +restoring the definitions in X.h. */ + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + typedef struct _AppleWMQueryVersion { CARD8 reqType; /* always WMReqCode */ CARD8 wmReqType; /* always X_AppleWMQueryVersion */ @@ -223,4 +241,18 @@ typedef struct _AppleWMFrameDraw { } xAppleWMFrameDrawReq; #define sz_xAppleWMFrameDrawReq 36 +/* restore these definitions back to the typedefs in X.h */ +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + #endif /* _APPLEWMSTR_H_ */ |