Lines Matching full:the
37 * Create a cache object with the given parameters.
38 * @param cache_class The class of the cache. Currently only support one two builtin classes:
41 * @param node_size The node size is the size of the data stored in the cache..
42 …* @param max_size The max size is the maximum amount of memory or count that the cache can ho…
43 … - lv_cache_class_lru_rb_count: max_size is the maximum count of nodes in the cach…
44 …* - lv_cache_class_lru_rb_size: max_size is the maximum size of the cache i…
45 …* @param ops A set of operations that can be performed on the cache. See lv_cache_ops_t …
46 * @return Returns a pointer to the created cache object on success, `NULL` on error.
54 * @param cache The cache object pointer to destroy.
55 * @param user_data A user data pointer that will be passed to the free callback.
60 …* Acquire a cache entry with the given key. If entry not in cache, it will return `NULL` (not foun…
61 …* If the entry is found, it's priority will be changed by the cache's policy. And the `lv_cache_en…
62 * @param cache The cache object pointer to acquire the entry.
63 * @param key The key of the entry to acquire.
64 * @param user_data A user data pointer that will be passed to the create callback.
65 …* @return Returns a pointer to the acquired cache entry on success with `lv_cache_ent…
70 …* Acquire a cache entry with the given key. If the entry is not in the cache, it will create a new…
71 …* If the entry is found, it's priority will be changed by the cache's policy. And the `lv_cache_en…
72 …t to use this API to simplify the code, you should provide a `lv_cache_ops_t::create_cb` that crea…
73 …* This API is a combination of lv_cache_acquire() and lv_cache_add(). The effect is the same as ca…
74 * And the internal impact on cache is also consistent with these two APIs.
75 * @param cache The cache object pointer to acquire the entry.
76 * @param key The key of the entry to acquire or create.
77 * @param user_data A user data pointer that will be passed to the create callback.
78 …* @return Returns a pointer to the acquired or created cache entry on success with `l…
83 …* Add a new cache entry with the given key and data. If the cache is full, the cache's policy will…
84 * @param cache The cache object pointer to add the entry.
85 * @param key The key of the entry to add.
86 * @param user_data A user data pointer that will be passed to the create callback.
87 …* @return Returns a pointer to the added cache entry on success with `lv_cache_entry_…
92 …* Release a cache entry. The `lv_cache_entry_t::ref_cnt` will be decremented. If the `lv_cache_ent…
93 …f the entry passed to this function is the last reference to the data and the entry is marked as i…
94 * @param cache The cache object pointer to release the entry.
95 * @param entry The cache entry pointer to release.
96 * @param user_data A user data pointer that will be passed to the free callback.
101 …* Reserve a certain amount of memory/count in the cache. This function is useful when you want to …
103 …* When the current cache size is max than the reserved size, the function will evict entries until…
104 * @param cache The cache object pointer to reserve.
105 * @param reserved_size The amount of memory/count to reserve.
106 * @param user_data A user data pointer that will be passed to the free callback.
111 …* Drop a cache entry with the given key. If the entry is not in the cache, nothing will happen to …
112 …* If the entry is found, it will be removed from the cache and its data will be freed when the las…
113 …* @note The data will not be freed immediately but when the last reference to it is released. But …
115 * @param cache The cache object pointer to drop the entry.
116 * @param key The key of the entry to drop.
117 * @param user_data A user data pointer that will be passed to the free callback.
122 … all cache entries. All entries will be removed from the cache and their data will be freed when t…
124 * @param cache The cache object pointer to drop all entries.
125 * @param user_data A user data pointer that will be passed to the free callback.
130 * Evict one entry from the cache. The eviction policy will be used to select the entry to evict.
131 * @param cache The cache object pointer to evict an entry.
132 * @param user_data A user data pointer that will be passed to the free callback.
138 * Set the maximum size of the cache.
139 …* If the current cache size is greater than the new maximum size, the cache's policy will be used …
140 * If set to 0, the cache will be disabled.
141 * @note But this behavior will happen only new entries are added to the cache.
142 * @param cache The cache object pointer to set the maximum size.
143 * @param max_size The new maximum size of the cache.
144 * @param user_data A user data pointer that will be passed to the free callback.
149 * Get the maximum size of the cache.
150 * @param cache The cache object pointer to get the maximum size.
151 * @param user_data A user data pointer that will be passed to the free callback.
152 * @return Returns the maximum size of the cache.
157 * Get the current size of the cache.
158 * @param cache The cache object pointer to get the current size.
159 * @param user_data A user data pointer that will be passed to the free callback.
160 * @return Returns the current size of the cache.
165 * Get the free size of the cache.
166 * @param cache The cache object pointer to get the free size.
167 * @param user_data A user data pointer that will be passed to the free callback.
168 * @return Returns the free size of the cache.
173 * Return true if the cache is enabled.
174 …* Disabled cache means that when the max_size of the cache is 0. In this case, all cache operation…
175 * @param cache The cache object pointer to check if it's disabled.
176 * @return Returns true if the cache is enabled, false otherwise.
181 * Set the compare callback of the cache.
182 * @param cache The cache object pointer to set the compare callback.
183 * @param compare_cb The compare callback to set.
189 * Set the create callback of the cache.
190 * @param cache The cache object pointer to set the create callback.
191 * @param alloc_cb The create callback to set.
197 * Set the free callback of the cache.
198 * @param cache The cache object pointer to set the free callback.
199 * @param free_cb The free callback to set.
205 * Give a name for a cache object. Only the pointer of the string is saved.
206 * @param cache The cache object pointer to set the name.
207 * @param name The name of the cache.
212 * Get the name of a cache object.
213 * @param cache The cache object pointer to get the name.
214 * @return Returns the name of the cache.
219 * Create an iterator for the cache object. The iterator is used to iterate over all cache entries.
220 * @param cache The cache object pointer to create the iterator.
221 * @return Returns a pointer to the created iterator on success, `NULL` on error.