Merge remote-tracking branch 'remotes/origin/upstream'
[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 <<<<<<< HEAD
27 // XXX: rename: elm_cache_all_flush()
28 EAPI void      elm_all_flush(void);
29
30 /**
31  * Get the configured cache flush interval time
32  *
33  * This gets the globally configured cache flush interval time, in
34  * ticks
35  *
36  * @return The cache flush interval time
37  * @ingroup Caches
38  *
39  * @see elm_all_flush()
40  */
41 EAPI int       elm_cache_flush_interval_get(void);
42
43 /**
44  * Set the configured cache flush interval time
45  *
46  * This sets the globally configured cache flush interval time, in ticks
47  *
48  * @param size The cache flush interval time
49  * @ingroup Caches
50  *
51  * @see elm_all_flush()
52  */
53 EAPI void      elm_cache_flush_interval_set(int size);
54
55 /**
56  * Set the configured cache flush interval time for all applications on the
57  * display
58  *
59  * This sets the globally configured cache flush interval time -- in ticks
60  * -- for all applications on the display.
61  *
62  * @param size The cache flush interval time
63  * @ingroup Caches
64  */
65 // XXX: deprecate and replace with elm_config_all_flush()
66 EAPI void      elm_cache_flush_interval_all_set(int size);
67
68 /**
69  * Get the configured cache flush enabled state
70  *
71  * This gets the globally configured cache flush state - if it is enabled
72  * or not. When cache flushing is enabled, elementary will regularly
73  * (see elm_cache_flush_interval_get() ) flush caches and dump data out of
74  * memory and allow usage to re-seed caches and data in memory where it
75  * can do so. An idle application will thus minimise its memory usage as
76  * data will be freed from memory and not be re-loaded as it is idle and
77  * not rendering or doing anything graphically right now.
78  *
79  * @return The cache flush state
80  * @ingroup Caches
81  *
82  * @see elm_all_flush()
83  */
84 EAPI Eina_Bool elm_cache_flush_enabled_get(void);
85
86 /**
87  * Set the configured cache flush enabled state
88  *
89  * This sets the globally configured cache flush enabled state.
90  *
91  * @param enabled The cache flush enabled state
92  * @ingroup Caches
93  *
94  * @see elm_all_flush()
95  */
96 EAPI void      elm_cache_flush_enabled_set(Eina_Bool enabled);
97
98 /**
99  * Set the configured cache flush enabled state for all applications on the
100  * display
101  *
102  * This sets the globally configured cache flush enabled state for all
103  * applications on the display.
104  *
105  * @param enabled The cache flush enabled state
106  * @ingroup Caches
107  */
108 // XXX: deprecate and replace with elm_config_all_flush()
109 EAPI void      elm_cache_flush_enabled_all_set(Eina_Bool enabled);
110
111 /**
112  * Get the configured font cache size
113  *
114  * This gets the globally configured font cache size, in bytes.
115  *
116  * @return The font cache size
117  * @ingroup Caches
118  */
119 EAPI int       elm_font_cache_get(void);
120
121 /**
122  * Set the configured font cache size
123  *
124  * This sets the globally configured font cache size, in bytes
125  *
126  * @param size The font cache size
127  * @ingroup Caches
128  */
129 EAPI void      elm_font_cache_set(int size);
130
131 /**
132  * Set the configured font cache size for all applications on the
133  * display
134  *
135  * This sets the globally configured font cache size -- in bytes
136  * -- for all applications on the display.
137  *
138  * @param size The font cache size
139  * @ingroup Caches
140  */
141 // XXX: deprecate and replace with elm_config_all_flush()
142 EAPI void      elm_font_cache_all_set(int size);
143
144 /**
145  * Get the configured image cache size
146  *
147  * This gets the globally configured image cache size, in bytes
148  *
149  * @return The image cache size
150  * @ingroup Caches
151  */
152 EAPI int       elm_image_cache_get(void);
153
154 /**
155  * Set the configured image cache size
156  *
157  * This sets the globally configured image cache size, in bytes
158  *
159  * @param size The image cache size
160  * @ingroup Caches
161  */
162 EAPI void      elm_image_cache_set(int size);
163
164 /**
165  * Set the configured image cache size for all applications on the
166  * display
167  *
168  * This sets the globally configured image cache size -- in bytes
169  * -- for all applications on the display.
170  *
171  * @param size The image cache size
172  * @ingroup Caches
173  */
174 // XXX: deprecate and replace with elm_config_all_flush()
175 EAPI void      elm_image_cache_all_set(int size);
176
177 /**
178  * Get the configured edje file cache size.
179  *
180  * This gets the globally configured edje file cache size, in number
181  * of files.
182  *
183  * @return The edje file cache size
184  * @ingroup Caches
185  */
186 EAPI int       elm_edje_file_cache_get(void);
187
188 /**
189  * Set the configured edje file cache size
190  *
191  * This sets the globally configured edje file cache size, in number
192  * of files.
193  *
194  * @param size The edje file cache size
195  * @ingroup Caches
196  */
197 EAPI void      elm_edje_file_cache_set(int size);
198
199 /**
200  * Set the configured edje file cache size for all applications on the
201  * display
202  *
203  * This sets the globally configured edje file cache size -- in number
204  * of files -- for all applications on the display.
205  *
206  * @param size The edje file cache size
207  * @ingroup Caches
208  */
209 // XXX: deprecate and replace with elm_config_all_flush()
210 EAPI void      elm_edje_file_cache_all_set(int size);
211
212 /**
213  * Get the configured edje collections (groups) cache size.
214  *
215  * This gets the globally configured edje collections cache size, in
216  * number of collections.
217  *
218  * @return The edje collections cache size
219  * @ingroup Caches
220  */
221 EAPI int       elm_edje_collection_cache_get(void);
222
223 /**
224  * Set the configured edje collections (groups) cache size
225  *
226  * This sets the globally configured edje collections cache size, in
227  * number of collections.
228  *
229  * @param size The edje collections cache size
230  * @ingroup Caches
231  */
232 EAPI void      elm_edje_collection_cache_set(int size);
233
234 /**
235  * Set the configured edje collections (groups) cache size for all
236  * applications on the display
237  *
238  * This sets the globally configured edje collections cache size -- in
239  * number of collections -- for all applications on the display.
240  *
241  * @param size The edje collections cache size
242  * @ingroup Caches
243  */
244 // XXX: deprecate and replace with elm_config_all_flush()
245 EAPI void      elm_edje_collection_cache_all_set(int size);
246 =======
247 EAPI void      elm_cache_all_flush(void);
248 >>>>>>> remotes/origin/upstream
249
250 /**
251  * @}
252  */