summaryrefslogtreecommitdiff
path: root/gtk/gtkimage.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-06-24 14:13:43 +0200
committerAlexander Larsson <alexl@redhat.com>2013-07-03 14:39:26 +0200
commit031e1a98a0d26682572906b3a3853a284412aaf1 (patch)
tree22ded67524447f7cf05aef0ead7164da4e7dd889 /gtk/gtkimage.h
parent635ae9bd919a60d4241a9c5a546fc281a5e4d59f (diff)
downloadgtk+-031e1a98a0d26682572906b3a3853a284412aaf1.tar.gz
GtkIconHelper: Convert to using cairo surfaces as base and support scales
We render the source into a cairo_surface_t so that we can render it with cairo directly, rather than having to convert it from a pixbuf every time. We also specify the target window when creating the cairo surface so that rendering can be faster. Using cairo surfaces also allows us to seamlessly support window scales. We also add a GTK_IMAGE_SURFACE source type.
Diffstat (limited to 'gtk/gtkimage.h')
-rw-r--r--gtk/gtkimage.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkimage.h b/gtk/gtkimage.h
index 07a93758bd..eb5be482c1 100644
--- a/gtk/gtkimage.h
+++ b/gtk/gtkimage.h
@@ -60,6 +60,8 @@ typedef struct _GtkImageClass GtkImageClass;
* This image type was added in GTK+ 2.6
* @GTK_IMAGE_GICON: the widget contains a #GIcon.
* This image type was added in GTK+ 2.14
+ * @GTK_IMAGE_SURFACE: the widget contains a #cairo_surface_t.
+ * This image type was added in GTK+ 3.10
*
* Describes the image data representation used by a #GtkImage. If you
* want to get the image from the widget, you can only get the
@@ -77,7 +79,8 @@ typedef enum
GTK_IMAGE_ICON_SET,
GTK_IMAGE_ANIMATION,
GTK_IMAGE_ICON_NAME,
- GTK_IMAGE_GICON
+ GTK_IMAGE_GICON,
+ GTK_IMAGE_SURFACE
} GtkImageType;
/**