2021-07-07 08:57:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "icon_animation.h"
|
|
|
|
|
2021-10-02 17:00:56 +00:00
|
|
|
#include <furi.h>
|
2021-07-07 08:57:49 +00:00
|
|
|
|
|
|
|
struct IconAnimation {
|
|
|
|
const Icon* icon;
|
|
|
|
uint8_t frame;
|
2021-10-02 17:00:56 +00:00
|
|
|
bool animating;
|
|
|
|
osTimerId_t timer;
|
|
|
|
IconAnimationCallback callback;
|
|
|
|
void* callback_context;
|
2021-07-07 08:57:49 +00:00
|
|
|
};
|
|
|
|
|
2021-10-02 17:00:56 +00:00
|
|
|
/** Get pointer to current frame data */
|
2021-07-07 08:57:49 +00:00
|
|
|
const uint8_t* icon_animation_get_data(IconAnimation* instance);
|
|
|
|
|
2021-10-02 17:00:56 +00:00
|
|
|
/** Advance to next frame */
|
2021-07-07 08:57:49 +00:00
|
|
|
void icon_animation_next_frame(IconAnimation* instance);
|
2021-10-02 17:00:56 +00:00
|
|
|
|
|
|
|
/** IconAnimation timer callback */
|
|
|
|
void icon_animation_timer_callback(void* context);
|