refactor(event): add _cb postfix to lv_obj_add_event()
This commit is contained in:
@@ -13,15 +13,15 @@ void lv_example_win_1(void)
|
||||
lv_obj_t * win = lv_win_create(lv_screen_active());
|
||||
lv_obj_t * btn;
|
||||
btn = lv_win_add_button(win, LV_SYMBOL_LEFT, 40);
|
||||
lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
|
||||
lv_win_add_title(win, "A title");
|
||||
|
||||
btn = lv_win_add_button(win, LV_SYMBOL_RIGHT, 40);
|
||||
lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
|
||||
btn = lv_win_add_button(win, LV_SYMBOL_CLOSE, 60);
|
||||
lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
|
||||
lv_obj_t * cont = lv_win_get_content(win); /*Content can be added here*/
|
||||
lv_obj_t * label = lv_label_create(cont);
|
||||
|
||||
Reference in New Issue
Block a user