[gtk+] quartz: Clean up header files, use same arrangement as X11 backend
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] quartz: Clean up header files, use same arrangement as X11 backend
- Date: Thu, 23 Dec 2010 13:26:45 +0000 (UTC)
commit caa9794af820b681d538f5b8927cff743e186798
Author: Kristian Rietveld <kris gtk org>
Date: Thu Dec 23 12:59:26 2010 +0100
quartz: Clean up header files, use same arrangement as X11 backend
gdk/gdkdisplaymanager.c | 6 ++-
gdk/quartz/GdkQuartzView.c | 2 +-
gdk/quartz/GdkQuartzWindow.c | 3 +-
gdk/quartz/Makefile.am | 18 +++++--
gdk/quartz/gdkcursor-quartz.c | 31 +++++++++++-
gdk/quartz/gdkdevice-core-quartz.c | 25 ++++++----
gdk/quartz/gdkdevicemanager-core-quartz.c | 4 +-
gdk/quartz/gdkdevicemanager-core-quartz.h | 26 +++-------
gdk/quartz/gdkdisplay-quartz.c | 27 ++++++++--
gdk/quartz/gdkdisplaymanager-quartz.c | 12 ++++-
gdk/quartz/gdkdnd-quartz.c | 3 +-
gdk/quartz/gdkdnd-quartz.h | 28 +++-------
gdk/quartz/gdkevents-quartz.c | 6 ++-
gdk/quartz/gdkkeys-quartz.c | 12 +----
gdk/quartz/gdkprivate-quartz.h | 9 +++-
gdk/quartz/gdkquartz.h | 24 +++++++--
.../{gdkcursor-quartz.h => gdkquartzcursor.h} | 24 +++------
...device-core-quartz.h => gdkquartzdevice-core.h} | 16 ++----
gdk/quartz/gdkquartzdevicemanager-core.h | 47 +++++++++++++++++
.../{gdkdisplay-quartz.h => gdkquartzdisplay.h} | 22 +++-----
...ymanager-quartz.h => gdkquartzdisplaymanager.h} | 24 ++++----
gdk/quartz/gdkquartzdnd.h | 53 +++++++++++++++++++
gdk/quartz/gdkquartzkeys.h | 51 ++++++++++++++++++
gdk/quartz/gdkquartzscreen.h | 51 ++++++++++++++++++
...gdkdisplaymanager-quartz.h => gdkquartzutils.h} | 34 ++++--------
gdk/quartz/gdkquartzvisual.h | 52 +++++++++++++++++++
gdk/quartz/gdkquartzwindow.h | 54 ++++++++++++++++++++
gdk/quartz/gdkscreen-quartz.c | 11 +---
gdk/quartz/gdkscreen-quartz.h | 25 ++-------
gdk/quartz/gdkvisual-quartz.c | 12 +----
gdk/quartz/gdkwindow-quartz.c | 22 +++-----
gdk/quartz/gdkwindow-quartz.h | 13 -----
32 files changed, 524 insertions(+), 223 deletions(-)
---
diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c
index 3975bbc..cfd4847 100644
--- a/gdk/gdkdisplaymanager.c
+++ b/gdk/gdkdisplaymanager.c
@@ -37,7 +37,11 @@
#endif
#ifdef GDK_WINDOWING_QUARTZ
-#include "quartz/gdkdisplaymanager-quartz.h"
+/* We immediately include gdkquartzdisplaymanager.h here instead of
+ * gdkquartz.h so that we do not have to enable -xobjective-c for the
+ * "generic" GDK source code.
+ */
+#include "quartz/gdkquartzdisplaymanager.h"
#endif
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index cf34e83..1b41aec 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -19,7 +19,7 @@
*/
#import "GdkQuartzView.h"
-#include "gdkwindow-quartz.h"
+#include "gdkquartzwindow.h"
#include "gdkprivate-quartz.h"
#include "gdkquartz.h"
diff --git a/gdk/quartz/GdkQuartzWindow.c b/gdk/quartz/GdkQuartzWindow.c
index 8edddfd..67db8bb 100644
--- a/gdk/quartz/GdkQuartzWindow.c
+++ b/gdk/quartz/GdkQuartzWindow.c
@@ -19,7 +19,8 @@
*/
#import "GdkQuartzWindow.h"
-#include "gdkwindow-quartz.h"
+#include "gdkquartzwindow.h"
+#include "gdkdnd-quartz.h"
#include "gdkprivate-quartz.h"
@implementation GdkQuartzNSWindow
diff --git a/gdk/quartz/Makefile.am b/gdk/quartz/Makefile.am
index 322f7db..aa0b717 100644
--- a/gdk/quartz/Makefile.am
+++ b/gdk/quartz/Makefile.am
@@ -1,6 +1,7 @@
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-3.0/gdk
+libgdkquartzincludedir = $(includedir)/gtk-3.0/gdk/quartz
INCLUDES = \
-DG_LOG_DOMAIN=\"Gdk\" \
@@ -22,15 +23,11 @@ libgdk_quartz_la_SOURCES = \
GdkQuartzWindow.c \
GdkQuartzWindow.h \
gdkcursor-quartz.c \
- gdkcursor-quartz.h \
gdkdevice-core-quartz.c \
- gdkdevice-core-quartz.h \
gdkdevicemanager-core-quartz.c \
gdkdevicemanager-core-quartz.h \
gdkdisplay-quartz.c \
- gdkdisplay-quartz.h \
gdkdisplaymanager-quartz.c \
- gdkdisplaymanager-quartz.h \
gdkdnd-quartz.c \
gdkdnd-quartz.h \
gdkevents-quartz.c \
@@ -54,5 +51,18 @@ libgdk_quartz_la_SOURCES = \
libgdkinclude_HEADERS = \
gdkquartz.h
+libgdkquartzinclude_HEADERS = \
+ gdkquartzcursor.h \
+ gdkquartzdevice-core.h \
+ gdkquartzdevicemanager-core.h \
+ gdkquartzdisplay.h \
+ gdkquartzdisplaymanager.h \
+ gdkquartzdnd.h \
+ gdkquartzkeys.h \
+ gdkquartzscreen.h \
+ gdkquartzutils.h \
+ gdkquartzvisual.h \
+ gdkquartzwindow.h
+
-include $(top_srcdir)/git.mk
diff --git a/gdk/quartz/gdkcursor-quartz.c b/gdk/quartz/gdkcursor-quartz.c
index cbbec9d..7f3e142 100644
--- a/gdk/quartz/gdkcursor-quartz.c
+++ b/gdk/quartz/gdkcursor-quartz.c
@@ -22,11 +22,25 @@
#include "gdkdisplay.h"
#include "gdkcursor.h"
-#include "gdkcursor-quartz.h"
+#include "gdkcursorprivate.h"
+#include "gdkquartzcursor.h"
#include "gdkprivate-quartz.h"
#include "xcursors.h"
+struct _GdkQuartzCursor
+{
+ GdkCursor cursor;
+
+ NSCursor *nscursor;
+};
+
+struct _GdkQuartzCursorClass
+{
+ GdkCursorClass cursor_class;
+};
+
+
static GdkCursor *cached_xcursors[G_N_ELEMENTS (xcursors)];
static GdkCursor *
@@ -397,6 +411,21 @@ _gdk_quartz_display_get_maximal_cursor_size (GdkDisplay *display,
*height = 65536;
}
+NSCursor *
+_gdk_quartz_cursor_get_ns_cursor (GdkCursor *cursor)
+{
+ GdkQuartzCursor *cursor_private;
+
+ if (!cursor)
+ return [NSCursor arrowCursor];
+
+ g_return_val_if_fail (GDK_IS_QUARTZ_CURSOR (cursor), NULL);
+
+ cursor_private = GDK_QUARTZ_CURSOR (cursor);
+
+ return cursor_private->nscursor;
+}
+
static GdkPixbuf *
gdk_quartz_cursor_get_image (GdkCursor *cursor)
{
diff --git a/gdk/quartz/gdkdevice-core-quartz.c b/gdk/quartz/gdkdevice-core-quartz.c
index 9aaba34..f42cc5d 100644
--- a/gdk/quartz/gdkdevice-core-quartz.c
+++ b/gdk/quartz/gdkdevice-core-quartz.c
@@ -20,13 +20,24 @@
#include "config.h"
+#include <gdk/gdkdeviceprivate.h>
#include <gdk/gdkdisplayprivate.h>
#import "GdkQuartzView.h"
-#include "gdkwindow-quartz.h"
-#include "gdkcursor-quartz.h"
+#include "gdkquartzwindow.h"
+#include "gdkquartzcursor.h"
#include "gdkprivate-quartz.h"
-#include "gdkdevice-core-quartz.h"
+#include "gdkquartzdevice-core.h"
+
+struct _GdkQuartzDeviceCore
+{
+ GdkDevice parent_instance;
+};
+
+struct _GdkQuartzDeviceCoreClass
+{
+ GdkDeviceClass parent_class;
+};
static gboolean gdk_quartz_device_core_get_history (GdkDevice *device,
GdkWindow *window,
@@ -159,18 +170,12 @@ gdk_quartz_device_core_set_window_cursor (GdkDevice *device,
GdkWindow *window,
GdkCursor *cursor)
{
- GdkQuartzCursor *cursor_private;
NSCursor *nscursor;
- cursor_private = (GdkQuartzCursor *) cursor;
-
if (GDK_WINDOW_DESTROYED (window))
return;
- if (!cursor)
- nscursor = [NSCursor arrowCursor];
- else
- nscursor = cursor_private->nscursor;
+ nscursor = _gdk_quartz_cursor_get_ns_cursor (cursor);
[nscursor set];
}
diff --git a/gdk/quartz/gdkdevicemanager-core-quartz.c b/gdk/quartz/gdkdevicemanager-core-quartz.c
index 73fc1c1..f5d0ab6 100644
--- a/gdk/quartz/gdkdevicemanager-core-quartz.c
+++ b/gdk/quartz/gdkdevicemanager-core-quartz.c
@@ -21,8 +21,10 @@
#include <gdk/gdktypes.h>
#include <gdk/gdkdevicemanager.h>
+#include <gdk/gdkdeviceprivate.h>
+#include <gdk/gdkdevicemanagerprivate.h>
#include "gdkdevicemanager-core-quartz.h"
-#include "gdkdevice-core-quartz.h"
+#include "gdkquartzdevice-core.h"
#include "gdkkeysyms.h"
diff --git a/gdk/quartz/gdkdevicemanager-core-quartz.h b/gdk/quartz/gdkdevicemanager-core-quartz.h
index 4624a98..48fc56c 100644
--- a/gdk/quartz/gdkdevicemanager-core-quartz.h
+++ b/gdk/quartz/gdkdevicemanager-core-quartz.h
@@ -1,5 +1,7 @@
-/* GDK - The GIMP Drawing Kit
+/* gdkdevicemanager-quartz.h
+ *
* Copyright (C) 2009 Carlos Garnacho <carlosg gnome org>
+ * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,23 +19,14 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
-#define __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
+#ifndef __GDK_QUARTZ_DEVICE_MANAGER_CORE__
+#define __GDK_QUARTZ_DEVICE_MANAGER_CORE__
-#include <gdk/gdkdevicemanagerprivate.h>
+#include <gdkdevicemanagerprivate.h>
+#include <gdkquartzdevicemanager-core.h>
G_BEGIN_DECLS
-#define GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE (gdk_quartz_device_manager_core_get_type ())
-#define GDK_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCore))
-#define GDK_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
-#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
-#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
-#define GDK_QUARTZ_DEVICE_MANAGER_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
-
-typedef struct _GdkQuartzDeviceManagerCore GdkQuartzDeviceManagerCore;
-typedef struct _GdkQuartzDeviceManagerCoreClass GdkQuartzDeviceManagerCoreClass;
-
struct _GdkQuartzDeviceManagerCore
{
GdkDeviceManager parent_object;
@@ -46,9 +39,6 @@ struct _GdkQuartzDeviceManagerCoreClass
GdkDeviceManagerClass parent_class;
};
-GType gdk_quartz_device_manager_core_get_type (void) G_GNUC_CONST;
-
-
G_END_DECLS
-#endif /* __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__ */
+#endif /* __GDK_QUARTZ_DEVICE_MANAGER__ */
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index b239e8a..6a667c9 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -20,12 +20,27 @@
#include "config.h"
-#include "gdk.h"
+#include <gdk/gdk.h>
+#include <gdk/gdkdisplayprivate.h>
+
#include "gdkprivate-quartz.h"
-#include "gdkscreen-quartz.h"
-#include "gdkwindow-quartz.h"
-#include "gdkdisplay-quartz.h"
-#include "gdkdevicemanager-core-quartz.h"
+#include "gdkquartzscreen.h"
+#include "gdkquartzwindow.h"
+#include "gdkquartzdisplay.h"
+#include "gdkquartzdevicemanager-core.h"
+
+
+struct _GdkQuartzDisplay
+{
+ GdkDisplay display;
+
+ GList *input_devices;
+};
+
+struct _GdkQuartzDisplayClass
+{
+ GdkDisplayClass display_class;
+};
static GdkWindow *
gdk_quartz_display_get_default_group (GdkDisplay *display)
@@ -107,7 +122,7 @@ _gdk_quartz_display_open (const gchar *display_name)
_gdk_display = g_object_new (_gdk_quartz_display_get_type (), NULL);
_gdk_display->device_manager = _gdk_device_manager_new (_gdk_display);
- _gdk_screen = _gdk_quartz_screen_new ();
+ _gdk_screen = g_object_new (_gdk_quartz_screen_get_type (), NULL);
_gdk_quartz_screen_init_visuals (_gdk_screen);
diff --git a/gdk/quartz/gdkdisplaymanager-quartz.c b/gdk/quartz/gdkdisplaymanager-quartz.c
index 7761ec1..087d5b3 100644
--- a/gdk/quartz/gdkdisplaymanager-quartz.c
+++ b/gdk/quartz/gdkdisplaymanager-quartz.c
@@ -27,13 +27,21 @@
#include <dlfcn.h>
#include <ApplicationServices/ApplicationServices.h>
-#include "gdkdisplay-quartz.h"
-#include "gdkdisplaymanager-quartz.h"
+#include "gdkquartzdisplay.h"
+#include "gdkquartzdisplaymanager.h"
#include "gdkprivate-quartz.h"
#include "gdkdisplaymanagerprivate.h"
#include "gdkinternals.h"
+struct _GdkQuartzDisplayManager
+{
+ GdkDisplayManager parent;
+
+ GdkDisplay *default_display;
+ GSList *displays;
+};
+
G_DEFINE_TYPE (GdkQuartzDisplayManager, gdk_quartz_display_manager, GDK_TYPE_DISPLAY_MANAGER)
diff --git a/gdk/quartz/gdkdnd-quartz.c b/gdk/quartz/gdkdnd-quartz.c
index 78ff19f..cbff4aa 100644
--- a/gdk/quartz/gdkdnd-quartz.c
+++ b/gdk/quartz/gdkdnd-quartz.c
@@ -19,9 +19,10 @@
*/
#include "gdkdnd.h"
-#include "gdkdnd-quartz.h"
+#include "gdkquartzdnd.h"
#include "gdkprivate-quartz.h"
+
G_DEFINE_TYPE (GdkQuartzDragContext, gdk_quartz_drag_context, GDK_TYPE_DRAG_CONTEXT)
diff --git a/gdk/quartz/gdkdnd-quartz.h b/gdk/quartz/gdkdnd-quartz.h
index d733e72..ebe787d 100644
--- a/gdk/quartz/gdkdnd-quartz.h
+++ b/gdk/quartz/gdkdnd-quartz.h
@@ -1,6 +1,7 @@
/* gdkdnd-quartz.h
*
- * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -18,24 +19,15 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_DND_H__
-#define __GDK_QUARTZ_DND_H__
+#ifndef __GDK_QUARTZ_DND__
+#define __GDK_QUARTZ_DND__
-#include <gdk/gdk.h>
-#include <gdk/quartz/gdkquartz.h>
-#include <gdk/gdkdndprivate.h>
+#include <gdkdndprivate.h>
+#include <gdkquartzdnd.h>
-G_BEGIN_DECLS
-
-#define GDK_TYPE_QUARTZ_DRAG_CONTEXT (gdk_quartz_drag_context_get_type ())
-#define GDK_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContext))
-#define GDK_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
-#define GDK_IS_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
-#define GDK_IS_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
-#define GDK_QUARTZ_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
+#include <AppKit/AppKit.h>
-typedef struct _GdkQuartzDragContext GdkQuartzDragContext;
-typedef struct _GdkQuartzDragContextClass GdkQuartzDragContextClass;
+G_BEGIN_DECLS
struct _GdkQuartzDragContext
{
@@ -50,8 +42,6 @@ struct _GdkQuartzDragContextClass
GdkDragContextClass context_class;
};
-GType gdk_quartz_drag_context_get_type (void);
-
G_END_DECLS
-#endif /* __GDK_QUARTZ_DRAG_CONTEXT_H__ */
+#endif /* __GDK_QUARTZ_DND__ */
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 915223c..3b20df2 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -29,11 +29,13 @@
#import <Cocoa/Cocoa.h>
#include <Carbon/Carbon.h>
+#include <gdk/gdkdisplayprivate.h>
+
#include "gdkscreen.h"
#include "gdkkeysyms.h"
-#include "gdkdisplay-quartz.h"
+#include "gdkquartzdisplay.h"
#include "gdkprivate-quartz.h"
-#include "gdkdevicemanager-core-quartz.h"
+#include "gdkquartzdevicemanager-core.h"
#define GRIP_WIDTH 15
#define GRIP_HEIGHT 15
diff --git a/gdk/quartz/gdkkeys-quartz.c b/gdk/quartz/gdkkeys-quartz.c
index 70977da..ede9d21 100644
--- a/gdk/quartz/gdkkeys-quartz.c
+++ b/gdk/quartz/gdkkeys-quartz.c
@@ -54,6 +54,7 @@
#include <Carbon/Carbon.h>
#include <AppKit/NSEvent.h>
#include "gdk.h"
+#include "gdkquartzkeys.h"
#include "gdkkeysprivate.h"
#include "gdkkeysyms.h"
@@ -62,17 +63,6 @@
static GdkKeymap *default_keymap = NULL;
-
-#define GDK_TYPE_QUARTZ_KEYMAP (gdk_quartz_keymap_get_type ())
-#define GDK_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymap))
-#define GDK_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
-#define GDK_IS_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_KEYMAP))
-#define GDK_IS_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_KEYMAP))
-#define GDK_QUARTZ_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
-
-typedef struct _GdkQuartzKeymap GdkQuartzKeymap;
-typedef struct _GdkQuartzKeymapClass GdkQuartzKeymapClass;
-
struct _GdkQuartzKeymap
{
GdkKeymap keymap;
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index 958d79e..3395d4c 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -25,9 +25,11 @@
#define GDK_QUARTZ_RELEASE_POOL [pool release]
#include <gdk/gdkprivate.h>
-#include <gdk/quartz/gdkwindow-quartz.h>
-#include <gdk/quartz/gdkdnd-quartz.h>
#include <gdk/quartz/gdkquartz.h>
+#include <gdk/quartz/gdkdevicemanager-core-quartz.h>
+#include <gdk/quartz/gdkdnd-quartz.h>
+#include <gdk/quartz/gdkscreen-quartz.h>
+#include <gdk/quartz/gdkwindow-quartz.h>
#include <gdk/gdk.h>
@@ -57,6 +59,9 @@ typedef enum {
GDK_QUARTZ_CONTEXT_TEXT = 1 << 2
} GdkQuartzContextValuesMask;
+/* Cursor */
+NSCursor *_gdk_quartz_cursor_get_ns_cursor (GdkCursor *cursor);
+
/* Window */
gboolean _gdk_quartz_window_is_ancestor (GdkWindow *ancestor,
GdkWindow *window);
diff --git a/gdk/quartz/gdkquartz.h b/gdk/quartz/gdkquartz.h
index 48c4748..ea00837 100644
--- a/gdk/quartz/gdkquartz.h
+++ b/gdk/quartz/gdkquartz.h
@@ -22,6 +22,8 @@
#define __GDK_QUARTZ_H__
#include <AppKit/AppKit.h>
+
+#include <gdk/gdk.h>
#include <gdk/gdkprivate.h>
G_BEGIN_DECLS
@@ -39,12 +41,22 @@ typedef unsigned int NSUInteger;
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);
-id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context);
-NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
-
G_END_DECLS
+#define __GDKQUARTZ_H_INSIDE__
+
+#include <gdk/quartz/gdkquartzcursor.h>
+#include <gdk/quartz/gdkquartzdevice-core.h>
+#include <gdk/quartz/gdkquartzdevicemanager-core.h>
+#include <gdk/quartz/gdkquartzdisplay.h>
+#include <gdk/quartz/gdkquartzdisplaymanager.h>
+#include <gdk/quartz/gdkquartzdnd.h>
+#include <gdk/quartz/gdkquartzkeys.h>
+#include <gdk/quartz/gdkquartzscreen.h>
+#include <gdk/quartz/gdkquartzutils.h>
+#include <gdk/quartz/gdkquartzvisual.h>
+#include <gdk/quartz/gdkquartzwindow.h>
+
+#undef __GDKQUARTZ_H_INSIDE__
+
#endif /* __GDK_QUARTZ_H__ */
diff --git a/gdk/quartz/gdkcursor-quartz.h b/gdk/quartz/gdkquartzcursor.h
similarity index 89%
rename from gdk/quartz/gdkcursor-quartz.h
rename to gdk/quartz/gdkquartzcursor.h
index bbbc198..7ab9498 100644
--- a/gdk/quartz/gdkcursor-quartz.h
+++ b/gdk/quartz/gdkquartzcursor.h
@@ -1,4 +1,4 @@
-/* gdkcursor-quartz.h
+/* gdkquartzcursor.h
*
* Copyright (C) 2005-2007 Imendio AB
* Copyright (C) 2010 Kristian Rietveld <kris gtk org>
@@ -19,12 +19,14 @@
* Boston, MA 02111-1307, USA.
*/
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
#ifndef __GDK_QUARTZ_CURSOR_H__
#define __GDK_QUARTZ_CURSOR_H__
#include <gdk/gdk.h>
-#include <gdk/quartz/gdkquartz.h>
-#include "gdkcursorprivate.h"
G_BEGIN_DECLS
@@ -35,21 +37,13 @@ G_BEGIN_DECLS
#define GDK_IS_QUARTZ_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_CURSOR))
#define GDK_QUARTZ_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_CURSOR, GdkQuartzCursorClass))
+#ifdef GDK_COMPILATION
typedef struct _GdkQuartzCursor GdkQuartzCursor;
+#else
+typedef GdkCursor GdkQuartzCursor;
+#endif
typedef struct _GdkQuartzCursorClass GdkQuartzCursorClass;
-struct _GdkQuartzCursor
-{
- GdkCursor cursor;
-
- NSCursor *nscursor;
-};
-
-struct _GdkQuartzCursorClass
-{
- GdkCursorClass cursor_class;
-};
-
GType gdk_quartz_cursor_get_type (void);
G_END_DECLS
diff --git a/gdk/quartz/gdkdevice-core-quartz.h b/gdk/quartz/gdkquartzdevice-core.h
similarity index 91%
rename from gdk/quartz/gdkdevice-core-quartz.h
rename to gdk/quartz/gdkquartzdevice-core.h
index abf6892..018a1df 100644
--- a/gdk/quartz/gdkdevice-core-quartz.h
+++ b/gdk/quartz/gdkquartzdevice-core.h
@@ -17,10 +17,14 @@
* Boston, MA 02111-1307, USA.
*/
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
#ifndef __GDK_QUARTZ_DEVICE_CORE_H__
#define __GDK_QUARTZ_DEVICE_CORE_H__
-#include <gdk/gdkdeviceprivate.h>
+#include <gdk/gdk.h>
G_BEGIN_DECLS
@@ -34,16 +38,6 @@ G_BEGIN_DECLS
typedef struct _GdkQuartzDeviceCore GdkQuartzDeviceCore;
typedef struct _GdkQuartzDeviceCoreClass GdkQuartzDeviceCoreClass;
-struct _GdkQuartzDeviceCore
-{
- GdkDevice parent_instance;
-};
-
-struct _GdkQuartzDeviceCoreClass
-{
- GdkDeviceClass parent_class;
-};
-
GType gdk_quartz_device_core_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/gdk/quartz/gdkquartzdevicemanager-core.h b/gdk/quartz/gdkquartzdevicemanager-core.h
new file mode 100644
index 0000000..eed8f50
--- /dev/null
+++ b/gdk/quartz/gdkquartzdevicemanager-core.h
@@ -0,0 +1,47 @@
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 2009 Carlos Garnacho <carlosg gnome org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
+#define __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE (gdk_quartz_device_manager_core_get_type ())
+#define GDK_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCore))
+#define GDK_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
+#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
+#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
+#define GDK_QUARTZ_DEVICE_MANAGER_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
+
+typedef struct _GdkQuartzDeviceManagerCore GdkQuartzDeviceManagerCore;
+typedef struct _GdkQuartzDeviceManagerCoreClass GdkQuartzDeviceManagerCoreClass;
+
+
+GType gdk_quartz_device_manager_core_get_type (void) G_GNUC_CONST;
+
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__ */
diff --git a/gdk/quartz/gdkdisplay-quartz.h b/gdk/quartz/gdkquartzdisplay.h
similarity index 89%
rename from gdk/quartz/gdkdisplay-quartz.h
rename to gdk/quartz/gdkquartzdisplay.h
index 4452008..50176ce 100644
--- a/gdk/quartz/gdkdisplay-quartz.h
+++ b/gdk/quartz/gdkquartzdisplay.h
@@ -1,4 +1,4 @@
-/* gdkdisplay-quartz.h
+/* gdkquartzdisplay.h
*
* Copyright (C) 2005-2007 Imendio AB
* Copyright (C) 2010 Kristian Rietveld <kris gtk org>
@@ -19,11 +19,14 @@
* Boston, MA 02111-1307, USA.
*/
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
#ifndef __GDK_QUARTZ_DISPLAY_H__
#define __GDK_QUARTZ_DISPLAY_H__
#include <gdk/gdk.h>
-#include "gdkdisplayprivate.h"
G_BEGIN_DECLS
@@ -34,20 +37,13 @@ G_BEGIN_DECLS
#define GDK_IS_QUARTZ_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DISPLAY))
#define GDK_QUARTZ_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DISPLAY, GdkQuartzDisplayClass))
+#ifdef GDK_COMPILATION
typedef struct _GdkQuartzDisplay GdkQuartzDisplay;
+#else
+typedef GdkDisplay GdkQuartzDisplay;
+#endif
typedef struct _GdkQuartzDisplayClass GdkQuartzDisplayClass;
-struct _GdkQuartzDisplay
-{
- GdkDisplay display;
-
- GList *input_devices;
-};
-
-struct _GdkQuartzDisplayClass
-{
- GdkDisplayClass display_class;
-};
GType _gdk_quartz_display_get_type (void);
diff --git a/gdk/quartz/gdkdisplaymanager-quartz.h b/gdk/quartz/gdkquartzdisplaymanager.h
similarity index 77%
copy from gdk/quartz/gdkdisplaymanager-quartz.h
copy to gdk/quartz/gdkquartzdisplaymanager.h
index b73f8cd..00a71ae 100644
--- a/gdk/quartz/gdkdisplaymanager-quartz.h
+++ b/gdk/quartz/gdkquartzdisplaymanager.h
@@ -1,4 +1,4 @@
-/* gdkdisplaymanager-quartz.h
+/* gdkquartzdisplaymanager.h
*
* Copyright (C) 2005-2007 Imendio AB
* Copyright 2010 Red Hat, Inc.
@@ -19,30 +19,30 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_DISPLAYMANAGER_H__
-#define __GDK_QUARTZ_DISPLAYMANAGER_H__
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DISPLAY_MANAGER_H__
+#define __GDK_QUARTZ_DISPLAY_MANAGER_H__
#include <gdk/gdk.h>
-#include <gdk/gdkdisplaymanagerprivate.h>
G_BEGIN_DECLS
#define GDK_TYPE_QUARTZ_DISPLAY_MANAGER (gdk_quartz_display_manager_get_type ())
#define GDK_QUARTZ_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DISPLAY_MANAGER, GdkQuartzDisplayManager))
+#ifdef GDK_COMPILATION
typedef struct _GdkQuartzDisplayManager GdkQuartzDisplayManager;
+#else
+typedef GdkDisplayManager _GdkQuartzDisplayManager;
+#endif
typedef struct _GdkDisplayManagerClass GdkQuartzDisplayManagerClass;
-struct _GdkQuartzDisplayManager
-{
- GdkDisplayManager parent;
-
- GdkDisplay *default_display;
- GSList *displays;
-};
GType gdk_quartz_display_manager_get_type (void);
G_END_DECLS
-#endif /* __GDK_QUARTZ_DISPLAYMANAGER_H__ */
+#endif /* __GDK_QUARTZ_DISPLAY_MANAGER_H__ */
diff --git a/gdk/quartz/gdkquartzdnd.h b/gdk/quartz/gdkquartzdnd.h
new file mode 100644
index 0000000..2199d0d
--- /dev/null
+++ b/gdk/quartz/gdkquartzdnd.h
@@ -0,0 +1,53 @@
+/* gdkquartzdnd.h
+ *
+ * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DND_H__
+#define __GDK_QUARTZ_DND_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_DRAG_CONTEXT (gdk_quartz_drag_context_get_type ())
+#define GDK_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContext))
+#define GDK_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
+#define GDK_IS_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
+#define GDK_IS_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
+#define GDK_QUARTZ_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzDragContext GdkQuartzDragContext;
+#else
+typedef GdkDragContext GdkQuartzDragContext;
+#endif
+typedef struct _GdkQuartzDragContextClass GdkQuartzDragContextClass;
+
+
+GType gdk_quartz_drag_context_get_type (void);
+
+id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_DRAG_CONTEXT_H__ */
diff --git a/gdk/quartz/gdkquartzkeys.h b/gdk/quartz/gdkquartzkeys.h
new file mode 100644
index 0000000..b78d8a2
--- /dev/null
+++ b/gdk/quartz/gdkquartzkeys.h
@@ -0,0 +1,51 @@
+/* gdkquartzkeyd.h
+ *
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_KEYS_H__
+#define __GDK_QUARTZ_KEYS_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_KEYMAP (gdk_quartz_keymap_get_type ())
+#define GDK_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymap))
+#define GDK_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
+#define GDK_IS_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_KEYMAP))
+#define GDK_IS_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_KEYMAP))
+#define GDK_QUARTZ_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzKeymap GdkQuartzKeymap;
+#else
+typedef GdkKeymap GdkQuartzKeymap;
+#endif
+typedef struct _GdkQuartzKeymapClass GdkQuartzKeymapClass;
+
+GType _gdk_quartz_keymap_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_KEYS_H__ */
diff --git a/gdk/quartz/gdkquartzscreen.h b/gdk/quartz/gdkquartzscreen.h
new file mode 100644
index 0000000..f144a65
--- /dev/null
+++ b/gdk/quartz/gdkquartzscreen.h
@@ -0,0 +1,51 @@
+/* gdkquartzscreen.h
+ *
+ * Copyright (C) 2009, 2010 Kristian Rietveld <kris gtk org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_SCREEN_H__
+#define __GDK_QUARTZ_SCREEN_H__
+
+G_BEGIN_DECLS
+
+#include <gdk/gdk.h>
+
+#define GDK_TYPE_QUARTZ_SCREEN (_gdk_quartz_screen_get_type ())
+#define GDK_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreen))
+#define GDK_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
+#define GDK_IS_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_SCREEN))
+#define GDK_IS_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_SCREEN))
+#define GDK_QUARTZ_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzScreen GdkQuartzScreen;
+#else
+typedef GdkScreen GdkQuartzScreen;
+#endif
+typedef struct _GdkQuartzScreenClass GdkQuartzScreenClass;
+
+
+GType _gdk_quartz_screen_get_type (void);
+
+G_END_DECLS
+
+#endif /* _GDK_QUARTZ_SCREEN_H_ */
diff --git a/gdk/quartz/gdkdisplaymanager-quartz.h b/gdk/quartz/gdkquartzutils.h
similarity index 50%
rename from gdk/quartz/gdkdisplaymanager-quartz.h
rename to gdk/quartz/gdkquartzutils.h
index b73f8cd..a3eeda1 100644
--- a/gdk/quartz/gdkdisplaymanager-quartz.h
+++ b/gdk/quartz/gdkquartzutils.h
@@ -1,7 +1,7 @@
-/* gdkdisplaymanager-quartz.h
+/* gdkquartzutils.h
*
- * Copyright (C) 2005-2007 Imendio AB
- * Copyright 2010 Red Hat, Inc.
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -19,30 +19,20 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_DISPLAYMANAGER_H__
-#define __GDK_QUARTZ_DISPLAYMANAGER_H__
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_UTILS_H__
+#define __GDK_QUARTZ_UTILS_H__
#include <gdk/gdk.h>
-#include <gdk/gdkdisplaymanagerprivate.h>
G_BEGIN_DECLS
-#define GDK_TYPE_QUARTZ_DISPLAY_MANAGER (gdk_quartz_display_manager_get_type ())
-#define GDK_QUARTZ_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DISPLAY_MANAGER, GdkQuartzDisplayManager))
-
-typedef struct _GdkQuartzDisplayManager GdkQuartzDisplayManager;
-typedef struct _GdkDisplayManagerClass GdkQuartzDisplayManagerClass;
-
-struct _GdkQuartzDisplayManager
-{
- GdkDisplayManager parent;
-
- GdkDisplay *default_display;
- GSList *displays;
-};
-
-GType gdk_quartz_display_manager_get_type (void);
+NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
+NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
G_END_DECLS
-#endif /* __GDK_QUARTZ_DISPLAYMANAGER_H__ */
+#endif /* __GDK_QUARTZ_UTILS_H__ */
diff --git a/gdk/quartz/gdkquartzvisual.h b/gdk/quartz/gdkquartzvisual.h
new file mode 100644
index 0000000..b3cbe39
--- /dev/null
+++ b/gdk/quartz/gdkquartzvisual.h
@@ -0,0 +1,52 @@
+/* gdkquartzvisual.h
+ *
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_VISUAL_H__
+#define __GDK_QUARTZ_VISUAL_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_VISUAL (_gdk_quartz_visual_get_type ())
+#define GDK_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisual))
+#define GDK_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
+#define GDK_IS_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_VISUAL))
+#define GDK_IS_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_VISUAL))
+#define GDK_QUARTZ_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzVisual GdkQuartzVisual;
+#else
+typedef GdkVisual GdkQuartzVisual;
+#endif
+typedef struct _GdkQuartzVisualClass GdkQuartzVisualClass;
+
+
+GType _gdk_quartz_visual_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_VISUAL_H__ */
diff --git a/gdk/quartz/gdkquartzwindow.h b/gdk/quartz/gdkquartzwindow.h
new file mode 100644
index 0000000..934b4c4
--- /dev/null
+++ b/gdk/quartz/gdkquartzwindow.h
@@ -0,0 +1,54 @@
+/* gdkquartzwindow.h
+ *
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris gtk org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_WINDOW_H__
+#define __GDK_QUARTZ_WINDOW_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_WINDOW (gdk_quartz_window_get_type ())
+#define GDK_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindow))
+#define GDK_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
+#define GDK_IS_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_WINDOW))
+#define GDK_IS_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_WINDOW))
+#define GDK_QUARTZ_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzWindow GdkQuartzWindow;
+#else
+typedef GdkWindow GdkQuartzWindow;
+#endif
+typedef struct _GdkQuartzWindowClass GdkQuartzWindowClass;
+
+GType gdk_quartz_window_get_type (void);
+
+NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
+NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_WINDOW_H__ */
diff --git a/gdk/quartz/gdkscreen-quartz.c b/gdk/quartz/gdkscreen-quartz.c
index d3caa9c..85ab6e6 100644
--- a/gdk/quartz/gdkscreen-quartz.c
+++ b/gdk/quartz/gdkscreen-quartz.c
@@ -20,8 +20,9 @@
*/
#include "config.h"
-#include "gdk.h"
-#include "gdkscreen-quartz.h"
+
+#include <gdk/gdk.h>
+
#include "gdkprivate-quartz.h"
@@ -254,12 +255,6 @@ display_reconfiguration_callback (CGDirectDisplayID display,
}
}
-GdkScreen *
-_gdk_quartz_screen_new (void)
-{
- return g_object_new (GDK_TYPE_QUARTZ_SCREEN, NULL);
-}
-
static GdkDisplay *
gdk_quartz_screen_get_display (GdkScreen *screen)
{
diff --git a/gdk/quartz/gdkscreen-quartz.h b/gdk/quartz/gdkscreen-quartz.h
index 59959b4..1999b5c 100644
--- a/gdk/quartz/gdkscreen-quartz.h
+++ b/gdk/quartz/gdkscreen-quartz.h
@@ -1,6 +1,6 @@
/* gdkscreen-quartz.h
*
- * Copyright (C) 2009, 2010 Kristian Rietveld <kris gtk org>
+ * Copyright (C) 2009,2010 Kristian Rietveld <kris gtk org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -18,22 +18,12 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_SCREEN_H__
-#define __GDK_QUARTZ_SCREEN_H__
+#ifndef __GDK_QUARTZ_SCREEN__
+#define __GDK_QUARTZ_SCREEN__
-G_BEGIN_DECLS
-
-#include <gdk/gdkscreenprivate.h>
-
-typedef struct _GdkQuartzScreen GdkQuartzScreen;
-typedef struct _GdkQuartzScreenClass GdkQuartzScreenClass;
+#include <gdkscreenprivate.h>
-#define GDK_TYPE_QUARTZ_SCREEN (_gdk_quartz_screen_get_type ())
-#define GDK_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreen))
-#define GDK_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
-#define GDK_IS_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_SCREEN))
-#define GDK_IS_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_SCREEN))
-#define GDK_QUARTZ_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
+G_BEGIN_DECLS
struct _GdkQuartzScreen
{
@@ -61,9 +51,6 @@ struct _GdkQuartzScreenClass
GdkScreenClass parent_class;
};
-GType _gdk_quartz_screen_get_type (void);
-GdkScreen *_gdk_quartz_screen_new (void);
-
G_END_DECLS
-#endif /* _GDK_QUARTZ_SCREEN_H_ */
+#endif /* __GDK_QUARTZ_SCREEN__ */
diff --git a/gdk/quartz/gdkvisual-quartz.c b/gdk/quartz/gdkvisual-quartz.c
index a2de49a..2ad13de 100644
--- a/gdk/quartz/gdkvisual-quartz.c
+++ b/gdk/quartz/gdkvisual-quartz.c
@@ -21,19 +21,9 @@
#include "config.h"
#include "gdkvisualprivate.h"
+#include "gdkquartzvisual.h"
#include "gdkprivate-quartz.h"
-GType _gdk_quartz_visual_get_type (void);
-
-#define GDK_TYPE_QUARTZ_VISUAL (_gdk_quartz_visual_get_type ())
-#define GDK_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisual))
-#define GDK_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
-#define GDK_IS_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_VISUAL))
-#define GDK_IS_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_VISUAL))
-#define GDK_QUARTZ_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
-
-typedef struct _GdkQuartzVisual GdkQuartzVisual;
-typedef struct _GdkQuartzVisualClass GdkQuartzVisualClass;
struct _GdkQuartzVisual
{
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 9d4daae..eb3687f 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -20,15 +20,17 @@
*/
#include "config.h"
-#include <Carbon/Carbon.h>
-#include "gdk.h"
-#include "gdkdeviceprivate.h"
-#include "gdkdisplayprivate.h"
+#include <gdk/gdk.h>
+#include <gdk/gdkdeviceprivate.h>
+#include <gdk/gdkdisplayprivate.h>
+
#include "gdkwindowimpl.h"
#include "gdkprivate-quartz.h"
-#include "gdkscreen-quartz.h"
-#include "gdkcursor-quartz.h"
+#include "gdkquartzscreen.h"
+#include "gdkquartzcursor.h"
+
+#include <Carbon/Carbon.h>
#include <sys/time.h>
#include <cairo-quartz.h>
@@ -1671,18 +1673,12 @@ gdk_window_quartz_set_device_cursor (GdkWindow *window,
GdkDevice *device,
GdkCursor *cursor)
{
- GdkQuartzCursor *cursor_private;
NSCursor *nscursor;
- cursor_private = (GdkQuartzCursor *)cursor;
-
if (GDK_WINDOW_DESTROYED (window))
return;
- if (!cursor)
- nscursor = [NSCursor arrowCursor];
- else
- nscursor = cursor_private->nscursor;
+ nscursor = _gdk_quartz_cursor_get_ns_cursor (cursor);
[nscursor set];
}
diff --git a/gdk/quartz/gdkwindow-quartz.h b/gdk/quartz/gdkwindow-quartz.h
index 0987b7e..f55bbb3 100644
--- a/gdk/quartz/gdkwindow-quartz.h
+++ b/gdk/quartz/gdkwindow-quartz.h
@@ -27,19 +27,6 @@
G_BEGIN_DECLS
-#define GDK_TYPE_QUARTZ_WINDOW (gdk_quartz_window_get_type ())
-#define GDK_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindow))
-#define GDK_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
-#define GDK_IS_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_WINDOW))
-#define GDK_IS_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_WINDOW))
-#define GDK_QUARTZ_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
-
-typedef struct _GdkQuartzWindow GdkQuartzWindow;
-typedef struct _GdkQuartzWindowClass GdkQuartzWindowClass;
-
-GType gdk_quartz_window_get_type (void);
-
-
/* Window implementation for Quartz
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]