feat(property): add property name (#6329)

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
Neo Xu
2024-06-20 00:06:16 +08:00
committed by GitHub
parent 147ac8ec72
commit 438e943937
24 changed files with 857 additions and 42 deletions

View File

@@ -16,6 +16,8 @@ Usage
Two APIs are provided to get/set widget properties. It can be enabled by setting
:c:macro:`LV_USE_OBJ_PROPERTY` to `1` in ``lv_conf.h``.
Set :c:macro:`LV_USE_OBJ_PROPERTY_NAME` to `1` in order to use property name instead of ID.
.. code:: c
typedef struct {
@@ -35,6 +37,8 @@ Two APIs are provided to get/set widget properties. It can be enabled by setting
lv_result_t lv_obj_set_property(lv_obj_t * obj, const lv_property_t * value);
lv_property_t lv_obj_get_property(lv_obj_t * obj, lv_prop_id_t id);
lv_prop_id_t lv_obj_property_get_id(const lv_obj_class_t * clz, const char * name);
.. _obj_property_id:
Property ID