image: Add surface based apis

Add gtk_image_get_surface.
This commit is contained in:
Matthias Clasen
2017-10-22 22:18:32 +02:00
parent 8f6fbc9c24
commit e5ce3144e0
2 changed files with 14 additions and 0 deletions

View File

@@ -1087,6 +1087,16 @@ gtk_image_get_pixbuf (GtkImage *image)
return _gtk_icon_helper_peek_pixbuf (&priv->icon_helper);
}
cairo_surface_t *
gtk_image_get_surface (GtkImage *image)
{
GtkImagePrivate *priv = gtk_image_get_instance_private (image);
g_return_val_if_fail (GTK_IS_IMAGE (image), NULL);
return _gtk_icon_helper_peek_surface (&priv->icon_helper);
}
/**
* gtk_image_get_animation:
* @image: a #GtkImage

View File

@@ -156,6 +156,10 @@ GtkImageType gtk_image_get_storage_type (GtkImage *image);
GDK_AVAILABLE_IN_ALL
GdkPixbuf* gtk_image_get_pixbuf (GtkImage *image);
GDK_AVAILABLE_IN_3_94
cairo_surface_t *gtk_image_get_surface (GtkImage *image);
GDK_AVAILABLE_IN_ALL
GdkPixbufAnimation* gtk_image_get_animation (GtkImage *image);
GDK_AVAILABLE_IN_ALL