Commit Graph

7 Commits

Author SHA1 Message Date
Matthias Clasen
7e40d74b0b GtkIconHelper: Change setters to return success
This makes it easier to avoid redundant notifications in users.
2014-06-09 13:31:04 -04:00
Alexander Larsson
9bde6b10ef gtkiconhelper: Add _gtk_icon_helper_ensure_surface to private header 2013-08-07 13:34:10 +02:00
Alexander Larsson
031e1a98a0 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.
2013-07-03 14:39:26 +02:00
Alexander Larsson
5d8fd4ee24 GtkIconHelper: Add set_window()
This is a hint on where the icon will be drawn. It
will allow us to pre-allocate cairo surfaces for the right
target.
2013-07-03 14:39:25 +02:00
Carlos Garnacho
b5d45a9edc Add API to force a GtkIconHelper pixbuf rescaling
This API is handy in entries and status icons, where the size is
limited and independent of the pixbuf size
2012-07-13 16:56:37 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Cosimo Cecchi
b5d8d2c4a8 icon-helper: add GtkIconHelper private object
GtkIconHelper is a helper object to easily obtain a pixbuf from
different icon sources (e.g. a GIcon, an icon name, a stock id, ...).

Code is ported from GtkImage, which will be adapted in the next commit.
2011-11-30 16:39:59 -05:00