Mercurial > emacs
diff src/nsgui.h @ 105567:963474e6d53e
(NSPoint, NSSize) [!__OBJC__]: Define and use CGFloat.
| author | Adrian Robert <Adrian.B.Robert@gmail.com> |
|---|---|
| date | Mon, 12 Oct 2009 00:38:28 +0000 |
| parents | 64413c753b62 |
| children | 1d1d5d9bd884 |
line wrap: on
line diff
--- a/src/nsgui.h Mon Oct 12 00:36:20 2009 +0000 +++ b/src/nsgui.h Mon Oct 12 00:38:28 2009 +0000 @@ -129,12 +129,17 @@ } XRectangle; #ifndef __OBJC__ -typedef struct _NSPoint { float x, y; } NSPoint; -typedef struct _NSSize { float width, height; } NSSize; +#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 +#endif /* NOT OBJC */ -#define NativeRectangle struct _NSRect +#define NativeRectangle NSRect #define CONVERT_TO_XRECT(xr, nr) \ ((xr).x = (nr).origin.x, \
