[gtk+] Add a missing accessor for GdkDragContext->source_window.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add a missing accessor for GdkDragContext->source_window.
- Date: Thu, 10 Jun 2010 14:12:37 +0000 (UTC)
commit 4467145e437074d0a9a233ffa80befb309df754a
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jun 10 15:52:45 2010 +0200
Add a missing accessor for GdkDragContext->source_window.
docs/reference/gdk/gdk3-sections.txt | 1 +
gdk/gdk.symbols | 1 +
gdk/gdkdnd.c | 18 ++++++++++++++++++
gdk/gdkdnd.h | 2 ++
4 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index da9208c..1d4baf2 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -1273,6 +1273,7 @@ gdk_drag_context_new
gdk_drag_drop
gdk_drag_find_window
gdk_drag_find_window_for_screen
+gdk_drag_context_get_source_window
gdk_drag_begin
gdk_drag_motion
gdk_drop_finish
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 3567606..7b25c6e 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -590,6 +590,7 @@ gdk_drag_context_get_actions
gdk_drag_context_get_selected_action
gdk_drag_context_get_suggested_action
gdk_drag_context_list_targets
+gdk_drag_context_get_source_window
gdk_drag_find_window
gdk_drag_get_protocol
#endif
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c
index fb43b1f..31aa250 100644
--- a/gdk/gdkdnd.c
+++ b/gdk/gdkdnd.c
@@ -166,5 +166,23 @@ gdk_drag_context_get_selected_action (GdkDragContext *context)
return context->action;
}
+/**
+ * gdk_drag_context_get_source_window:
+ * @context: a #GdkDragContext
+ *
+ * Returns the #GdkWindow where the DND operation started.
+ *
+ * Return value: (transfer none): a #GdkWindow
+ *
+ * Since: 2.22
+ **/
+GdkWindow *
+gdk_drag_context_get_source_window (GdkDragContext *context)
+{
+ g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
+
+ return context->source_window;
+}
+
#define __GDK_DND_C__
#include "gdkaliasdef.c"
diff --git a/gdk/gdkdnd.h b/gdk/gdkdnd.h
index 2bdf589..b257d1e 100644
--- a/gdk/gdkdnd.h
+++ b/gdk/gdkdnd.h
@@ -145,6 +145,8 @@ GdkDragAction gdk_drag_context_get_actions (GdkDragContext *context)
GdkDragAction gdk_drag_context_get_suggested_action (GdkDragContext *context);
GdkDragAction gdk_drag_context_get_selected_action (GdkDragContext *context);
+GdkWindow *gdk_drag_context_get_source_window (GdkDragContext *context);
+
/* Destination side */
void gdk_drag_status (GdkDragContext *context,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]