+/**
+ * gtk_drag_set_icon_name:
+ * @context: the context for a drag. (This must be called
+ * with a context for the source side of a drag)
+ * @icon_name: name of icon to use
+ * @hot_x: the X offset of the hotspot within the icon
+ * @hot_y: the Y offset of the hotspot within the icon
+ *
+ * Sets the icon for the window from a named themed icon. See
+ * the docs for #GtkIconTheme for more details. Note that the
+ * size of the icon depends on the icon theme (the icon is
+ * loaded at the symbolic size #GTK_ICON_SIZE_DND), thus
+ * @hot_x and @hot_y have to be used with care.
+ *
+ * Since: 2.8
+ **/
+void
+gtk_drag_set_icon_name (GdkDragContext *context,
+ const gchar *icon_name,
+ gint hot_x,
+ gint hot_y)
+{
+ GdkScreen *screen;
+ GtkSettings *settings;
+ GtkIconTheme *icon_theme;
+ GdkPixbuf *pixbuf;
+ gint width, height, icon_size;
+
+ g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
+ g_return_if_fail (context->is_source);
+ g_return_if_fail (icon_name != NULL);
+
+ screen = gdk_drawable_get_screen (context->source_window);
+ g_return_if_fail (screen != NULL);
+
+ settings = gtk_settings_get_for_screen (screen);
+ if (gtk_icon_size_lookup_for_settings (settings,
+ GTK_ICON_SIZE_DND,
+ &width, &height))
+ icon_size = MAX (width, height);
+ else
+ icon_size = 32; /* default value for GTK_ICON_SIZE_DND */
+
+ icon_theme = gtk_icon_theme_get_for_screen (screen);
+
+ pixbuf = gtk_icon_theme_load_icon (icon_theme, icon_name,
+ icon_size, 0, NULL);
+ set_icon_stock_pixbuf (context, NULL, pixbuf, hot_x, hot_y);
+}
+