# HG changeset patch # User Adrian Robert # Date 1255307908 0 # Node ID 963474e6d53ecad6546f6fe8650ae1af0682e3bd # Parent a8741022610c4852f79b5d0b0c5e567e410d85f0 (NSPoint, NSSize) [!__OBJC__]: Define and use CGFloat. diff -r a8741022610c -r 963474e6d53e src/nsgui.h --- 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, \