From e634f3fbe0498afc560530d9b92eb4709d7c7f97 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Sun, 27 Jun 2010 10:32:12 +0200 Subject: [PATCH] Move Leopard-specific type definitions to gdkquartz.h Update includes subsequently where it matters. Fixes build on Mac OS X 10.4. --- gdk/quartz/GdkQuartzView.c | 1 + gdk/quartz/gdkprivate-quartz.h | 1 + gdk/quartz/gdkquartz.h | 13 +++++++++++++ gdk/quartz/gdkwindow-quartz.h | 13 ------------- gtk/gtkquartz.c | 1 + 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c index 02018ff8d0..2c897fb883 100644 --- a/gdk/quartz/GdkQuartzView.c +++ b/gdk/quartz/GdkQuartzView.c @@ -23,6 +23,7 @@ #include "gdkregion-generic.h" #include "gdkwindow-quartz.h" #include "gdkprivate-quartz.h" +#include "gdkquartz.h" @implementation GdkQuartzView diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h index 16651eacf5..ab80332928 100644 --- a/gdk/quartz/gdkprivate-quartz.h +++ b/gdk/quartz/gdkprivate-quartz.h @@ -27,6 +27,7 @@ #include #include #include +#include #include diff --git a/gdk/quartz/gdkquartz.h b/gdk/quartz/gdkquartz.h index d7177fea44..48c47484cb 100644 --- a/gdk/quartz/gdkquartz.h +++ b/gdk/quartz/gdkquartz.h @@ -26,6 +26,19 @@ G_BEGIN_DECLS +/* NSInteger only exists in Leopard and newer. This check has to be + * done after inclusion of the system headers. If NSInteger has not + * been defined, we know for sure that we are on 32-bit. + */ +#ifndef NSINTEGER_DEFINED +typedef int NSInteger; +typedef unsigned int NSUInteger; +#endif + +#ifndef CGFLOAT_DEFINED +typedef float CGFloat; +#endif + NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window); NSView *gdk_quartz_window_get_nsview (GdkWindow *window); NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf); diff --git a/gdk/quartz/gdkwindow-quartz.h b/gdk/quartz/gdkwindow-quartz.h index cbb0fe1668..4a0e27a174 100644 --- a/gdk/quartz/gdkwindow-quartz.h +++ b/gdk/quartz/gdkwindow-quartz.h @@ -25,19 +25,6 @@ #import #import -/* NSInteger only exists in Leopard and newer. This check has to be - * done after inclusion of the system headers. If NSInteger has not - * been defined, we know for sure that we are on 32-bit. - */ -#ifndef NSINTEGER_DEFINED -typedef int NSInteger; -typedef unsigned int NSUInteger; -#endif - -#ifndef CGFLOAT_DEFINED -typedef float CGFloat; -#endif - G_BEGIN_DECLS /* Window implementation for Quartz diff --git a/gtk/gtkquartz.c b/gtk/gtkquartz.c index dcc8ee0c9a..265d9ffa22 100644 --- a/gtk/gtkquartz.c +++ b/gtk/gtkquartz.c @@ -21,6 +21,7 @@ #include "config.h" #include "gtkquartz.h" +#include #include "gtkalias.h" NSImage *