[gtk+/gtk-2-24] Add some forgotten accessors for GdkDragContext
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Add some forgotten accessors for GdkDragContext
- Date: Tue, 21 Dec 2010 14:55:36 +0000 (UTC)
commit 3bdd56c92802fa24b4769492611c327aa128e281
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Dec 16 23:55:04 2010 -0500
Add some forgotten accessors for GdkDragContext
These fields are accessed in gtk.
gdk/gdk.symbols | 2 ++
gdk/gdkdnd.c | 36 ++++++++++++++++++++++++++++++++++++
gdk/gdkdnd.h | 3 +++
3 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index aa3db9d..2c805be 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -547,6 +547,8 @@ 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_context_get_dest_window
+gdk_drag_context_get_protocol
gdk_drag_find_window
gdk_drag_get_protocol
#endif
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c
index da0ae88..c34974a 100644
--- a/gdk/gdkdnd.c
+++ b/gdk/gdkdnd.c
@@ -168,5 +168,41 @@ gdk_drag_context_get_source_window (GdkDragContext *context)
return context->source_window;
}
+/**
+ * gdk_drag_context_get_dest_window:
+ * @context: a #GdkDragContext
+ *
+ * Returns the destination windw for the DND operation.
+ *
+ * Return value: (transfer none): a #GdkWindow
+ *
+ * Since: 2.24
+ */
+GdkWindow *
+gdk_drag_context_get_dest_window (GdkDragContext *context)
+{
+ g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
+
+ return context->dest_window;
+}
+
+/**
+ * gdk_drag_context_get_protocol:
+ * @context: a #GdkDragContext
+ *
+ * Returns the drag protocol thats used by this context.
+ *
+ * Returns: the drag protocol
+ *
+ * Since: 2.24
+ */
+GdkDragProtocol
+gdk_drag_context_get_protocol (GdkDragContext *context)
+{
+ g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_DRAG_PROTO_NONE);
+
+ return context->protocol;
+}
+
#define __GDK_DND_C__
#include "gdkaliasdef.c"
diff --git a/gdk/gdkdnd.h b/gdk/gdkdnd.h
index 9d65d79..1f6e341 100644
--- a/gdk/gdkdnd.h
+++ b/gdk/gdkdnd.h
@@ -112,6 +112,9 @@ 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);
+GdkWindow *gdk_drag_context_get_dest_window (GdkDragContext *context);
+GdkDragProtocol gdk_drag_context_get_protocol (GdkDragContext *context);
+
#ifndef GDK_DISABLE_DEPRECATED
void gdk_drag_context_ref (GdkDragContext *context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]