lv_anim_timeline.h
API reference for lv_anim_timeline.h
Functions
lv_anim_timeline_set_reverse
Set the playback direction of the animation timeline.
void lv_anim_timeline_set_reverse(lv_anim_timeline_t *at, bool reverse)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
reverse | bool | whether to play in reverse. |
lv_anim_timeline_set_delay
Set the time to wait before starting the animation. Applies only when playing from the very start, or reverse from the very end.
void lv_anim_timeline_set_delay(lv_anim_timeline_t *at, uint32_t delay)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to an animation timeline |
delay | uint32_t | the delay time in milliseconds |
lv_anim_timeline_set_repeat_count
Make the animation timeline repeat itself.
void lv_anim_timeline_set_repeat_count(lv_anim_timeline_t *at, uint32_t cnt)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
cnt | uint32_t | repeat count or LV_ANIM_REPEAT_INFINITE for infinite repetition. 0: to disable repetition. |
lv_anim_timeline_set_repeat_delay
Set a delay before repeating the animation timeline.
void lv_anim_timeline_set_repeat_delay(lv_anim_timeline_t *at, uint32_t delay)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
delay | uint32_t | delay in milliseconds before repeating the animation timeline. |
lv_anim_timeline_set_progress
Set the progress of the animation timeline.
void lv_anim_timeline_set_progress(lv_anim_timeline_t *at, uint16_t progress)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
progress | uint16_t | set value 0 |
lv_anim_timeline_set_user_data
Set the user_data of a an animation timeline
void lv_anim_timeline_set_user_data(lv_anim_timeline_t *at, void *user_data)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
user_data | void * | pointer to any data. Only the pointer will be saved. May be NULL. |
lv_anim_timeline_get_playtime
Get the time used to play the animation timeline.
uint32_t lv_anim_timeline_get_playtime(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
Returns: uint32_t — total time spent in animation timeline.
lv_anim_timeline_get_reverse
Get whether the animation timeline is played in reverse.
bool lv_anim_timeline_get_reverse(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
Returns: bool — return true if it is reverse playback.
lv_anim_timeline_get_delay
Get the wait time when playing from the very start, or reverse from the very end.
uint32_t lv_anim_timeline_get_delay(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to an animation timeline |
Returns: uint32_t — the remaining time in milliseconds
lv_anim_timeline_get_progress
Get the progress of the animation timeline.
uint16_t lv_anim_timeline_get_progress(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
Returns: uint16_t — return value 065535 to map 0100% animation progress.
lv_anim_timeline_get_repeat_count
Get repeat count of the animation timeline.
uint32_t lv_anim_timeline_get_repeat_count(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
lv_anim_timeline_get_repeat_delay
Get repeat delay of the animation timeline.
uint32_t lv_anim_timeline_get_repeat_delay(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
lv_anim_timeline_get_user_data
Get the user_data of a an animation timeline
void * lv_anim_timeline_get_user_data(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
lv_anim_timeline_create
Create an animation timeline.
lv_anim_timeline_t * lv_anim_timeline_create(void)Returns: lv_anim_timeline_t * — pointer to the animation timeline.
lv_anim_timeline_delete
Delete animation timeline.
void lv_anim_timeline_delete(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. May be NULL. |
lv_anim_timeline_add
Add animation to the animation timeline.
void lv_anim_timeline_add(lv_anim_timeline_t *at, uint32_t start_time, const lv_anim_t *a)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
start_time | uint32_t | the time the animation started on the timeline, note that start_time will override the value of delay. |
a | const lv_anim_t * | pointer to an animation. |
lv_anim_timeline_start
Start the animation timeline. It plays from where the timeline currently is: from the beginning, or from the point set by lv_anim_timeline_set_progress().
uint32_t lv_anim_timeline_start(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
Returns: uint32_t — total time spent in animation timeline.
delay is applied only if the animation is at very beginning or very end (not midway)
if reverse was set it plays backwards.
lv_anim_timeline_restart
Play the animation timeline from the beginning, whatever state it was left in. Same as rewinding with lv_anim_timeline_set_progress() and starting it.
uint32_t lv_anim_timeline_restart(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
Returns: uint32_t — total time spent in animation timeline.
lv_anim_timeline_pause
Pause the animation timeline.
void lv_anim_timeline_pause(lv_anim_timeline_t *at)| Name | Type | Description |
|---|---|---|
at | lv_anim_timeline_t * | pointer to the animation timeline. |
lv_anim_timeline_merge
Merge (add) all animations of a timeline to another
void lv_anim_timeline_merge(lv_anim_timeline_t *dest, const lv_anim_timeline_t *src, int32_t delay)| Name | Type | Description |
|---|---|---|
dest | lv_anim_timeline_t * | merge animation into this timeline |
src | const lv_anim_timeline_t * | merge the animations of this timeline |
delay | int32_t | add the animations with this extra delay |
Structs
_lv_anim_timeline_dsc_t
| Member | Type | Description |
|---|---|---|
anim | lv_anim_t | |
start_time | uint32_t | |
is_started | uint8_t | |
is_completed | uint8_t |
Typedefs
lv_anim_timeline_dsc_t
typedef struct _lv_anim_timeline_dsc_t lv_anim_timeline_dsc_tMacros
LV_ANIM_TIMELINE_PROGRESS_MAX
#define LV_ANIM_TIMELINE_PROGRESS_MAX 0xFFFFDependencies
Indirect dependencies
Last updated on