|
Functions |
Etk_Cache * | etk_cache_new (int size) |
| Creates a new cache system that you can use to cache image objects or Edje objects. You usually don't need to use that, except if you are implementing your own widget or your own tree model which may need to load a lot of images efficiently.
|
void | etk_cache_destroy (Etk_Cache *cache) |
| Destroys the cache system: it destroys all the cached objects, and frees the memory used by the cache system.
|
void | etk_cache_clear (Etk_Cache *cache) |
| Clears the cache system: it destroys all the cached objects. The cache system remains still usable.
|
void | etk_cache_free_callback_set (Etk_Cache *cache, void(*free_cb)(Evas_Object *object, void *data), void *data) |
| Sets the callback to call when a cached object is deleted (if it is there is no more space in the cache, or if the cache is being cleared).
|
void | etk_cache_size_set (Etk_Cache *cache, int size) |
| Sets the max number of objects that the cache system can contain. If the new size is smaller than current number of objects in the cache, the oldest objects that can't fit in the new cache size will be destroyed.
|
int | etk_cache_size_get (Etk_Cache *cache) |
| Gets the max number of objects that can be stored by the cache system.
|
int | etk_cache_num_objects_get (Etk_Cache *cache) |
| Gets the current number of objects stored in the cache system.
|
void | etk_cache_add (Etk_Cache *cache, Evas_Object *object, const char *filename, const char *key) |
| Adds an Evas image object or an Edje object in the cache system. If the cache is already full, the oldest object will be removed. The object to cache will also be automatically hidden.
|
void | etk_cache_remove (Etk_Cache *cache, Evas_Object *object) |
| Removes an object from the cache. The object won't be destroyed.
|
Evas_Object * | etk_cache_find (Etk_Cache *cache, const char *filename, const char *key) |
| Finds an object in the cache according to its filename and its key. If the object is present in the cache, it will be removed from the cache and returned. Otherwise NULL is returned.
|