mimagepiece.h
00001 #ifndef _MGNCS_IMAGEPIECE_H
00002 #define _MGNCS_IMAGEPIECE_H
00003
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif
00007
00008 typedef struct _mImagePieceClass mImagePieceClass;
00009 typedef struct _mImagePiece mImagePiece;
00010
00011 #define mImagePieceClassHeader(clss, superCls) \
00012 mStaticPieceClassHeader(clss, superCls)
00013
00014 struct _mImagePieceClass
00015 {
00016 mImagePieceClassHeader(mImagePiece, mStaticPiece)
00017 };
00018
00019 MGNCS_EXPORT extern mImagePieceClass g_stmImagePieceCls;
00020
00021 #define mImagePieceHeader(clss) \
00022 mStaticPieceHeader(clss) \
00023 ImageDrawInfo img;
00024
00025 struct _mImagePiece
00026 {
00027 mImagePieceHeader(mImagePiece)
00028 };
00029
00030 #define mImagePiece_setAlign(self, align) ((self)->img.revert=((((self)->img.revert)&0xF0)|((align)&0xF)))
00031 #define mImagePiece_getAlign(self) ((self)->img.revert&0xF)
00032
00033 #define mImagePiece_setVAlign(self, valign) ((self)->img.revert=(((self)->img.revert&0x0F)|(((valign)&0xF)<<4)))
00034 #define mImagePiece_getVAlign(self) (((self)->img.revert&0xF0)>>4)
00035
00036 enum mImagePieceProps {
00037 NCSP_IMAGEPIECE_IMAGE = IMAGEPIECE_PROP_BEGIN,
00038 NCSP_IMAGEPIECE_ICON,
00039 NCSP_IMAGEPIECE_MYBITMAP,
00040 NCSP_IMAGEPIECE_IMAGEFILE,
00041 NCSP_IMAGEPIECE_ALIGN = PIECECOMM_PROP_ALIGN,
00042 NCSP_IMAGEPIECE_VALIGN = PIECECOMM_PROP_VALIGN,
00043 NCSP_IMAGEPIECE_DRAWMODE = PIECECOMM_PROP_DRAWMOD
00044 };
00045
00046
00047
00048 #ifdef __cplusplus
00049 }
00050 #endif
00051
00052 #endif
00053