⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ddgpepriv.h

📁 WinCE 3.0 BSP, 包含Inter SA1110, Intel_815E, Advantech_PCM9574 等
💻 H
字号:
#ifndef __DDGPEPRIV_H__
#define __DDGPEPRIV_H__

// some macros to help in debugging

/*
#define GPE_ZONE_ERROR              DEBUGZONE(0)
#define GPE_ZONE_WARNING    		DEBUGZONE(1)
#define GPE_ZONE_PERF               DEBUGZONE(2)
#define GPE_ZONE_TEMP               DEBUGZONE(3)

#define GPE_ZONE_ENTER              DEBUGZONE(4)
#define GPE_ZONE_INIT               DEBUGZONE(5)
#define GPE_ZONE_BLT_HI             DEBUGZONE(6)
#define GPE_ZONE_BLT_LO             DEBUGZONE(7)

#define GPE_ZONE_CREATE             DEBUGZONE(8)
#define GPE_ZONE_FLIP               DEBUGZONE(9)
#define GPE_ZONE_LINE               DEBUGZONE(10)
#define GPE_ZONE_HW                 DEBUGZONE(11)

#define GPE_ZONE_POLY               DEBUGZONE(12)
#define GPE_ZONE_CURSOR             DEBUGZONE(13)
*/

#define HAL_ZONE_ERROR		GPE_ZONE_ERROR
#define HAL_ZONE_WARNING	GPE_ZONE_WARNING
#define HAL_ZONE_INFO		0
#define HAL_ZONE_SUCCESS	0
#define HAL_ZONE_ENTER		GPE_ZONE_ENTER
#define HAL_ZONE_INIT		GPE_ZONE_INIT
#define HAL_ZONE_CREATE		GPE_ZONE_CREATE
#define HZL_ZONE_FLIP		GPE_ZONE_FLIP



#define DEBUGENTER(func) 										\
	{															\
		DEBUGMSG(GPE_ZONE_ENTER,(TEXT("Entering function %s\r\n"),TEXT(#func)));		\
	}

#define DEBUGLEAVE(func) 										\
	{															\
		DEBUGMSG(GPE_ZONE_ENTER,(TEXT("Leaving function %s\r\n"),TEXT( #func )));	\
	}

#define GDI_SCREEN_WIDTH	(g_pGPE->ScreenWidth())
#define GDI_SCREEN_HEIGHT	(g_pGPE->ScreenHeight())

#define DDRAW_SCREEN_WIDTH	( (g_pDDrawPrimarySurface != NULL) \
								? (g_pDDrawPrimarySurface->Width()) \
								: GDI_SCREEN_WIDTH )
#define DDRAW_SCREEN_HEIGHT	( (g_pDDrawPrimarySurface != NULL) \
								? (g_pDDrawPrimarySurface->Height()) \
								: GDI_SCREEN_HEIGHT )


////////////////////////////////////////////////////////////////////////////////
//
// Surface Detection Macros
//
////////////////////////////////////////////////////////////////////////////////


#define IsRGB1555(ppixelFormat) \
	( \
	 ((ppixelFormat)->dwRGBAlphaBitMask == 0x8000) && \
	 ((ppixelFormat)->dwRBitMask == 0x7c00) && \
	 ((ppixelFormat)->dwGBitMask == 0x03e0) && \
	 ((ppixelFormat)->dwBBitMask == 0x001f) && \
	 (1))

#define IsRGB0555(ppixelFormat) \
	( \
	 ((ppixelFormat)->dwRGBAlphaBitMask == 0x0000) && \
	 ((ppixelFormat)->dwRBitMask == 0x7c00) && \
	 ((ppixelFormat)->dwGBitMask == 0x03e0) && \
	 ((ppixelFormat)->dwBBitMask == 0x001f) && \
	 (1))

#define IsRGB565(ppixelFormat) \
	( \
	 ((ppixelFormat)->dwRGBAlphaBitMask == 0x0000) && \
	 ((ppixelFormat)->dwRBitMask == 0xf800) && \
	 ((ppixelFormat)->dwGBitMask == 0x07e0) && \
	 ((ppixelFormat)->dwBBitMask == 0x001f) && \
	 (1))

#define IsRGB4444(ppixelFormat) \
	( \
	 ((ppixelFormat)->dwRGBAlphaBitMask == 0xf000) && \
	 ((ppixelFormat)->dwRBitMask == 0x0f00) && \
	 ((ppixelFormat)->dwGBitMask == 0x00f0) && \
	 ((ppixelFormat)->dwBBitMask == 0x000f) && \
	 (1))

#define IsRGB0888(ppixelFormat) \
	( \
	 ((ppixelFormat)->dwRGBAlphaBitMask == 0x00000000) && \
	 ((ppixelFormat)->dwRBitMask == 0x00ff0000) && \
	 ((ppixelFormat)->dwGBitMask == 0x0000ff00) && \
	 ((ppixelFormat)->dwBBitMask == 0x000000ff) && \
	 (1))

#define IsRGB8888(ppixelFormat) \
	( \
	 ((ppixelFormat)->dwRGBAlphaBitMask == 0xff000000) && \
	 ((ppixelFormat)->dwRBitMask == 0x00ff0000) && \
	 ((ppixelFormat)->dwGBitMask == 0x0000ff00) && \
	 ((ppixelFormat)->dwBBitMask == 0x000000ff) && \
	 (1))


////////////////////////////////////////////////////////////////////////////////
//
// PRIVATE DDGPE FUNCTIONS
//
////////////////////////////////////////////////////////////////////////////////


// Update the HALInit info
// calls buildDDHALInfo in the driver to update info based on a mode change
EXTERN_C BOOL UpdateHALInit
				(LPDDRAWI_DIRECTDRAW_GBL	lpDD,           // driver struct
				DWORD						modeidx );

// GDI Surface has split from DDraw
BOOL DDGPEGDIHasSplitFromDDraw(void);

// Get the DDGPE and GPE pixel format from a surface descriptor
EXTERN_C SCODE DDGPEGetPixelFormatFromSurfaceDesc(
					LPDDSURFACEDESC			lpDDSurfaceDesc,
					EDDGPEPixelFormat*		pPixelFormat,
					EGPEFormat*				pFormat
					);


#endif //__DDGPEPRIV_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -