2009-05-13 14:06:24 -04:00
|
|
|
#ifndef __SHELL_TEXTURE_CACHE_H__
|
|
|
|
#define __SHELL_TEXTURE_CACHE_H__
|
|
|
|
|
|
|
|
#include <gio/gio.h>
|
2009-07-16 17:44:50 -04:00
|
|
|
#include <gtk/gtk.h>
|
2009-07-08 21:06:06 -04:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2009-05-13 14:06:24 -04:00
|
|
|
#include <clutter/clutter.h>
|
|
|
|
|
|
|
|
#define SHELL_TYPE_TEXTURE_CACHE (shell_texture_cache_get_type ())
|
|
|
|
#define SHELL_TEXTURE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_TEXTURE_CACHE, ShellTextureCache))
|
|
|
|
#define SHELL_TEXTURE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_TEXTURE_CACHE, ShellTextureCacheClass))
|
|
|
|
#define SHELL_IS_TEXTURE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_TEXTURE_CACHE))
|
|
|
|
#define SHELL_IS_TEXTURE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_TEXTURE_CACHE))
|
|
|
|
#define SHELL_TEXTURE_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_TEXTURE_CACHE, ShellTextureCacheClass))
|
|
|
|
|
|
|
|
typedef struct _ShellTextureCache ShellTextureCache;
|
|
|
|
typedef struct _ShellTextureCacheClass ShellTextureCacheClass;
|
|
|
|
|
|
|
|
typedef struct _ShellTextureCachePrivate ShellTextureCachePrivate;
|
|
|
|
|
|
|
|
struct _ShellTextureCache
|
|
|
|
{
|
|
|
|
GObject parent;
|
|
|
|
|
|
|
|
ShellTextureCachePrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _ShellTextureCacheClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2009-07-16 17:44:50 -04:00
|
|
|
typedef enum {
|
|
|
|
SHELL_TEXTURE_CACHE_POLICY_NONE,
|
|
|
|
SHELL_TEXTURE_CACHE_POLICY_FOREVER
|
|
|
|
} ShellTextureCachePolicy;
|
|
|
|
|
2009-05-13 14:06:24 -04:00
|
|
|
GType shell_texture_cache_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2009-08-06 16:39:15 -04:00
|
|
|
ShellTextureCache* shell_texture_cache_get_default (void);
|
2009-05-13 14:06:24 -04:00
|
|
|
|
2009-08-14 04:33:45 -04:00
|
|
|
ClutterActor *shell_texture_cache_bind_pixbuf_property (ShellTextureCache *cache,
|
|
|
|
GObject *object,
|
|
|
|
const char *property_name);
|
|
|
|
|
2009-07-30 00:17:25 -04:00
|
|
|
ClutterActor *shell_texture_cache_load_icon_name (ShellTextureCache *cache,
|
|
|
|
const char *name,
|
|
|
|
gint size);
|
|
|
|
|
2009-05-13 14:06:24 -04:00
|
|
|
ClutterActor *shell_texture_cache_load_gicon (ShellTextureCache *cache,
|
|
|
|
GIcon *icon,
|
|
|
|
gint size);
|
|
|
|
|
2009-07-08 21:06:06 -04:00
|
|
|
ClutterActor *shell_texture_cache_load_thumbnail (ShellTextureCache *cache,
|
|
|
|
int size,
|
|
|
|
const char *uri,
|
2009-07-16 17:44:50 -04:00
|
|
|
const char *mimetype);
|
|
|
|
|
|
|
|
ClutterActor *shell_texture_cache_load_recent_thumbnail (ShellTextureCache *cache,
|
|
|
|
int size,
|
|
|
|
GtkRecentInfo *info);
|
|
|
|
|
|
|
|
void shell_texture_cache_evict_thumbnail (ShellTextureCache *cache,
|
|
|
|
int size,
|
|
|
|
const char *uri);
|
2009-07-08 21:06:06 -04:00
|
|
|
|
2009-07-16 17:44:50 -04:00
|
|
|
void shell_texture_cache_evict_recent_thumbnail (ShellTextureCache *cache,
|
|
|
|
int size,
|
|
|
|
GtkRecentInfo *info);
|
2009-07-08 21:06:06 -04:00
|
|
|
|
2009-05-13 14:06:24 -04:00
|
|
|
ClutterActor *shell_texture_cache_load_uri_async (ShellTextureCache *cache,
|
|
|
|
const gchar *filename,
|
|
|
|
int available_width,
|
|
|
|
int available_height);
|
|
|
|
|
|
|
|
ClutterActor *shell_texture_cache_load_uri_sync (ShellTextureCache *cache,
|
2009-07-16 17:44:50 -04:00
|
|
|
ShellTextureCachePolicy policy,
|
2009-05-13 14:06:24 -04:00
|
|
|
const gchar *filename,
|
|
|
|
int available_width,
|
|
|
|
int available_height,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
#endif /* __SHELL_TEXTURE_CACHE_H__ */
|