📄 mqtab32.h
字号:
#ifndef __MQTAB32_H_
#define __MQTAB32_H_
#define NUM_CDEPTH 4
#define CDEPTH_8BPP 0
#define CDEPTH_16BPP 1
#define CDEPTH_24BPP 2
#define CDEPTH_32BPP 3
#define DECLARE_BLT( name ) \
SCODE (GPE::*Table##name[NUM_CDEPTH])(struct GPEBltParms *);
#define DECLARE_LINE( name ) \
SCODE (GPE::*Table##name[NUM_CDEPTH])(struct GPELineParms *);
#define DEFINE_BLT( name, f0, f1, f2, f3 ) \
Table##name[CDEPTH_8BPP ] = (SCODE (GPE::*)(struct GPEBltParms *))f0; \
Table##name[CDEPTH_16BPP] = (SCODE (GPE::*)(struct GPEBltParms *))f1; \
Table##name[CDEPTH_24BPP] = (SCODE (GPE::*)(struct GPEBltParms *))f2; \
Table##name[CDEPTH_32BPP] = (SCODE (GPE::*)(struct GPEBltParms *))f3;
#define DEFINE_LINE( name, f0, f1, f2, f3 ) \
Table##name[CDEPTH_8BPP ] = (SCODE (GPE::*)(struct GPELineParms *))f0; \
Table##name[CDEPTH_16BPP] = (SCODE (GPE::*)(struct GPELineParms *))f1; \
Table##name[CDEPTH_24BPP] = (SCODE (GPE::*)(struct GPELineParms *))f2; \
Table##name[CDEPTH_32BPP] = (SCODE (GPE::*)(struct GPELineParms *))f3;
//Change to non-table-select if one-only-one color depth is supported
#define MQFUNC( name ) \
Table##name[ m_ulBPPSelect ]
#define MQFUNC2( name ) \
Table##name[ m_ulBPPSelect ]
#ifdef MPATBLT_ON
#define _DECLARE_BLT_MPATBLT \
DECLARE_BLT( MPATBlt );
#else
#define _DECLARE_BLT_MPATBLT
#endif //MPATBLT_ON
//Change to "empty" define if one-only-one color depth is supported
#define _DECLARE_BLT_TABLES \
DECLARE_BLT( RFillBlt ) \
DECLARE_BLT( CPATBlt ) \
DECLARE_BLT( S2SBlt ) \
DECLARE_BLT( MM2SBlt ) \
DECLARE_BLT( CM2SBlt ) \
DECLARE_BLT( CM2SLKBlt) \
DECLARE_BLT( XPTextBlt)
#define DECLARE_BLT_TABLES \
_DECLARE_BLT_TABLES \
_DECLARE_BLT_MPATBLT
//Change to "empty" define if one-only-one color depth is supported
#define DECLARE_LINE_TABLES \
DECLARE_LINE( SolidLine )
#ifdef MPATBLT_ON
#define _DEFINE_BLT_TABLE_MPATBLT \
DEFINE_BLT(MPATBlt, MPATBlt, MPATBlt, pEMULATED_BLT, MPATBlt)
#else
#define _DEFINE_BLT_TABLE_MPATBLT
#endif //MPATBLT_ON
#define _DEFINE_BLT_TABLES \
DEFINE_BLT(RFillBlt, RFillBlt, RFillBlt, RFillBlt24, RFillBlt) \
DEFINE_BLT(CPATBlt, CPATBlt, CPATBlt, pEMULATED_BLT, CPATBlt32) \
DEFINE_BLT(S2SBlt, S2SBlt, S2SBlt, S2SBlt24, S2SBlt) \
DEFINE_BLT(MM2SBlt, MM2SBlt, MM2SBlt, pEMULATED_BLT, MM2SBlt) \
DEFINE_BLT(CM2SBlt, CM2SBlt, CM2SBlt16, pEMULATED_BLT, CM2SBlt32) \
DEFINE_BLT(CM2SLKBlt, CM2SLKBlt, CM2SLKBlt16, pEMULATED_BLT, CM2SLKBlt32)\
DEFINE_BLT(XPTextBlt, XPTextBlt, XPTextBlt, pEMULATED_BLT, XPTextBlt)
// DEFINE_BLT(AAFontBlt, AAFontBlt8, AAFontBlt, pEMULATED_BLT, AAFontBlt) \
#define DEFINE_BLT_TABLES \
_DEFINE_BLT_TABLES \
_DEFINE_BLT_TABLE_MPATBLT
#define DEFINE_LINE_TABLES \
DEFINE_LINE( SolidLine, SolidLine, SolidLine, NullLine, SolidLine )
#ifdef AAFONT_ON
#define _DEFINE_BLT_AAFONT \
DECLARE_BLT_FUNC( AAFontBlt );
#else
#define _DEFINE_BLT_AAFONT
#endif //AAFONT_ON
#ifdef MPATBLT_ON
#define _DEFINE_BLT_MPATBLT \
DECLARE_BLT_FUNC( MPATBlt );
#else
#define _DEFINE_BLT_MPATBLT
#endif //MPATBLT_ON
#define _DEFINE_BLT_FUNCTIONS \
DECLARE_BLT_FUNC( RFillBlt ); \
DECLARE_BLT_FUNC( RFillBlt24 ); \
DECLARE_BLT_FUNC( CPATBlt ); \
DECLARE_BLT_FUNC( CPATBlt32 ); \
DECLARE_BLT_FUNC( S2SBlt ); \
DECLARE_BLT_FUNC( S2SBlt24 ); \
DECLARE_BLT_FUNC( S2SBlt32 ); \
DECLARE_BLT_FUNC( MM2SBlt ); \
DECLARE_BLT_FUNC( MM2SBlt32 ); \
DECLARE_BLT_FUNC( CM2SBlt ); \
DECLARE_BLT_FUNC( CM2SBlt16 ); \
DECLARE_BLT_FUNC( CM2SBlt24 ); \
DECLARE_BLT_FUNC( CM2SBlt32 ); \
DECLARE_BLT_FUNC( CM2SLKBlt ); \
DECLARE_BLT_FUNC( CM2SLKBlt16 );\
DECLARE_BLT_FUNC( CM2SLKBlt32 );\
DECLARE_BLT_FUNC( XPTextBlt );
/*
DECLARE_BLT_FUNC( MPATBlt24 ); \
DECLARE_BLT_FUNC( CPATBlt24 ); \
DECLARE_BLT_FUNC( MM2SBlt24 ); \
*/
#define DEFINE_BLT_FUNCTIONS \
_DEFINE_BLT_FUNCTIONS \
_DEFINE_BLT_MPATBLT \
_DEFINE_BLT_AAFONT
#define DEFINE_LINE_FUNCTIONS \
DECLARE_LINE_FUNC( SolidLine );
//+++++++++ Pattern Setup Routines handling ++++++++++
#define NullPatternSetup (void (MQGC::*)(GPEBltParms *, ULONG *))NULL
#define NUM_PATTERNTABLE (gpe32Bpp - gpe8Bpp + 1)
#define DECLARE_PATSETUP_TABLES \
void (MQGC::*TablePatternSetup[NUM_PATTERNTABLE])(GPEBltParms *, ULONG *ulCmd);
#define PATSETUP_IDX( cdepth ) TablePatternSetup[cdepth - gpe8Bpp]
#define DEFINE_PATSETUP_TABLES \
PATSETUP_IDX( gpe8Bpp ) = (void (MQGC::*)(GPEBltParms *, ULONG *))PatternSetup8BPP; \
PATSETUP_IDX( gpe16Bpp ) = (void (MQGC::*)(GPEBltParms *, ULONG *))PatternSetup16BPP; \
PATSETUP_IDX( gpe24Bpp ) = NullPatternSetup; \
PATSETUP_IDX( gpe32Bpp ) = (void (MQGC::*)(GPEBltParms *, ULONG *))PatternSetup32BPP;
//24Bpp Pattern cannot be supported in hw nor driver.
//PATSETUP_IDX( gpe24Bpp ) = (void (MQGC::*)(GPEBltParms *, ULONG *))PatternSetup24BPP; \
#ifdef MPATBLT_ON
#define _DEFINE_MPATSETUP_FUNCTION \
void PatternSetup1BPP( GPEBltParms *, ULONG *ulCmd );
#else
#define _DEFINE_MPATSETUP_FUNCTION
#endif //MPATBLT_ON
#define _DEFINE_PATSETUP_FUNCTIONS \
void PatternSetupSolid( GPEBltParms *, ULONG *ulCmd ); \
void PatternSetup8BPP( GPEBltParms *, ULONG *ulCmd ); \
void PatternSetup16BPP( GPEBltParms *, ULONG *ulCmd ); \
void PatternSetup24BPP( GPEBltParms *, ULONG *ulCmd ); \
void PatternSetup32BPP( GPEBltParms *, ULONG *ulCmd );
#define DEFINE_PATSETUP_FUNCTIONS \
_DEFINE_PATSETUP_FUNCTIONS \
_DEFINE_MPATSETUP_FUNCTION
//+++++++++ End Pattern Setup Routines handling ++++++++++
//$$$$$$$$$$$$ Macros for customized configuration - End $$$$$$$$$$$$$
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//$$$$$$$$$ Macros for temporary driver development - Begin $$$$$$$$$$
//Change to just OK code after implemented
#define RETURN_RFILLBLT return S_OK
#define RETURN_RFILLBLT24 return S_OK
#define RETURN_MPATBLT return S_OK
#define RETURN_MPATBLT24 return EMULATED_BLT( pBltParms )
#define RETURN_CPATBLT return S_OK
#define RETURN_CPATBLT24 return EMULATED_BLT( pBltParms )
#define RETURN_CPATBLT32 return S_OK
#define RETURN_S2SBLT return S_OK
#define RETURN_S2SBLT24 return S_OK
#define RETURN_S2SBLT32 return S_OK
#define RETURN_MM2SBLT return S_OK
#define RETURN_MM2SBLT24 return EMULATED_BLT( pBltParms )
#define RETURN_MM2SBLT32 return S_OK
#define RETURN_CM2SBLT return S_OK
#define RETURN_CM2SBLT16 return S_OK
#define RETURN_CM2SBLT24 return S_OK
#define RETURN_CM2SBLT32 return S_OK
#define RETURN_CM2SLKBLT return S_OK
#define RETURN_CM2SLKBLT16 return S_OK
#define RETURN_CM2SLKBLT32 return S_OK
#define RETURN_AAFONT8 return EMULATED_BLT( pBltParms )
#define RETURN_AAFONT return S_OK
#define RETURN_SOLIDLINE return S_OK
#define RETURN_XPTEXT return S_OK
//$$$$$$$$$$ Macros for temporary driver development - End $$$$$$$$$$$
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#endif //__MQTAB32_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -