[gtk+/gdk-backend] Add some forgotten accessors for GdkDragContext
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend] Add some forgotten accessors for GdkDragContext
- Date: Fri, 10 Dec 2010 06:31:04 +0000 (UTC)
commit 3b7d8103c447946cddaa1d7efa9745d945faaa76
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 10 00:58:33 2010 -0500
Add some forgotten accessors for GdkDragContext
These fields are accessed in gtk.
gdk/gdk.symbols | 2 ++
gdk/gdkdnd.c | 37 +++++++++++++++++++++++++++++++++++++
gdk/gdkdnd.h | 2 ++
3 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index d4f02ef..d8a495f 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -136,7 +136,9 @@ gdk_drag_abort
gdk_drag_action_get_type G_GNUC_CONST
gdk_drag_begin
gdk_drag_context_get_actions
+gdk_drag_context_get_dest_window
gdk_drag_context_get_device
+gdk_drag_context_get_protocol
gdk_drag_context_get_selected_action
gdk_drag_context_get_source_window
gdk_drag_context_get_suggested_action
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c
index cccae09..22967ad 100644
--- a/gdk/gdkdnd.c
+++ b/gdk/gdkdnd.c
@@ -185,3 +185,40 @@ 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: 3.0
+ **/
+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: 3.0
+ */
+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;
+}
+
diff --git a/gdk/gdkdnd.h b/gdk/gdkdnd.h
index b257d1e..e383c95 100644
--- a/gdk/gdkdnd.h
+++ b/gdk/gdkdnd.h
@@ -146,6 +146,8 @@ 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);
/* Destination side */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]