]> Pileus Git - ~andy/gtk/blob - gtk/gtkiconcache.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkiconcache.h
1 /* gtkiconcache.h
2  * Copyright (C) 2004  Anders Carlsson <andersca@gnome.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16  */
17 #ifndef __GTK_ICON_CACHE_H__
18 #define __GTK_ICON_CACHE_H__
19
20 #include <gdk-pixbuf/gdk-pixbuf.h>
21 #include <gdk/gdk.h>
22
23 typedef struct _GtkIconCache GtkIconCache;
24 typedef struct _GtkIconData GtkIconData;
25
26 struct _GtkIconData
27 {
28   gboolean has_embedded_rect;
29   gint x0, y0, x1, y1;
30   
31   GdkPoint *attach_points;
32   gint n_attach_points;
33
34   gchar *display_name;
35 };
36
37 GtkIconCache *_gtk_icon_cache_new            (const gchar  *data);
38 GtkIconCache *_gtk_icon_cache_new_for_path   (const gchar  *path);
39 gint          _gtk_icon_cache_get_directory_index  (GtkIconCache *cache,
40                                                     const gchar  *directory);
41 gboolean      _gtk_icon_cache_has_icon       (GtkIconCache *cache,
42                                               const gchar  *icon_name);
43 gboolean      _gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
44                                                      const gchar  *icon_name,
45                                                      const gchar  *directory);
46 void          _gtk_icon_cache_add_icons      (GtkIconCache *cache,
47                                               const gchar  *directory,
48                                               GHashTable   *hash_table);
49
50 gint          _gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
51                                               const gchar  *icon_name,
52                                               gint          directory_index);
53 GdkPixbuf    *_gtk_icon_cache_get_icon       (GtkIconCache *cache,
54                                               const gchar  *icon_name,
55                                               gint          directory_index);
56 GtkIconData  *_gtk_icon_cache_get_icon_data  (GtkIconCache *cache,
57                                               const gchar  *icon_name,
58                                               gint          directory_index);
59
60 GtkIconCache *_gtk_icon_cache_ref            (GtkIconCache *cache);
61 void          _gtk_icon_cache_unref          (GtkIconCache *cache);
62
63
64 #endif /* __GTK_ICON_CACHE_H__ */