📄 ddrawint.h
字号:
* This structure mirrors the first entries of the DDCAPS but is of a fixed
* size and will not grow as DDCAPS grows. This is the structure your driver
* returns in DDCOREINFO. Additional caps will be requested via a GetDriverInfo
* call.
*/
typedef struct _DDNTCORECAPS
{
DWORD dwSize; // size of the DDDRIVERCAPS structure
DWORD dwCaps; // driver specific capabilities
DWORD dwCaps2; // more driver specific capabilites
DWORD dwCKeyCaps; // color key capabilities of the surface
DWORD dwFXCaps; // driver specific stretching and effects capabilites
DWORD dwFXAlphaCaps; // alpha driver specific capabilities
DWORD dwPalCaps; // palette capabilities
DWORD dwSVCaps; // stereo vision capabilities
DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
DWORD dwVidMemTotal; // total amount of video memory
DWORD dwVidMemFree; // amount of free video memory
DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
DWORD dwCurrVisibleOverlays; // current number of visible overlays
DWORD dwNumFourCCCodes; // number of four cc codes
DWORD dwAlignBoundarySrc; // source rectangle alignment
DWORD dwAlignSizeSrc; // source rectangle byte size
DWORD dwAlignBoundaryDest; // dest rectangle alignment
DWORD dwAlignSizeDest; // dest rectangle byte size
DWORD dwAlignStrideAlign; // stride alignment
DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwReserved1; // reserved
DWORD dwReserved2; // reserved
DWORD dwReserved3; // reserved
DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
DWORD dwSSBCaps; // driver specific capabilities for System->System blts
DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
DWORD dwMaxVideoPorts; // maximum number of usable video ports
DWORD dwCurrVideoPorts; // current number of video ports used
DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
} DDNTCORECAPS, *PDDNTCORECAPS;
/*
* structure for D3D buffer callbacks
*/
typedef struct _DD_D3DBUFCALLBACKS
{
DWORD dwSize;
DWORD dwFlags;
PDD_CANCREATESURFACE CanCreateD3DBuffer;
PDD_CREATESURFACE CreateD3DBuffer;
PDD_SURFCB_DESTROYSURFACE DestroyD3DBuffer;
PDD_SURFCB_LOCK LockD3DBuffer;
PDD_SURFCB_UNLOCK UnlockD3DBuffer;
} DD_D3DBUFCALLBACKS, *PDD_D3DBUFCALLBACKS;
#define DDHAL_EXEBUFCB32_CANCREATEEXEBUF 0x00000001l
#define DDHAL_EXEBUFCB32_CREATEEXEBUF 0x00000002l
#define DDHAL_EXEBUFCB32_DESTROYEXEBUF 0x00000004l
#define DDHAL_EXEBUFCB32_LOCKEXEBUF 0x00000008l
#define DDHAL_EXEBUFCB32_UNLOCKEXEBUF 0x00000010l
/*
* NT friendly names
*/
#define DDHAL_D3DBUFCB32_CANCREATED3DBUF DDHAL_EXEBUFCB32_CANCREATEEXEBUF
#define DDHAL_D3DBUFCB32_CREATED3DBUF DDHAL_EXEBUFCB32_CREATEEXEBUF
#define DDHAL_D3DBUFCB32_DESTROYD3DBUF DDHAL_EXEBUFCB32_DESTROYEXEBUF
#define DDHAL_D3DBUFCB32_LOCKD3DBUF DDHAL_EXEBUFCB32_LOCKEXEBUF
#define DDHAL_D3DBUFCB32_UNLOCKD3DBUF DDHAL_EXEBUFCB32_UNLOCKEXEBUF
/*
* structure for display driver to call DDHAL_Create with
* the _V4 version was used by NT4 drivers
*/
typedef struct _DD_HALINFO_V4
{
DWORD dwSize;
VIDEOMEMORYINFO vmiData; // video memory info
DDNTCORECAPS ddCaps; // hw specific caps
PDD_GETDRIVERINFO GetDriverInfo; // callback for querying driver data
DWORD dwFlags; // create flags
} DD_HALINFO_V4, *PDD_HALINFO_V4;
typedef struct _DD_HALINFO
{
DWORD dwSize;
VIDEOMEMORYINFO vmiData; // video memory info
DDNTCORECAPS ddCaps; // hw specific caps
PDD_GETDRIVERINFO GetDriverInfo; // callback for querying driver data
DWORD dwFlags; // create flags
LPVOID lpD3DGlobalDriverData; // D3D global Data
LPVOID lpD3DHALCallbacks; // D3D callbacks
PDD_D3DBUFCALLBACKS lpD3DBufCallbacks; // Buffer callbacks
} DD_HALINFO, *PDD_HALINFO;
#define DDHALINFO_GETDRIVERINFOSET 0x00000004l // indicates that GetDriverInfo is set
#define DDHALINFO_GETDRIVERINFO2 0x00000008l // indicates driver support GetDriverInfo2 variant
// of GetDriverInfo. New for DX 8.0
/*
* DDRAW version of DirectDraw object;
*
*/
typedef struct _DD_DIRECTDRAW_GLOBAL
{
VOID* dhpdev; // driver's private PDEV pointer
ULONG_PTR dwReserved1; // reserved for use by display driver
ULONG_PTR dwReserved2; // reserved for use by display driver
LPDDVIDEOPORTCAPS lpDDVideoPortCaps;// Info returned by the HAL (an array if more than one video port)
} DD_DIRECTDRAW_GLOBAL;
typedef struct _DD_DIRECTDRAW_LOCAL
{
PDD_DIRECTDRAW_GLOBAL lpGbl; // pointer to data
} DD_DIRECTDRAW_LOCAL;
typedef struct _DD_VIDEOPORT_LOCAL
{
PDD_DIRECTDRAW_LOCAL lpDD; // pointer to DIRECTDRAW_LCL
DDVIDEOPORTDESC ddvpDesc; // description used at create time
DDVIDEOPORTINFO ddvpInfo; // most recent video port info
PDD_SURFACE_INT lpSurface; // surface receiving the data
PDD_SURFACE_INT lpVBISurface; // surface receiving the VBI data
DWORD dwNumAutoflip; // Number of current autoflip surfaces
DWORD dwNumVBIAutoflip; // Number of VBI surfaces currently being autoflipped
ULONG_PTR dwReserved1; // Reserved for display driver
ULONG_PTR dwReserved2; // Reserved for display driver
ULONG_PTR dwReserved3; // Reserved for display driver
} DD_VIDEOPORT_LOCAL;
#define DDRAWIVPORT_ON 0x00000001 // Video port is pumping data
#define DDRAWIVPORT_SOFTWARE_AUTOFLIP 0x00000002 // Video port cannot use hardware autoflip
#define DDRAWIVPORT_COLORKEYANDINTERP 0x00000004 // Overlay cannot bob and colorkey at same time
typedef struct _DD_MOTIONCOMP_LOCAL
{
PDD_DIRECTDRAW_LOCAL lpDD; // pointer to DIRECTDRAW_LCL
GUID guid;
DWORD dwUncompWidth;
DWORD dwUncompHeight;
DDPIXELFORMAT ddUncompPixelFormat;
DWORD dwDriverReserved1;
DWORD dwDriverReserved2;
DWORD dwDriverReserved3;
LPVOID lpDriverReserved1;
LPVOID lpDriverReserved2;
LPVOID lpDriverReserved3;
} DD_MOTIONCOMP_LOCAL;
/*
* More driver surface capabilities (in addition to those described in DDCORECAPS).
* This struct contains the caps bits added to the DDCAPS.ddsCaps structure in DX6.
*/
typedef struct _DD_MORESURFACECAPS
{
DWORD dwSize; // size of DDMORESURFACECAPS structure
DDSCAPSEX ddsCapsMore;
/*
* The DDMORESURFACECAPS struct is of variable size. The following list may be
* filled in by DX6-aware drivers (see DDVERSIONINFO) to restrict their
* video memory heaps (those which are exposed to DirectDraw) to
* certain sets of DDSCAPS_ bits. Thse entries are exactly analogous to
* the ddsCaps and ddsCapsAlt members of the VIDMEM structures listed in
* the VIDMEMINFO.pvmList member of DDHALINFO.vmiData. There should be
* exactly DDHALINFO.vmiData.dwNumHeaps copies of tagExtendedHeapRestrictions
* in this struct. The size of this struct is thus:
* DDMORESURFACECAPS.dwSize = sizeof(DDMORESURFACECAPS) +
* (DDHALINFO.vmiData.dwNumHeaps-1) * sizeof(DDSCAPSEX)*2;
* Note the -1 accounts for the fact that DDMORESURFACECAPS is declared to have 1
* tagExtendedHeapRestrictions member.
*/
struct tagNTExtendedHeapRestrictions
{
DDSCAPSEX ddsCapsEx;
DDSCAPSEX ddsCapsExAlt;
} ddsExtendedHeapRestrictions[1];
} DD_MORESURFACECAPS;
// for DX7, we check each mode in the driver if it supports
// Stereo, driver returns DD_OK if mode is ok for stereo
typedef struct _DD_STEREOMODE
{
DWORD dwSize; // size of DDSTEREOMODECAPS structure
DWORD dwHeight;
DWORD dwWidth;
DWORD dwBpp;
DWORD dwRefreshRate;
BOOL bSupported;
} DD_STEREOMODE;
typedef struct _DD_UPDATENONLOCALHEAPDATA
{
PDD_DIRECTDRAW_GLOBAL lpDD; // driver struct
DWORD dwHeap; // heap index
FLATPTR fpGARTLin; // linear GART address of start of heap
FLATPTR fpGARTDev; // high physical GART address of start of heap
ULONG_PTR ulPolicyMaxBytes; // maximum amount of AGP memory to use
HRESULT ddRVal; // return value
VOID* UpdateNonLocalHeap; // Unused: Win95 compatibility
} DD_UPDATENONLOCALHEAPDATA;
/*
* Private caps that the driver passes to change DirectDraw behavior.
* These caps are not exposed to the application
*/
typedef struct DD_NTPRIVATEDRIVERCAPS
{
DWORD dwSize;
DWORD dwPrivateCaps;
} DD_NTPRIVATEDRIVERCAPS;
// Driver wants DD_CREATESURFACEDATA.lplpSList to contain a list of
// surfaces to create rather than always a single surface.
#define DDHAL_PRIVATECAP_ATOMICSURFACECREATION 0x00000001l
// Driver wants to be notified when creating a primary surface.
#define DDHAL_PRIVATECAP_NOTIFYPRIMARYCREATION 0x00000002l
#define DDHAL_PRIVATECAP_RESERVED1 0x00000004l
/////////////////////////////////////////////////////////////////////////////
// NT Note:
//
// The following structures must match, field for field, the corresponding
// structures as declared in 'ddrawi.h.' We cannot simply use the same
// structures because the sub-structures such as DD_DIRECTDRAW_GLOBAL are
// different, and have to be properly typed for the drivers.
//
/////////////////////////////////////////////////////////////////////////////
/****************************************************************************
*
* DDHAL structures for Surface Object callbacks
*
***************************************************************************/
/*
* This special flag is seen only by drivers. The DD runtime sets this
* bit in DDHAL_BLTDATA.dwFlags if the dwAFlags and ddrgbaScaleFactors
* members at the end of the DDHAL_BLTDATA structure are valid.
* The flag is always set if the DDHAL_BLTDATA structure is passed to
* the driver via the AlphaBlt HAL callback; otherwise, the flag is zero.
*/
#define DDBLT_AFLAGS 0x80000000L
/*
* This flag will be set in DDHAL_BLTDATA.dwAFlags if the call was originated
* by the AlphaBlt API method. If the call was originated by the Blt API,
* this flag will not be set.
* Drivers which have a unified Blt/AlphaBlt DDI can use this flag to distinguish
* between the two API calls.
*/
#define DDABLT_SRCOVERDEST 0x00000001L
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -