diff options
author | Matthias Clasen <mclasen@redhat.com> | 2008-05-29 14:33:49 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-05-29 14:33:49 +0000 |
commit | ee8253f908d2541321d72a0151fcfeb7446f7b8f (patch) | |
tree | aba76516a9370271ff86850367542c38b61a7d7b /gtk/gtkicontheme.h | |
parent | 24ac36693bebbd22416f91fc78c6fe189f953d94 (diff) | |
download | gtk+-ee8253f908d2541321d72a0151fcfeb7446f7b8f.tar.gz |
Bug 522084 – GIcon support for GtkIconTheme & GtkImage
2008-05-27 Matthias Clasen <mclasen@redhat.com>
Bug 522084 – GIcon support for GtkIconTheme & GtkImage
* gtk/gtkicontheme.[hc]: Add support for GIcon based lookups.
* gtk/gtkimage.[hc]: Allow setting an image from a GIcon.
* gtk/gtk.symbols: Additions
* tests/testimage.c: Add a GIcon test
svn path=/trunk/; revision=20236
Diffstat (limited to 'gtk/gtkicontheme.h')
-rw-r--r-- | gtk/gtkicontheme.h | 64 |
1 files changed, 37 insertions, 27 deletions
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h index 015000dc55..ec8154394c 100644 --- a/gtk/gtkicontheme.h +++ b/gtk/gtkicontheme.h @@ -73,15 +73,18 @@ struct _GtkIconThemeClass * @GTK_ICON_LOOKUP_GENERIC_FALLBACK: Try to shorten icon name at '-' * characters before looking at inherited themes. For more general * fallback, see gtk_icon_theme_choose_icon(). Since 2.12. + * @GTK_ICON_LOOKUP_FORCE_SIZE: Always return the icon scaled to the + * requested size. Since 2.14. * * Used to specify options for gtk_icon_theme_lookup_icon() **/ typedef enum { - GTK_ICON_LOOKUP_NO_SVG = 1 << 0, - GTK_ICON_LOOKUP_FORCE_SVG = 1 << 1, - GTK_ICON_LOOKUP_USE_BUILTIN = 1 << 2, - GTK_ICON_LOOKUP_GENERIC_FALLBACK = 1 << 3 + GTK_ICON_LOOKUP_NO_SVG = 1 << 0, + GTK_ICON_LOOKUP_FORCE_SVG = 1 << 1, + GTK_ICON_LOOKUP_USE_BUILTIN = 1 << 2, + GTK_ICON_LOOKUP_GENERIC_FALLBACK = 1 << 3, + GTK_ICON_LOOKUP_FORCE_SIZE = 1 << 4 } GtkIconLookupFlags; #define GTK_ICON_THEME_ERROR gtk_icon_theme_error_quark () @@ -149,6 +152,11 @@ GdkPixbuf * gtk_icon_theme_load_icon (GtkIconTheme GtkIconLookupFlags flags, GError **error); +GtkIconInfo * gtk_icon_theme_lookup_by_gicon (GtkIconTheme *icon_theme, + GIcon *icon, + gint size, + GtkIconLookupFlags flags); + GList * gtk_icon_theme_list_icons (GtkIconTheme *icon_theme, const gchar *context); GList * gtk_icon_theme_list_contexts (GtkIconTheme *icon_theme); @@ -156,29 +164,31 @@ char * gtk_icon_theme_get_example_icon_name (GtkIconTheme gboolean gtk_icon_theme_rescan_if_needed (GtkIconTheme *icon_theme); -void gtk_icon_theme_add_builtin_icon (const gchar *icon_name, - gint size, - GdkPixbuf *pixbuf); - -GType gtk_icon_info_get_type (void) G_GNUC_CONST; -GtkIconInfo *gtk_icon_info_copy (GtkIconInfo *icon_info); -void gtk_icon_info_free (GtkIconInfo *icon_info); - -gint gtk_icon_info_get_base_size (GtkIconInfo *icon_info); -G_CONST_RETURN gchar *gtk_icon_info_get_filename (GtkIconInfo *icon_info); -GdkPixbuf * gtk_icon_info_get_builtin_pixbuf (GtkIconInfo *icon_info); -GdkPixbuf * gtk_icon_info_load_icon (GtkIconInfo *icon_info, - GError **error); - -void gtk_icon_info_set_raw_coordinates (GtkIconInfo *icon_info, - gboolean raw_coordinates); - -gboolean gtk_icon_info_get_embedded_rect (GtkIconInfo *icon_info, - GdkRectangle *rectangle); -gboolean gtk_icon_info_get_attach_points (GtkIconInfo *icon_info, - GdkPoint **points, - gint *n_points); -G_CONST_RETURN gchar *gtk_icon_info_get_display_name (GtkIconInfo *icon_info); +void gtk_icon_theme_add_builtin_icon (const gchar *icon_name, + gint size, + GdkPixbuf *pixbuf); + +GType gtk_icon_info_get_type (void) G_GNUC_CONST; +GtkIconInfo * gtk_icon_info_copy (GtkIconInfo *icon_info); +void gtk_icon_info_free (GtkIconInfo *icon_info); + +GtkIconInfo * gtk_icon_info_new_for_pixbuf (GtkIconTheme *icon_theme, + GdkPixbuf *pixbuf); + +gint gtk_icon_info_get_base_size (GtkIconInfo *icon_info); +G_CONST_RETURN gchar *gtk_icon_info_get_filename (GtkIconInfo *icon_info); +GdkPixbuf * gtk_icon_info_get_builtin_pixbuf (GtkIconInfo *icon_info); +GdkPixbuf * gtk_icon_info_load_icon (GtkIconInfo *icon_info, + GError **error); +void gtk_icon_info_set_raw_coordinates (GtkIconInfo *icon_info, + gboolean raw_coordinates); + +gboolean gtk_icon_info_get_embedded_rect (GtkIconInfo *icon_info, + GdkRectangle *rectangle); +gboolean gtk_icon_info_get_attach_points (GtkIconInfo *icon_info, + GdkPoint **points, + gint *n_points); +G_CONST_RETURN gchar *gtk_icon_info_get_display_name (GtkIconInfo *icon_info); /* Non-public methods */ void _gtk_icon_theme_check_reload (GdkDisplay *display); |