2021-10-03 10:36:05 +00:00
|
|
|
/**
|
|
|
|
* @file icon_animation_i.h
|
|
|
|
* GUI: internal IconAnimation API
|
|
|
|
*/
|
|
|
|
|
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;
|
2022-07-20 10:56:33 +00:00
|
|
|
FuriTimer* timer;
|
2021-10-02 17:00:56 +00:00
|
|
|
IconAnimationCallback callback;
|
|
|
|
void* callback_context;
|
2021-07-07 08:57:49 +00:00
|
|
|
};
|
|
|
|
|
2021-10-03 10:36:05 +00:00
|
|
|
/** Get pointer to current frame data
|
|
|
|
*
|
|
|
|
* @param instance IconAnimation instance
|
|
|
|
*
|
|
|
|
* @return pointer to current frame XBM bitmap data
|
|
|
|
*/
|
2023-02-09 04:58:01 +00:00
|
|
|
const uint8_t* icon_animation_get_data(const IconAnimation* instance);
|
2021-07-07 08:57:49 +00:00
|
|
|
|
2021-10-03 10:36:05 +00:00
|
|
|
/** Advance to next frame
|
|
|
|
*
|
|
|
|
* @param instance IconAnimation instance
|
|
|
|
*/
|
2021-07-07 08:57:49 +00:00
|
|
|
void icon_animation_next_frame(IconAnimation* instance);
|
2021-10-02 17:00:56 +00:00
|
|
|
|
2021-10-03 10:36:05 +00:00
|
|
|
/** IconAnimation timer callback
|
|
|
|
*
|
|
|
|
* @param context pointer to IconAnimation
|
|
|
|
*/
|
2021-10-02 17:00:56 +00:00
|
|
|
void icon_animation_timer_callback(void* context);
|