chore(obj): deprecate lv_obj_find_by_id in favor of lv_obj_find_by_name

This commit is contained in:
Gabor Kiss-Vamosi
2025-02-18 21:36:05 +01:00
committed by Liam Howatt
parent 56c44bfdc4
commit 346395d039
2 changed files with 6 additions and 2 deletions

View File

@@ -190,7 +190,8 @@ that the Widget no longer exists.
Find child by ID Find child by ID
---------------- ----------------
.. warning::
``lv_obj_find_by_id(widget, id)`` is deprecated. To find a widget use ``obj_name``.
:cpp:expr:`lv_obj_find_by_id(widget, id)` will perform a recursive walk through :cpp:expr:`lv_obj_find_by_id(widget, id)` will perform a recursive walk through
``widget``\ 's children and return the first child encountered having the given ID. ``widget``\ 's children and return the first child encountered having the given ID.

View File

@@ -399,6 +399,9 @@ void lv_obj_set_id(lv_obj_t * obj, void * id);
void * lv_obj_get_id(const lv_obj_t * obj); void * lv_obj_get_id(const lv_obj_t * obj);
/** /**
* DEPRECATED IDs are used only to print the widget trees.
* To find a widget use `lv_obj_find_by_name`
*
* Get the child object by its id. * Get the child object by its id.
* It will check children and grandchildren recursively. * It will check children and grandchildren recursively.
* Function `lv_obj_id_compare` is used to matched obj id with given id. * Function `lv_obj_id_compare` is used to matched obj id with given id.