elm cache: elm_all_flush() -> elm_cache_all_flush()
[framework/uifw/elementary.git] / src / lib / elm_cache.h
1 /**
2  * @defgroup Caches Caches
3  *
4  * These are functions which let one fine-tune some cache values for
5  * Elementary applications, thus allowing for performance adjustments.
6  *
7  * @{
8  */
9
10 /**
11  * @brief Flush all caches.
12  *
13  * Frees all data that was in cache and is not currently being used to reduce
14  * memory usage. This frees Edje's, Evas' and Eet's cache. This is equivalent
15  * to calling all of the following functions:
16  * @li edje_file_cache_flush()
17  * @li edje_collection_cache_flush()
18  * @li eet_clearcache()
19  * @li evas_image_cache_flush()
20  * @li evas_font_cache_flush()
21  * @li evas_render_dump()
22  * @note Evas caches are flushed for every canvas associated with a window.
23  *
24  * @ingroup Caches
25  */
26 EAPI void      elm_cache_all_flush(void);
27
28 /**
29  * Get the configured cache flush interval time
30  *
31  * This gets the globally configured cache flush interval time, in
32  * ticks
33  *
34  * @return The cache flush interval time
35  * @ingroup Caches
36  *
37  * @see elm_all_flush()
38  */
39 EAPI int       elm_cache_flush_interval_get(void);
40
41 /**
42  * Set the configured cache flush interval time
43  *
44  * This sets the globally configured cache flush interval time, in ticks
45  *
46  * @param size The cache flush interval time
47  * @ingroup Caches
48  *
49  * @see elm_all_flush()
50  */
51 EAPI void      elm_cache_flush_interval_set(int size);
52
53 /**
54  * Get the configured cache flush enabled state
55  *
56  * This gets the globally configured cache flush state - if it is enabled
57  * or not. When cache flushing is enabled, elementary will regularly
58  * (see elm_cache_flush_interval_get() ) flush caches and dump data out of
59  * memory and allow usage to re-seed caches and data in memory where it
60  * can do so. An idle application will thus minimize its memory usage as
61  * data will be freed from memory and not be re-loaded as it is idle and
62  * not rendering or doing anything graphically right now.
63  *
64  * @return The cache flush state
65  * @ingroup Caches
66  *
67  * @see elm_all_flush()
68  */
69 EAPI Eina_Bool elm_cache_flush_enabled_get(void);
70
71 /**
72  * Set the configured cache flush enabled state
73  *
74  * This sets the globally configured cache flush enabled state.
75  *
76  * @param enabled The cache flush enabled state
77  * @ingroup Caches
78  *
79  * @see elm_all_flush()
80  */
81 EAPI void      elm_cache_flush_enabled_set(Eina_Bool enabled);
82
83 /**
84  * Get the configured font cache size
85  *
86  * This gets the globally configured font cache size, in bytes.
87  *
88  * @return The font cache size
89  * @ingroup Caches
90  */
91 EAPI int       elm_font_cache_get(void);
92
93 /**
94  * Set the configured font cache size
95  *
96  * This sets the globally configured font cache size, in bytes
97  *
98  * @param size The font cache size
99  * @ingroup Caches
100  */
101 EAPI void      elm_font_cache_set(int size);
102
103 /**
104  * Get the configured image cache size
105  *
106  * This gets the globally configured image cache size, in bytes
107  *
108  * @return The image cache size
109  * @ingroup Caches
110  */
111 EAPI int       elm_image_cache_get(void);
112
113 /**
114  * Set the configured image cache size
115  *
116  * This sets the globally configured image cache size, in bytes
117  *
118  * @param size The image cache size
119  * @ingroup Caches
120  */
121 EAPI void      elm_image_cache_set(int size);
122
123
124 /**
125  * Get the configured edje file cache size.
126  *
127  * This gets the globally configured edje file cache size, in number
128  * of files.
129  *
130  * @return The edje file cache size
131  * @ingroup Caches
132  */
133 EAPI int       elm_edje_file_cache_get(void);
134
135 /**
136  * Set the configured edje file cache size
137  *
138  * This sets the globally configured edje file cache size, in number
139  * of files.
140  *
141  * @param size The edje file cache size
142  * @ingroup Caches
143  */
144 EAPI void      elm_edje_file_cache_set(int size);
145
146 /**
147  * Get the configured edje collections (groups) cache size.
148  *
149  * This gets the globally configured edje collections cache size, in
150  * number of collections.
151  *
152  * @return The edje collections cache size
153  * @ingroup Caches
154  */
155 EAPI int       elm_edje_collection_cache_get(void);
156
157 /**
158  * Set the configured edje collections (groups) cache size
159  *
160  * This sets the globally configured edje collections cache size, in
161  * number of collections.
162  *
163  * @param size The edje collections cache size
164  * @ingroup Caches
165  */
166 EAPI void      elm_edje_collection_cache_set(int size);
167
168 /**
169  * @}
170  */