MiniGUI API Reference (MiniGUI-Threads)  v3.2.0
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
 
 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

#define ANIMATION_ERR   1

Return values of ANIMATION control.

Definition at line 194 of file animation.h.

#define ANIMATION_OKAY   0

Return values of ANIMATION control.

Definition at line 192 of file animation.h.

#define CTRL_ANIMATION   ("Animation")

Control class name of ANIMATION control.

Definition at line 189 of file animation.h.

Typedef Documentation

typedef struct _ANIMATION ANIMATION

Animation structure

Animation frame structure.

Function Documentation

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
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
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
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