dnd: Remove gtk_drag_set_icon_surface()
authorBenjamin Otte <otte@redhat.com>
Mon, 26 Mar 2018 16:32:38 +0000 (18:32 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 26 Mar 2018 16:32:38 +0000 (18:32 +0200)
All users are gone. Use gtk_drag_set_icon_paintable() instead.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkdnd.c
gtk/gtkdnd.h

index 64603bc9257d7971b57ef6456461297de728c020..83d091b6937b941105fbafdbfb4a840f0710e744 100644 (file)
@@ -4993,7 +4993,6 @@ gtk_drag_unhighlight
 gtk_drag_begin_with_coordinates
 gtk_drag_cancel
 gtk_drag_set_icon_widget
-gtk_drag_set_icon_surface
 gtk_drag_set_icon_paintable
 gtk_drag_set_icon_name
 gtk_drag_set_icon_gicon
index 80c8c73e13c954675a083498aeb33e58ec15f476..53bfac35694ff3bb70f5270a0779e8fc548c8f3f 100644 (file)
@@ -1175,42 +1175,6 @@ gtk_drag_set_icon_definition (GdkDragContext     *context,
   set_icon_helper (context, def, hot_x, hot_y);
 }
 
-/**
- * gtk_drag_set_icon_surface:
- * @context: the context for a drag (This must be called
- *     with a context for the source side of a drag)
- * @surface: the surface to use as icon
- *
- * Sets @surface as the icon for a given drag. GTK+ retains
- * references for the arguments, and will release them when
- * they are no longer needed.
- *
- * To position the surface relative to the mouse, use
- * cairo_surface_set_device_offset() on @surface. The mouse
- * cursor will be positioned at the (0,0) coordinate of the
- * surface.
- */
-void
-gtk_drag_set_icon_surface (GdkDragContext  *context,
-                           cairo_surface_t *surface)
-{
-  GtkWidget *widget;
-  double hot_x, hot_y;
-  GdkTexture *texture;
-
-  g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
-  g_return_if_fail (surface != NULL);
-
-  cairo_surface_get_device_offset (surface, &hot_x, &hot_y);
-  cairo_surface_set_device_offset (surface, 0, 0);
-
-  texture = gdk_texture_new_for_surface (surface);
-  widget = gtk_image_new_from_paintable (GDK_PAINTABLE (texture));
-  g_object_unref (texture);
-
-  gtk_drag_set_icon_widget_internal (context, widget, (int)hot_x, (int)hot_y, TRUE);
-}
-
 /**
  * gtk_drag_set_icon_paintable:
  * @context: the context for a drag (This must be called
index 58b2aca5f9d63c22141f1b642e3920593a426407..c6aa57743bbb5e7143dab83a1aaa8ea7e02d302e 100644 (file)
@@ -76,9 +76,6 @@ void gtk_drag_set_icon_widget (GdkDragContext *context,
                               gint            hot_x,
                               gint            hot_y);
 GDK_AVAILABLE_IN_ALL
-void gtk_drag_set_icon_surface(GdkDragContext *context,
-                              cairo_surface_t *surface);
-GDK_AVAILABLE_IN_ALL
 void gtk_drag_set_icon_paintable (GdkDragContext *context,
                               GdkPaintable   *paintable,
                                int             hot_x,