[FL-1908] New animation update scheme (#737)
* Assets: update desktop animation frame rate and cleanup. * Power: update ViewPort only if changed. * Gui: tie IconAnimation with View, new update event generation scheme. Desktop: update IconAnimation usage. Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -11,54 +11,41 @@ extern "C" {
|
||||
|
||||
typedef struct IconAnimation IconAnimation;
|
||||
|
||||
/*
|
||||
* Allocate icon animation instance with const icon data.
|
||||
typedef void (*IconAnimationCallback)(IconAnimation* instance, void* context);
|
||||
|
||||
/** Allocate icon animation instance with const icon data.
|
||||
* always returns Icon or stops system if not enough memory
|
||||
*/
|
||||
IconAnimation* icon_animation_alloc(const Icon* icon);
|
||||
|
||||
/*
|
||||
* Release icon animation instance
|
||||
/** Release icon animation instance
|
||||
*/
|
||||
void icon_animation_free(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Get icon animation width
|
||||
/** Get icon animation width
|
||||
*/
|
||||
void icon_animation_set_update_callback(
|
||||
IconAnimation* instance,
|
||||
IconAnimationCallback callback,
|
||||
void* context);
|
||||
|
||||
/** Get icon animation width
|
||||
*/
|
||||
uint8_t icon_animation_get_width(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Get icon animation height
|
||||
/** Get icon animation height
|
||||
*/
|
||||
uint8_t icon_animation_get_height(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Check if icon is animated
|
||||
*/
|
||||
bool icon_animation_is_animated(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Check if icon animation is active
|
||||
*/
|
||||
bool icon_animation_is_animating(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Start icon animation
|
||||
/** Start icon animation
|
||||
*/
|
||||
void icon_animation_start(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Stop icon animation
|
||||
/** Stop icon animation
|
||||
*/
|
||||
void icon_animation_stop(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Get current frame
|
||||
*/
|
||||
uint8_t icon_animation_get_current_frame(IconAnimation* instance);
|
||||
|
||||
/*
|
||||
* Returns true if current frame is a last one
|
||||
/** Returns true if current frame is a last one
|
||||
*/
|
||||
bool icon_animation_is_last_frame(IconAnimation* instance);
|
||||
|
||||
|
Reference in New Issue
Block a user