MiniGUI API Reference (MiniGUI-Standalone)  v4.0.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
animation.h
Go to the documentation of this file.
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 
55 /*
56  * $Id: animation.h 10865 2008-08-27 06:52:22Z wangjian $
57  *
58  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
59  * pSOS, ThreadX, NuCleus, OSE, and Win32.
60  */
61 
62 #ifndef EXT_ANIMATION_H
63 #define EXT_ANIMATION_H
64 
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
81 typedef struct _ANIMATIONFRAME
82 {
92  int disposal;
94  int off_x;
96  int off_y;
98  unsigned int width;
100  unsigned int height;
101 
103  unsigned int delay_time;
108 
114 
116 typedef struct _ANIMATION
117 {
119  unsigned int width;
121  unsigned int height;
122 
125 
135 } ANIMATION;
136 
152 
167 MG_EXPORT ANIMATION* CreateAnimationFromGIF89aFile (HDC hdc, const char* file);
168 
184 MG_EXPORT ANIMATION* CreateAnimationFromGIF89aMem (HDC hdc, const void* mem, int size);
185 
198 MG_EXPORT void DestroyAnimation (ANIMATION* anim, BOOL free_it);
199 
201 #define CTRL_ANIMATION ("Animation")
202 
204 #define ANIMATION_OKAY 0
205 
206 #define ANIMATION_ERR 1
207 
239 #define ANS_AUTOLOOP 0x0001L
240 
245 #define ANS_SCALED 0x0002L
246 
251 #define ANS_FITTOANI 0x0004L
252 
257 #define ANS_WINBGC 0x0010L
258 
282 #define ANM_SETANIMATION 0xF110
283 
299 #define ANM_GETANIMATION 0xF111
300 
318 #define ANM_STARTPLAY 0xF112
319 
336 #define ANM_PAUSE_RESUME 0xF113
337 
355 #define ANM_STOPPLAY 0xF114
356 
357 #define ANM_MSGMAX 0xF120
358 
369 #define ANNC_CLICKED 1
370 
375 #define ANNC_DBLCLK 2
376 
381 #define ANNC_NOFRAME 3
382 
389 #ifdef __cplusplus
390 }
391 #endif
392 
393 #endif /* EXT_ANIMATION_H */
394 
ANIMATION * CreateAnimationFromGIF89a(HDC hdc, MG_RWops *area)
Creates an ANIMATION obeject from a GIF 89a data source.
int BOOL
A type definition for boolean value.
Definition: common.h:338
unsigned int width
Definition: animation.h:98
unsigned int width
Definition: animation.h:119
MG_EXPORT ANIMATION * CreateAnimationFromGIF89aFile(HDC hdc, const char *file)
Creates an ANIMATION obeject from a GIF 89a file.
MG_EXPORT ANIMATION * CreateAnimationFromGIF89aMem(HDC hdc, const void *mem, int size)
Creates an ANIMATION obeject from a GIF 89a memory data.
MG_EXPORT void DestroyAnimation(ANIMATION *anim, BOOL free_it)
Destories an ANIMATION object.
unsigned int height
Definition: animation.h:121
GHANDLE HDC
Handle to device context.
Definition: common.h:407
unsigned int height
Definition: animation.h:100
struct _ANIMATIONFRAME * prev
Definition: animation.h:112
Uint8 * bits
Definition: animation.h:107
ANIMATIONFRAME * frames
Definition: animation.h:134
struct _ANIMATION ANIMATION
unsigned char Uint8
A type definition for an 8-bit unsigned character.
Definition: common.h:154
Definition: common.h:1001
struct _ANIMATIONFRAME ANIMATIONFRAME
int time_unit
Definition: animation.h:132
struct _ANIMATIONFRAME * next
Definition: animation.h:110
int nr_frames
Definition: animation.h:127
unsigned int delay_time
Definition: animation.h:103