refactor(style): rename lv_indev_get_act to lv_indev_active

This commit is contained in:
Gabor Kiss-Vamosi
2023-10-31 19:13:45 +01:00
parent d28f80d362
commit 50d01cec3d
50 changed files with 110 additions and 105 deletions

View File

@@ -195,7 +195,7 @@ static void msgbox_event_cb(lv_event_t * e)
static void ta_event_cb(lv_event_t * e)
{
lv_indev_t * indev = lv_indev_get_act();
lv_indev_t * indev = lv_indev_active();
if(indev == NULL) return;
lv_indev_type_t indev_type = lv_indev_get_type(indev);

View File

@@ -131,7 +131,7 @@ class KeyboardEncoder:
def ta_event_cb(self,e) :
indev = lv.indev_get_act()
indev = lv.indev_active()
if indev == None :
return
indev_type = indev.get_type()

View File

@@ -266,7 +266,7 @@ static void shrink_anim_cb(void * var, int32_t v)
static void scroll_event_cb(lv_event_t * e)
{
lv_indev_t * indev = lv_indev_get_act();
lv_indev_t * indev = lv_indev_active();
lv_obj_t * cont = lv_event_get_target(e);
if(lv_indev_get_scroll_obj(indev) != cont) return;

View File

@@ -973,7 +973,7 @@ static lv_obj_t * album_image_create(lv_obj_t * parent)
static void album_gesture_event_cb(lv_event_t * e)
{
LV_UNUSED(e);
lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_get_act());
lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_active());
if(dir == LV_DIR_LEFT) _lv_demo_music_album_next(true);
if(dir == LV_DIR_RIGHT) _lv_demo_music_album_next(false);
}

View File

@@ -107,7 +107,7 @@ static void obj_test_task_cb(lv_timer_t * tmr)
t = lv_tabview_add_tab(obj, LV_SYMBOL_EDIT " Edit");
t = lv_tabview_add_tab(obj, LV_SYMBOL_CLOSE);
lv_tabview_set_act(obj, 1, LV_ANIM_ON);
lv_tabview_set_active(obj, 1, LV_ANIM_ON);
auto_delete(obj, LV_DEMO_STRESS_TIME_STEP * 5 + 30);
}
break;

View File

@@ -1282,7 +1282,7 @@ static void ta_event_cb(lv_event_t * e)
lv_obj_t * ta = lv_event_get_target(e);
lv_obj_t * kb = lv_event_get_user_data(e);
if(code == LV_EVENT_FOCUSED) {
if(lv_indev_get_type(lv_indev_get_act()) != LV_INDEV_TYPE_KEYPAD) {
if(lv_indev_get_type(lv_indev_active()) != LV_INDEV_TYPE_KEYPAD) {
lv_keyboard_set_textarea(kb, ta);
lv_obj_set_style_max_height(kb, LV_HOR_RES * 2 / 3, 0);
lv_obj_update_layout(tv); /*Be sure the sizes are recalculated*/
@@ -1312,7 +1312,7 @@ static void birthday_event_cb(lv_event_t * e)
lv_obj_t * ta = lv_event_get_target(e);
if(code == LV_EVENT_FOCUSED) {
if(lv_indev_get_type(lv_indev_get_act()) == LV_INDEV_TYPE_POINTER) {
if(lv_indev_get_type(lv_indev_active()) == LV_INDEV_TYPE_POINTER) {
if(calendar == NULL) {
lv_obj_add_flag(lv_layer_top(), LV_OBJ_FLAG_CLICKABLE);
calendar = lv_calendar_create(lv_layer_top());
@@ -1648,10 +1648,10 @@ static void slideshow_anim_ready_cb(lv_anim_t * a_old)
LV_UNUSED(a_old);
lv_obj_t * cont = lv_tabview_get_content(tv);
uint32_t tab_id = lv_tabview_get_tab_act(tv);
uint32_t tab_id = lv_tabview_get_tab_active(tv);
tab_id += 1;
if(tab_id > 2) tab_id = 0;
lv_tabview_set_act(tv, tab_id, LV_ANIM_ON);
lv_tabview_set_active(tv, tab_id, LV_ANIM_ON);
lv_obj_t * tab = lv_obj_get_child(cont, tab_id);
lv_obj_scroll_to_y(tab, 0, LV_ANIM_OFF);