X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ac3232837188f7e1c4ffe34b76edede0ccb54f5e..a8101f663e6cbff953b67b8bef33bc0171818477:/src/nsgui.h diff --git a/src/nsgui.h b/src/nsgui.h index f8d3ae4a3a..c8fe06a82e 100644 --- a/src/nsgui.h +++ b/src/nsgui.h @@ -1,5 +1,5 @@ /* Definitions and headers for communication on the NeXT/Open/GNUstep API. - Copyright (C) 1995, 2005, 2008 Free Software Foundation, Inc. + Copyright (C) 1995, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -60,7 +60,7 @@ typedef struct _XCharStruct int descent; } XCharStruct; -/* 23: Fake tructure from Xlib.h to represent two-byte characters. */ +/* Fake tructure from Xlib.h to represent two-byte characters. */ #ifndef __OBJC__ typedef unsigned short unichar; #endif @@ -121,20 +121,25 @@ typedef int Display; typedef Lisp_Object XrmDatabase; -/* 23: some sort of attempt to normalize rectangle handling.. seems a bit much - for what is accomplished */ +/* some sort of attempt to normalize rectangle handling.. seems a bit much + for what is accomplished */ typedef struct { int x, y; unsigned width, height; } XRectangle; #ifndef __OBJC__ -typedef struct _NSPoint { float x, y; } NSPoint; -typedef struct _NSSize { float width, height; } NSSize; -typedef struct _NSRect { NSPoint origin; NSSize size; } NSRect; +#if defined(__LP64__) && __LP64__ +typedef double CGFloat; +#else +typedef float CGFloat; #endif +typedef struct _NSPoint { CGFloat x, y; } NSPoint; +typedef struct _NSSize { CGFloat width, height; } NSSize; +typedef struct _NSRect { NSPoint origin; NSSize size; } NSRect; +#endif /* NOT OBJC */ -#define NativeRectangle struct _NSRect +#define NativeRectangle NSRect #define CONVERT_TO_XRECT(xr, nr) \ ((xr).x = (nr).origin.x, \