00001 00020 /* 00021 * $Id: animation.h,v 1.5.2.3 2006/06/05 08:59:40 xwyan Exp $ 00022 * 00023 * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 00024 * pSOS, ThreadX, NuCleus, OSE, and Win32 version 1.6.x 00025 * Copyright (C) 2002-2006 Feynman Software. 00026 * Copyright (C) 1998-2002 Wei Yongming. 00027 */ 00028 00029 #ifndef EXT_ANIMATION_H 00030 #define EXT_ANIMATION_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00052 typedef struct _ANIMATIONFRAME 00053 { 00063 int disposal; 00065 int off_x; 00067 int off_y; 00069 unsigned int width; 00071 unsigned int height; 00072 00074 unsigned int delay_time; 00075 #ifdef _USE_NEWGAL 00076 00077 HDC mem_dc; 00079 Uint8* bits; 00080 #else 00081 00082 BITMAP bmp; 00083 #endif 00084 00086 struct _ANIMATIONFRAME* next; 00088 struct _ANIMATIONFRAME* prev; 00089 } ANIMATIONFRAME; 00090 00092 typedef struct _ANIMATION 00093 { 00095 unsigned int width; 00097 unsigned int height; 00098 00100 RGB bk; 00101 00103 int nr_frames; 00108 int time_unit; 00110 ANIMATIONFRAME* frames; 00111 } ANIMATION; 00112 00127 ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area); 00128 00143 MGEXT_EXPORT ANIMATION* CreateAnimationFromGIF89aFile (HDC hdc, const char* file); 00144 00160 MGEXT_EXPORT ANIMATION* CreateAnimationFromGIF89aMem (HDC hdc, const void* mem, int size); 00161 00174 MGEXT_EXPORT void DestroyAnimation (ANIMATION* anim, BOOL free_it); 00175 00177 #define CTRL_ANIMATION ("Animation") 00178 00180 #define ANIMATION_OKAY 0 00181 00182 #define ANIMATION_ERR 1 00183 00215 #define ANS_AUTOLOOP 0x0001L 00216 00221 #define ANS_SCALED 0x0002L 00222 00227 #define ANS_FITTOANI 0x0004L 00228 00252 #define ANM_SETANIMATION 0xF110 00253 00269 #define ANM_GETANIMATION 0xF111 00270 00288 #define ANM_STARTPLAY 0xF112 00289 00306 #define ANM_PAUSE_RESUME 0xF113 00307 00325 #define ANM_STOPPLAY 0xF114 00326 00327 #define ANM_MSGMAX 0xF120 00328 00342 #define ANNC_CLICKED 1 00343 00348 #define ANNC_DBLCLK 2 00349 00356 #ifdef __cplusplus 00357 } 00358 #endif 00359 00360 #endif /* EXT_ANIMATION_H */ 00361
1.4.2