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, see <http://www.gnu.org/licenses/>.
20 #include "gdkquartzdnd.h"
21 #include "gdkprivate-quartz.h"
24 G_DEFINE_TYPE (GdkQuartzDragContext, gdk_quartz_drag_context, GDK_TYPE_DRAG_CONTEXT)
27 GdkDragContext *_gdk_quartz_drag_source_context = NULL;
30 gdk_quartz_drag_source_context ()
32 return _gdk_quartz_drag_source_context;
36 _gdk_quartz_window_drag_begin (GdkWindow *window,
40 g_assert (_gdk_quartz_drag_source_context == NULL);
42 /* Create fake context */
43 _gdk_quartz_drag_source_context = g_object_new (GDK_TYPE_QUARTZ_DRAG_CONTEXT,
45 _gdk_quartz_drag_source_context->is_source = TRUE;
47 gdk_drag_context_set_device (_gdk_quartz_drag_source_context, device);
49 return _gdk_quartz_drag_source_context;
53 gdk_quartz_drag_context_drag_motion (GdkDragContext *context,
54 GdkWindow *dest_window,
55 GdkDragProtocol protocol,
58 GdkDragAction suggested_action,
59 GdkDragAction possible_actions,
62 /* FIXME: Implement */
67 gdk_quartz_drag_context_find_window (GdkDragContext *context,
68 GdkWindow *drag_window,
72 GdkDragProtocol *protocol)
74 /* FIXME: Implement */
79 gdk_quartz_drag_context_drag_drop (GdkDragContext *context,
82 /* FIXME: Implement */
86 gdk_quartz_drag_context_drag_abort (GdkDragContext *context,
89 /* FIXME: Implement */
93 gdk_quartz_drag_context_drag_status (GdkDragContext *context,
97 context->action = action;
101 gdk_quartz_drag_context_drop_reply (GdkDragContext *context,
105 /* FIXME: Implement */
109 gdk_quartz_drag_context_drop_finish (GdkDragContext *context,
113 /* FIXME: Implement */
117 _gdk_quartz_window_register_dnd (GdkWindow *window)
119 /* FIXME: Implement */
123 gdk_quartz_drag_context_get_selection (GdkDragContext *context)
125 /* FIXME: Implement */
130 gdk_quartz_drag_context_drop_status (GdkDragContext *context)
132 /* FIXME: Implement */
137 gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context)
139 return GDK_QUARTZ_DRAG_CONTEXT (context)->dragging_info;
143 gdk_quartz_drag_context_init (GdkQuartzDragContext *context)
148 gdk_quartz_drag_context_finalize (GObject *object)
150 G_OBJECT_CLASS (gdk_quartz_drag_context_parent_class)->finalize (object);
154 gdk_quartz_drag_context_class_init (GdkQuartzDragContextClass *klass)
156 GObjectClass *object_class = G_OBJECT_CLASS (klass);
157 GdkDragContextClass *context_class = GDK_DRAG_CONTEXT_CLASS (klass);
159 object_class->finalize = gdk_quartz_drag_context_finalize;
161 context_class->find_window = gdk_quartz_drag_context_find_window;
162 context_class->drag_status = gdk_quartz_drag_context_drag_status;
163 context_class->drag_motion = gdk_quartz_drag_context_drag_motion;
164 context_class->drag_abort = gdk_quartz_drag_context_drag_abort;
165 context_class->drag_drop = gdk_quartz_drag_context_drag_drop;
166 context_class->drop_reply = gdk_quartz_drag_context_drop_reply;
167 context_class->drop_finish = gdk_quartz_drag_context_drop_finish;
168 context_class->drop_status = gdk_quartz_drag_context_drop_status;
169 context_class->get_selection = gdk_quartz_drag_context_get_selection;