DDDrvEsc.h
上传用户:fjqzjn
上传日期:2008-01-21
资源大小:2764k
文件大小:5k
- /******************************************************************************
- ** Copyright (c) 2004, Intel Corporation
- ** Copyright (c) 2003 by Imagination Technologies Limited.
- ** All rights reserved.
- **
- ** The source code contained or described herein and all documents related to the
- ** source code ("Material") are owned by Intel Corporation or its suppliers or
- ** licensors. Title to the Material remains with Intel Corporation or its suppliers
- ** and licensors. The Material contains trade secrets and proprietary and
- ** confidential information of Intel or its suppliers and licensors. The Material
- ** is protected by worldwide copyright and trade secret laws and treaty provisions.
- ** No part of the Material may be used, copied, reproduced, modified, published,
- ** uploaded, posted, transmitted, distributed, or disclosed in any way without
- ** Intel抯 prior express written permission.
- **
- ** No license under any patent, copyright, trade secret or other intellectual
- ** property right is granted to or conferred upon you by disclosure or delivery
- ** of the Materials, either expressly, by implication, inducement, estoppel or
- ** otherwise. Any license under such intellectual property rights must be express
- ** and approved by Intel in writing.
- *
- * Description : Dual display drvesc wrapper function declarations for
- * DualDispDemo application.
- *
- * Platform : Marathon/WinCE
- *
- ***************************************************************************/
- #ifndef __DDDRVESC_H__
- #define __DDDRVESC_H__
- #include <windows.h>
- #include "dispconfig.h"
- /* Set the secondary surface dimensions. */
- #define SECONDARYSURFACEWIDTH 640
- #define SECONDARYSURFACEHEIGHT 480
- #define XSCALE_CACHE_ENABLED 1
- #define MARATHON_CACHE_ENABLED 1
- /* Certain fields within the DISPCFG_DISPLAY_SYSTEM struct are not
- applicable when connecting the PDP to the Desktop. This 'define'
- is used to explicitly set any such field to zero. */
- #define PARAM_NOT_APPLICABLE 0
- /* Error handling: Calling functions will 'BITWISE OR' return values with
- nDDRetVal to avoid overwriting it. nDDRetVal is a locally declared
- variable used in all functions returning an error code. */
- #define DUALDISPSUCCESS 0
- #define DUALDISPERROR 1
- /* Enable logging to a file instead of the debugger. */
- #ifdef LOGGING_TO_FILE
- #define TEXTOUT(X) fwprintf(gpStream, X); fflush(gpStream)
- #else
- #define TEXTOUT(X) OutputDebugString(X)
- #endif
- typedef enum _SELECT_DUALDISP_CONFIG_{
- eDefaultDisplay,
- eMirrorModeIncompatible,
- eMirrorModeCompatible,
- eVideoMode,
- eCustomGDIApplication,
- eCustomFBApplication,
- eInternalDispOnlySecSurf,
- eExternalDispOnlySecSurf,
- eExternalDispOnlyDesktop,
- eModeInvalid,
- eSlowTestMode,
- eQuickTestMode,
- } SELECT_DUAL_DISP_CONFIG;
- typedef struct _XSCALE_SURFACE_INFO_
- {
- ULONG ulPhysAddress; /* Physical address */
- ULONG ulPageAddress; /* Start address of the page containing XScale FB */
- ULONG ulWidth; /* Width in pixels */
- ULONG ulHeight; /* Height in pixels */
- ULONG ulStride; /* Stride in bytes */
- ULONG ulBpp; /* Bits Per Pixel */
- LONG nPhysicalRotation; /* Rotation angle of the frame buffer contents */
- BOOL bDouble; /* XScale display requires pixel/line doubling */
- } XSCALE_SURFACE_INFO;
- /* For the purposes of this test application, XScale display surface
- information will be hardwired as described by this enumeration. */
- enum XScaleSurfaceInfo
- {
- XSCALE_DISPLAY_BPP = 16,
- XSCALE_DISPLAY_WIDTH = 640,
- XSCALE_DISPLAY_HEIGHT = 480,
- XSCALE_DISPLAY_STRIDE = ((XSCALE_DISPLAY_WIDTH * XSCALE_DISPLAY_BPP) / 8),
- XSCALE_DISPLAY_PHYS_ROTATION = 0,
- XSCALE_DISPLAY_DOUBLE = FALSE,
- };
- /* Connect surface to PDP */
- LONG DE_ConfigureDisplaySystem(DISPCFG_DISPLAY_SYSTEM& sDisplayConfig, HDC hdcMarathon);
- /* Get information about the Marathon display surface */
- LONG DE_GetMarathonSurfaceInfo(DISPCFG_GET_SURFACE_INFO& sMarathonSurfaceInfo,
- DCFG_DISPLAY_SURFACE eDisplaySurface, HDC hdcMarathon);
- /* Get information about the XScale display surface */
- LONG DE_GetXScaleSurfaceInfo(XSCALE_SURFACE_INFO& sXScaleSurfaceInfo, HDC hdcXScale);
- LONG DE_CreateSecondarySurfBitmap(HDC hdcMarathon,
- HDC& hdcMem,
- HBITMAP& hBitmap,
- HGDIOBJ& hOldBitmap,
- BOOL& bSecondarySurfaceCreated);
- LONG DE_CheckForScreenUpdate(HDC hdcMarathon, BOOL& bIsDirty);
- BOOL DE_AcquireDualDisplay(HDC hdcMarathon);
- BOOL DE_ReleaseDualDisplay(HDC hdcMarathon);
- void* getMemory(DWORD dwPhysAddr, DWORD size, DWORD dwCacheEnabled);
- #endif /* __DDDRVESC_H__ */