[gtk+] Drop gtk_drag_source_set_icon_pixbuf



commit c2a38612a91e41265b69596cdd668621e5d59851
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 29 20:02:47 2017 -0500

    Drop gtk_drag_source_set_icon_pixbuf
    
    Part of removing GdkPixbuf from the API.

 docs/reference/gtk/gtk4-sections.txt |    1 -
 gtk/gtkdragsource.c                  |   28 ----------------------------
 gtk/gtkdragsource.h                  |    3 ---
 3 files changed, 0 insertions(+), 32 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index c431350..b3da2cb 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -5340,7 +5340,6 @@ gtk_drag_set_icon_gicon
 gtk_drag_set_icon_default
 gtk_drag_check_threshold
 gtk_drag_source_set
-gtk_drag_source_set_icon_pixbuf
 gtk_drag_source_set_icon_surface
 gtk_drag_source_set_icon_name
 gtk_drag_source_set_icon_gicon
diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c
index ff61520..13f1c17 100644
--- a/gtk/gtkdragsource.c
+++ b/gtk/gtkdragsource.c
@@ -350,34 +350,6 @@ gtk_drag_source_add_uri_targets (GtkWidget *widget)
 }
 
 /**
- * gtk_drag_source_set_icon_pixbuf: (method)
- * @widget: a #GtkWidget
- * @pixbuf: the #GdkPixbuf for the drag icon
- * 
- * Sets the icon that will be used for drags from a particular widget
- * from a #GdkPixbuf. GTK+ retains a reference for @pixbuf and will 
- * release it when it is no longer needed.
- */
-void 
-gtk_drag_source_set_icon_pixbuf (GtkWidget *widget,
-                                 GdkPixbuf *pixbuf)
-{
-  GtkDragSourceSite *site;
-  cairo_surface_t *surface = NULL;
-
-  g_return_if_fail (GTK_IS_WIDGET (widget));
-  g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
-
-  site = g_object_get_data (G_OBJECT (widget), "gtk-site-data");
-  g_return_if_fail (site != NULL); 
-
-  g_clear_pointer (&site->image_def, gtk_image_definition_unref);
-  surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, 1, gtk_widget_get_window (widget));
-  site->image_def = gtk_image_definition_new_surface (surface);
-  cairo_surface_destroy (surface);
-}
-
-/**
  * gtk_drag_source_set_icon_surface: (method)
  * @widget: a #GtkWidget
  * @surface: the cairo surface for the drag icon
diff --git a/gtk/gtkdragsource.h b/gtk/gtkdragsource.h
index 4fda28f..29c0db9 100644
--- a/gtk/gtkdragsource.h
+++ b/gtk/gtkdragsource.h
@@ -58,9 +58,6 @@ void           gtk_drag_source_add_image_targets (GtkWidget    *widget);
 GDK_AVAILABLE_IN_ALL
 void           gtk_drag_source_add_uri_targets   (GtkWidget    *widget);
 
-GDK_AVAILABLE_IN_ALL
-void gtk_drag_source_set_icon_pixbuf  (GtkWidget       *widget,
-                                      GdkPixbuf       *pixbuf);
 GDK_AVAILABLE_IN_3_94
 void gtk_drag_source_set_icon_surface (GtkWidget       *widget,
                                        cairo_surface_t *surface);


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