00001 00021 /* 00022 * $Id: animation.h,v 1.13 2006/06/11 04:20:45 weiym Exp $ 00023 * 00024 * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 00025 * pSOS, ThreadX, NuCleus, OSE, and Win32. 00026 * 00027 * Copyright (C) 2002-2006 Feynman Software. 00028 * Copyright (C) 1998-2002 Wei Yongming. 00029 */ 00030 00031 #ifndef EXT_ANIMATION_H 00032 #define EXT_ANIMATION_H 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00054 typedef struct _ANIMATIONFRAME 00055 { 00065 int disposal; 00067 int off_x; 00069 int off_y; 00071 unsigned int width; 00073 unsigned int height; 00074 00076 unsigned int delay_time; 00077 #ifdef _USE_NEWGAL 00078 00079 HDC mem_dc; 00081 Uint8* bits; 00082 #else 00083 00084 BITMAP bmp; 00085 #endif 00086 00088 struct _ANIMATIONFRAME* next; 00090 struct _ANIMATIONFRAME* prev; 00091 } ANIMATIONFRAME; 00092 00094 typedef struct _ANIMATION 00095 { 00097 unsigned int width; 00099 unsigned int height; 00100 00102 RGB bk; 00103 00105 int nr_frames; 00110 int time_unit; 00112 ANIMATIONFRAME* frames; 00113 } ANIMATION; 00114 00129 ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area); 00130 00145 MGEXT_EXPORT ANIMATION* CreateAnimationFromGIF89aFile (HDC hdc, const char* file); 00146 00162 MGEXT_EXPORT ANIMATION* CreateAnimationFromGIF89aMem (HDC hdc, const void* mem, int size); 00163 00176 MGEXT_EXPORT void DestroyAnimation (ANIMATION* anim, BOOL free_it); 00177 00179 #define CTRL_ANIMATION ("Animation") 00180 00182 #define ANIMATION_OKAY 0 00183 00184 #define ANIMATION_ERR 1 00185 00217 #define ANS_AUTOLOOP 0x0001L 00218 00223 #define ANS_SCALED 0x0002L 00224 00229 #define ANS_FITTOANI 0x0004L 00230 00254 #define ANM_SETANIMATION 0xF110 00255 00271 #define ANM_GETANIMATION 0xF111 00272 00290 #define ANM_STARTPLAY 0xF112 00291 00308 #define ANM_PAUSE_RESUME 0xF113 00309 00327 #define ANM_STOPPLAY 0xF114 00328 00329 #define ANM_MSGMAX 0xF120 00330 00344 #define ANNC_CLICKED 1 00345 00350 #define ANNC_DBLCLK 2 00351 00358 #ifdef __cplusplus 00359 } 00360 #endif 00361 00362 #endif /* EXT_ANIMATION_H */ 00363
1.4.2