icon factory: Add gtk_icon_set_render_icon_surface

Support scales when falling back to loading icons from the
icon theme.

In order to actually render scaled icons we add
gtk_icon_set_render_icon_surface which renders to a cairo_surface_t
which includes whatever scaling you need for scaled icons.
This commit is contained in:
Alexander Larsson
2013-06-25 13:59:51 +02:00
parent 91a268f00e
commit 635ae9bd91
2 changed files with 119 additions and 44 deletions

View File

@ -885,6 +885,13 @@ GDK_AVAILABLE_IN_ALL
GdkPixbuf * gtk_icon_set_render_icon_pixbuf (GtkIconSet *icon_set,
GtkStyleContext *context,
GtkIconSize size);
GDK_AVAILABLE_IN_3_10
cairo_surface_t *
gtk_icon_set_render_icon_surface (GtkIconSet *icon_set,
GtkStyleContext *context,
GtkIconSize size,
int scale,
GdkWindow *for_window);
GDK_AVAILABLE_IN_ALL
void gtk_style_context_set_screen (GtkStyleContext *context,