GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon Api (#566)

* GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon API.
* Gui: icon and animation draw now do not accept null pointer
* Format Sources
* Fix no debug build
* Furi: stricter checks in memmgr
This commit is contained in:
あく
2021-07-07 11:57:49 +03:00
committed by GitHub
parent 607e873404
commit a7283280ef
82 changed files with 1093 additions and 1053 deletions

View File

@@ -1,66 +1,19 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct IconData IconData;
typedef struct Icon Icon;
/*
* Allocate icon instance with const icon data.
* always returns Icon or stops system if not enough memory
*/
Icon* icon_alloc(const IconData* data);
uint8_t icon_get_width(const Icon* instance);
/*
* Release icon instance
*/
void icon_free(Icon* icon);
uint8_t icon_get_height(const Icon* instance);
/*
* Get icon width
*/
uint8_t icon_get_width(Icon* icon);
/*
* Get icon height
*/
uint8_t icon_get_height(Icon* icon);
/*
* Check if icon is animated
*/
bool icon_is_animated(Icon* icon);
/*
* Check if icon animation is active
*/
bool icon_is_animating(Icon* icon);
/*
* Start icon animation
*/
void icon_start_animation(Icon* icon);
/*
* Stop icon animation
*/
void icon_stop_animation(Icon* icon);
/*
* Get current frame
*/
uint8_t icon_get_current_frame(Icon* icon);
/*
* Returns true if current frame is a last one
*/
bool icon_is_last_frame(Icon* icon);
const uint8_t* icon_get_data(const Icon* instance);
#ifdef __cplusplus
}
#endif
#endif