diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-06-24 12:35:39 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-07-03 14:39:26 +0200 |
commit | 91a268f00e26448325cacf81536cfe2ed30a52d1 (patch) | |
tree | 95a443fb44259fc3d9d6c8b916839d42c606f9f4 /gtk/gtkthemingengine.h | |
parent | 1d0bb3e010f397d89e03f2a8129d7a0f37ea5966 (diff) | |
download | gtk+-91a268f00e26448325cacf81536cfe2ed30a52d1.tar.gz |
stylecontext: add gtk_render_icon_surface
This draws an icon from a cairo_surface. We want to use this more rather
than render_icon as this means we can skip the pixbuf to surface
conversion (including allocation and alpha premultiplication) at
render time, plus we can use create_similar_image which may allow
faster rendering.
Diffstat (limited to 'gtk/gtkthemingengine.h')
-rw-r--r-- | gtk/gtkthemingengine.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkthemingengine.h b/gtk/gtkthemingengine.h index a3c48f2e16..f75464a932 100644 --- a/gtk/gtkthemingengine.h +++ b/gtk/gtkthemingengine.h @@ -70,6 +70,7 @@ struct _GtkThemingEngine * or #GtkProgressBar. * @render_icon_pixbuf: Renders an icon as a #GdkPixbuf. * @render_icon: Renders an icon given as a #GdkPixbuf. + * @render_icon_surface: Renders an icon given as a #cairo_surface_t. * * Base class for theming engines. */ @@ -174,9 +175,14 @@ struct _GtkThemingEngineClass GdkPixbuf *pixbuf, gdouble x, gdouble y); + void (* render_icon_surface) (GtkThemingEngine *engine, + cairo_t *cr, + cairo_surface_t *surface, + gdouble x, + gdouble y); /*< private >*/ - gpointer padding[15]; + gpointer padding[14]; }; GDK_AVAILABLE_IN_ALL |