refactor(event): add _cb postfix to lv_obj_add_event()
This commit is contained in:
@@ -37,7 +37,7 @@ void lv_example_ime_pinyin_1(void)
|
||||
lv_ime_pinyin_set_keyboard(pinyin_ime, kb);
|
||||
lv_keyboard_set_textarea(kb, ta1);
|
||||
|
||||
lv_obj_add_event(ta1, ta_event_cb, LV_EVENT_ALL, kb);
|
||||
lv_obj_add_event_cb(ta1, ta_event_cb, LV_EVENT_ALL, kb);
|
||||
|
||||
/*Get the cand_panel, and adjust its size and position*/
|
||||
lv_obj_t * cand_panel = lv_ime_pinyin_get_cand_panel(pinyin_ime);
|
||||
|
||||
@@ -36,7 +36,7 @@ kb = lv.keyboard(lv.screen_active())
|
||||
pinyin_ime.pinyin_set_keyboard(kb)
|
||||
kb.set_textarea(ta1)
|
||||
|
||||
ta1.add_event(lambda evt: ta_event_cb(evt,kb), lv.EVENT.ALL, None)
|
||||
ta1.add_event_cb(lambda evt: ta_event_cb(evt,kb), lv.EVENT.ALL, None)
|
||||
|
||||
# Get the cand_panel, and adjust its size and position
|
||||
cand_panel = pinyin_ime.pinyin_get_cand_panel()
|
||||
|
||||
@@ -39,7 +39,7 @@ void lv_example_ime_pinyin_2(void)
|
||||
lv_ime_pinyin_set_keyboard(pinyin_ime, kb);
|
||||
lv_ime_pinyin_set_mode(pinyin_ime,
|
||||
LV_IME_PINYIN_MODE_K9); // Set to 9-key input mode. Default: 26-key input(k26) mode.
|
||||
lv_obj_add_event(ta1, ta_event_cb, LV_EVENT_ALL, kb);
|
||||
lv_obj_add_event_cb(ta1, ta_event_cb, LV_EVENT_ALL, kb);
|
||||
|
||||
/*Get the cand_panel, and adjust its size and position*/
|
||||
lv_obj_t * cand_panel = lv_ime_pinyin_get_cand_panel(pinyin_ime);
|
||||
|
||||
@@ -38,7 +38,7 @@ kb.set_textarea(ta1)
|
||||
pinyin_ime.pinyin_set_keyboard(kb)
|
||||
pinyin_ime.pinyin_set_mode(lv.ime_pinyin.PINYIN_MODE.K9) # Set to 9-key input mode. Default: 26-key input(k26) mode.
|
||||
|
||||
ta1.add_event(lambda evt: ta_event_cb(evt,kb), lv.EVENT.ALL, None)
|
||||
ta1.add_event_cb(lambda evt: ta_event_cb(evt,kb), lv.EVENT.ALL, None)
|
||||
|
||||
# Get the cand_panel, and adjust its size and position
|
||||
cand_panel = pinyin_ime.pinyin_get_cand_panel()
|
||||
|
||||
Reference in New Issue
Block a user