gdk: Remove outdated gdk_drag_begin() alternatives

There's only one that's ever used, so delete the others and rename this
one to gdk_drag_begin().
This commit is contained in:
Benjamin Otte 2017-12-10 14:20:59 +01:00
parent 6af4947e70
commit 565d8325c4
4 changed files with 6 additions and 69 deletions

View File

@ -853,8 +853,6 @@ gdk_drag_get_selection
gdk_drop_reply
gdk_drag_drop_done
gdk_drag_begin
gdk_drag_begin_for_device
gdk_drag_begin_from_point
gdk_drop_finish
GdkDragAction
gdk_drag_status

View File

@ -138,14 +138,6 @@ GInputStream * gdk_drop_read_finish (GdkDragContext *
GDK_AVAILABLE_IN_ALL
GdkDragContext * gdk_drag_begin (GdkWindow *window,
GdkContentFormats *formats);
GDK_AVAILABLE_IN_ALL
GdkDragContext * gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GdkContentFormats *formats);
GDK_AVAILABLE_IN_3_20
GdkDragContext * gdk_drag_begin_from_point (GdkWindow *window,
GdkDevice *device,
GdkContentFormats *formats,
gint x_root,

View File

@ -6925,57 +6925,6 @@ gdk_window_register_dnd (GdkWindow *window)
/**
* gdk_drag_begin:
* @window: the source window for this drag.
* @formats: (transfer none): the offered formats
*
* Starts a drag and creates a new drag context for it.
* This function assumes that the drag is controlled by the
* client pointer device, use gdk_drag_begin_for_device() to
* begin a drag with a different device.
*
* This function is called by the drag source.
*
* Returns: (transfer full): a newly created #GdkDragContext
*/
GdkDragContext *
gdk_drag_begin (GdkWindow *window,
GdkContentFormats *formats)
{
GdkDisplay *display;
GdkDevice *device;
display = gdk_window_get_display (window);
device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
return gdk_drag_begin_for_device (window, device, formats);
}
/**
* gdk_drag_begin_for_device:
* @window: the source window for this drag
* @device: the device that controls this drag
* @formats: (transfer none): the offered formats
*
* Starts a drag and creates a new drag context for it.
*
* This function is called by the drag source.
*
* Returns: (transfer full): a newly created #GdkDragContext
*/
GdkDragContext *
gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GdkContentFormats *formats)
{
gint x, y;
gdk_device_get_position (device, &x, &y);
return gdk_drag_begin_from_point (window, device, formats, x, y);
}
/**
* gdk_drag_begin_from_point:
* @window: the source window for this drag
* @device: the device that controls this drag
* @formats: (transfer none): the offered formats
@ -6987,15 +6936,13 @@ gdk_drag_begin_for_device (GdkWindow *window,
* This function is called by the drag source.
*
* Returns: (transfer full): a newly created #GdkDragContext
*
* Since: 3.20
*/
GdkDragContext *
gdk_drag_begin_from_point (GdkWindow *window,
GdkDevice *device,
GdkContentFormats *formats,
gint x_root,
gint y_root)
gdk_drag_begin (GdkWindow *window,
GdkDevice *device,
GdkContentFormats *formats,
gint x_root,
gint y_root)
{
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->drag_begin (window, device, formats, x_root, y_root);
}

View File

@ -1120,7 +1120,7 @@ gtk_drag_begin_internal (GtkWidget *widget,
else
gdk_device_get_position (pointer, &start_x, &start_y);
context = gdk_drag_begin_from_point (ipc_window, pointer, target_list, start_x, start_y);
context = gdk_drag_begin (ipc_window, pointer, target_list, start_x, start_y);
gdk_drag_context_set_device (context, pointer);