refactor(event): add _cb postfix to lv_obj_add_event()
This commit is contained in:
@@ -19,20 +19,20 @@ void lv_example_switch_1(void)
|
||||
lv_obj_t * sw;
|
||||
|
||||
sw = lv_switch_create(lv_screen_active());
|
||||
lv_obj_add_event(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_flag(sw, LV_OBJ_FLAG_EVENT_BUBBLE);
|
||||
|
||||
sw = lv_switch_create(lv_screen_active());
|
||||
lv_obj_add_state(sw, LV_STATE_CHECKED);
|
||||
lv_obj_add_event(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
|
||||
sw = lv_switch_create(lv_screen_active());
|
||||
lv_obj_add_state(sw, LV_STATE_DISABLED);
|
||||
lv_obj_add_event(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
|
||||
sw = lv_switch_create(lv_screen_active());
|
||||
lv_obj_add_state(sw, LV_STATE_CHECKED | LV_STATE_DISABLED);
|
||||
lv_obj_add_event(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user