1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

feat(obj): rename lv_obj_set_flag to lv_obj_update_flag (#4655)

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu 2023-10-23 23:20:29 +08:00 committed by GitHub
parent 2bee95d43e
commit 1d41ec3739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -152,8 +152,7 @@ void lv_obj_remove_flag(lv_obj_t * obj, lv_obj_flag_t f)
} }
void lv_obj_update_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v)
void lv_obj_set_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v)
{ {
if(v) lv_obj_add_flag(obj, f); if(v) lv_obj_add_flag(obj, f);
else lv_obj_remove_flag(obj, f); else lv_obj_remove_flag(obj, f);

View File

@ -223,7 +223,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent);
void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f); void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f);
/** /**
* Clear one or more flags * Remove one or more flags
* @param obj pointer to an object * @param obj pointer to an object
* @param f OR-ed values from `lv_obj_flag_t` to set. * @param f OR-ed values from `lv_obj_flag_t` to set.
*/ */
@ -232,10 +232,10 @@ void lv_obj_remove_flag(lv_obj_t * obj, lv_obj_flag_t f);
/** /**
* Set add or remove one or more flags. * Set add or remove one or more flags.
* @param obj pointer to an object * @param obj pointer to an object
* @param f OR-ed values from `lv_obj_flag_t` to set. * @param f OR-ed values from `lv_obj_flag_t` to update.
* @param v true: add the flags; false: remove the flags * @param v true: add the flags; false: remove the flags
*/ */
void lv_obj_set_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v); void lv_obj_update_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v);
/** /**
* Add one or more states to the object. The other state bits will remain unchanged. * Add one or more states to the object. The other state bits will remain unchanged.