manimate.h

00001 #ifdef _MGNCSCTRL_ANIMATE
00002 
00003 #ifndef _MGUI_NCSCTRL_ANIMATESTATIC_H
00004 #define _MGUI_NCSCTRL_ANIMATESTATIC_H
00005 
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif  /* __cplusplus */
00010 
00011 #define NCSCTRL_ANIMATE        NCSCLASSNAME("animate")
00012 
00013 typedef struct _mAnimate mAnimate;
00014 typedef struct _mAnimateClass mAnimateClass;
00015 typedef struct _mAnimateRenderer mAnimateRenderer;
00016 
00017 
00018 #define mAnimateHeader(clsName) \
00019         mStaticHeader(clsName)  \
00020         unsigned int state:4;  \
00021         unsigned int paint_flag; \
00022         unsigned int interval:24; \
00023         char *path;     \
00024         HDC  mem_dc;
00025 
00026 struct _mAnimate
00027 {
00028         mAnimateHeader(mAnimate)
00029 };
00030 
00031 #define mAnimateClassHeader(clsName, parentClass) \
00032         mStaticClassHeader(clsName, parentClass) \
00033         BOOL (*play)(clsName*); \
00034         BOOL (*pauseResume)(clsName*); \
00035         BOOL (*stop)(clsName*);
00036 
00037 struct _mAnimateClass
00038 {
00039         mAnimateClassHeader(mAnimate, mStatic)
00040 };
00041 
00042 #define mAnimateRendererHeader(clsName, parentClass) \
00043         mStaticRendererHeader(clsName, parentClass)
00044 
00045 struct _mAnimateRenderer {
00046         mAnimateRendererHeader(mAnimate, mStatic)
00047 };
00048 
00049 MGNCS_EXPORT extern mAnimateClass g_stmAnimateCls;
00050 
00051 enum mAnimateProp {
00052         NCSP_ANMT_GIFFILE = NCSP_STATIC_MAX + 1,
00053         NCSP_ANMT_DIR,
00054         NCSP_ANMT_INTERVAL,
00055         NCSP_ANMT_MEM, //gif memory
00056         NCSP_ANMT_BMPARRAY, //bmp array end by NULL, e.g PBITMAP bmps={&bmp1, &bmp2, ..., NULL}
00057         NCSP_ANMT_AFRAME, //set the animate frame object
00058         NCSP_ANMT_MAX,
00059 };
00060 
00061 #define NCSS_ANMT_SHIFT  (NCSS_STATIC_SHIFT + 1)
00062 
00063 #define NCSS_ANMT_AUTOLOOP (0x1<<NCSS_ANMT_SHIFT)
00064 
00065 #define NCSS_ANMT_SCALE (0x2<<NCSS_ANMT_SHIFT)
00066 
00067 #define NCSS_ANMT_AUTOFIT       (0x4<<NCSS_ANMT_SHIFT)
00068 
00069 #define NCSS_ANMT_AUTOPLAY   (0x8<<NCSS_ANMT_SHIFT)
00070 
00071 enum enumAnimateNotify{
00072         NCSN_ANMT_MAX = NCSN_STATIC_MAX + 1
00073 };
00074 
00075 #define ANIM_PLAY 0x01
00076 #define ANIM_PAUSE 0x02
00077 #define ANIM_STOP 0x04
00078 #define ANIM_STARTPLAY 0xF112
00079 #define ANIM_PAUSE_RESUME 0xF113
00080 #define ANIM_STOPPLAY 0xF114
00081 
00082 #define ncsAnimateStart(self)  ((self)?_c(self)->play(self):FALSE)
00083 
00084 #define ncsAnimatePauseResume(self)  ((self)?_c(self)->pauseResume(self):FALSE)
00085 
00086 #define ncsAnimateStop(self) ((self)?_c(self)->stop(self):FALSE)
00087 
00088 #ifdef __cplusplus
00089 }
00090 #endif  /* __cplusplus */
00091 
00092 #endif
00093 #endif          //_MGNCSCTRL_ANIMATE
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3