diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-05-27 16:11:25 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-05-27 16:25:54 +0200 |
commit | cfb988ab383e47254f32cd0dd00e8b1bafb4d535 (patch) | |
tree | 6f0feedcb340d00999d14b8fe9f67b2fa6b2855e /gdk/gdkdnd.c | |
parent | c4b1bbf3e201099e5fed38d7a60b343662b88b21 (diff) | |
download | gtk+-cfb988ab383e47254f32cd0dd00e8b1bafb4d535.tar.gz |
Seal gdk
Add G_SEAL annotation for struct members, and add accessors for
the (useful) fields. Patch based on work by Garrett Regier,
see bug #592580.
Diffstat (limited to 'gdk/gdkdnd.c')
-rw-r--r-- | gdk/gdkdnd.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c index 2d114faf49..1b4ca7ae04 100644 --- a/gdk/gdkdnd.c +++ b/gdk/gdkdnd.c @@ -77,5 +77,78 @@ gdk_drag_get_protocol (GdkNativeWindow xid, return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol); } +/** + * gdk_drag_context_list_targets: + * @context: a #GdkDragContext + * + * Retrieves the list of targets of the context. + * + * Return value: a #GList of targets + * + * Since: 2.22 + **/ +GList * +gdk_drag_context_list_targets (GdkDragContext *context) +{ + g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL); + + return context->targets; +} + +/** + * gdk_drag_context_get_actions: + * @context: a #GdkDragContext + * + * Determines the bitmask of actions proposed by the source if + * gdk_drag_context_suggested_action() returns GDK_ACTION_ASK. + * + * Return value: the #GdkDragAction flags + * + * Since: 2.22 + **/ +GdkDragAction +gdk_drag_context_get_actions (GdkDragContext *context) +{ + g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_ACTION_DEFAULT); + + return context->actions; +} + +/** + * gdk_drag_context_get_suggested_action: + * @context: a #GdkDragContext + * + * Determines the suggested drag action of the context. + * + * Return value: a #GdkDragAction value + * + * Since: 2.22 + **/ +GdkDragAction +gdk_drag_context_get_suggested_action (GdkDragContext *context) +{ + g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), 0); + + return context->suggested_action; +} + +/** + * gdk_drag_context_get_action: + * @context: a #GdkDragContext + * + * Determines the action chosen by the drag destination. + * + * Return value: a #GdkDragAction value + * + * Since: 2.22 + **/ +GdkDragAction +gdk_drag_context_get_action (GdkDragContext *context) +{ + g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), 0); + + return context->action; +} + #define __GDK_DND_C__ #include "gdkaliasdef.c" |