dispconfig.h
上传用户:fjqzjn
上传日期:2008-01-21
资源大小:2764k
文件大小:6k
- /******************************************************************************
- ** Copyright (C) 2004. Intel Corporation. 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.
- ******************************************************************************/
- #if !defined (__DISPCONFIG_H__)
- #define __DISPCONFIG_H__
- // This file defines the escapes and structures of the Marathon Display Configuration
- // Application Programming Interface (API)
- // Marathon Display Configuraiton Escapes
- #define DRVESC_DISPLAY_CONFIG_BASE (100000 + 1000)
- #define DRVESC_CONFIG_DISPLAYSYSTEM (DRVESC_DISPLAY_CONFIG_BASE+0)
- /*
- Escape Usage:
- ExtEscape(hdcMarathon,
- DRVESC_CONFIG_DISPLAYSYSTEM,
- sizeof(DISPCFG_DISPLAY_SYSTEM),
- (LPSTR) &sDisplayConfig, // pointer to DISPCFG_DISPLAY_SYSTEM stucture
- 0,
- NULL);
- */
- #define DRVESC_CREATE_OFFSCREENSURFACE (DRVESC_DISPLAY_CONFIG_BASE+1)
- /*
- Escape Usage:
- ExtEscape(hdcMarathon,
- DRVESC_CREATE_OFFSCREENSURFACE,
- sizeof(DISPCFG_CREATE_SURFACE),
- (LPSTR) &sCreateSurface, // pointer to DISPCFG_CREATE_SURFACE stucture
- 0,
- NULL);
- */
- #define DRVESC_GET_SURFACEINFO (DRVESC_DISPLAY_CONFIG_BASE+2)
- /*
- Escape Usage:
- ExtEscape(hdcMarathon,
- DRVESC_GET_SURFACEINFO,
- sizeof(DISPCFG_GET_SURFACE_INFO),
- (LPSTR) &sSurfaceSelect, // pointer to DISPCFG_GET_SURFACE_INFO stucture
- sizeof(DISPCFG_GET_SURFACE_INFO),
- (LPSTR) &sSurfaceInfo, // pointer to DISPCFG_GET_SURFACE_INFO stucture
- );
- */
- #define DRVESC_DIRTY (DRVESC_DISPLAY_CONFIG_BASE+3)
- /*
- Escape Usage:
- ExtEscape(hdcMarathon,
- DRVESC_DIRTY,
- 0,
- NULL,
- sizeof(BOOL),
- (LPSTR) &bIsDirty); // pointer to BOOL that will indicate if the Marathon
- // surface has been updated
- */
- // #define DRVESC_RESREVED (DRVESC_DISPLAY_CONFIG_BASE+4)
- #define DRVESC_ACQUIRE_DUALDISPLAY (DRVESC_DISPLAY_CONFIG_BASE+5)
- /*
- Escape Usage:
- ExtEscape(hdcMarathon,
- DRVESC_ACQUIRE_DUALDISPLAY,
- sizeof(DISPCFG_ACQUIRE_LOCK),
- (LPSTR) &In, // DISPCFG_ACQUIRE_LOCK struct
- sizeof(DISPCFG_ACQUIRE_LOCK),
- (LPSTR) &Out, // DISPCFG_ACQUIRE_LOCK struct
- );
- */
- // Marathon Display Configuration defines/enumerations
- // typs of surfaces
- typedef enum _DCFG_DISPLAY_SURFACE_ {
- DCFG_DESKTOP, // Desktop surface
- DCFG_SECONDARYSURFACE, // Seconadary display surface
- } DCFG_DISPLAY_SURFACE;
- typedef enum _DCFG_LCD_SOURCE_ {
- DCFG_SOURCE_MARATHON,
- DCFG_SOURCE_XSCALE,
- DCFG_SOURCE_NOT_APPLICABLE,
- } DCFG_LCD_SOURCE;
- // Format of pixels feed into Marathon's LCD-IN from XScale LCD Controller
- typedef enum _DCFG_LCD_IN_FORMAT_ {
- DCFG_LCD_IN_555,
- DCFG_LCD_IN_556,
- DCFG_LCD_IN_565,
- DCFG_LCD_IN_655,
- DCFG_LCD_IN_665,
- DCFG_LCD_IN_666,
- DCFG_FORMAT_NOT_APPLICABLE, // Format not applicable when Marathon is source
- } DCFG_LCD_IN_FORMAT;
- // Marathon Display Configuration Sturctures
- // Describes the surface that a display stream is connected to
- typedef struct _DCFG_CONNECT_SURFACE_ {
- DCFG_DISPLAY_SURFACE eSurface; // Surface to connect to
- // Border Color & Refresh Rate fields only valid if surface DCFG_SECONDARYSURFACE
- ULONG ulBorderColor; // Border color if required
- ULONG ulRefreshRate; // Recommendation only
- ULONG ulPhysRotation; // orination of primary Display, in degrees
- } DCFG_CONNECT_SURFACE;
- // Controls configuration of a LCD_SWITCH port
- typedef struct _DCFG_SWITCH_LCD_ {
- BOOL bValid; // TRUE - program switch with following params, FALSE - do not
- BOOL bActivate; // Enable/Disable the LCD output
- DCFG_LCD_SOURCE eLcdSource;
- DCFG_LCD_IN_FORMAT eXScaleFormat; // Only valid if eLcdSource == DCFG_SOURCE_XSCALE
- } DCFG_SWITCH_LCD;
- typedef struct _DISPCFG_DISPLAY_SYSTEM_
- {
- BOOL bSet; // Get/Set Parameters in this structure
- DCFG_SWITCH_LCD sLcdInternal;
- DCFG_SWITCH_LCD sLcdExternal;
- DCFG_CONNECT_SURFACE sConnectSurface; // Surface to connect to Marathon
- } DISPCFG_DISPLAY_SYSTEM;
- // Create/destroy off-screen display surface
- typedef struct _DISPCFG_CREATE_SURFACE_
- {
- WORD wWidth;
- WORD wHeight;
- } DISPCFG_CREATE_SURFACE;
- typedef struct _SURFACE_PHYSICAL_VIEW_
- {
- ULONG ulPhysAddress; // Physical address
- ULONG ulWidth; // Width in pixels
- ULONG ulHeight; // Height in pixels
- ULONG ulStride; // Stride in bytes
- ULONG ulBpp; // Bits Per Pixel
-
- /* This bool indicates the driver has changed the shape and orientation
- of the frame buffer. The driver does this so that the frame buffer is correctly
- aligned for displaying to an external display. */
- BOOL bDriverRealigned;
- LONG lPhysicalRotation; // Rotation angle of the frame buffer contents.
- } SURFACE_PHYSICAL_VIEW;
- typedef struct _DISPCFG_GET_SURFACE_INFO_
- {
- DCFG_DISPLAY_SURFACE eDisplaySurface; // Surface to return information
- SURFACE_PHYSICAL_VIEW sPhysSurfaceInfo; // Surface information
- } DISPCFG_GET_SURFACE_INFO;
- // Acquireing this interface is only required for calls to set the state
- typedef struct _DISPCFG_ACQUIRE_LOCK_
- {
- BOOL bAcquire; // We are trying to acquire the interface
- BOOL bRelease; // We are releasing the interface
- BOOL bSuccess; // The returned succes or error
- } DISPCFG_ACQUIRE_LOCK;
- #endif // #if !defined (__DISPCONFIG_H__)