Commit caa9794a authored by Kristian Rietveld's avatar Kristian Rietveld

quartz: Clean up header files, use same arrangement as X11 backend

parent dd5a74dc
......@@ -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
......
......@@ -19,7 +19,7 @@
*/
#import "GdkQuartzView.h"
#include "gdkwindow-quartz.h"
#include "gdkquartzwindow.h"
#include "gdkprivate-quartz.h"
#include "gdkquartz.h"
......
......@@ -19,7 +19,8 @@
*/
#import "GdkQuartzWindow.h"
#include "gdkwindow-quartz.h"
#include "gdkquartzwindow.h"
#include "gdkdnd-quartz.h"
#include "gdkprivate-quartz.h"
@implementation GdkQuartzNSWindow
......
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
......@@ -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)
{
......
......@@ -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];
}
......
......@@ -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"
......
/* 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__ */
......@@ -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);
......
......@@ -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)
......
......@@ -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)
......
/* 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__ */
......@@ -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
......
......@@ -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;
......
......@@ -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);
......
......@@ -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__ */
/* 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
......
......@@ -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
......
/* 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__ */
/* 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);
......
/* 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__ */
/* 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__ */
/* 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.
*