diff --git a/gdk/quartz/Makefile.am b/gdk/quartz/Makefile.am index 7d40f89686..3f6081b564 100644 --- a/gdk/quartz/Makefile.am +++ b/gdk/quartz/Makefile.am @@ -27,6 +27,7 @@ libgdk_quartz_la_SOURCES = \ gdkdisplay-quartz.c \ gdkdisplaymanager-quartz.c \ gdkdnd-quartz.c \ + gdkdnd-quartz.h \ gdkevents-quartz.c \ gdkeventloop-quartz.c \ gdkgeometry-quartz.c \ diff --git a/gdk/quartz/gdkdnd-quartz.c b/gdk/quartz/gdkdnd-quartz.c index 9f4b26cbc6..54b66461dc 100644 --- a/gdk/quartz/gdkdnd-quartz.c +++ b/gdk/quartz/gdkdnd-quartz.c @@ -19,12 +19,10 @@ */ #include "gdkdnd.h" +#include "gdkdnd-quartz.h" #include "gdkprivate-quartz.h" -typedef struct _GdkDragContext GdkDragContextQuartz; -typedef struct _GdkDragContextClass GdkDragContextQuartzClass; - -G_DEFINE_TYPE (GdkDragContextQuartz, gdk_quartz_drag_context, GDK_TYPE_DRAG_CONTEXT) +G_DEFINE_TYPE (GdkQuartzDragContext, gdk_quartz_drag_context, GDK_TYPE_DRAG_CONTEXT) GdkDragContext *_gdk_quartz_drag_source_context = NULL; @@ -40,15 +38,18 @@ _gdk_quartz_window_drag_begin (GdkWindow *window, GdkDevice *device, GList *targets) { + GdkDragContext *context; + g_assert (_gdk_quartz_drag_source_context == NULL); /* Create fake context */ - _gdk_quartz_drag_source_context = g_object_new (gdk_quartz_drag_context_get_type (), NULL); + _gdk_quartz_drag_source_context = g_object_new (GDK_TYPE_QUARTZ_DRAG_CONTEXT, + NULL); _gdk_quartz_drag_source_context->is_source = TRUE; - gdk_drag_context_set_device (_gdk_quartz_drag_source_context, device); + gdk_drag_context_set_device (context, device); - return _gdk_quartz_drag_source_context; + return context; } static gboolean @@ -65,25 +66,26 @@ gdk_quartz_drag_context_drag_motion (GdkDragContext *context, return FALSE; } -guint32 +GdkNativeWindow _gdk_quartz_display_get_drag_get_protocol (GdkDisplay *display, - guint32 xid, - GdkDragProtocol *protocol) + GdkNativeWindow *xid, + GdkDragProtocol *protocol, + guint version) { /* FIXME: Implement */ return 0; } -static void +static GdkWindow * gdk_quartz_drag_context_find_window (GdkDragContext *context, GdkWindow *drag_window, GdkScreen *screen, gint x_root, gint y_root, - GdkWindow **dest_window, GdkDragProtocol *protocol) { /* FIXME: Implement */ + return NULL; } static void @@ -144,14 +146,14 @@ gdk_quartz_drag_context_drop_status (GdkDragContext *context) return FALSE; } -void +id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context) { - return GDK_DRAG_CONTEXT_PRIVATE (context)->dragging_info; + return GDK_QUARTZ_DRAG_CONTEXT (context)->dragging_info; } static void -gdk_quartz_drag_context_init (GdkDragContextQuartz *context) +gdk_quartz_drag_context_init (GdkQuartzDragContext *context) { } diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h index ee4b902ea6..09d8e29e26 100644 --- a/gdk/quartz/gdkprivate-quartz.h +++ b/gdk/quartz/gdkprivate-quartz.h @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -34,22 +35,13 @@ #include "config.h" -#define GDK_DRAG_CONTEXT_PRIVATE(context) ((GdkDragContextPrivate *) GDK_DRAG_CONTEXT (context)->windowing_data) - typedef struct _GdkCursorPrivate GdkCursorPrivate; -typedef struct _GdkDragContextPrivate GdkDragContextPrivate; struct _GdkVisualClass { GObjectClass parent_class; }; -struct _GdkDragContextPrivate -{ - id dragging_info; - GdkDevice *device; -}; - extern GdkDisplay *_gdk_display; extern GdkScreen *_gdk_screen; extern GdkWindow *_gdk_root;