diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-11-04 15:43:40 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-11-04 15:43:40 +0000 |
commit | b983d1c6a7833ce85fe53eee0d7b15bd03aad585 (patch) | |
tree | 093dd7272edec179393defc86c8ee11ca6c08f89 /gtk/gtkiconcache.h | |
parent | 99633ce5358189eec090d9a72655b777396762b0 (diff) | |
download | gtk+-b983d1c6a7833ce85fe53eee0d7b15bd03aad585.tar.gz |
Store builtin stock icons in an icon cache, instead of populating a hash
2005-11-04 Matthias Clasen <mclasen@redhat.com>
Store builtin stock icons in an icon cache, instead of
populating a hash table with pixbufs at startup, to save both
memory and startup time.
* gtk/stock-icons/*: Reorganize the icons in a directory structure
suitable for gtk-update-icon-cache, and rename them to match the
stock ids.
* gtk/gtkiconcache.[hc]: Support non-mmapped icon caches, and
add _gtk_icon_cache_has_icon_in_directory().
* gtk/updateiconcache.c: Support a --source <VARIABLE> argument
to store the contents of the icon cache in a C header.
* gtk/gtkbuiltincache.h: Generated private header which contains
the icon cache for the builtin icons.
* gtk/gtkicontheme.c: Create a GtkIconCache for the builtin
icons, and use that in addition to the hash table whenever
builtin icons are searched.
* gtk/gtkiconfactory.c: Add GTK_ICON_SOURCE_STATIC_ICON_NAME and
use it for static stock ids.
(get_default_icons): Don't add the builtin
icons to the icon theme, just register the stock ids.
(render_fallback_image): Take the fallback image out of the
builtin icon cache.
* gtk/Makefile.am: Remove stock-icons from SUBDIRS and add
the necessary machinery to rebuild gtkbuiltincache.h.
Diffstat (limited to 'gtk/gtkiconcache.h')
-rw-r--r-- | gtk/gtkiconcache.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkiconcache.h b/gtk/gtkiconcache.h index 134a3ab317..c404d16d7c 100644 --- a/gtk/gtkiconcache.h +++ b/gtk/gtkiconcache.h @@ -36,11 +36,15 @@ struct _GtkIconData gchar *display_name; }; +GtkIconCache *_gtk_icon_cache_new (const gchar *data); GtkIconCache *_gtk_icon_cache_new_for_path (const gchar *path); gboolean _gtk_icon_cache_has_directory (GtkIconCache *cache, const gchar *directory); gboolean _gtk_icon_cache_has_icon (GtkIconCache *cache, const gchar *icon_name); +gboolean _gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache, + const gchar *icon_name, + const gchar *directory); void _gtk_icon_cache_add_icons (GtkIconCache *cache, const gchar *directory, GHashTable *hash_table); |