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