+G_DEFINE_TYPE (GdkDragContext, gdk_drag_context, G_TYPE_OBJECT)
+
+static void
+gdk_drag_context_init (GdkDragContext *context)
+{
+}
+
+static void
+gdk_drag_context_finalize (GObject *object)
+{
+ GdkDragContext *context = GDK_DRAG_CONTEXT (object);
+
+ g_list_free (context->targets);
+
+ if (context->source_window)
+ g_object_unref (context->source_window);
+
+ if (context->dest_window)
+ g_object_unref (context->dest_window);
+
+ G_OBJECT_CLASS (gdk_drag_context_parent_class)->finalize (object);
+}
+
+static void
+gdk_drag_context_class_init (GdkDragContextClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = gdk_drag_context_finalize;
+}
+
+/**
+ * gdk_drag_find_window_for_screen:
+ * @context: a #GdkDragContext
+ * @drag_window: a window which may be at the pointer position, but
+ * should be ignored, since it is put up by the drag source as an icon
+ * @screen: the screen where the destination window is sought
+ * @x_root: the x position of the pointer in root coordinates
+ * @y_root: the y position of the pointer in root coordinates
+ * @dest_window: (out): location to store the destination window in
+ * @protocol: (out): location to store the DND protocol in
+ *
+ * Finds the destination window and DND protocol to use at the
+ * given pointer position.
+ *
+ * This function is called by the drag source to obtain the
+ * @dest_window and @protocol parameters for gdk_drag_motion().
+ *
+ * Since: 2.2
+ */
+void
+gdk_drag_find_window_for_screen (GdkDragContext *context,
+ GdkWindow *drag_window,
+ GdkScreen *screen,
+ gint x_root,
+ gint y_root,
+ GdkWindow **dest_window,
+ GdkDragProtocol *protocol)
+{
+ g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
+
+ *dest_window = GDK_DRAG_CONTEXT_GET_CLASS (context)
+ ->find_window (context, drag_window, screen, x_root, y_root, protocol);
+}
+
+/**
+ * gdk_drag_status:
+ * @context: a #GdkDragContext
+ * @action: the selected action which will be taken when a drop happens,
+ * or 0 to indicate that a drop will not be accepted
+ * @time_: the timestamp for this operation
+ *
+ * Selects one of the actions offered by the drag source.
+ *
+ * This function is called by the drag destination in response to
+ * gdk_drag_motion() called by the drag source.
+ */
+void
+gdk_drag_status (GdkDragContext *context,
+ GdkDragAction action,
+ guint32 time_)
+{
+ g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
+
+ GDK_DRAG_CONTEXT_GET_CLASS (context)->drag_status (context, action, time_);
+}
+
+/**
+ * gdk_drag_motion:
+ * @context: a #GdkDragContext
+ * @dest_window: the new destination window, obtained by
+ * gdk_drag_find_window()
+ * @protocol: the DND protocol in use, obtained by gdk_drag_find_window()
+ * @x_root: the x position of the pointer in root coordinates
+ * @y_root: the y position of the pointer in root coordinates
+ * @suggested_action: the suggested action
+ * @possible_actions: the possible actions
+ * @time_: the timestamp for this operation
+ *
+ * Updates the drag context when the pointer moves or the
+ * set of actions changes.
+ *
+ * This function is called by the drag source.
+ */
+gboolean
+gdk_drag_motion (GdkDragContext *context,
+ GdkWindow *dest_window,
+ GdkDragProtocol protocol,
+ gint x_root,
+ gint y_root,
+ GdkDragAction suggested_action,
+ GdkDragAction possible_actions,
+ guint32 time_)
+{
+ g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), FALSE);
+
+ return GDK_DRAG_CONTEXT_GET_CLASS (context)
+ ->drag_motion (context,
+ dest_window,
+ protocol,
+ x_root,
+ y_root,
+ suggested_action,
+ possible_actions,
+ time_);
+}
+
+/**
+ * gdk_drag_abort:
+ * @context: a #GdkDragContext
+ * @time_: the timestamp for this operation
+ *
+ * Aborts a drag without dropping.
+ *
+ * This function is called by the drag source.
+ */