Loading...
Searching...
No Matches
icon_animation.h File Reference

GUI: IconAnimation API. More...

#include <stdint.h>
#include <stdbool.h>
#include <gui/icon.h>

Go to the source code of this file.

Typedefs

typedef struct IconAnimation IconAnimation
 Icon Animation.
 
typedef void(* IconAnimationCallback) (IconAnimation *instance, void *context)
 Icon Animation Callback.
 

Functions

IconAnimationicon_animation_alloc (const Icon *icon)
 Allocate icon animation instance with const icon data.
 
void icon_animation_free (IconAnimation *instance)
 Release icon animation instance.
 
void icon_animation_set_update_callback (IconAnimation *instance, IconAnimationCallback callback, void *context)
 Set IconAnimation update callback.
 
uint8_t icon_animation_get_width (const IconAnimation *instance)
 Get icon animation width.
 
uint8_t icon_animation_get_height (const IconAnimation *instance)
 Get icon animation height.
 
void icon_animation_start (IconAnimation *instance)
 Start icon animation.
 
void icon_animation_stop (IconAnimation *instance)
 Stop icon animation.
 
bool icon_animation_is_last_frame (const IconAnimation *instance)
 Returns true if current frame is a last one.
 

Detailed Description

GUI: IconAnimation API.

Typedef Documentation

◆ IconAnimationCallback

typedef void(* IconAnimationCallback) (IconAnimation *instance, void *context)

Icon Animation Callback.

Used for update notification

Function Documentation

◆ icon_animation_alloc()

IconAnimation * icon_animation_alloc ( const Icon * icon)

Allocate icon animation instance with const icon data.

always returns Icon or stops system if not enough memory

Parameters
[in]iconpointer to Icon data
Returns
IconAnimation instance

◆ icon_animation_free()

void icon_animation_free ( IconAnimation * instance)

Release icon animation instance.

Parameters
instanceIconAnimation instance

◆ icon_animation_get_height()

uint8_t icon_animation_get_height ( const IconAnimation * instance)

Get icon animation height.

Parameters
instanceIconAnimation instance
Returns
height in pixels

◆ icon_animation_get_width()

uint8_t icon_animation_get_width ( const IconAnimation * instance)

Get icon animation width.

Parameters
instanceIconAnimation instance
Returns
width in pixels

◆ icon_animation_is_last_frame()

bool icon_animation_is_last_frame ( const IconAnimation * instance)

Returns true if current frame is a last one.

Parameters
instanceIconAnimation instance
Returns
true if last frame

◆ icon_animation_set_update_callback()

void icon_animation_set_update_callback ( IconAnimation * instance,
IconAnimationCallback callback,
void * context )

Set IconAnimation update callback.

Normally you do not need to use this function, use view_tie_icon_animation instead.

Parameters
instanceIconAnimation instance
[in]callbackIconAnimationCallback
contextcallback context

◆ icon_animation_start()

void icon_animation_start ( IconAnimation * instance)

Start icon animation.

Parameters
instanceIconAnimation instance

◆ icon_animation_stop()

void icon_animation_stop ( IconAnimation * instance)

Stop icon animation.

Parameters
instanceIconAnimation instance