summaryrefslogtreecommitdiff
path: root/gdk/gdkwindow.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-02-01 18:11:35 +0100
committerBenjamin Otte <otte@redhat.com>2011-02-01 18:51:57 +0100
commit44c02fcbb19da4a270622cdd73ed85f19c9f8fbe (patch)
tree9f8939339030c369d46b878f8f50ad9717dba10c /gdk/gdkwindow.c
parent9210347600c640becebe19ac12de5bdf332acaa5 (diff)
downloadgtk+-44c02fcbb19da4a270622cdd73ed85f19c9f8fbe.tar.gz
API: gdk: Change get_drag_window() API
The previous function gdk_drag_get_protocol_for_display() took native window handles, so it had to be changed. Because it didn't do what it was named to do (it didn't return a protocol even though it was named get_protocol) and because it doesn't operate on the display anymore but on the actual window, it's now called gdk_window_get_drag_protocol().
Diffstat (limited to 'gdk/gdkwindow.c')
-rw-r--r--gdk/gdkwindow.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 019b0ea94b..5b1d43f3d5 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -10658,6 +10658,28 @@ gdk_window_register_dnd (GdkWindow *window)
}
/**
+ * gdk_window_get_drag_protocol:
+ * @window: the destination window
+ * @target: (out) (allow-none) (transfer full): location of the window
+ * where the drop should happen. This may be @window or a proxy window,
+ * or %NULL if @window does not support Drag and Drop.
+ *
+ * Finds out the DND protocol supported by a window.
+ *
+ * Returns: the supported DND protocol.
+ *
+ * Since: 3.0
+ */
+GdkDragProtocol
+gdk_window_get_drag_protocol (GdkWindow *window,
+ GdkWindow **target)
+{
+ g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_DRAG_PROTO_NONE);
+
+ return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->get_drag_protocol (window, target);
+}
+
+/**
* gdk_drag_begin:
* @window: the source window for this drag.
* @targets: (transfer none) (element-type GdkAtom): the offered targets,