[gtk+] gdk: Remove outdated gdk_drag_begin() alternatives



commit 565d8325c41ad59bd3d2da3d708c7188cb2f0ec9
Author: Benjamin Otte <otte redhat com>
Date:   Sun Dec 10 14:20:59 2017 +0100

    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().

 docs/reference/gdk/gdk4-sections.txt |    2 -
 gdk/gdkdnd.h                         |    8 ----
 gdk/gdkwindow.c                      |   63 +++-------------------------------
 gtk/gtkdnd.c                         |    2 +-
 4 files changed, 6 insertions(+), 69 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index cdc3b88..9b76590 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -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
diff --git a/gdk/gdkdnd.h b/gdk/gdkdnd.h
index 70c69e1..ccedece 100644
--- a/gdk/gdkdnd.h
+++ b/gdk/gdkdnd.h
@@ -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,
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 682893e..d14558d 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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);
 }
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 3bfc417..08c1117 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]