[gtk+/gdk-backend-quartz] quartz: fix up GdkDragContext conversion
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend-quartz] quartz: fix up GdkDragContext conversion
- Date: Wed, 22 Dec 2010 16:32:49 +0000 (UTC)
commit 432d7530d24259f9993b1256f0113e320d22896a
Author: Kristian Rietveld <kris gtk org>
Date: Wed Dec 22 13:31:58 2010 +0100
quartz: fix up GdkDragContext conversion
gdk/quartz/Makefile.am | 1 +
gdk/quartz/gdkdnd-quartz.c | 32 +++++++++++++++++---------------
gdk/quartz/gdkprivate-quartz.h | 10 +---------
3 files changed, 19 insertions(+), 24 deletions(-)
---
diff --git a/gdk/quartz/Makefile.am b/gdk/quartz/Makefile.am
index 7d40f89..3f6081b 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 9f4b26c..54b6646 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 ee4b902..09d8e29 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -26,6 +26,7 @@
#include <gdk/gdkprivate.h>
#include <gdk/quartz/gdkwindow-quartz.h>
+#include <gdk/quartz/gdkdnd-quartz.h>
#include <gdk/quartz/gdkquartz.h>
#include <gdk/gdk.h>
@@ -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 <NSDraggingInfo> dragging_info;
- GdkDevice *device;
-};
-
extern GdkDisplay *_gdk_display;
extern GdkScreen *_gdk_screen;
extern GdkWindow *_gdk_root;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]