rt-thread-official/bsp/renesas/ra6m3-hmi-board/board/lvgl/demo/ui_anim.h

178 lines
8.8 KiB
C
Raw Normal View History

#include "lvgl.h"
void roll_out_Animation(lv_obj_t *TargetObject, int delay)
{
lv_anim_t PropertyAnimation_0;
lv_anim_init(&PropertyAnimation_0);
lv_anim_set_time(&PropertyAnimation_0, 600);
lv_anim_set_user_data(&PropertyAnimation_0, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_y);
lv_anim_set_values(&PropertyAnimation_0, -200, 0);
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_0, 0);
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
lv_anim_set_repeat_count(&PropertyAnimation_0, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_0, 0);
lv_anim_set_early_apply(&PropertyAnimation_0, false);
lv_anim_start(&PropertyAnimation_0);
lv_anim_t PropertyAnimation_1;
lv_anim_init(&PropertyAnimation_1);
lv_anim_set_time(&PropertyAnimation_1, 600);
lv_anim_set_user_data(&PropertyAnimation_1, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_1, _ui_anim_callback_set_x);
lv_anim_set_values(&PropertyAnimation_1, 300, 0);
lv_anim_set_path_cb(&PropertyAnimation_1, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_1, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_1, 0);
lv_anim_set_playback_delay(&PropertyAnimation_1, 0);
lv_anim_set_repeat_count(&PropertyAnimation_1, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_1, 0);
lv_anim_set_early_apply(&PropertyAnimation_1, false);
lv_anim_start(&PropertyAnimation_1);
lv_anim_t PropertyAnimation_2;
lv_anim_init(&PropertyAnimation_2);
lv_anim_set_time(&PropertyAnimation_2, 600);
lv_anim_set_user_data(&PropertyAnimation_2, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_2, _ui_anim_callback_set_width);
lv_anim_set_values(&PropertyAnimation_2, 0, 370);
lv_anim_set_path_cb(&PropertyAnimation_2, lv_anim_path_linear);
lv_anim_set_delay(&PropertyAnimation_2, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_2, 0);
lv_anim_set_playback_delay(&PropertyAnimation_2, 0);
lv_anim_set_repeat_count(&PropertyAnimation_2, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_2, 0);
lv_anim_set_early_apply(&PropertyAnimation_2, false);
lv_anim_start(&PropertyAnimation_2);
lv_anim_t PropertyAnimation_3;
lv_anim_init(&PropertyAnimation_3);
lv_anim_set_time(&PropertyAnimation_3, 600);
lv_anim_set_user_data(&PropertyAnimation_3, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_3, _ui_anim_callback_set_height);
lv_anim_set_values(&PropertyAnimation_3, 0, 200);
lv_anim_set_path_cb(&PropertyAnimation_3, lv_anim_path_linear);
lv_anim_set_delay(&PropertyAnimation_3, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_3, 0);
lv_anim_set_playback_delay(&PropertyAnimation_3, 0);
lv_anim_set_repeat_count(&PropertyAnimation_3, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_3, 0);
lv_anim_set_early_apply(&PropertyAnimation_3, false);
lv_anim_start(&PropertyAnimation_3);
}
void take_back_Animation(lv_obj_t *TargetObject, int delay)
{
lv_anim_t PropertyAnimation_0;
lv_anim_init(&PropertyAnimation_0);
lv_anim_set_time(&PropertyAnimation_0, 600);
lv_anim_set_user_data(&PropertyAnimation_0, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_x);
lv_anim_set_values(&PropertyAnimation_0, 0, 300);
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_0, 0);
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
lv_anim_set_repeat_count(&PropertyAnimation_0, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_0, 0);
lv_anim_set_early_apply(&PropertyAnimation_0, false);
lv_anim_start(&PropertyAnimation_0);
lv_anim_t PropertyAnimation_1;
lv_anim_init(&PropertyAnimation_1);
lv_anim_set_time(&PropertyAnimation_1, 600);
lv_anim_set_user_data(&PropertyAnimation_1, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_1, _ui_anim_callback_set_y);
lv_anim_set_values(&PropertyAnimation_1, 0, -200);
lv_anim_set_path_cb(&PropertyAnimation_1, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_1, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_1, 0);
lv_anim_set_playback_delay(&PropertyAnimation_1, 0);
lv_anim_set_repeat_count(&PropertyAnimation_1, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_1, 0);
lv_anim_set_early_apply(&PropertyAnimation_1, false);
lv_anim_start(&PropertyAnimation_1);
lv_anim_t PropertyAnimation_2;
lv_anim_init(&PropertyAnimation_2);
lv_anim_set_time(&PropertyAnimation_2, 600);
lv_anim_set_user_data(&PropertyAnimation_2, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_2, _ui_anim_callback_set_width);
lv_anim_set_values(&PropertyAnimation_2, 370, 0);
lv_anim_set_path_cb(&PropertyAnimation_2, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_2, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_2, 0);
lv_anim_set_playback_delay(&PropertyAnimation_2, 0);
lv_anim_set_repeat_count(&PropertyAnimation_2, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_2, 0);
lv_anim_set_early_apply(&PropertyAnimation_2, false);
lv_anim_start(&PropertyAnimation_2);
lv_anim_t PropertyAnimation_3;
lv_anim_init(&PropertyAnimation_3);
lv_anim_set_time(&PropertyAnimation_3, 600);
lv_anim_set_user_data(&PropertyAnimation_3, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_3, _ui_anim_callback_set_height);
lv_anim_set_values(&PropertyAnimation_3, 200, 0);
lv_anim_set_path_cb(&PropertyAnimation_3, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_3, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_3, 0);
lv_anim_set_playback_delay(&PropertyAnimation_3, 0);
lv_anim_set_repeat_count(&PropertyAnimation_3, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_3, 0);
lv_anim_set_early_apply(&PropertyAnimation_3, false);
lv_anim_start(&PropertyAnimation_3);
}
void btn3_comein_Animation(lv_obj_t *TargetObject, int delay)
{
lv_anim_t PropertyAnimation_0;
lv_anim_init(&PropertyAnimation_0);
lv_anim_set_time(&PropertyAnimation_0, 500);
lv_anim_set_user_data(&PropertyAnimation_0, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_y);
lv_anim_set_values(&PropertyAnimation_0, 240, 0);
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_0, 0);
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
lv_anim_set_repeat_count(&PropertyAnimation_0, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_0, 0);
lv_anim_set_early_apply(&PropertyAnimation_0, false);
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_y);
lv_anim_start(&PropertyAnimation_0);
}
void btn2_comein_Animation(lv_obj_t *TargetObject, int delay)
{
lv_anim_t PropertyAnimation_0;
lv_anim_init(&PropertyAnimation_0);
lv_anim_set_time(&PropertyAnimation_0, 650);
lv_anim_set_user_data(&PropertyAnimation_0, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_y);
lv_anim_set_values(&PropertyAnimation_0, 240, 0);
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_0, 0);
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
lv_anim_set_repeat_count(&PropertyAnimation_0, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_0, 0);
lv_anim_set_early_apply(&PropertyAnimation_0, false);
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_y);
lv_anim_start(&PropertyAnimation_0);
}
void btn1_comein_Animation(lv_obj_t *TargetObject, int delay)
{
lv_anim_t PropertyAnimation_0;
lv_anim_init(&PropertyAnimation_0);
lv_anim_set_time(&PropertyAnimation_0, 800);
lv_anim_set_user_data(&PropertyAnimation_0, TargetObject);
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_y);
lv_anim_set_values(&PropertyAnimation_0, 240, 0);
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_ease_out);
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
lv_anim_set_playback_time(&PropertyAnimation_0, 0);
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
lv_anim_set_repeat_count(&PropertyAnimation_0, 0);
lv_anim_set_repeat_delay(&PropertyAnimation_0, 0);
lv_anim_set_early_apply(&PropertyAnimation_0, false);
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_y);
lv_anim_start(&PropertyAnimation_0);
}