Fix rating menu.
[gmpc.git] / src / Tools / pixbuf-cache.h
blob2fda4c41ecbc61ac7f133a1b0d1753af68da96e1
1 #ifndef __PIXBUF_CACHE_H__
2 #define __PIXBUF_CACHE_H__
5 typedef enum {
6 COVER_SMALL,
7 COVER_DEFAULT,
8 COVER_LARGE,
9 COVER_BROWSER,
10 COVER_TOOLTIP,
11 NUM_COVER_SIZES
12 }CoverSize;
15 int pixbuf_cache_get_closest_size(int size);
16 /**
17 * Destroy the pixbuf cache.
19 * Removes all entries from the cache.
21 void pixbuf_cache_destroy(void);
23 /**
24 * Create the pixbuf cache. This needs to be called before add_iocn,lookup_icon, invalidate and destroy
26 void pixbuf_cache_create(void);
28 /**
29 * @param size the size of the icon.
30 * @param mdd the md5 off the icon (16 bytes).
31 * @param pb the pixbuf.
33 * Add an icon to the pixbuf cache
35 void pixbuf_cache_add_icon(int size,const gchar *mdd, GdkPixbuf *pb);
36 /**
37 * @param size the size of the icon
38 * @param mdd the md5 off the icon (16 bytes).
40 * Lookup an icon in the pixbuf cache.
42 * @return If found returns the pixbuf. (no reference added)
44 GdkPixbuf *pixbuf_cache_lookup_icon(int size, const gchar *mdd);
46 /**
47 * @brief clear the pixbuf cache.
49 void pixbuf_cache_clear(void);
50 #endif