2020-10-26 17:00:17 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
typedef struct IconData IconData;
|
|
|
|
typedef struct Icon Icon;
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Allocate icon instance with const icon data.
|
|
|
|
* always returns Icon or stops system if not enough memory
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
Icon* icon_alloc(const IconData* data);
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Release icon instance
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
void icon_free(Icon* icon);
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Get icon width
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
uint8_t icon_get_width(Icon* icon);
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Get icon height
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
uint8_t icon_get_height(Icon* icon);
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Check if icon is animated
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
bool icon_is_animated(Icon* icon);
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Start icon animation
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
void icon_start_animation(Icon* icon);
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Stop icon animation
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
void icon_stop_animation(Icon* icon);
|