fix(docs): fix Doxygen warnings caused by format errors (#6584)

This commit is contained in:
Victor Wheeler
2024-08-07 00:40:10 -06:00
committed by GitHub
parent 7e3be59dda
commit c98fb29dea
20 changed files with 109 additions and 90 deletions
-1
View File
@@ -203,7 +203,6 @@ bool lv_group_get_editing(const lv_group_t * group);
/** /**
* Get whether focus next/prev will allow wrapping from first->last or last->first object. * Get whether focus next/prev will allow wrapping from first->last or last->first object.
* @param group pointer to group * @param group pointer to group
* @param en true: wrapping enabled; false: wrapping disabled
*/ */
bool lv_group_get_wrap(lv_group_t * group); bool lv_group_get_wrap(lv_group_t * group);
-1
View File
@@ -157,7 +157,6 @@ lv_result_t lv_obj_set_properties(lv_obj_t * obj, const lv_property_t * value, u
* If id is a style property, the style selector is default to 0. * If id is a style property, the style selector is default to 0.
* @param obj pointer to an object * @param obj pointer to an object
* @param id ID of which property to read * @param id ID of which property to read
* @param value pointer to a buffer to store the value
* @return return the property value read. The returned property ID is set to `LV_PROPERTY_ID_INVALID` if failed. * @return return the property value read. The returned property ID is set to `LV_PROPERTY_ID_INVALID` if failed.
*/ */
lv_property_t lv_obj_get_property(lv_obj_t * obj, lv_prop_id_t id); lv_property_t lv_obj_get_property(lv_obj_t * obj, lv_prop_id_t id);
-1
View File
@@ -93,7 +93,6 @@ lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t * obj);
/** /**
* Get the object in which directions can be scrolled * Get the object in which directions can be scrolled
* @param obj pointer to an object * @param obj pointer to an object
* @param dir the allow scroll directions. An element or OR-ed values of `lv_dir_t`
*/ */
lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t * obj); lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t * obj);
+23 -7
View File
@@ -43,8 +43,13 @@ typedef uint32_t lv_style_selector_t;
* @param obj pointer to an object * @param obj pointer to an object
* @param style pointer to a style to add * @param style pointer to a style to add
* @param selector OR-ed value of parts and state to which the style should be added * @param selector OR-ed value of parts and state to which the style should be added
* @example lv_obj_add_style(btn, &style_btn, 0); //Default button style *
* @example lv_obj_add_style(btn, &btn_red, LV_STATE_PRESSED); //Overwrite only some colors to red when pressed * Examples:
* @code
* lv_obj_add_style(btn, &style_btn, 0); //Default button style
*
* lv_obj_add_style(btn, &btn_red, LV_STATE_PRESSED); //Overwrite only some colors to red when pressed
* @endcode
*/ */
void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector);
@@ -54,8 +59,13 @@ void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selecto
* @param old_style pointer to a style to replace. * @param old_style pointer to a style to replace.
* @param new_style pointer to a style to replace the old style with. * @param new_style pointer to a style to replace the old style with.
* @param selector OR-ed values of states and a part to replace only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used * @param selector OR-ed values of states and a part to replace only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used
* @example lv_obj_replace_style(obj, &yellow_style, &blue_style, LV_PART_ANY | LV_STATE_ANY); //Replace a specific style *
* @example lv_obj_replace_style(obj, &yellow_style, &blue_style, LV_PART_MAIN | LV_STATE_PRESSED); //Replace a specific style assigned to the main part when it is pressed * Examples:
* @code
* lv_obj_replace_style(obj, &yellow_style, &blue_style, LV_PART_ANY | LV_STATE_ANY); //Replace a specific style
*
* lv_obj_replace_style(obj, &yellow_style, &blue_style, LV_PART_MAIN | LV_STATE_PRESSED); //Replace a specific style assigned to the main part when it is pressed
* @endcode
*/ */
bool lv_obj_replace_style(lv_obj_t * obj, const lv_style_t * old_style, const lv_style_t * new_style, bool lv_obj_replace_style(lv_obj_t * obj, const lv_style_t * old_style, const lv_style_t * new_style,
lv_style_selector_t selector); lv_style_selector_t selector);
@@ -65,9 +75,15 @@ bool lv_obj_replace_style(lv_obj_t * obj, const lv_style_t * old_style, const lv
* @param obj pointer to an object * @param obj pointer to an object
* @param style pointer to a style to remove. Can be NULL to check only the selector * @param style pointer to a style to remove. Can be NULL to check only the selector
* @param selector OR-ed values of states and a part to remove only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used * @param selector OR-ed values of states and a part to remove only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used
* @example lv_obj_remove_style(obj, &style, LV_PART_ANY | LV_STATE_ANY); //Remove a specific style *
* @example lv_obj_remove_style(obj, NULL, LV_PART_MAIN | LV_STATE_ANY); //Remove all styles from the main part * Examples:
* @example lv_obj_remove_style(obj, NULL, LV_PART_ANY | LV_STATE_ANY); //Remove all styles * @code
* lv_obj_remove_style(obj, &style, LV_PART_ANY | LV_STATE_ANY); //Remove a specific style
*
* lv_obj_remove_style(obj, NULL, LV_PART_MAIN | LV_STATE_ANY); //Remove all styles from the main part
*
* lv_obj_remove_style(obj, NULL, LV_PART_ANY | LV_STATE_ANY); //Remove all styles
* @endcode
*/ */
void lv_obj_remove_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); void lv_obj_remove_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector);
+1 -1
View File
@@ -139,7 +139,7 @@ struct lv_display_t {
lv_event_list_t event_list; lv_event_list_t event_list;
uint32_t sw_rotate : 1; /**< 1: use software rotation (slower)*/ uint32_t sw_rotate : 1; /**< 1: use software rotation (slower)*/
uint32_t rotation : 2; /**< Element of @lv_display_rotation_t*/ uint32_t rotation : 2; /**< Element of lv_display_rotation_t*/
/**< The theme assigned to the screen*/ /**< The theme assigned to the screen*/
lv_theme_t * theme; lv_theme_t * theme;
+8 -9
View File
@@ -40,9 +40,9 @@ typedef enum {
/** /**
* Get info from an image and store in the `header` * Get info from an image and store in the `header`
* @param src the image source. Can be a pointer to a C array or a file name (Use * @param decoder pointer to decoder object
* `lv_image_src_get_type` to determine the type) * @param dsc pointer to decoder descriptor
* @param header store the info here * @param header store the info here
* @return LV_RESULT_OK: info written correctly; LV_RESULT_INVALID: failed * @return LV_RESULT_OK: info written correctly; LV_RESULT_INVALID: failed
*/ */
typedef lv_result_t (*lv_image_decoder_info_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, typedef lv_result_t (*lv_image_decoder_info_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc,
@@ -50,8 +50,8 @@ typedef lv_result_t (*lv_image_decoder_info_f_t)(lv_image_decoder_t * decoder, l
/** /**
* Open an image for decoding. Prepare it as it is required to read it later * Open an image for decoding. Prepare it as it is required to read it later
* @param decoder pointer to the decoder the function associated with * @param decoder pointer to the decoder the function associated with
* @param dsc pointer to decoder descriptor. `src`, `color` are already initialized in it. * @param dsc pointer to decoder descriptor. `src`, `color` are already initialized in it.
*/ */
typedef lv_result_t (*lv_image_decoder_open_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); typedef lv_result_t (*lv_image_decoder_open_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc);
@@ -95,13 +95,12 @@ lv_result_t lv_image_decoder_get_info(const void * src, lv_image_header_t * head
/** /**
* Open an image. * Open an image.
* Try the created image decoders one by one. Once one is able to open the image that decoder is saved in `dsc` * Try the created image decoders one by one. Once one is able to open the image that decoder is saved in `dsc`
* @param dsc describes a decoding session. Simply a pointer to an `lv_image_decoder_dsc_t` variable. * @param dsc describes a decoding session. Simply a pointer to an `lv_image_decoder_dsc_t` variable.
* @param src the image source. Can be * @param src the image source. Can be
* 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register())`) * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register())`)
* 2) Variable: Pointer to an `lv_image_dsc_t` variable * 2) Variable: Pointer to an `lv_image_dsc_t` variable
* 3) Symbol: E.g. `LV_SYMBOL_OK` * 3) Symbol: E.g. `LV_SYMBOL_OK`
* @param color The color of the image with `LV_COLOR_FORMAT_ALPHA_...` * @param args args about how the image should be opened.
* @param args args about how the image should be opened.
* @return LV_RESULT_OK: opened the image. `dsc->decoded` and `dsc->header` are set. * @return LV_RESULT_OK: opened the image. `dsc->decoded` and `dsc->header` are set.
* LV_RESULT_INVALID: none of the registered image decoders were able to open the image. * LV_RESULT_INVALID: none of the registered image decoders were able to open the image.
*/ */
+2 -2
View File
@@ -42,8 +42,8 @@ typedef void(*lv_x11_close_cb)(void * user_data);
* create and add keyboard, mouse and scrollwheel objects and connect them to x11 display. * create and add keyboard, mouse and scrollwheel objects and connect them to x11 display.
* *
* This is a convenience method handling the typical input initialisation of an X11 window: * This is a convenience method handling the typical input initialisation of an X11 window:
* - create keyboard (@ref lv_x11_keyboard_create) * - create keyboard (lv_x11_keyboard_create)
* - create mouse (with scrollwheel, @ref lv_x11_mouse_create @ref lv_x11_mousewheel_create) * - create mouse (with scrollwheel, lv_x11_mouse_create lv_x11_mousewheel_create)
* *
* @param[in] disp the created X11 display object from @ref lv_x11_window_create * @param[in] disp the created X11 display object from @ref lv_x11_window_create
* @param[in] mouse_img optional image description for the mouse cursor (NULL for no/invisible mouse cursor) * @param[in] mouse_img optional image description for the mouse cursor (NULL for no/invisible mouse cursor)
+3 -3
View File
@@ -60,7 +60,7 @@ typedef struct {
uint16_t box_h; /**< Height of the glyph's bounding box*/ uint16_t box_h; /**< Height of the glyph's bounding box*/
int16_t ofs_x; /**< x offset of the bounding box*/ int16_t ofs_x; /**< x offset of the bounding box*/
int16_t ofs_y; /**< y offset of the bounding box*/ int16_t ofs_y; /**< y offset of the bounding box*/
lv_font_glyph_format_t format; /**< Font format of the glyph see @lv_font_glyph_format_t*/ lv_font_glyph_format_t format; /**< Font format of the glyph see lv_font_glyph_format_t*/
uint8_t is_placeholder: 1; /**< Glyph is missing. But placeholder will still be displayed*/ uint8_t is_placeholder: 1; /**< Glyph is missing. But placeholder will still be displayed*/
union { union {
@@ -115,7 +115,7 @@ struct lv_font_t {
/** /**
* Return with the bitmap of a font. * Return with the bitmap of a font.
* @note You must call @lv_font_get_glyph_dsc to get @g_dsc (@lv_font_glyph_dsc_t) before you can call this function. * @note You must call lv_font_get_glyph_dsc() to get `g_dsc` (lv_font_glyph_dsc_t) before you can call this function.
* @param g_dsc the glyph descriptor including which font to use, which supply the glyph_index and the format. * @param g_dsc the glyph descriptor including which font to use, which supply the glyph_index and the format.
* @param draw_buf a draw buffer that can be used to store the bitmap of the glyph, it's OK not to use it. * @param draw_buf a draw buffer that can be used to store the bitmap of the glyph, it's OK not to use it.
* @return pointer to the glyph's data. It can be a draw buffer for bitmap fonts or an image source for imgfonts. * @return pointer to the glyph's data. It can be a draw buffer for bitmap fonts or an image source for imgfonts.
@@ -136,7 +136,7 @@ bool lv_font_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out
/** /**
* Release the bitmap of a font. * Release the bitmap of a font.
* @note You must call @lv_font_get_glyph_dsc to get @g_dsc (@lv_font_glyph_dsc_t) before you can call this function. * @note You must call lv_font_get_glyph_dsc() to get `g_dsc` (lv_font_glyph_dsc_t) before you can call this function.
* @param g_dsc the glyph descriptor including which font to use, which supply the glyph_index and the format. * @param g_dsc the glyph descriptor including which font to use, which supply the glyph_index and the format.
*/ */
void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t * g_dsc); void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t * g_dsc);
-1
View File
@@ -62,7 +62,6 @@ typedef enum {
/** /**
* Initialize a flex layout the default values * Initialize a flex layout the default values
* @param flex pointer to a flex layout descriptor
*/ */
void lv_flex_init(void); void lv_flex_init(void);
+17 -17
View File
@@ -36,14 +36,14 @@ extern "C" {
/** /**
* Create a cache object with the given parameters. * Create a cache object with the given parameters.
* @param cache_class The class of the cache. Currently only support one two builtin classes: * @param cache_class The class of the cache. Currently only support one two builtin classes:
* @lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy. * - lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy.
* @lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. * - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy.
* @param node_size The node size is the size of the data stored in the cache.. * @param node_size The node size is the size of the data stored in the cache..
* @param max_size The max size is the maximum amount of memory or count that the cache can hold. * @param max_size The max size is the maximum amount of memory or count that the cache can hold.
* @lv_cache_class_lru_rb_count: max_size is the maximum count of nodes in the cache. * - lv_cache_class_lru_rb_count: max_size is the maximum count of nodes in the cache.
* @lv_cache_class_lru_rb_size: max_size is the maximum size of the cache in bytes. * - lv_cache_class_lru_rb_size: max_size is the maximum size of the cache in bytes.
* @param ops A set of operations that can be performed on the cache. See @lv_cache_ops_t for details. * @param ops A set of operations that can be performed on the cache. See lv_cache_ops_t for details.
* @return Returns a pointer to the created cache object on success, @NULL on error. * @return Returns a pointer to the created cache object on success, NULL on error.
*/ */
lv_cache_t * lv_cache_create(const lv_cache_class_t * cache_class, lv_cache_t * lv_cache_create(const lv_cache_class_t * cache_class,
size_t node_size, size_t max_size, size_t node_size, size_t max_size,
@@ -57,25 +57,25 @@ lv_cache_t * lv_cache_create(const lv_cache_class_t * cache_class,
void lv_cache_destroy(lv_cache_t * cache, void * user_data); void lv_cache_destroy(lv_cache_t * cache, void * user_data);
/** /**
* Acquire a cache entry with the given key. If the entry is not in the cache, it will return @NULL as it is not found. * Acquire a cache entry with the given key. If the entry is not in the cache, it will return NULL as it is not found.
* If the entry is found, it's priority will be changed by the cache's policy. And the @lv_entry_t::ref count will be incremented. * If the entry is found, it's priority will be changed by the cache's policy. And the lv_entry_t::ref count will be incremented.
* @param cache The cache object pointer to acquire the entry. * @param cache The cache object pointer to acquire the entry.
* @param key The key of the entry to acquire. * @param key The key of the entry to acquire.
* @param user_data A user data pointer that will be passed to the create callback. * @param user_data A user data pointer that will be passed to the create callback.
* @return Returns a pointer to the acquired cache entry on success with @lv_entry_t::ref count incremented, @NULL on error. * @return Returns a pointer to the acquired cache entry on success with lv_entry_t::ref count incremented, NULL on error.
*/ */
lv_cache_entry_t * lv_cache_acquire(lv_cache_t * cache, const void * key, void * user_data); lv_cache_entry_t * lv_cache_acquire(lv_cache_t * cache, const void * key, void * user_data);
/** /**
* Acquire a cache entry with the given key. If the entry is not in the cache, it will create a new entry with the given key. * Acquire a cache entry with the given key. If the entry is not in the cache, it will create a new entry with the given key.
* If the entry is found, it's priority will be changed by the cache's policy. And the @lv_entry_t::ref count will be incremented. * If the entry is found, it's priority will be changed by the cache's policy. And the lv_entry_t::ref count will be incremented.
* If you want to use this API to simplify the code, you should provide a @lv_cache_ops_t::create_cb that creates a new entry with the given key. * If you want to use this API to simplify the code, you should provide a lv_cache_ops_t::create_cb that creates a new entry with the given key.
* This API is a combination of @lv_cache_acquire and @lv_cache_add. The effect is the same as calling @lv_cache_acquire and @lv_cache_add separately. * This API is a combination of lv_cache_acquire() and lv_cache_add(). The effect is the same as calling lv_cache_acquire() and lv_cache_add() separately.
* And the internal impact on cache is also consistent with these two APIs. * And the internal impact on cache is also consistent with these two APIs.
* @param cache The cache object pointer to acquire the entry. * @param cache The cache object pointer to acquire the entry.
* @param key The key of the entry to acquire or create. * @param key The key of the entry to acquire or create.
* @param user_data A user data pointer that will be passed to the create callback. * @param user_data A user data pointer that will be passed to the create callback.
* @return Returns a pointer to the acquired or created cache entry on success with @lv_entry_t::ref count incremented, @NULL on error. * @return Returns a pointer to the acquired or created cache entry on success with lv_entry_t::ref count incremented, NULL on error.
*/ */
lv_cache_entry_t * lv_cache_acquire_or_create(lv_cache_t * cache, const void * key, void * user_data); lv_cache_entry_t * lv_cache_acquire_or_create(lv_cache_t * cache, const void * key, void * user_data);
@@ -84,12 +84,12 @@ lv_cache_entry_t * lv_cache_acquire_or_create(lv_cache_t * cache, const void * k
* @param cache The cache object pointer to add the entry. * @param cache The cache object pointer to add the entry.
* @param key The key of the entry to add. * @param key The key of the entry to add.
* @param user_data A user data pointer that will be passed to the create callback. * @param user_data A user data pointer that will be passed to the create callback.
* @return Returns a pointer to the added cache entry on success with @lv_entry_t::ref count incremented, @NULL on error. * @return Returns a pointer to the added cache entry on success with lv_entry_t::ref count incremented, NULL on error.
*/ */
lv_cache_entry_t * lv_cache_add(lv_cache_t * cache, const void * key, void * user_data); lv_cache_entry_t * lv_cache_add(lv_cache_t * cache, const void * key, void * user_data);
/** /**
* Release a cache entry. The @lv_entry_t::ref count will be decremented. If the @lv_entry_t::ref count is zero, it will issue an error. * Release a cache entry. The lv_entry_t::ref count will be decremented. If the lv_entry_t::ref count is zero, it will issue an error.
* If the entry passed to this function is the last reference to the data and the entry is marked as invalid, the cache's policy will be used to evict the entry. * If the entry passed to this function is the last reference to the data and the entry is marked as invalid, the cache's policy will be used to evict the entry.
* @param cache The cache object pointer to release the entry. * @param cache The cache object pointer to release the entry.
* @param entry The cache entry pointer to release. * @param entry The cache entry pointer to release.
@@ -110,8 +110,8 @@ void lv_cache_reserve(lv_cache_t * cache, uint32_t reserved_size, void * user_da
/** /**
* Drop a cache entry with the given key. If the entry is not in the cache, nothing will happen to it. * Drop a cache entry with the given key. If the entry is not in the cache, nothing will happen to it.
* If the entry is found, it will be removed from the cache and its data will be freed when the last reference to it is released. * If the entry is found, it will be removed from the cache and its data will be freed when the last reference to it is released.
* @note The data will not be freed immediately but when the last reference to it is released. But this entry will not be found by @lv_cache_acquire. * @note The data will not be freed immediately but when the last reference to it is released. But this entry will not be found by lv_cache_acquire().
* If you want cache a same key again, you should use @lv_cache_add or @lv_cache_acquire_or_create. * If you want cache a same key again, you should use lv_cache_add() or lv_cache_acquire_or_create().
* @param cache The cache object pointer to drop the entry. * @param cache The cache object pointer to drop the entry.
* @param key The key of the entry to drop. * @param key The key of the entry to drop.
* @param user_data A user data pointer that will be passed to the free callback. * @param user_data A user data pointer that will be passed to the free callback.
+1 -1
View File
@@ -43,7 +43,7 @@ uint32_t lv_cache_entry_get_size(const uint32_t node_size);
int32_t lv_cache_entry_get_ref(lv_cache_entry_t * entry); int32_t lv_cache_entry_get_ref(lv_cache_entry_t * entry);
/** /**
* Get the node size of a cache entry. Which is the same size with @lv_cache_entry_get_size's node_size parameter. * Get the node size of a cache entry. Which is the same size with lv_cache_entry_get_size()'s node_size parameter.
* @param entry The cache entry to get the node size of. * @param entry The cache entry to get the node size of.
* @return The node size of the cache entry. * @return The node size of the cache entry.
*/ */
+12 -9
View File
@@ -68,7 +68,7 @@ typedef void (*lv_cache_destroy_cb_t)(lv_cache_t * cache, void * user_data);
/** /**
* The cache get function, used by the cache class to get a cache entry by its key. * The cache get function, used by the cache class to get a cache entry by its key.
* @return @NULL if the key is not found. * @return NULL if the key is not found.
*/ */
typedef lv_cache_entry_t * (*lv_cache_get_cb_t)(lv_cache_t * cache, const void * key, void * user_data); typedef lv_cache_entry_t * (*lv_cache_get_cb_t)(lv_cache_t * cache, const void * key, void * user_data);
@@ -102,7 +102,7 @@ typedef lv_cache_entry_t * (*lv_cache_get_victim_cb)(lv_cache_t * cache, void *
/** /**
* The cache reserve condition function, used by the cache class to check if a new entry can be added to the cache without exceeding its maximum size. * The cache reserve condition function, used by the cache class to check if a new entry can be added to the cache without exceeding its maximum size.
* See @lv_cache_reserve_cond_res_t for the possible results. * See lv_cache_reserve_cond_res_t for the possible results.
*/ */
typedef lv_cache_reserve_cond_res_t (*lv_cache_reserve_cond_cb)(lv_cache_t * cache, const void * key, size_t size, typedef lv_cache_reserve_cond_res_t (*lv_cache_reserve_cond_cb)(lv_cache_t * cache, const void * key, size_t size,
void * user_data); void * user_data);
@@ -121,15 +121,16 @@ struct lv_cache_ops_t {
*/ */
struct lv_cache_t { struct lv_cache_t {
const lv_cache_class_t * clz; /**< The cache class. There are two built-in classes: const lv_cache_class_t * clz; /**< The cache class. There are two built-in classes:
* @lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy. * - lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy.
* @lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. */ * - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy.
*/
uint32_t node_size; /**< The size of a node */ uint32_t node_size; /**< The size of a node */
uint32_t max_size; /**< The maximum size of the cache */ uint32_t max_size; /**< The maximum size of the cache */
uint32_t size; /**< The current size of the cache */ uint32_t size; /**< The current size of the cache */
lv_cache_ops_t ops; /**< The cache operations struct @lv_cache_ops_t */ lv_cache_ops_t ops; /**< The cache operations struct lv_cache_ops_t */
lv_mutex_t lock; /**< The cache lock used to protect the cache in multithreading environments */ lv_mutex_t lock; /**< The cache lock used to protect the cache in multithreading environments */
@@ -137,9 +138,11 @@ struct lv_cache_t {
}; };
/** /**
* The cache class struct for building custom cache classes, and there are two built-in classes for examples: * The cache class struct for building custom cache classes, and there are two built-in classes.
* @lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy. *
* @lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. * - lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy.
*
* - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy.
*/ */
struct lv_cache_class_t { struct lv_cache_class_t {
lv_cache_alloc_cb_t alloc_cb; /**< The allocation function for cache entries */ lv_cache_alloc_cb_t alloc_cb; /**< The allocation function for cache entries */
@@ -150,7 +153,7 @@ struct lv_cache_class_t {
lv_cache_add_cb_t add_cb; /**< The add function for cache entries */ lv_cache_add_cb_t add_cb; /**< The add function for cache entries */
lv_cache_remove_cb_t remove_cb; /**< The remove function for cache entries */ lv_cache_remove_cb_t remove_cb; /**< The remove function for cache entries */
lv_cache_drop_cb_t drop_cb; /**< The drop function for cache entries */ lv_cache_drop_cb_t drop_cb; /**< The drop function for cache entries */
lv_cache_drop_all_cb_t drop_all_cb; /**< The drop all function for cache entries */ lv_cache_drop_all_cb_t drop_all_cb; /**< The drop all function for cache entries */
lv_cache_get_victim_cb get_victim_cb; /**< The get victim function for cache entries */ lv_cache_get_victim_cb get_victim_cb; /**< The get victim function for cache entries */
lv_cache_reserve_cond_cb reserve_cond_cb; /**< The reserve condition function for cache entries */ lv_cache_reserve_cond_cb reserve_cond_cb; /**< The reserve condition function for cache entries */
}; };
+2 -4
View File
@@ -58,12 +58,10 @@ lv_color_t LV_ATTRIBUTE_FAST_MEM lv_color_mix(lv_color_t c1, lv_color_t c2, uint
*/ */
lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg); lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg);
//! @endcond
/** /**
* Get the brightness of a color * Get the brightness of a color
* @param color a color * @param c a color
* @return the brightness [0..255] * @return the brightness [0..255]
*/ */
uint8_t lv_color_brightness(lv_color_t c); uint8_t lv_color_brightness(lv_color_t c);
+4 -1
View File
@@ -192,12 +192,15 @@ void lv_event_stop_processing(lv_event_t * e);
* Register a new, custom event ID. * Register a new, custom event ID.
* It can be used the same way as e.g. `LV_EVENT_CLICKED` to send custom events * It can be used the same way as e.g. `LV_EVENT_CLICKED` to send custom events
* @return the new event id * @return the new event id
* @example *
* Example:
* @code
* uint32_t LV_EVENT_MINE = 0; * uint32_t LV_EVENT_MINE = 0;
* ... * ...
* e = lv_event_register_id(); * e = lv_event_register_id();
* ... * ...
* lv_obj_send_event(obj, LV_EVENT_MINE, &some_data); * lv_obj_send_event(obj, LV_EVENT_MINE, &some_data);
* @endcode
*/ */
uint32_t lv_event_register_id(void); uint32_t lv_event_register_id(void);
+1 -1
View File
@@ -175,7 +175,7 @@ lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, u
* Set the position of the 'cursor' (read write pointer) in a file * Set the position of the 'cursor' (read write pointer) in a file
* @param file_p pointer to a lv_fs_file_t variable * @param file_p pointer to a lv_fs_file_t variable
* @param pos the new position expressed in bytes index (0: start of file) * @param pos the new position expressed in bytes index (0: start of file)
* @param whence tells from where set the position. See @lv_fs_whence_t * @param whence tells from where set the position. See lv_fs_whence_t
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/ */
lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence); lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence);
+4 -4
View File
@@ -130,7 +130,7 @@ void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act);
*/ */
uint32_t lv_ll_get_len(const lv_ll_t * ll_p); uint32_t lv_ll_get_len(const lv_ll_t * ll_p);
/** /*
* TODO * TODO
* @param ll_p * @param ll_p
* @param n1_p * @param n1_p
@@ -140,9 +140,9 @@ void lv_ll_swap(lv_ll_t * ll_p, void * n1_p, void * n2_p);
/** /**
* Move a node before another node in the same linked list * Move a node before another node in the same linked list
* @param ll_p pointer to a linked list * @param ll_p pointer to a linked list
* @param n_act pointer to node to move * @param n_act pointer to node to move
* @param n_after pointer to a node which should be after `n_act` * @param n_after pointer to a node which should be after `n_act`
*/ */
void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after); void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after);
+18 -14
View File
@@ -29,24 +29,22 @@ extern "C" {
#define LV_STYLE_SENTINEL_VALUE 0xAABBCCDD #define LV_STYLE_SENTINEL_VALUE 0xAABBCCDD
/** /*
* Flags for style behavior * Flags for style behavior
*
* The rest of the flags will have _FLAG added to their name in v9.
*/ */
#define LV_STYLE_PROP_FLAG_NONE (0) #define LV_STYLE_PROP_FLAG_NONE (0) /**< No special behavior */
#define LV_STYLE_PROP_FLAG_INHERITABLE (1 << 0) /*Inherited*/ #define LV_STYLE_PROP_FLAG_INHERITABLE (1 << 0) /**< Inherited*/
#define LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE (1 << 1) /*Requires ext. draw size update when changed*/ #define LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE (1 << 1) /**< Requires ext. draw size update when changed*/
#define LV_STYLE_PROP_FLAG_LAYOUT_UPDATE (1 << 2) /*Requires layout update when changed*/ #define LV_STYLE_PROP_FLAG_LAYOUT_UPDATE (1 << 2) /**< Requires layout update when changed*/
#define LV_STYLE_PROP_FLAG_PARENT_LAYOUT_UPDATE (1 << 3) /*Requires layout update on parent when changed*/ #define LV_STYLE_PROP_FLAG_PARENT_LAYOUT_UPDATE (1 << 3) /**< Requires layout update on parent when changed*/
#define LV_STYLE_PROP_FLAG_LAYER_UPDATE (1 << 4) /*Affects layer handling*/ #define LV_STYLE_PROP_FLAG_LAYER_UPDATE (1 << 4) /**< Affects layer handling*/
#define LV_STYLE_PROP_FLAG_TRANSFORM (1 << 5) /*Affects the object's transformation*/ #define LV_STYLE_PROP_FLAG_TRANSFORM (1 << 5) /**< Affects the object's transformation*/
#define LV_STYLE_PROP_FLAG_ALL (0x3F) /*Indicating all flags*/ #define LV_STYLE_PROP_FLAG_ALL (0x3F) /**< Indicating all flags*/
/** /**
* Other constants * Other constants
*/ */
#define LV_SCALE_NONE 256 /*Value for not zooming the image*/ #define LV_SCALE_NONE 256 /**< Value for not zooming the image*/
LV_EXPORT_CONST_INT(LV_SCALE_NONE); LV_EXPORT_CONST_INT(LV_SCALE_NONE);
// *INDENT-OFF* // *INDENT-OFF*
@@ -411,7 +409,9 @@ static inline bool lv_style_is_const(const lv_style_t * style)
/** /**
* Register a new style property for custom usage * Register a new style property for custom usage
* @return a new property ID, or LV_STYLE_PROP_INV if there are no more available. * @return a new property ID, or LV_STYLE_PROP_INV if there are no more available.
* @example *
* Example:
* @code
* lv_style_prop_t MY_PROP; * lv_style_prop_t MY_PROP;
* static inline void lv_style_set_my_prop(lv_style_t * style, lv_color_t value) { * static inline void lv_style_set_my_prop(lv_style_t * style, lv_color_t value) {
* lv_style_value_t v = {.color = value}; lv_style_set_prop(style, MY_PROP, v); } * lv_style_value_t v = {.color = value}; lv_style_set_prop(style, MY_PROP, v); }
@@ -420,6 +420,7 @@ static inline bool lv_style_is_const(const lv_style_t * style)
* MY_PROP = lv_style_register_prop(); * MY_PROP = lv_style_register_prop();
* ... * ...
* lv_style_set_my_prop(&style1, lv_palette_main(LV_PALETTE_RED)); * lv_style_set_my_prop(&style1, lv_palette_main(LV_PALETTE_RED));
* @endcode
*/ */
lv_style_prop_t lv_style_register_prop(uint8_t flag); lv_style_prop_t lv_style_register_prop(uint8_t flag);
@@ -465,10 +466,13 @@ lv_style_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop,
* @param time duration of the transition in [ms] * @param time duration of the transition in [ms]
* @param delay delay before the transition in [ms] * @param delay delay before the transition in [ms]
* @param user_data any custom data that will be saved in the transition animation and will be available when `path_cb` is called * @param user_data any custom data that will be saved in the transition animation and will be available when `path_cb` is called
* @example *
* Example:
* @code
* const static lv_style_prop_t trans_props[] = { LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR, 0 }; * const static lv_style_prop_t trans_props[] = { LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR, 0 };
* static lv_style_transition_dsc_t trans1; * static lv_style_transition_dsc_t trans1;
* lv_style_transition_dsc_init(&trans1, trans_props, NULL, 300, 0, NULL); * lv_style_transition_dsc_init(&trans1, trans_props, NULL, 300, 0, NULL);
* @endcode
*/ */
void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style_prop_t props[], void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style_prop_t props[],
lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void * user_data); lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void * user_data);
+9 -9
View File
@@ -199,14 +199,14 @@ static inline bool lv_text_is_marker(uint32_t letter)
* @param str pointer to a character in a string * @param str pointer to a character in a string
* @return length of the encoded character (1,2,3 ...). O in invalid * @return length of the encoded character (1,2,3 ...). O in invalid
*/ */
extern uint8_t (*const lv_text_encoded_size)(const char *); extern uint8_t (*const lv_text_encoded_size)(const char * str);
/** /**
* Convert a Unicode letter to encoded * Convert a Unicode letter to encoded
* @param letter_uni a Unicode letter * @param letter_uni a Unicode letter
* @return Encoded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ü') * @return Encoded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ü')
*/ */
extern uint32_t (*const lv_text_unicode_to_encoded)(uint32_t); extern uint32_t (*const lv_text_unicode_to_encoded)(uint32_t letter_uni);
/** /**
* Convert a wide character, e.g. 'Á' little endian to be compatible with the encoded format. * Convert a wide character, e.g. 'Á' little endian to be compatible with the encoded format.
@@ -223,7 +223,7 @@ extern uint32_t (*const lv_text_encoded_conv_wc)(uint32_t c);
* NULL to use txt[0] as index * NULL to use txt[0] as index
* @return the decoded Unicode character or 0 on invalid data code * @return the decoded Unicode character or 0 on invalid data code
*/ */
extern uint32_t (*const lv_text_encoded_next)(const char *, uint32_t *); extern uint32_t (*const lv_text_encoded_next)(const char * txt, uint32_t * i);
/** /**
* Get the previous encoded character form a string. * Get the previous encoded character form a string.
@@ -232,25 +232,25 @@ extern uint32_t (*const lv_text_encoded_next)(const char *, uint32_t *);
* encoded char in 'txt'. * encoded char in 'txt'.
* @return the decoded Unicode character or 0 on invalid data * @return the decoded Unicode character or 0 on invalid data
*/ */
extern uint32_t (*const lv_text_encoded_prev)(const char *, uint32_t *); extern uint32_t (*const lv_text_encoded_prev)(const char * txt, uint32_t * i_start);
/** /**
* Convert a letter index (in the encoded text) to byte index. * Convert a letter index (in the encoded text) to byte index.
* E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long * E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long
* @param txt a '\0' terminated UTF-8 string * @param txt a '\0' terminated UTF-8 string
* @param enc_id letter index * @param utf8_id character index
* @return byte index of the 'enc_id'th letter * @return byte index of the 'enc_id'th letter
*/ */
extern uint32_t (*const lv_text_encoded_get_byte_id)(const char *, uint32_t); extern uint32_t (*const lv_text_encoded_get_byte_id)(const char * txt, uint32_t utf8_id);
/** /**
* Convert a byte index (in an encoded text) to character index. * Convert a byte index (in an encoded text) to character index.
* E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long * E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long
* @param txt a '\0' terminated UTF-8 string * @param txt a '\0' terminated UTF-8 string
* @param byte_id byte index * @param byte_id character index
* @return character index of the letter at 'byte_id'th position * @return character index of the letter at 'byte_id'th position
*/ */
extern uint32_t (*const lv_text_encoded_get_char_id)(const char *, uint32_t); extern uint32_t (*const lv_text_encoded_get_char_id)(const char * txt, uint32_t byte_id);
/** /**
* Get the number of characters (and NOT bytes) in a string. * Get the number of characters (and NOT bytes) in a string.
@@ -258,7 +258,7 @@ extern uint32_t (*const lv_text_encoded_get_char_id)(const char *, uint32_t);
* @param txt a '\0' terminated char string * @param txt a '\0' terminated char string
* @return number of characters * @return number of characters
*/ */
extern uint32_t (*const lv_text_get_encoded_length)(const char *); extern uint32_t (*const lv_text_get_encoded_length)(const char * txt);
/********************** /**********************
* MACROS * MACROS
+2 -2
View File
@@ -41,8 +41,8 @@ extern "C" {
* @param base Pointer to first element to search * @param base Pointer to first element to search
* @param n Number of elements * @param n Number of elements
* @param size Size of each element * @param size Size of each element
* @param cmp Pointer to comparison function (see #unicode_list_compare as a comparison function * @param cmp Pointer to comparison function (see unicode_list_compare() as a comparison
* example) * function example)
* *
* @return a pointer to a matching item, or NULL if none exists. * @return a pointer to a matching item, or NULL if none exists.
*/ */
+2 -2
View File
@@ -76,7 +76,7 @@ lv_obj_t * lv_scale_create(lv_obj_t * parent);
*====================*/ *====================*/
/** /**
* Set scale mode. See @ref lv_scale_mode_t * Set scale mode. See lv_scale_mode_t
* @param obj pointer the scale object * @param obj pointer the scale object
* @param mode the new scale mode * @param mode the new scale mode
*/ */
@@ -197,7 +197,7 @@ void lv_scale_section_set_style(lv_scale_section_t * section, lv_part_t part, lv
*====================*/ *====================*/
/** /**
* Get scale mode. See @ref lv_scale_mode_t * Get scale mode. See lv_scale_mode_t
* @param obj pointer the scale object * @param obj pointer the scale object
* @return Scale mode * @return Scale mode
*/ */