📄 ddraw.h
字号:
#define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
#define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
#define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
#endif
/*
* IDirectDrawSurface3 and related interfaces
*/
#undef INTERFACE
#define INTERFACE IDirectDrawSurface3
DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
/*** Added in the V3 interface ***/
STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
#define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
#define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
#else
#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface3_Release(p) (p)->Release()
#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface3_Restore(p) (p)->Restore()
#define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
#define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
#define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
#endif
/*
* IDirectDrawColorControl
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawColorControl
DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawColorControl methods ***/
STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a)
#define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a)
#else
#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
#define IDirectDrawColorControl_Release(p) (p)->Release()
#define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a)
#define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a)
#endif
#endif
#endif
/*
* DDSURFACEDESC
*/
typedef struct _DDSURFACEDESC
{
DWORD dwSize; // size of the DDSURFACEDESC structure
DWORD dwFlags; // determines what fields are valid
DWORD dwHeight; // height of surface to be created
DWORD dwWidth; // width of input surface
union
{
LONG lPitch; // distance to start of next line (return value only)
DWORD dwLinearSize; // Formless late-allocated optimized surface size
};
DWORD dwBackBufferCount; // number of back buffers requested
union
{
DWORD dwMipMapCount; // number of mip-map levels requested
DWORD dwZBufferBitDepth; // depth of Z buffer requested
DWORD dwRefreshRate; // refresh rate (used when display mode is described)
};
DWORD dwAlphaBitDepth; // depth of alpha buffer requested
DWORD dwReserved; // reserved
LPVOID lpSurface; // pointer to the associated surface memory
DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
DDSCAPS ddsCaps; // direct draw surface capabilities
} DDSURFACEDESC;
/*
* ddsCaps field is valid.
*/
#define DDSD_CAPS 0x00000001l // default
/*
* dwHeight field is valid.
*/
#define DDSD_HEIGHT 0x00000002l
/*
* dwWidth field is valid.
*/
#defi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -