1 /**
2  * @file lv_anim.h
3  *
4  */
5 
6 #ifndef LV_ANIM_H
7 #define LV_ANIM_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "../lv_conf_internal.h"
17 #include "lv_types.h"
18 #include "lv_math.h"
19 #include "lv_timer.h"
20 #include "lv_ll.h"
21 
22 /*********************
23  *      DEFINES
24  *********************/
25 
26 #define LV_ANIM_REPEAT_INFINITE      0xFFFFFFFF
27 #define LV_ANIM_PLAYTIME_INFINITE    0xFFFFFFFF
28 #define LV_ANIM_PAUSE_FOREVER        0xFFFFFFFF
29 
30 /*
31  * Macros used to set cubic-bezier anim parameter.
32  * Parameters come from https://easings.net/
33  *
34  * Usage:
35  *
36  * lv_anim_t a;
37  * lv_anim_init(&a);
38  * ...
39  * lv_anim_set_path_cb(&a, lv_anim_path_custom_bezier3);
40  * LV_ANIM_SET_EASE_IN_SINE(&a); //Set cubic-bezier anim parameter to easeInSine
41  * ...
42  * lv_anim_start(&a);
43  */
44 
45 #define _PARA(a, x1, y1, x2, y2) ((a)->parameter.bezier3 =                                  \
46 (lv_anim_bezier3_para_t) {                      \
47     LV_BEZIER_VAL_FLOAT(x1), LV_BEZIER_VAL_FLOAT(y1),   \
48     LV_BEZIER_VAL_FLOAT(x2), LV_BEZIER_VAL_FLOAT(y2) }  \
49                                  )
50 
51 #define LV_ANIM_SET_EASE_IN_SINE(a) _PARA(a, 0.12, 0, 0.39, 0)
52 #define LV_ANIM_SET_EASE_OUT_SINE(a) _PARA(a, 0.61, 1, 0.88, 1)
53 #define LV_ANIM_SET_EASE_IN_OUT_SINE(a) _PARA(a, 0.37, 0, 0.63, 1)
54 #define LV_ANIM_SET_EASE_IN_QUAD(a) _PARA(a, 0.11, 0, 0.5, 0)
55 #define LV_ANIM_SET_EASE_OUT_QUAD(a) _PARA(a, 0.5, 1, 0.89, 1)
56 #define LV_ANIM_SET_EASE_IN_OUT_QUAD(a) _PARA(a, 0.45, 0, 0.55, 1)
57 #define LV_ANIM_SET_EASE_IN_CUBIC(a) _PARA(a, 0.32, 0, 0.67, 0)
58 #define LV_ANIM_SET_EASE_OUT_CUBIC(a) _PARA(a, 0.33, 1, 0.68, 1)
59 #define LV_ANIM_SET_EASE_IN_OUT_CUBIC(a) _PARA(a, 0.65, 0, 0.35, 1)
60 #define LV_ANIM_SET_EASE_IN_QUART(a) _PARA(a, 0.5, 0, 0.75, 0)
61 #define LV_ANIM_SET_EASE_OUT_QUART(a) _PARA(a, 0.25, 1, 0.5, 1)
62 #define LV_ANIM_SET_EASE_IN_OUT_QUART(a) _PARA(a, 0.76, 0, 0.24, 1)
63 #define LV_ANIM_SET_EASE_IN_QUINT(a) _PARA(a, 0.64, 0, 0.78, 0)
64 #define LV_ANIM_SET_EASE_OUT_QUINT(a) _PARA(a, 0.22, 1, 0.36, 1)
65 #define LV_ANIM_SET_EASE_IN_OUT_QUINT(a) _PARA(a, 0.83, 0, 0.17, 1)
66 #define LV_ANIM_SET_EASE_IN_EXPO(a) _PARA(a, 0.7, 0, 0.84, 0)
67 #define LV_ANIM_SET_EASE_OUT_EXPO(a) _PARA(a, 0.16, 1, 0.3, 1)
68 #define LV_ANIM_SET_EASE_IN_OUT_EXPO(a) _PARA(a, 0.87, 0, 0.13, 1)
69 #define LV_ANIM_SET_EASE_IN_CIRC(a) _PARA(a, 0.55, 0, 1, 0.45)
70 #define LV_ANIM_SET_EASE_OUT_CIRC(a) _PARA(a, 0, 0.55, 0.45, 1)
71 #define LV_ANIM_SET_EASE_IN_OUT_CIRC(a) _PARA(a, 0.85, 0, 0.15, 1)
72 #define LV_ANIM_SET_EASE_IN_BACK(a) _PARA(a, 0.36, 0, 0.66, -0.56)
73 #define LV_ANIM_SET_EASE_OUT_BACK(a) _PARA(a, 0.34, 1.56, 0.64, 1)
74 #define LV_ANIM_SET_EASE_IN_OUT_BACK(a) _PARA(a, 0.68, -0.6, 0.32, 1.6)
75 
76 LV_EXPORT_CONST_INT(LV_ANIM_REPEAT_INFINITE);
77 LV_EXPORT_CONST_INT(LV_ANIM_PLAYTIME_INFINITE);
78 
79 /**********************
80  *      TYPEDEFS
81  **********************/
82 
83 /** Can be used to indicate if animations are enabled or disabled in a case*/
84 #define LV_ANIM_OFF false
85 #define LV_ANIM_ON true
86 typedef bool lv_anim_enable_t;
87 
88 /** Get the current value during an animation*/
89 typedef int32_t (*lv_anim_path_cb_t)(const lv_anim_t *);
90 
91 /** Generic prototype of "animator" functions.
92  * First parameter is the variable to animate.
93  * Second parameter is the value to set.
94  * Compatible with `lv_xxx_set_yyy(obj, value)` functions
95  * The `x` in `_xcb_t` means it's not a fully generic prototype because
96  * it doesn't receive `lv_anim_t *` as its first argument*/
97 typedef void (*lv_anim_exec_xcb_t)(void *, int32_t);
98 
99 /** Same as `lv_anim_exec_xcb_t` but receives `lv_anim_t *` as the first parameter.
100  * It's more consistent but less convenient. Might be used by binding generator functions.*/
101 typedef void (*lv_anim_custom_exec_cb_t)(lv_anim_t *, int32_t);
102 
103 /** Callback to call when the animation is ready*/
104 typedef void (*lv_anim_completed_cb_t)(lv_anim_t *);
105 
106 /** Callback to call when the animation really stars (considering `delay`)*/
107 typedef void (*lv_anim_start_cb_t)(lv_anim_t *);
108 
109 /** Callback used when the animation values are relative to get the current value*/
110 typedef int32_t (*lv_anim_get_value_cb_t)(lv_anim_t *);
111 
112 /** Callback used when the animation is deleted*/
113 typedef void (*lv_anim_deleted_cb_t)(lv_anim_t *);
114 
115 /** Parameter used when path is custom_bezier */
116 typedef struct {
117     int16_t x1;
118     int16_t y1;
119     int16_t x2;
120     int16_t y2;
121 } lv_anim_bezier3_para_t;
122 
123 /** Describes an animation*/
124 struct _lv_anim_t {
125     void * var;                               /**< Variable (Widget or other user-provided object) to animate */
126     lv_anim_exec_xcb_t exec_cb;               /**< Function to execute to animate */
127     lv_anim_custom_exec_cb_t custom_exec_cb;  /**< Function to execute to animate,
128                                                * same purpose as exec_cb but different parameters */
129     lv_anim_start_cb_t start_cb;              /**< Call it when animation is starts (considering `delay`) */
130     lv_anim_completed_cb_t completed_cb;      /**< Call it when animation is fully completed */
131     lv_anim_deleted_cb_t deleted_cb;          /**< Call it when animation is deleted */
132     lv_anim_get_value_cb_t get_value_cb;      /**< Get current value in relative mode */
133     void * user_data;                         /**< Custom user data */
134     lv_anim_path_cb_t path_cb;                /**< Provides path (curve) of animation */
135     int32_t start_value;                      /**< Start value */
136     int32_t current_value;                    /**< Current value */
137     int32_t end_value;                        /**< End value */
138     int32_t duration;                         /**< Animation duration in ms */
139     int32_t act_time;                         /**< Ms elapsed since animation started. Set to negative to make delay. */
140     uint32_t reverse_delay;                   /**< Wait (in ms) after forward play ends and before reverse play begins. */
141     uint32_t reverse_duration;                /**< Reverse animation duration in ms */
142     uint32_t repeat_delay;                    /**< Wait before repeating */
143     uint32_t repeat_cnt;                      /**< Repeat count for animation */
144     union _lv_anim_path_para_t {
145         lv_anim_bezier3_para_t bezier3;       /**< Parameter used when path is custom_bezier */
146     } parameter;
147 
148     /* Animation system use these - user shouldn't set */
149     uint32_t last_timer_run;
150     uint32_t pause_time;                      /**<The time when the animation was paused*/
151     uint32_t pause_duration;                  /**<The amount of the time the animation must stay paused for*/
152     uint8_t is_paused : 1;                    /**<Indicates that the animation is paused */
153     uint8_t reverse_play_in_progress : 1;     /**< Reverse play is in progress */
154     uint8_t run_round : 1;                    /**< When not equal to global.anim_state.anim_run_round (which toggles each
155                                                * time animation timer executes), indicates this animation needs to be updated. */
156     uint8_t start_cb_called : 1;              /**< Indicates that `start_cb` was already called */
157     uint8_t early_apply  : 1;                 /**< 1: Apply start value immediately even is there is a `delay` */
158 };
159 
160 /**********************
161  * GLOBAL PROTOTYPES
162  **********************/
163 
164 /**
165  * Initialize an animation variable.
166  * E.g.:
167  * lv_anim_t a;
168  * lv_anim_init(&a);
169  * lv_anim_set_...(&a);
170  * lv_anim_start(&a);
171  * @param a     pointer to an `lv_anim_t` variable to initialize
172  */
173 void lv_anim_init(lv_anim_t * a);
174 
175 /**
176  * Set a variable to animate
177  * @param a     pointer to an initialized `lv_anim_t` variable
178  * @param var   pointer to a variable to animate
179  */
180 void lv_anim_set_var(lv_anim_t * a, void * var);
181 
182 /**
183  * Set a function to animate `var`
184  * @param a         pointer to an initialized `lv_anim_t` variable
185  * @param exec_cb   a function to execute during animation
186  *                  LVGL's built-in functions can be used.
187  *                  E.g. lv_obj_set_x
188  */
189 void lv_anim_set_exec_cb(lv_anim_t * a, lv_anim_exec_xcb_t exec_cb);
190 
191 /**
192  * Set the duration of an animation
193  * @param a         pointer to an initialized `lv_anim_t` variable
194  * @param duration  duration of the animation in milliseconds
195  */
196 void lv_anim_set_duration(lv_anim_t * a, uint32_t duration);
197 
198 /**
199  * Set a delay before starting the animation
200  * @param a         pointer to an initialized `lv_anim_t` variable
201  * @param delay     delay before the animation in milliseconds
202  */
203 void lv_anim_set_delay(lv_anim_t * a, uint32_t delay);
204 
205 /**
206  * Resumes a paused animation
207  * @param a         pointer to an initialized `lv_anim_t` variable
208  */
209 void lv_anim_resume(lv_anim_t * a);
210 
211 /**
212  * Pauses the animation
213  * @param a         pointer to an initialized `lv_anim_t` variable
214  */
215 void lv_anim_pause(lv_anim_t * a);
216 
217 /**
218  * Pauses the animation for ms milliseconds
219  * @param a         pointer to an initialized `lv_anim_t` variable
220  * @param ms        the pause time in milliseconds
221  */
222 void lv_anim_pause_for(lv_anim_t * a, uint32_t ms);
223 
224 /**
225  * Check if the animation is paused
226  * @param a         pointer to an initialized `lv_anim_t` variable
227  * @return          true if the animation is paused else false
228  */
229 bool lv_anim_is_paused(lv_anim_t * a);
230 
231 /**
232  * Set the start and end values of an animation
233  * @param a         pointer to an initialized `lv_anim_t` variable
234  * @param start     the start value
235  * @param end       the end value
236  */
237 void lv_anim_set_values(lv_anim_t * a, int32_t start, int32_t end);
238 
239 /**
240  * Similar to `lv_anim_set_exec_cb` but `lv_anim_custom_exec_cb_t` receives
241  * `lv_anim_t * ` as its first parameter instead of `void *`.
242  * This function might be used when LVGL is bound to other languages because
243  * it's more consistent to have `lv_anim_t *` as first parameter.
244  * @param a         pointer to an initialized `lv_anim_t` variable
245  * @param exec_cb   a function to execute.
246  */
247 void lv_anim_set_custom_exec_cb(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb);
248 
249 /**
250  * Set the path (curve) of the animation.
251  * @param a         pointer to an initialized `lv_anim_t` variable
252  * @param path_cb a function to set the current value of the animation.
253  */
254 void lv_anim_set_path_cb(lv_anim_t * a, lv_anim_path_cb_t path_cb);
255 
256 /**
257  * Set a function call when the animation really starts (considering `delay`)
258  * @param a         pointer to an initialized `lv_anim_t` variable
259  * @param start_cb  a function call when the animation starts
260  */
261 void lv_anim_set_start_cb(lv_anim_t * a, lv_anim_start_cb_t start_cb);
262 
263 /**
264  * Set a function to use the current value of the variable and make start and end value
265  * relative to the returned current value.
266  * @param a             pointer to an initialized `lv_anim_t` variable
267  * @param get_value_cb  a function call when the animation starts
268  */
269 void lv_anim_set_get_value_cb(lv_anim_t * a, lv_anim_get_value_cb_t get_value_cb);
270 
271 /**
272  * Set a function call when the animation is completed
273  * @param a             pointer to an initialized `lv_anim_t` variable
274  * @param completed_cb  a function call when the animation is fully completed
275  */
276 void lv_anim_set_completed_cb(lv_anim_t * a, lv_anim_completed_cb_t completed_cb);
277 
278 /**
279  * Set a function call when the animation is deleted.
280  * @param a         pointer to an initialized `lv_anim_t` variable
281  * @param deleted_cb  a function call when the animation is deleted
282  */
283 void lv_anim_set_deleted_cb(lv_anim_t * a, lv_anim_deleted_cb_t deleted_cb);
284 
285 /**
286  * Make the animation to play back to when the forward direction is ready
287  * @param a         pointer to an initialized `lv_anim_t` variable
288  * @param duration  duration of playback animation in milliseconds. 0: disable playback
289  */
290 void lv_anim_set_reverse_duration(lv_anim_t * a, uint32_t duration);
291 
292 /**
293  * Legacy `lv_anim_set_reverse_time` API will be removed soon, use `lv_anim_set_reverse_duration` instead.
294  */
295 void lv_anim_set_reverse_time(lv_anim_t * a, uint32_t duration);
296 
297 /**
298  * Make the animation to play back to when the forward direction is ready
299  * @param a         pointer to an initialized `lv_anim_t` variable
300  * @param delay     delay in milliseconds before starting the playback animation.
301  */
302 void lv_anim_set_reverse_delay(lv_anim_t * a, uint32_t delay);
303 
304 /**
305  * Make the animation repeat itself.
306  * @param a         pointer to an initialized `lv_anim_t` variable
307  * @param cnt       repeat count or `LV_ANIM_REPEAT_INFINITE` for infinite repetition. 0: to disable repetition.
308  */
309 void lv_anim_set_repeat_count(lv_anim_t * a, uint32_t cnt);
310 
311 /**
312  * Set a delay before repeating the animation.
313  * @param a         pointer to an initialized `lv_anim_t` variable
314  * @param delay     delay in milliseconds before repeating the animation.
315  */
316 void lv_anim_set_repeat_delay(lv_anim_t * a, uint32_t delay);
317 
318 /**
319  * Set a whether the animation's should be applied immediately or only when the delay expired.
320  * @param a         pointer to an initialized `lv_anim_t` variable
321  * @param en        true: apply the start value immediately in `lv_anim_start`;
322  *                  false: apply the start value only when `delay` ms is elapsed and the animations really starts
323  */
324 void lv_anim_set_early_apply(lv_anim_t * a, bool en);
325 
326 /**
327  * Set the custom user data field of the animation.
328  * @param a           pointer to an initialized `lv_anim_t` variable
329  * @param user_data   pointer to the new user_data.
330  */
331 void lv_anim_set_user_data(lv_anim_t * a, void * user_data);
332 
333 /**
334  * Set parameter for cubic bezier path
335  * @param a         pointer to an initialized `lv_anim_t` variable
336  * @param x1        first control point X
337  * @param y1        first control point Y
338  * @param x2        second control point X
339  * @param y2        second control point Y
340  */
341 void lv_anim_set_bezier3_param(lv_anim_t * a, int16_t x1, int16_t y1, int16_t x2, int16_t y2);
342 
343 /**
344  * Create an animation
345  * @param a         an initialized 'anim_t' variable. Not required after call.
346  * @return          pointer to the created animation (different from the `a` parameter)
347  */
348 lv_anim_t * lv_anim_start(const lv_anim_t * a);
349 
350 /**
351  * Get a delay before starting the animation
352  * @param a pointer to an initialized `lv_anim_t` variable
353  * @return delay before the animation in milliseconds
354  */
355 uint32_t lv_anim_get_delay(const lv_anim_t * a);
356 
357 /**
358  * Get the time used to play the animation.
359  * @param a pointer to an animation.
360  * @return the play time in milliseconds.
361  */
362 uint32_t lv_anim_get_playtime(const lv_anim_t * a);
363 
364 /**
365  * Get the duration of an animation
366  * @param a         pointer to an initialized `lv_anim_t` variable
367  * @return the duration of the animation in milliseconds
368  */
369 uint32_t lv_anim_get_time(const lv_anim_t * a);
370 
371 /**
372  * Get the repeat count of the animation.
373  * @param a         pointer to an initialized `lv_anim_t` variable
374  * @return the repeat count or `LV_ANIM_REPEAT_INFINITE` for infinite repetition. 0: disabled repetition.
375  */
376 uint32_t lv_anim_get_repeat_count(const lv_anim_t * a);
377 
378 /**
379  * Get the user_data field of the animation
380  * @param   a pointer to an initialized `lv_anim_t` variable
381  * @return  the pointer to the custom user_data of the animation
382  */
383 void * lv_anim_get_user_data(const lv_anim_t * a);
384 
385 /**
386  * Delete animation(s) of a variable with a given animator function
387  * @param var       pointer to variable
388  * @param exec_cb   a function pointer which is animating 'var',
389  *                  or NULL to ignore it and delete all the animations of 'var
390  * @return          true: at least 1 animation is deleted, false: no animation is deleted
391  */
392 bool lv_anim_delete(void * var, lv_anim_exec_xcb_t exec_cb);
393 
394 /**
395  * Delete all the animations
396  */
397 void lv_anim_delete_all(void);
398 
399 /**
400  * Get the animation of a variable and its `exec_cb`.
401  * @param var       pointer to variable
402  * @param exec_cb   a function pointer which is animating 'var', or NULL to return first matching 'var'
403  * @return          pointer to the animation.
404  */
405 lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb);
406 
407 /**
408  * Get global animation refresher timer.
409  * @return pointer to the animation refresher timer.
410  */
411 lv_timer_t * lv_anim_get_timer(void);
412 
413 /**
414  * Delete an animation by getting the animated variable from `a`.
415  * Only animations with `exec_cb` will be deleted.
416  * This function exists because it's logical that all anim. functions receives an
417  * `lv_anim_t` as their first parameter. It's not practical in C but might make
418  * the API more consequent and makes easier to generate bindings.
419  * @param a         pointer to an animation.
420  * @param exec_cb   a function pointer which is animating 'var',
421  *                  or NULL to ignore it and delete all the animations of 'var
422  * @return          true: at least 1 animation is deleted, false: no animation is deleted
423  */
424 bool lv_anim_custom_delete(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb);
425 
426 /**
427  * Get the animation of a variable and its `exec_cb`.
428  * This function exists because it's logical that all anim. functions receives an
429  * `lv_anim_t` as their first parameter. It's not practical in C but might make
430  * the API more consequent and makes easier to generate bindings.
431  * @param a         pointer to an animation.
432  * @param exec_cb   a function pointer which is animating 'var', or NULL to return first matching 'var'
433  * @return          pointer to the animation.
434  */
435 lv_anim_t * lv_anim_custom_get(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb);
436 
437 /**
438  * Get the number of currently running animations
439  * @return      the number of running animations
440  */
441 uint16_t lv_anim_count_running(void);
442 
443 /**
444  * Store the speed as a special value which can be used as time in animations.
445  * It will be converted to time internally based on the start and end values.
446  * The return value can be used as a constant with multiple animations
447  * and let LVGL convert the speed to time based on the actual values.
448  * LIMITATION: the max time stored this way can be 10,000 ms.
449  * @param speed         the speed of the animation in with unit / sec resolution in 0..10k range
450  * @return              a special value which can be used as an animation time
451  * @note                internally speed is stored as 10 unit/sec
452  */
453 uint32_t lv_anim_speed(uint32_t speed);
454 
455 /**
456  * Store the speed as a special value which can be used as time in animations.
457  * It will be converted to time internally based on the start and end values.
458  * The return value can be used as a constant with multiple animations
459  * and let LVGL convert the speed to time based on the actual values.
460  * @param speed         the speed of the animation in as unit / sec resolution in 0..10k range
461  * @param min_time      the minimum time in 0..10k range
462  * @param max_time      the maximum time in 0..10k range
463  * @return              a special value in where all three values are stored and can be used as an animation time
464  * @note                internally speed is stored as 10 unit/sec
465  * @note                internally min/max_time are stored with 10 ms unit
466  *
467  */
468 uint32_t lv_anim_speed_clamped(uint32_t speed, uint32_t min_time, uint32_t max_time);
469 
470 /**
471  * Resolve the speed (created with `lv_anim_speed` or `lv_anim_speed_clamped`) to time
472  * based on start and end values.
473  * @param speed     return values of `lv_anim_speed` or `lv_anim_speed_clamped`
474  * @param start     the start value of the animation
475  * @param end       the end value of the animation
476  * @return          the time required to get from `start` to `end` with the given `speed` setting
477  */
478 uint32_t lv_anim_resolve_speed(uint32_t speed, int32_t start, int32_t end);
479 
480 /**
481  * Calculate the time of an animation based on its speed, start and end values.
482  * It simpler than `lv_anim_speed` or `lv_anim_speed_clamped` as it converts
483  * speed, start, and end to a time immediately.
484  * As it's simpler there is no limit on the maximum time.
485  * @param speed         the speed of the animation
486  * @param start         the start value
487  * @param end           the end value
488  * @return              the time of the animation in milliseconds
489  */
490 uint32_t lv_anim_speed_to_time(uint32_t speed, int32_t start, int32_t end);
491 
492 
493 /**
494  * Manually refresh the state of the animations.
495  * Useful to make the animations running in a blocking process where
496  * `lv_timer_handler` can't run for a while.
497  * Shouldn't be used directly because it is called in `lv_refr_now()`.
498  */
499 void lv_anim_refr_now(void);
500 
501 /**
502  * Calculate the current value of an animation applying linear characteristic
503  * @param a     pointer to an animation
504  * @return      the current value to set
505  */
506 int32_t lv_anim_path_linear(const lv_anim_t * a);
507 
508 /**
509  * Calculate the current value of an animation slowing down the start phase
510  * @param a     pointer to an animation
511  * @return      the current value to set
512  */
513 int32_t lv_anim_path_ease_in(const lv_anim_t * a);
514 
515 /**
516  * Calculate the current value of an animation slowing down the end phase
517  * @param a     pointer to an animation
518  * @return      the current value to set
519  */
520 int32_t lv_anim_path_ease_out(const lv_anim_t * a);
521 
522 /**
523  * Calculate the current value of an animation applying an "S" characteristic (cosine)
524  * @param a     pointer to an animation
525  * @return      the current value to set
526  */
527 int32_t lv_anim_path_ease_in_out(const lv_anim_t * a);
528 
529 /**
530  * Calculate the current value of an animation with overshoot at the end
531  * @param a     pointer to an animation
532  * @return      the current value to set
533  */
534 int32_t lv_anim_path_overshoot(const lv_anim_t * a);
535 
536 /**
537  * Calculate the current value of an animation with 3 bounces
538  * @param a     pointer to an animation
539  * @return      the current value to set
540  */
541 int32_t lv_anim_path_bounce(const lv_anim_t * a);
542 
543 /**
544  * Calculate the current value of an animation applying step characteristic.
545  * (Set end value on the end of the animation)
546  * @param a     pointer to an animation
547  * @return      the current value to set
548  */
549 int32_t lv_anim_path_step(const lv_anim_t * a);
550 
551 /**
552  * A custom cubic bezier animation path, need to specify cubic-parameters in a->parameter.bezier3
553  * @param a     pointer to an animation
554  * @return      the current value to set
555  */
556 int32_t lv_anim_path_custom_bezier3(const lv_anim_t * a);
557 
558 /**********************
559  *   GLOBAL VARIABLES
560  **********************/
561 
562 /**********************
563  *      MACROS
564  **********************/
565 
566 #ifdef __cplusplus
567 } /*extern "C"*/
568 #endif
569 
570 #endif /*LV_ANIM_H*/
571