3 * Copyright (C) 2005 Imendio AB
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 #include "gdkprivate-quartz.h"
24 static gpointer parent_class = NULL;
27 gdk_drag_context_finalize (GObject *object)
29 GdkDragContext *context = GDK_DRAG_CONTEXT (object);
30 GdkDragContextPrivate *private = GDK_DRAG_CONTEXT_PRIVATE (context);
34 G_OBJECT_CLASS (parent_class)->finalize (object);
38 gdk_drag_context_init (GdkDragContext *dragcontext)
40 GdkDragContextPrivate *priv = g_new0 (GdkDragContextPrivate, 1);
42 dragcontext->windowing_data = priv;
46 gdk_drag_context_class_init (GdkDragContextClass *klass)
48 GObjectClass *object_class = G_OBJECT_CLASS (klass);
50 parent_class = g_type_class_peek_parent (klass);
52 object_class->finalize = gdk_drag_context_finalize;
56 gdk_drag_context_get_type (void)
58 static GType object_type = 0;
62 static const GTypeInfo object_info =
64 sizeof (GdkDragContextClass),
66 (GBaseFinalizeFunc) NULL,
67 (GClassInitFunc) gdk_drag_context_class_init,
68 NULL, /* class_finalize */
69 NULL, /* class_data */
70 sizeof (GdkDragContext),
72 (GInstanceInitFunc) gdk_drag_context_init,
75 object_type = g_type_register_static (G_TYPE_OBJECT,
85 gdk_drag_context_new (void)
87 return (GdkDragContext *)g_object_new (gdk_drag_context_get_type (), NULL);
91 gdk_drag_context_ref (GdkDragContext *context)
93 g_object_ref (context);
97 gdk_drag_context_unref (GdkDragContext *context)
99 g_object_unref (context);
102 GdkDragContext *_gdk_quartz_drag_source_context = NULL;
105 gdk_drag_begin (GdkWindow *window,
108 g_assert (_gdk_quartz_drag_source_context == NULL);
110 /* Create fake context */
111 _gdk_quartz_drag_source_context = gdk_drag_context_new ();
112 _gdk_quartz_drag_source_context->is_source = TRUE;
114 return _gdk_quartz_drag_source_context;
118 gdk_drag_motion (GdkDragContext *context,
119 GdkWindow *dest_window,
120 GdkDragProtocol protocol,
123 GdkDragAction suggested_action,
124 GdkDragAction possible_actions,
127 /* FIXME: Implement */
132 gdk_drag_get_protocol_for_display (GdkDisplay *display,
134 GdkDragProtocol *protocol)
136 /* FIXME: Implement */
141 gdk_drag_find_window_for_screen (GdkDragContext *context,
142 GdkWindow *drag_window,
146 GdkWindow **dest_window,
147 GdkDragProtocol *protocol)
149 /* FIXME: Implement */
153 gdk_drag_drop (GdkDragContext *context,
156 /* FIXME: Implement */
160 gdk_drag_abort (GdkDragContext *context,
163 g_return_if_fail (context != NULL);
165 /* FIXME: Implement */
169 gdk_drag_status (GdkDragContext *context,
170 GdkDragAction action,
173 context->action = action;
177 gdk_drop_reply (GdkDragContext *context,
181 g_return_if_fail (context != NULL);
183 /* FIXME: Implement */
187 gdk_drop_finish (GdkDragContext *context,
191 /* FIXME: Implement */
195 gdk_window_register_dnd (GdkWindow *window)
197 /* FIXME: Implement */
201 gdk_drag_get_selection (GdkDragContext *context)
203 /* FIXME: Implement */
208 gdk_drag_drop_succeeded (GdkDragContext *context)
210 /* FIXME: Implement */
215 gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context)
217 return GDK_DRAG_CONTEXT_PRIVATE (context)->dragging_info;