dnd: Remove gdk_drag_context_get_dest_surface()

... and gdk_drag_context_get_source_surface().

In the backends, use direct access to the variables instead.
This commit is contained in:
Benjamin Otte 2018-06-06 07:43:58 +02:00
parent 8a08a325be
commit e1206763a8
5 changed files with 3 additions and 42 deletions

View File

@ -794,8 +794,6 @@ gdk_drag_context_get_suggested_action
gdk_drag_context_get_selected_action
gdk_drag_context_get_formats
gdk_drag_context_get_device
gdk_drag_context_get_source_surface
gdk_drag_context_get_dest_surface
gdk_drag_context_get_drag_surface
gdk_drag_context_set_hotspot

View File

@ -209,38 +209,6 @@ gdk_drag_context_get_selected_action (GdkDragContext *context)
return context->action;
}
/**
* gdk_drag_context_get_source_surface:
* @context: a #GdkDragContext
*
* Returns the #GdkSurface where the DND operation started.
*
* Returns: (transfer none): a #GdkSurface
**/
GdkSurface *
gdk_drag_context_get_source_surface (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
return context->source_surface;
}
/**
* gdk_drag_context_get_dest_surface:
* @context: a #GdkDragContext
*
* Returns the destination surface for the DND operation.
*
* Returns: (transfer none): a #GdkSurface
**/
GdkSurface *
gdk_drag_context_get_dest_surface (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
return context->dest_surface;
}
/**
* gdk_drag_context_get_device:
* @context: a #GdkDragContext

View File

@ -72,11 +72,6 @@ GdkDragAction gdk_drag_context_get_suggested_action (GdkDragContext *context)
GDK_AVAILABLE_IN_ALL
GdkDragAction gdk_drag_context_get_selected_action (GdkDragContext *context);
GDK_AVAILABLE_IN_ALL
GdkSurface *gdk_drag_context_get_source_surface (GdkDragContext *context);
GDK_AVAILABLE_IN_ALL
GdkSurface *gdk_drag_context_get_dest_surface (GdkDragContext *context);
GDK_AVAILABLE_IN_ALL
GdkDragAction gdk_drag_action_is_unique (GdkDragAction action);

View File

@ -2439,7 +2439,7 @@ gdk_dnd_handle_key_event (GdkDragContext *drag,
case GDK_KEY_KP_Enter:
case GDK_KEY_KP_Space:
if ((gdk_drag_context_get_selected_action (drag) != 0) &&
(gdk_drag_context_get_dest_surface (drag) != NULL))
(drag->dest_surface != NULL))
{
g_signal_emit_by_name (drag, "drop-performed",
gdk_event_get_time ((GdkEvent *) event));

View File

@ -3082,7 +3082,7 @@ gdk_dnd_handle_key_event (GdkDragContext *context,
case GDK_KEY_KP_Enter:
case GDK_KEY_KP_Space:
if ((gdk_drag_context_get_selected_action (context) != 0) &&
(gdk_drag_context_get_dest_surface (context) != NULL))
(context->dest_surface != NULL))
{
g_signal_emit_by_name (context, "drop-performed",
gdk_event_get_time ((GdkEvent *) event));
@ -3170,7 +3170,7 @@ gdk_dnd_handle_button_event (GdkDragContext *context,
#endif
if ((gdk_drag_context_get_selected_action (context) != 0) &&
(gdk_drag_context_get_dest_surface (context) != NULL))
(context->dest_surface != NULL))
{
g_signal_emit_by_name (context, "drop-performed",
gdk_event_get_time ((GdkEvent *) event));