texture = get_image_texture (GTK_IMAGE (widget));
if (texture)
- gtk_drag_set_icon_texture (context, texture, -2, -2);
+ {
+ gtk_drag_set_icon_paintable (context, GDK_PAINTABLE (texture), -2, -2);
+ g_object_unref (texture);
+ }
}
void
}
/**
- * gtk_drag_set_icon_texture:
+ * gtk_drag_set_icon_paintable:
* @context: the context for a drag (This must be called
* with a context for the source side of a drag)
- * @texture: the #GdkTexture to use as icon
+ * @paintable: the #GdkPaintable to use as icon
* @hot_x: the X offset of the hotspot within the icon
* @hot_y: the Y offset of the hotspot within the icon
*
* mouse cursor.
*/
void
-gtk_drag_set_icon_texture (GdkDragContext *context,
- GdkTexture *texture,
- int hot_x,
- int hot_y)
+gtk_drag_set_icon_paintable (GdkDragContext *context,
+ GdkPaintable *paintable,
+ int hot_x,
+ int hot_y)
{
GtkWidget *widget;
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
- g_return_if_fail (GDK_IS_TEXTURE (texture));
+ g_return_if_fail (GDK_IS_PAINTABLE (paintable));
- widget = gtk_image_new_from_texture (texture);
+ widget = gtk_image_new_from_paintable (paintable);
gtk_drag_set_icon_widget_internal (context, widget, hot_x, hot_y, TRUE);
}
void gtk_drag_set_icon_surface(GdkDragContext *context,
cairo_surface_t *surface);
GDK_AVAILABLE_IN_ALL
-void gtk_drag_set_icon_texture(GdkDragContext *context,
- GdkTexture *texture,
+void gtk_drag_set_icon_paintable (GdkDragContext *context,
+ GdkPaintable *paintable,
int hot_x,
int hot_y);
GDK_AVAILABLE_IN_ALL