refactor(event): add _cb postfix to lv_obj_add_event()
This commit is contained in:
@@ -24,7 +24,7 @@ void lv_example_obj_2(void)
|
||||
lv_obj_t * obj;
|
||||
obj = lv_obj_create(lv_screen_active());
|
||||
lv_obj_set_size(obj, 150, 100);
|
||||
lv_obj_add_event(obj, drag_event_handler, LV_EVENT_PRESSING, NULL);
|
||||
lv_obj_add_event_cb(obj, drag_event_handler, LV_EVENT_PRESSING, NULL);
|
||||
|
||||
lv_obj_t * label = lv_label_create(obj);
|
||||
lv_label_set_text(label, "Drag me");
|
||||
|
||||
@@ -17,7 +17,7 @@ def drag_event_handler(e):
|
||||
|
||||
obj = lv.obj(lv.screen_active())
|
||||
obj.set_size(150, 100)
|
||||
obj.add_event(drag_event_handler, lv.EVENT.PRESSING, None)
|
||||
obj.add_event_cb(drag_event_handler, lv.EVENT.PRESSING, None)
|
||||
|
||||
label = lv.label(obj)
|
||||
label.set_text("Drag me")
|
||||
|
||||
Reference in New Issue
Block a user