elementary - deprecated APIs
[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  * Get the configured cache flush enabled state
56  *
57  * This gets the globally configured cache flush state - if it is enabled
58  * or not. When cache flushing is enabled, elementary will regularly
59  * (see elm_cache_flush_interval_get() ) flush caches and dump data out of
60  * memory and allow usage to re-seed caches and data in memory where it
61  * can do so. An idle application will thus minimize its memory usage as
62  * data will be freed from memory and not be re-loaded as it is idle and
63  * not rendering or doing anything graphically right now.
64  *
65  * @return The cache flush state
66  * @ingroup Caches
67  *
68  * @see elm_all_flush()
69  */
70 EAPI Eina_Bool elm_cache_flush_enabled_get(void);
71
72 /**
73  * Set the configured cache flush enabled state
74  *
75  * This sets the globally configured cache flush enabled state.
76  *
77  * @param enabled The cache flush enabled state
78  * @ingroup Caches
79  *
80  * @see elm_all_flush()
81  */
82 EAPI void      elm_cache_flush_enabled_set(Eina_Bool enabled);
83
84 /**
85  * Get the configured font cache size
86  *
87  * This gets the globally configured font cache size, in bytes.
88  *
89  * @return The font cache size
90  * @ingroup Caches
91  */
92 EAPI int       elm_font_cache_get(void);
93
94 /**
95  * Set the configured font cache size
96  *
97  * This sets the globally configured font cache size, in bytes
98  *
99  * @param size The font cache size
100  * @ingroup Caches
101  */
102 EAPI void      elm_font_cache_set(int size);
103
104 /**
105  * Get the configured image cache size
106  *
107  * This gets the globally configured image cache size, in bytes
108  *
109  * @return The image cache size
110  * @ingroup Caches
111  */
112 EAPI int       elm_image_cache_get(void);
113
114 /**
115  * Set the configured image cache size
116  *
117  * This sets the globally configured image cache size, in bytes
118  *
119  * @param size The image cache size
120  * @ingroup Caches
121  */
122 EAPI void      elm_image_cache_set(int size);
123
124
125 /**
126  * Get the configured edje file cache size.
127  *
128  * This gets the globally configured edje file cache size, in number
129  * of files.
130  *
131  * @return The edje file cache size
132  * @ingroup Caches
133  */
134 EAPI int       elm_edje_file_cache_get(void);
135
136 /**
137  * Set the configured edje file cache size
138  *
139  * This sets the globally configured edje file cache size, in number
140  * of files.
141  *
142  * @param size The edje file cache size
143  * @ingroup Caches
144  */
145 EAPI void      elm_edje_file_cache_set(int size);
146
147 /**
148  * Get the configured edje collections (groups) cache size.
149  *
150  * This gets the globally configured edje collections cache size, in
151  * number of collections.
152  *
153  * @return The edje collections cache size
154  * @ingroup Caches
155  */
156 EAPI int       elm_edje_collection_cache_get(void);
157
158 /**
159  * Set the configured edje collections (groups) cache size
160  *
161  * This sets the globally configured edje collections cache size, in
162  * number of collections.
163  *
164  * @param size The edje collections cache size
165  * @ingroup Caches
166  */
167 EAPI void      elm_edje_collection_cache_set(int size);
168
169 /**
170  * @}
171  */