+2007-02-18 Richard Hult <richard@imendio.com>
+
+ * gdk/quartz/GdkQuartzView.h:
+ * gdk/quartz/GdkQuartzWindow.h:
+ * gdk/quartz/gdkquartz.h: Import AppKit.h instead of Quartz.h.
+ * gdk/quartz/gdkscreen-quartz.c: (get_mm_from_pixels): Don't use
+ userSpaceScaleFactor for 10.3. Those changes bring us closer to working
+ on panther, patch from Mathias Hasselmann.
+
+ * gdk/quartz/gdkeventloop-quartz.c: Add includes to fix build warnings.
+
2007-02-16 Behdad Esfahbod <behdad@gnome.org>
* gdk/gdkpango.c (gdk_pango_layout_get_clip_region): Use PANGO_PIXELS
* Boston, MA 02111-1307, USA.
*/
-#import <Quartz/Quartz.h>
+#import <AppKit/AppKit.h>
#include "gdkwindow.h"
@interface GdkQuartzView : NSView {
* Boston, MA 02111-1307, USA.
*/
-#import <Quartz/Quartz.h>
+#import <AppKit/AppKit.h>
#include "gdkwindow.h"
@interface GdkQuartzWindow : NSWindow {
#include <glib.h>
#include <pthread.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
#include "gdkprivate-quartz.h"
#ifndef __GDK_QUARTZ_H__
#define __GDK_QUARTZ_H__
-#include <Quartz/Quartz.h>
+#include <AppKit/AppKit.h>
#include "gdk/gdkprivate.h"
#include "gdkprivate-quartz.h"
#include "gdkdrawable-quartz.h"
* 72 is the number of points per inch,
* and 25.4 is the number of millimeters per inch.
*/
- return ((pixels / [screen userSpaceScaleFactor]) / 72) * 25.4;
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+ float dpi = [screen userSpaceScaleFactor] * 72.0;
+#else
+ float dpi = 96.0 / 72.0;
+#endif
+
+ return (pixels / dpi) * 25.4;
}
gint