lv_cache_entry.h

API reference for lv_cache_entry.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_cache_entry_private.h
Summary

Functions

lv_cache_entry_get_size

Get the size of a cache entry.

 
uint32_t lv_cache_entry_get_size(const uint32_t node_size)
Parameters
NameTypeDescription
node_sizeconst uint32_tThe size of the node in the cache.

Returns: uint32_t — The size of the cache entry.

lv_cache_entry_get_ref

Get the reference count of a cache entry.

 
int32_t lv_cache_entry_get_ref(lv_cache_entry_t *entry)
Parameters
NameTypeDescription
entrylv_cache_entry_t *The cache entry to get the reference count of.

Returns: int32_t — The reference count of the cache entry.

lv_cache_entry_get_node_size

Get the node size of a cache entry. Which is the same size with lv_cache_entry_get_size()'s node_size parameter.

 
uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t *entry)
Parameters
NameTypeDescription
entrylv_cache_entry_t *The cache entry to get the node size of.

Returns: uint32_t — The node size of the cache entry.

lv_cache_entry_get_data

Get the data of a cache entry.

 
void * lv_cache_entry_get_data(lv_cache_entry_t *entry)
Parameters
NameTypeDescription
entrylv_cache_entry_t *The cache entry to get the data of.

Returns: void * — The pointer to the data of the cache entry.

lv_cache_entry_get_entry

Get the cache entry of a data. The data should be allocated by the cache instance.

 
lv_cache_entry_t * lv_cache_entry_get_entry(void *data, const uint32_t node_size)
Parameters
NameTypeDescription
datavoid *The data to get the cache entry of.
node_sizeconst uint32_tThe size of the node in the cache.

Returns: lv_cache_entry_t * — The pointer to the cache entry of the data.

Dependencies

Last updated on

On this page