changeset 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 a8741022610c
children ca0fda145315
files src/nsgui.h
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
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,			\