MiniGUI API Reference (MiniGUI-Processes)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Modules | Data Structures | Macros | Typedefs | Functions
ANIMATION control and animation GIF (GIF87a/GIF89a) support

Modules

 Styles of ANIMATION control
 This control can be used to play the animation object, and you should specify the animation object when you create the control by using the dwAddData:
 
 Messages of ANIMATION control
 
 Notification code of ANIMATION control
 

Data Structures

struct  _ANIMATIONFRAME
 
struct  _ANIMATION
 

Macros

#define CTRL_ANIMATION   ("Animation")
 
#define ANIMATION_OKAY   0
 
#define ANIMATION_ERR   1
 

Typedefs

typedef struct _ANIMATIONFRAME ANIMATIONFRAME
 
typedef struct _ANIMATION ANIMATION
 

Functions

ANIMATIONCreateAnimationFromGIF89a (HDC hdc, MG_RWops *area)
 Creates an ANIMATION obeject from a GIF 89a data source. More...
 
MG_EXPORT ANIMATIONCreateAnimationFromGIF89aFile (HDC hdc, const char *file)
 Creates an ANIMATION obeject from a GIF 89a file. More...
 
MG_EXPORT ANIMATIONCreateAnimationFromGIF89aMem (HDC hdc, const void *mem, int size)
 Creates an ANIMATION obeject from a GIF 89a memory data. More...
 
MG_EXPORT void DestroyAnimation (ANIMATION *anim, BOOL free_it)
 Destories an ANIMATION object. More...
 

Detailed Description

Macro Definition Documentation

◆ ANIMATION_ERR

#define ANIMATION_ERR   1

Return values of ANIMATION control.

Definition at line 205 of file animation.h.

◆ ANIMATION_OKAY

#define ANIMATION_OKAY   0

Return values of ANIMATION control.

Definition at line 203 of file animation.h.

◆ CTRL_ANIMATION

#define CTRL_ANIMATION   ("Animation")

Control class name of ANIMATION control.

Definition at line 200 of file animation.h.

Typedef Documentation

◆ ANIMATION

typedef struct _ANIMATION ANIMATION

Animation structure

◆ ANIMATIONFRAME

Animation frame structure.

Function Documentation

◆ CreateAnimationFromGIF89a()

ANIMATION * CreateAnimationFromGIF89a ( HDC  hdc,
MG_RWops area 
)

Creates an ANIMATION obeject from a GIF 89a data source.

This function load a GIF 89a graphic from the data source area, and create an ANIMATION object from the GIF 89a data.

Parameters
hdcThe dc will be used to create BITMAP object for the animation frame.
areaThe data source.
Returns
This function returns an ANIMATION object when success, otherwise NULL.
See also
DestroyAnimation, ANIMATION

◆ CreateAnimationFromGIF89aFile()

ANIMATION * CreateAnimationFromGIF89aFile ( HDC  hdc,
const char *  file 
)

Creates an ANIMATION obeject from a GIF 89a file.

This function load a GIF 89a graphic from the file file, and create an ANIMATION object.

Parameters
hdcThe dc will be used to create BITMAP object for the animation frame.
fileThe file name.
Returns
This function returns an ANIMATION object when success, otherwise NULL.
See also
DestroyAnimation, ANIMATION

◆ CreateAnimationFromGIF89aMem()

ANIMATION * CreateAnimationFromGIF89aMem ( HDC  hdc,
const void *  mem,
int  size 
)

Creates an ANIMATION obeject from a GIF 89a memory data.

This function load a GIF 89a graphic from the memory mem which is size long and create an ANIMATION object from the GIF 89a data.

Parameters
hdcThe dc will be used to create BITMAP object for the animation frame.
memThe pointer to the memory.
sizeThe size of the memory.
Returns
This function returns an ANIMATION object when success, otherwise NULL.
See also
DestroyAnimation, ANIMATION

◆ DestroyAnimation()

void DestroyAnimation ( ANIMATION anim,
BOOL  free_it 
)

Destories an ANIMATION object.

This function destroies the ANIMATION object anim, and free it if free_it is TRUE.

Parameters
animPointer to the ANIMATION object.
free_itSpecify whether free the object by calling free(3).
See also
CreateAnimationFromGIF89a, ANIMATION