[gtk+] image: Add surface based apis



commit e5ce3144e0082a082268c0befae574404fdf3322
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Oct 22 22:18:32 2017 +0200

    image: Add surface based apis
    
    Add gtk_image_get_surface.

 gtk/gtkimage.c |   10 ++++++++++
 gtk/gtkimage.h |    4 ++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 72bdeb7..ac9f347 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -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
diff --git a/gtk/gtkimage.h b/gtk/gtkimage.h
index 29901a3..52c5d49 100644
--- a/gtk/gtkimage.h
+++ b/gtk/gtkimage.h
@@ -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


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