* Copyright (C) 2020 Xiaomi Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* INCLUDES
*********************/
#include "lv_obj_ext_func.h"
* DEFINES
*********************/
* TYPEDEFS
**********************/
* STATIC PROTOTYPES
**********************/
* STATIC VARIABLES
**********************/
* MACROS
**********************/
* GLOBAL FUNCTIONS
**********************/
void lv_obj_add_anim(
lv_obj_t* obj, lv_anim_t* a,
lv_anim_exec_xcb_t exec_cb,
int32_t start, int32_t end,
uint16_t time,
uint32_t delay,
lv_anim_ready_cb_t ready_cb,
lv_anim_path_cb_t path_cb)
{
lv_anim_t anim_temp;
if (a == NULL) {
a = &anim_temp;
*-----------------------*/
lv_anim_init(a);
}
*------------------*/
lv_anim_set_exec_cb(a, exec_cb);
lv_anim_set_var(a, obj);
lv_anim_set_time(a, time);
lv_anim_set_values(a, start, end);
*------------------*/
lv_anim_set_delay(a, delay);
lv_anim_set_path_cb(a, path_cb);
lv_anim_set_ready_cb(a, ready_cb);
lv_anim_set_start_cb(a, ready_cb);
*------------------*/
lv_anim_start(a);
}
* STATIC FUNCTIONS
**********************/