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_quartz_drag_source_context ()
107 return _gdk_quartz_drag_source_context;
111 gdk_drag_begin (GdkWindow *window,
114 g_assert (_gdk_quartz_drag_source_context == NULL);
116 /* Create fake context */
117 _gdk_quartz_drag_source_context = gdk_drag_context_new ();
118 _gdk_quartz_drag_source_context->is_source = TRUE;
120 return _gdk_quartz_drag_source_context;
124 gdk_drag_motion (GdkDragContext *context,
125 GdkWindow *dest_window,
126 GdkDragProtocol protocol,
129 GdkDragAction suggested_action,
130 GdkDragAction possible_actions,
133 /* FIXME: Implement */
138 gdk_drag_get_protocol_for_display (GdkDisplay *display,
140 GdkDragProtocol *protocol)
142 /* FIXME: Implement */
147 gdk_drag_find_window_for_screen (GdkDragContext *context,
148 GdkWindow *drag_window,
152 GdkWindow **dest_window,
153 GdkDragProtocol *protocol)
155 /* FIXME: Implement */
159 gdk_drag_drop (GdkDragContext *context,
162 /* FIXME: Implement */
166 gdk_drag_abort (GdkDragContext *context,
169 g_return_if_fail (context != NULL);
171 /* FIXME: Implement */
175 gdk_drag_status (GdkDragContext *context,
176 GdkDragAction action,
179 context->action = action;
183 gdk_drop_reply (GdkDragContext *context,
187 g_return_if_fail (context != NULL);
189 /* FIXME: Implement */
193 gdk_drop_finish (GdkDragContext *context,
197 /* FIXME: Implement */
201 gdk_window_register_dnd (GdkWindow *window)
203 /* FIXME: Implement */
207 gdk_drag_get_selection (GdkDragContext *context)
209 /* FIXME: Implement */
214 gdk_drag_drop_succeeded (GdkDragContext *context)
216 /* FIXME: Implement */
221 gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context)
223 return GDK_DRAG_CONTEXT_PRIVATE (context)->dragging_info;