manimatepiece.h

00001 #ifdef _MGNCSCTRL_ANIMATE
00002 #ifndef _MGNCS_ANIMATEPIECE_H
00003 #define _MGNCS_ANIMATEPIECE_H
00004 
00005 #ifdef __cplusplus
00006 extern "C" {
00007 #endif
00008 
00009 typedef struct _mAnimatePiece mAnimatePiece;
00010 typedef struct _mAnimatePieceClass mAnimatePieceClass;
00011 
00012 #define mAnimatePieceHeader(clss) \
00013         mStaticPieceHeader(clss) \
00014         unsigned char flags;    \
00015         unsigned char align:4;  \
00016         unsigned char valign:4; \
00017         mAnimateFrames *frame;
00018 
00019 struct _mAnimatePiece
00020 {
00021         mAnimatePieceHeader(mAnimatePiece)
00022 };
00023 
00024 #define mAnimatePieceClassHeader(clss, superCls) \
00025         mStaticPieceClassHeader(clss, superCls) \
00026         void (*reset)(mAnimatePiece *self); \
00027         void (*autofit)(mAnimatePiece *self, int *width, int *height); \
00028 
00029 struct _mAnimatePieceClass
00030 {
00031         mAnimatePieceClassHeader(mAnimatePiece, mStaticPiece)
00032 };
00033 
00034 MGNCS_EXPORT extern mAnimatePieceClass g_stmAnimatePieceCls;
00035 
00036 enum mAnimatePieceProps {
00037         NCSP_ANIMATEPIECE_GIFFILE = ANIMATEPIECE_PROP_BEGIN,
00038         NCSP_ANIMATEPIECE_DIR,
00039         NCSP_ANIMATEPIECE_MEM,
00040         NCSP_ANIMATEPIECE_AUTOLOOP,
00041         NCSP_ANIMATEPIECE_SCALE,
00042         NCSP_ANIMATEPIECE_AUTOFIT,
00043         NCSP_ANIMATEPIECE_AUTOPLAY,
00044         NCSP_ANIMATEPIECE_BMPARRAY,
00045         NCSP_ANIMATEPIECE_AFRAME,
00046         NCSP_ANIMATEPIECE_ALIGN = PIECECOMM_PROP_ALIGN,
00047         NCSP_ANIMATEPIECE_VALIGN = PIECECOMM_PROP_VALIGN
00048 };
00049 
00050 #define NCSS_AF_AUTOLOOP 0x01
00051 #define NCSS_AF_PLAY 0x02
00052 #define NCSS_AF_SCALE 0x04
00053 #define NCSS_AF_AUTOFIT 0x08
00054 #define NCSS_AF_AUTOPLAY 0x10
00055 
00056 #define mAnimatePiece_setAutoloop(self, bautoloop) \
00057         ((bautoloop)?SET_BIT((self)->flags, NCSS_AF_AUTOLOOP):CLEAR_BIT((self)->flags, NCSS_AF_AUTOLOOP))
00058 
00059 #define mAnimatePiece_isAutoloop(self)  \
00060         IS_BIT_SET((self)->flags, NCSS_AF_AUTOLOOP)
00061 
00062 #define mAnimatePiece_setScale(self, bscale) \
00063         ((bscale)?SET_BIT((self)->flags, NCSS_AF_SCALE):CLEAR_BIT((self)->flags, NCSS_AF_SCALE))
00064 
00065 #define mAnimatePiece_isScale(self)     \
00066         IS_BIT_SET((self)->flags, NCSS_AF_SCALE)
00067 
00068 #define mAnimatePiece_setAutofit(self, bautofit) \
00069         ((bautofit)?SET_BIT((self)->flags, NCSS_AF_AUTOFIT):CLEAR_BIT((self)->flags, NCSS_AF_AUTOFIT))
00070 
00071 #define mAnimatePiece_isAutofit(self)   \
00072         IS_BIT_SET((self)->flags, NCSS_AF_AUTOFIT)
00073 
00074 #define mAnimatePiece_setPlay(self, bplay) \
00075         ((bplay)?SET_BIT((self)->flags, NCSS_AF_PLAY):CLEAR_BIT((self)->flags, NCSS_AF_PLAY))
00076 
00077 #define mAnimatePiece_isPlay(self)      \
00078         IS_BIT_SET((self)->flags, NCSS_AF_PLAY)
00079 
00080 #define mAnimatePiece_setAutoplay(self, bautoplay) \
00081         ((bautoplay)?SET_BIT((self)->flags, NCSS_AF_AUTOPLAY):CLEAR_BIT((self)->flags, NCSS_AF_AUTOPLAY))
00082 
00083 #define mAnimatePiece_isAutoplay(self)  \
00084         IS_BIT_SET((self)->flags, NCSS_AF_AUTOPLAY)
00085 
00086 #ifdef __cplusplus
00087 }
00088 #endif
00089 
00090 #endif
00091 #endif          //_MGNCSCTRL_ANIMATE
00092 
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3