-static void
-gtk_drag_source_unset_icon (GtkDragSourceSite *site)
-{
- switch (site->icon_type)
- {
- case GTK_IMAGE_EMPTY:
- break;
- case GTK_IMAGE_PIXMAP:
- if (site->icon_data.pixmap.pixmap)
- g_object_unref (site->icon_data.pixmap.pixmap);
- if (site->icon_mask)
- g_object_unref (site->icon_mask);
- break;
- case GTK_IMAGE_PIXBUF:
- g_object_unref (site->icon_data.pixbuf.pixbuf);
- break;
- case GTK_IMAGE_STOCK:
- g_free (site->icon_data.stock.stock_id);
- break;
- case GTK_IMAGE_ICON_NAME:
- g_free (site->icon_data.name.icon_name);
- break;
- default:
- g_assert_not_reached();
- break;
- }
- site->icon_type = GTK_IMAGE_EMPTY;
-
- if (site->colormap)
- g_object_unref (site->colormap);
- site->colormap = NULL;
-}
-
-/**
- * gtk_drag_source_set_icon:
- * @widget: a #GtkWidget
- * @colormap: the colormap of the icon
- * @pixmap: the image data for the icon
- * @mask: (allow-none): the transparency mask for an image.
- *
- * Sets the icon that will be used for drags from a particular widget
- * from a pixmap/mask. GTK+ retains references for the arguments, and
- * will release them when they are no longer needed.
- * Use gtk_drag_source_set_icon_pixbuf() instead.
- **/
-void
-gtk_drag_source_set_icon (GtkWidget *widget,
- GdkColormap *colormap,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
-{
- GtkDragSourceSite *site;
-
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (GDK_IS_COLORMAP (colormap));
- g_return_if_fail (GDK_IS_PIXMAP (pixmap));
- g_return_if_fail (!mask || GDK_IS_PIXMAP (mask));
-
- site = g_object_get_data (G_OBJECT (widget), "gtk-site-data");
- g_return_if_fail (site != NULL);
-
- g_object_ref (colormap);
- g_object_ref (pixmap);
- if (mask)
- g_object_ref (mask);
-
- gtk_drag_source_unset_icon (site);
-
- site->icon_type = GTK_IMAGE_PIXMAP;
-
- site->icon_data.pixmap.pixmap = pixmap;
- site->icon_mask = mask;
- site->colormap = colormap;
-}
-