diff options
author | Adrian Robert <Adrian.B.Robert@gmail.com> | 2009-10-12 00:38:28 +0000 |
---|---|---|
committer | Adrian Robert <Adrian.B.Robert@gmail.com> | 2009-10-12 00:38:28 +0000 |
commit | 9094eb48018cddbea31251d50545434e045a9fd6 (patch) | |
tree | 25a33bbb4e0f4bcbfbf8ba2d3f2a081834c3e2e4 /src/nsgui.h | |
parent | c74e0c59f87e5ecf528a4e0bfb69c3f9431e85ac (diff) | |
download | emacs-9094eb48018cddbea31251d50545434e045a9fd6.tar.gz |
(NSPoint, NSSize) [!__OBJC__]: Define and use CGFloat.
Diffstat (limited to 'src/nsgui.h')
-rw-r--r-- | src/nsgui.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nsgui.h b/src/nsgui.h index 9bf6be695da..c52e5607c61 100644 --- a/src/nsgui.h +++ b/src/nsgui.h @@ -129,12 +129,17 @@ typedef struct { } 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, \ |