mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Import AppKit.h instead of Quartz.h. Don't use userSpaceScaleFactor for
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. svn path=/trunk/; revision=17323
This commit is contained in:
parent
898385a3e0
commit
a862e9f6b9
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
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
|
||||
|
@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Quartz/Quartz.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
#include "gdkwindow.h"
|
||||
|
||||
@interface GdkQuartzView : NSView {
|
||||
|
@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Quartz/Quartz.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
#include "gdkwindow.h"
|
||||
|
||||
@interface GdkQuartzWindow : NSWindow {
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "gdkprivate-quartz.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#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"
|
||||
|
@ -139,7 +139,13 @@ get_mm_from_pixels (NSScreen *screen, int pixels)
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user