More DirectDraw groundwork by Peter Bajusz

svn path=/trunk/; revision=6447
This commit is contained in:
Gé van Geldorp 2003-10-28 19:30:08 +00:00
parent e0d3016a0f
commit 82fc43d926
18 changed files with 1935 additions and 1416 deletions

View file

@ -16,8 +16,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <ddk/ddrawi.h>
#include <ddk/winddi.h>
#include <ddk/ddrawi.h>
#include <ddk/d3dhal.h>
BOOL STDCALL DdCreateDirectDrawObject(
LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
@ -93,265 +93,3 @@ LPDDRAWI_DIRECTDRAW_LCL pDDraw,
LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1,
LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
);
DWORD STDCALL DxgGenericThunk(ULONG_PTR ulIndex,
ULONG_PTR ulHandle,
SIZE_T *pdwSizeOfPtr1,
PVOID pvPtr1,
SIZE_T *pdwSizeOfPtr2,
PVOID pvPtr2);
BOOL STDCALL D3DContextCreate(
HANDLE hDirectDrawLocal,
HANDLE hSurfColor,
HANDLE hSurfZ,
D3DNTHAL_CONTEXTCREATEI *pdcci
);
DWORD STDCALL D3DContextDestroy(
LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
);
DWORD STDCALL D3DContextDestroyAll(VOID);
DWORD STDCALL D3DValidateTextureStageState(
LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
);
DWORD STDCALL D3DDrawPrimitives2(
HANDLE hCmdBuf,
HANDLE hVBuf,
LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
FLATPTR *pfpVidMemCmd,
DWORD *pdwSizeCmd,
FLATPTR *pfpVidMemVtx,
DWORD *pdwSizeVtx
);
DWORD STDCALL D3DGetDriverState(
PDD_GETDRIVERSTATEDATA pdata
);
DWORD STDCALL DdAddAttachedSurface(
HANDLE hSurface,
HANDLE hSurfaceAttached,
PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
);
DWORD STDCALL DdAlphaBlt(
HANDLE hSurfaceDest,
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData);
BOOL STDCALL DdDdAttachSurface( /*rename it so it doesnt conflict */
HANDLE hSurfaceFrom,
HANDLE hSurfaceTo
);
DWORD STDCALL DdBeginMoCompFrame(
HANDLE hMoComp,
PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
);
DWORD STDCALL DdBlt(
HANDLE hSurfaceDest,
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData
);
DWORD STDCALL DdCanCreateSurface(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
);
DWORD STDCALL DdCanCreateD3DBuffer(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
);
DWORD STDCALL DdColorControl(
HANDLE hSurface,
PDD_COLORCONTROLDATA puColorControlData
);
HANDLE STDCALL DdDdCreateDirectDrawObject( /*rename it so it doesnt conflict */
HDC hdc
);
DWORD STDCALL DdCreateSurface(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
HANDLE *puhSurface
);
DWORD STDCALL DdCreateD3DBuffer(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
HANDLE *puhSurface
);
HANDLE STDCALL DdCreateMoComp(
HANDLE hDirectDraw,
PDD_CREATEMOCOMPDATA puCreateMoCompData
);
HANDLE STDCALL DdDdCreateSurfaceObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal,
HANDLE hSurface,
PDD_SURFACE_LOCAL puSurfaceLocal,
PDD_SURFACE_MORE puSurfaceMore,
PDD_SURFACE_GLOBAL puSurfaceGlobal,
BOOL bComplete
);
BOOL STDCALL DdDdDeleteDirectDrawObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal
);
BOOL STDCALL DdDdDeleteSurfaceObject( /*rename it so it doesnt conflict */
HANDLE hSurface
);
DWORD STDCALL DdDestroyMoComp(
HANDLE hMoComp,
PDD_DESTROYMOCOMPDATA puBeginFrameData
);
DWORD STDCALL DdDestroySurface(
HANDLE hSurface,
BOOL bRealDestroy
);
DWORD STDCALL DdDestroyD3DBuffer(
HANDLE hSurface
);
DWORD STDCALL DdEndMoCompFrame(
HANDLE hMoComp,
PDD_ENDMOCOMPFRAMEDATA puEndFrameData
);
DWORD STDCALL DdFlip(
HANDLE hSurfaceCurrent,
HANDLE hSurfaceTarget,
HANDLE hSurfaceCurrentLeft,
HANDLE hSurfaceTargetLeft,
PDD_FLIPDATA puFlipData
);
DWORD STDCALL DdFlipToGDISurface(
HANDLE hDirectDraw,
PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
);
DWORD STDCALL DdGetAvailDriverMemory(
HANDLE hDirectDraw,
PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
);
DWORD STDCALL DdGetBltStatus(
HANDLE hSurface,
PDD_GETBLTSTATUSDATA puGetBltStatusData
);
HDC STDCALL DdDdGetDC( /*rename it so it doesnt conflict */
HANDLE hSurface,
PALETTEENTRY *puColorTable
);
DWORD STDCALL DdGetDriverInfo(
HANDLE hDirectDraw,
PDD_GETDRIVERINFODATA puGetDriverInfoData
);
DWORD STDCALL DdDdGetDxHandle( /*rename it so it doesnt conflict */
HANDLE hDirectDraw,
HANDLE hSurface,
BOOL bRelease
);
DWORD STDCALL DdGetFlipStatus(
HANDLE hSurface,
PDD_GETFLIPSTATUSDATA puGetFlipStatusData
);
DWORD STDCALL DdGetInternalMoCompInfo(
HANDLE hDirectDraw,
PDD_GETINTERNALMOCOMPDATA puGetInternalData
);
DWORD STDCALL DdGetMoCompBuffInfo(
HANDLE hDirectDraw,
PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
);
DWORD STDCALL DdGetMoCompGuids(
HANDLE hDirectDraw,
PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
);
DWORD STDCALL DdGetMoCompFormats(
HANDLE hDirectDraw,
PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
);
DWORD STDCALL DdGetScanLine(
HANDLE hDirectDraw,
PDD_GETSCANLINEDATA puGetScanLineData
);
DWORD STDCALL DdLock(
HANDLE hSurface,
PDD_LOCKDATA puLockData,
HDC hdcClip
);
DWORD STDCALL DdLockD3D(
HANDLE hSurface,
PDD_LOCKDATA puLockData
);
BOOL STDCALL DdDdQueryDirectDrawObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal,
DD_HALINFO *pHalInfo,
DWORD *pCallBackFlags,
LPD3DNTHAL_CALLBACKS puD3dCallbacks,
LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
LPDDSURFACEDESC puD3dTextureFormats,
DWORD *puNumHeaps,
VIDEOMEMORY *puvmList,
DWORD *puNumFourCC,
DWORD *puFourCC
);
DWORD STDCALL DdQueryMoCompStatus(
HANDLE hMoComp,
PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
);
BOOL STDCALL DdDdReenableDirectDrawObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal,
BOOL *pubNewMode
);
BOOL STDCALL DdDdReleaseDC( /*rename it so it doesnt conflict */
HANDLE hSurface
);
DWORD STDCALL DdRenderMoComp(
HANDLE hMoComp,
PDD_RENDERMOCOMPDATA puRenderMoCompData
);
BOOL STDCALL DdDdResetVisrgn( /*rename it so it doesnt conflict */
HANDLE hSurface,
HWND hwnd
);
DWORD STDCALL DdSetColorKey(
HANDLE hSurface,
PDD_SETCOLORKEYDATA puSetColorKeyData
);
DWORD STDCALL DdSetExclusiveMode(
HANDLE hDirectDraw,
PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
);
BOOL STDCALL DdDdSetGammaRamp( /*rename it so it doesnt conflict */
HANDLE hDirectDraw,
HDC hdc,
LPVOID lpGammaRamp
);
DWORD STDCALL DdCreateSurfaceEx(
HANDLE hDirectDraw,
HANDLE hSurface,
DWORD dwSurfaceHandle
);
DWORD STDCALL DdSetOverlayPosition(
HANDLE hSurfaceSource,
HANDLE hSurfaceDestination,
PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
);
VOID STDCALL DdDdUnattachSurface( /*rename it so it doesnt conflict */
HANDLE hSurface,
HANDLE hSurfaceAttached
);
DWORD STDCALL DdUnlock(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
);
DWORD STDCALL DdUnlockD3D(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
);
DWORD STDCALL DdUpdateOverlay(
HANDLE hSurfaceDestination,
HANDLE hSurfaceSource,
PDD_UPDATEOVERLAYDATA puUpdateOverlayData
);
DWORD STDCALL DdWaitForVerticalBlank(
HANDLE hDirectDraw,
PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
);

View file

@ -528,86 +528,6 @@ typedef struct _D3DHAL_VALIDATETEXTURESTAGESTATEDATA
HRESULT ddrval;
} D3DHAL_VALIDATETEXTURESTAGESTATEDATA;
/* FIXME: get definition for this */
typedef DWORD D3DNTHAL_CONTEXTCREATEI;
typedef D3DHAL_CONTEXTDESTROYDATA D3DNTHAL_CONTEXTDESTROYDATA;
typedef D3DNTHAL_CONTEXTDESTROYDATA *LPD3DNTHAL_CONTEXTDESTROYDATA;
typedef D3DHAL_VALIDATETEXTURESTAGESTATEDATA D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
typedef D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA *LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
typedef D3DHAL_DRAWPRIMITIVES2DATA D3DNTHAL_DRAWPRIMITIVES2DATA;
typedef D3DNTHAL_DRAWPRIMITIVES2DATA *LPD3DNTHAL_DRAWPRIMITIVES2DATA;
typedef DDHAL_GETDRIVERSTATEDATA DD_GETDRIVERSTATEDATA;
typedef DD_GETDRIVERSTATEDATA *PDD_GETDRIVERSTATEDATA;
typedef DDHAL_ADDATTACHEDSURFACEDATA DD_ADDATTACHEDSURFACEDATA;
typedef DD_ADDATTACHEDSURFACEDATA *PDD_ADDATTACHEDSURFACEDATA;
typedef DDHAL_BLTDATA DD_BLTDATA;
typedef DD_BLTDATA *PDD_BLTDATA;
typedef DDHAL_BEGINMOCOMPFRAMEDATA DD_BEGINMOCOMPFRAMEDATA;
typedef DD_BEGINMOCOMPFRAMEDATA *PDD_BEGINMOCOMPFRAMEDATA;
typedef DDHAL_CANCREATESURFACEDATA DD_CANCREATESURFACEDATA;
typedef DD_CANCREATESURFACEDATA *PDD_CANCREATESURFACEDATA;
typedef DDHAL_COLORCONTROLDATA DD_COLORCONTROLDATA;
typedef DD_COLORCONTROLDATA *PDD_COLORCONTROLDATA;
typedef DDRAWI_DDRAWSURFACE_GBL DD_SURFACE_GLOBAL;
typedef DD_SURFACE_GLOBAL *PDD_SURFACE_GLOBAL;
typedef DDHAL_CREATEMOCOMPDATA DD_CREATEMOCOMPDATA;
typedef DD_CREATEMOCOMPDATA *PDD_CREATEMOCOMPDATA;
typedef DDRAWI_DDRAWSURFACE_LCL DD_SURFACE_LOCAL;
typedef DD_SURFACE_LOCAL *PDD_SURFACE_LOCAL;
typedef DDRAWI_DDRAWSURFACE_MORE DD_SURFACE_MORE;
typedef DD_SURFACE_MORE *PDD_SURFACE_MORE;
typedef DDHAL_DESTROYMOCOMPDATA DD_DESTROYMOCOMPDATA;
typedef DD_DESTROYMOCOMPDATA *PDD_DESTROYMOCOMPDATA;
typedef DDHAL_ENDMOCOMPFRAMEDATA DD_ENDMOCOMPFRAMEDATA;
typedef DD_ENDMOCOMPFRAMEDATA *PDD_ENDMOCOMPFRAMEDATA;
typedef DDHAL_FLIPDATA DD_FLIPDATA;
typedef DD_FLIPDATA *PDD_FLIPDATA;
typedef DDHAL_FLIPTOGDISURFACEDATA DD_FLIPTOGDISURFACEDATA;
typedef DD_FLIPTOGDISURFACEDATA *PDD_FLIPTOGDISURFACEDATA;
typedef DDHAL_GETAVAILDRIVERMEMORYDATA DD_GETAVAILDRIVERMEMORYDATA;
typedef DD_GETAVAILDRIVERMEMORYDATA *PDD_GETAVAILDRIVERMEMORYDATA;
typedef DDHAL_GETBLTSTATUSDATA DD_GETBLTSTATUSDATA;
typedef DD_GETBLTSTATUSDATA *PDD_GETBLTSTATUSDATA;
typedef DDHAL_GETDRIVERINFODATA DD_GETDRIVERINFODATA;
typedef DD_GETDRIVERINFODATA *PDD_GETDRIVERINFODATA;
typedef DDHAL_GETFLIPSTATUSDATA DD_GETFLIPSTATUSDATA;
typedef DD_GETFLIPSTATUSDATA *PDD_GETFLIPSTATUSDATA;
typedef DDHAL_GETINTERNALMOCOMPDATA DD_GETINTERNALMOCOMPDATA;
typedef DD_GETINTERNALMOCOMPDATA *PDD_GETINTERNALMOCOMPDATA;
typedef DDHAL_GETMOCOMPCOMPBUFFDATA DD_GETMOCOMPCOMPBUFFDATA;
typedef DD_GETMOCOMPCOMPBUFFDATA *PDD_GETMOCOMPCOMPBUFFDATA;
typedef DDHAL_GETMOCOMPGUIDSDATA DD_GETMOCOMPGUIDSDATA;
typedef DD_GETMOCOMPGUIDSDATA *PDD_GETMOCOMPGUIDSDATA;
typedef DDHAL_GETMOCOMPFORMATSDATA DD_GETMOCOMPFORMATSDATA;
typedef DD_GETMOCOMPFORMATSDATA *PDD_GETMOCOMPFORMATSDATA;
typedef DDHAL_GETSCANLINEDATA DD_GETSCANLINEDATA;
typedef DD_GETSCANLINEDATA *PDD_GETSCANLINEDATA;
typedef DDHAL_LOCKDATA DD_LOCKDATA;
typedef DD_LOCKDATA *PDD_LOCKDATA;
typedef DDHALINFO DD_HALINFO;
typedef DDHAL_QUERYMOCOMPSTATUSDATA DD_QUERYMOCOMPSTATUSDATA;
typedef DD_QUERYMOCOMPSTATUSDATA *PDD_QUERYMOCOMPSTATUSDATA;
typedef DDHAL_RENDERMOCOMPDATA DD_RENDERMOCOMPDATA;
typedef DD_RENDERMOCOMPDATA *PDD_RENDERMOCOMPDATA;
typedef DDHAL_SETCOLORKEYDATA DD_SETCOLORKEYDATA;
typedef DD_SETCOLORKEYDATA *PDD_SETCOLORKEYDATA;
typedef DDHAL_SETEXCLUSIVEMODEDATA DD_SETEXCLUSIVEMODEDATA;
typedef DD_SETEXCLUSIVEMODEDATA *PDD_SETEXCLUSIVEMODEDATA;
typedef DDHAL_SETOVERLAYPOSITIONDATA DD_SETOVERLAYPOSITIONDATA;
typedef DD_SETOVERLAYPOSITIONDATA *PDD_SETOVERLAYPOSITIONDATA;
typedef DDHAL_UNLOCKDATA DD_UNLOCKDATA;
typedef DD_UNLOCKDATA *PDD_UNLOCKDATA;
typedef DDHAL_CREATESURFACEDATA DD_CREATESURFACEDATA;
typedef DD_CREATESURFACEDATA *LPDD_CREATESURFACEDATA;
typedef DDHAL_UPDATEOVERLAYDATA DD_UPDATEOVERLAYDATA;
typedef DD_UPDATEOVERLAYDATA *PDD_UPDATEOVERLAYDATA;
typedef DDHAL_WAITFORVERTICALBLANKDATA DD_WAITFORVERTICALBLANKDATA;
typedef DD_WAITFORVERTICALBLANKDATA *PDD_WAITFORVERTICALBLANKDATA;
typedef D3DHAL_CALLBACKS D3DNTHAL_CALLBACKS;
typedef D3DNTHAL_CALLBACKS *LPD3DNTHAL_CALLBACKS;
typedef D3DHAL_GLOBALDRIVERDATA D3DNTHAL_GLOBALDRIVERDATA;
typedef D3DNTHAL_GLOBALDRIVERDATA *LPD3DNTHAL_GLOBALDRIVERDATA;
#ifdef __cplusplus
} /* extern "C" */
#endif

View file

@ -0,0 +1,72 @@
/*
* Direct3D NT driver interface
*/
#ifndef __DDK_D3DNTHAL_H
#define __DDK_D3DNTHAL_H
#include <ddk/ddrawint.h>
#include <d3dtypes.h>
#include <d3dcaps.h>
#ifdef __cplusplus
extern "C" {
#endif
DEFINE_GUID(GUID_D3DCallbacks, 0x7BF06990, 0x8794, 0x11D0, 0x91, 0x39, 0x08, 0x00, 0x36, 0xD2, 0xEF, 0x02);
DEFINE_GUID(GUID_D3DCallbacks3, 0xDDF41230, 0xEC0A, 0x11D0, 0xA9, 0xB6, 0x00, 0xAA, 0x00, 0xC0, 0x99, 0x3E);
DEFINE_GUID(GUID_D3DExtendedCaps, 0x7DE41F80, 0x9D93, 0x11D0, 0x89, 0xAB, 0x00, 0xA0, 0xC9, 0x05, 0x41, 0x29);
DEFINE_GUID(GUID_D3DParseUnknownCommandCallback, 0x2E04FFA0, 0x98E4, 0x11D1, 0x8C, 0xE1, 0x00, 0xA0, 0xC9, 0x06, 0x29, 0xA8);
DEFINE_GUID(GUID_ZPixelFormats, 0x93869880, 0x36CF, 0x11D1, 0x9B, 0x1B, 0x00, 0xAA, 0x00, 0xBB, 0xB8, 0xAE);
DEFINE_GUID(GUID_DDStereoMode, 0xF828169C, 0xA8E8, 0x11D2, 0xA1, 0xF2, 0x00, 0xA0, 0xC9, 0x83, 0xEA, 0xF6);
typedef struct _D3DNTHAL_CONTEXTCREATEDATA *PD3DNTHAL_CONTEXTCREATEDATA;
typedef struct _D3DNTHAL_CONTEXTDESTROYDATA *PD3DNTHAL_CONTEXTDESTROYDATA;
typedef struct _D3DNTHAL_DRAWPRIMITIVES2DATA *PD3DNTHAL_DRAWPRIMITIVES2DATA;
typedef struct _D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA *PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
/* DIRECT3D object callbacks */
typedef DWORD (STDCALL *PD3DNTHAL_CONTEXTCREATECB)(PD3DNTHAL_CONTEXTCREATEDATA);
typedef DWORD (STDCALL *PD3DNTHAL_CONTEXTDESTROYCB)(PD3DNTHAL_CONTEXTDESTROYDATA);
typedef struct _D3DNTHAL_CALLBACKS {
DWORD dwSize;
PD3DNTHAL_CONTEXTCREATECB ContextCreate;
PD3DNTHAL_CONTEXTDESTROYCB ContextDestroy;
PVOID Reserved[32];
} D3DNTHAL_CALLBACKS;
typedef D3DNTHAL_CALLBACKS *PD3DNTHAL_CALLBACKS;
/* Structures to report driver capabilities */
typedef struct _D3DNTHAL_DEVICEDESC {
DWORD dwSize;
DWORD dwFlags;
D3DCOLORMODEL dcmColorModel;
DWORD dwDevCaps;
D3DTRANSFORMCAPS dtcTransformCaps;
BOOL bClipping;
D3DLIGHTINGCAPS dlcLightingCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMaxBufferSize;
DWORD dwMaxVertexCount;
} D3DNTHAL_DEVICEDESC, *PD3DNT_HALDEVICEDESC;
typedef struct _D3DNTHAL_GLOBALDRIVERDATA {
DWORD dwSize;
D3DNTHAL_DEVICEDESC hwCaps;
DWORD dwNumVertices;
DWORD dwNumClipVertices;
DWORD dwNumTextureFormats;
LPDDSURFACEDESC lpTextureFormats;
} D3DNTHAL_GLOBALDRIVERDATA, *PD3DNTHAL_GLOBALDRIVERDATA;
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __DDK_D3DNTHAL_H */

View file

@ -28,9 +28,11 @@ extern "C" {
#include <ddraw.h>
#ifndef __DDK_DDRAWINT_H
typedef struct _DDVIDEOPORTCAPS *LPDDVIDEOPORTCAPS; /* should be in dvp.h */
typedef struct _DDKERNELCAPS *LPDDKERNELCAPS; /* should be in ddkernel.h */
typedef struct _VMEMHEAP *LPVMEMHEAP; /* should be in dmemmgr.h */
#endif
#define DDAPI WINAPI
@ -66,8 +68,10 @@ typedef struct {
typedef DWORD (PASCAL *LPDD32BITDRIVERINIT)(DWORD dwContext);
#ifndef __DDK_DDRAWINT_H
/* pointer to video memory */
typedef ULONG_PTR FLATPTR;
#endif
/* predeclare some structures */
typedef struct _DDHALINFO *LPDDHALINFO;
@ -145,12 +149,14 @@ typedef struct _VIDMEM {
} DUMMYUNIONNAME2;
} VIDMEM,*LPVIDMEM;
#ifndef __DDK_DDRAWINT_H
#define VIDMEM_ISLINEAR 0x00000001
#define VIDMEM_ISRECTANGULAR 0x00000002
#define VIDMEM_ISHEAP 0x00000004
#define VIDMEM_ISNONLOCAL 0x00000008
#define VIDMEM_ISWC 0x00000010
#define VIDMEM_ISDISABLED 0x00000020
#endif
typedef struct _VIDMEMINFO {
FLATPTR fpPrimary;
@ -250,12 +256,6 @@ typedef struct _DDNONLOCALVIDMEMCAPS {
DWORD dwNLVBRops[DD_ROP_SPACE];
} DDNONLOCALVIDMEMCAPS,*LPDDNONLOCALVIDMEMCAPS;
typedef struct _DDSCAPSEX {
DWORD dwCaps2;
DWORD dwCaps3;
DWORD dwCaps4;
} DDSCAPSEX,*LPDDSCAPSEX;
#define DDSCAPS_EXECUTEBUFFER DDSCAPS_RESERVED2
#define DDSCAPS2_VERTEXBUFFER DDSCAPS2_RESERVED1
#define DDSCAPS2_COMMANDBUFFER DDSCAPS2_RESERVED2
@ -971,13 +971,21 @@ typedef struct _DDRAWI_DDRAWSURFACE_LCL {
#define DDRAWISURF_HASCKEYDESTOVERLAY 0x00000100
#define DDRAWISURF_HASCKEYDESTBLT 0x00000200
#define DDRAWISURF_HASCKEYSRCOVERLAY 0x00000400
#ifndef DDRAWISURF_HASCKEYSRCBLT
#define DDRAWISURF_HASCKEYSRCBLT 0x00000800
#endif
#define DDRAWISURF_LOCKEXCLUDEDCURSOR 0x00001000
#ifndef DDRAWISURF_HASPIXELFORMAT
#define DDRAWISURF_HASPIXELFORMAT 0x00002000
#endif
#ifndef DDRAWISURF_HASOVERLAYDATA
#define DDRAWISURF_HASOVERLAYDATA 0x00004000
#endif
#define DDRAWISURF_SETGAMMA 0x00008000
/* more... */
#ifndef DDRAWISURF_INVALID
#define DDRAWISURF_INVALID 0x10000000
#endif
/* palettes */
typedef struct _DDRAWI_DDRAWPALETTE_INT {
@ -1314,17 +1322,6 @@ typedef struct _DDHAL_WAITFORVERTICALBLANKDATA
LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank; // PRIVATE: ptr to callback
} DDHAL_WAITFORVERTICALBLANKDATA;
typedef struct _DD_D3DBUFCALLBACKS
{
DWORD dwSize;
DWORD dwFlags;
LPDDHAL_CANCREATESURFACE CanCreateD3DBuffer;
LPDDHAL_CREATESURFACE CreateD3DBuffer;
LPDDHALSURFCB_DESTROYSURFACE DestroyD3DBuffer;
LPDDHALSURFCB_LOCK LockD3DBuffer;
LPDDHALSURFCB_UNLOCK UnlockD3DBuffer;
} DD_D3DBUFCALLBACKS, *PDD_D3DBUFCALLBACKS;
#ifdef __cplusplus
} /* extern "C" */
#endif

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,7 @@
#else
#include <windows.h>
#endif
#include <ddk/ddrawi.h>
#include <ddk/ddrawint.h>
#ifndef IN
#define IN
@ -35,28 +35,6 @@ typedef DWORD PTRDIFF;
#define GDI_DRIVER_VERSION 0x4000 /* NT 4 compatibility */
typedef DDHAL_DDCALLBACKS *PDD_CALLBACKS;
typedef DDHALINFO *PDD_HALINFO;
typedef DDHAL_DDPALETTECALLBACKS *PDD_PALETTECALLBACKS;
typedef DDHAL_DDSURFACECALLBACKS *PDD_SURFACECALLBACKS;
typedef struct _VIDEOMEMORY
{
DWORD dwFlags;
FLATPTR fpStart;
union
{
FLATPTR fpEnd;
DWORD dwWidth;
};
DDSCAPS ddsCaps;
DDSCAPS ddsCapsAlt;
union
{
struct _VMEMHEAP *lpHeap;
DWORD dwHeight;
};
} VIDEOMEMORY, *PVIDEOMEMORY;
typedef struct _FONTINFO
{
ULONG cjThis;

View file

@ -323,6 +323,12 @@ typedef struct _DDSCAPS2 {
DWORD dwCaps4; /* more reserved capabilities */
} DDSCAPS2,*LPDDSCAPS2;
typedef struct _DDSCAPSEX {
DWORD dwCaps2; /* additional capabilities */
DWORD dwCaps3; /* reserved capabilities */
DWORD dwCaps4; /* more reserved capabilities */
} DDSCAPSEX,*LPDDSCAPSEX;
#define DD_ROP_SPACE (256/32) /* space required to store ROP array */
typedef struct DDCAPS_DX7 /* DirectX 7 version of caps struct */

View file

@ -3,114 +3,117 @@
#define __WIN32K_NTDDRAW_H
#include <windows.h>
#include <ddk/d3dhal.h>
#include <ddk/ddrawint.h>
#include <ddk/d3dnthal.h>
typedef D3DHAL_CONTEXTCREATEDATA D3DNTHAL_CONTEXTCREATEDATA;
#ifdef __cplusplus
extern "C" {
#endif
BOOL APIENTRY NtGdiD3dContextCreate(
BOOL STDCALL NtGdiD3dContextCreate(
HANDLE hDirectDrawLocal,
HANDLE hSurfColor,
HANDLE hSurfZ,
D3DNTHAL_CONTEXTCREATEDATA *pdcci
PD3DNTHAL_CONTEXTCREATEDATA pdcci
);
DWORD APIENTRY NtGdiD3dContextDestroy(
LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
DWORD STDCALL NtGdiD3dContextDestroy(
PD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
);
DWORD APIENTRY NtGdiD3dContextDestroyAll(VOID);
DWORD STDCALL NtGdiD3dContextDestroyAll(VOID);
DWORD APIENTRY NtGdiD3dDrawPrimitives2(
DWORD STDCALL NtGdiD3dDrawPrimitives2(
HANDLE hCmdBuf,
HANDLE hVBuf,
LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
PD3DNTHAL_DRAWPRIMITIVES2DATA pded,
FLATPTR *pfpVidMemCmd,
DWORD *pdwSizeCmd,
FLATPTR *pfpVidMemVtx,
DWORD *pdwSizeVtx
);
DWORD APIENTRY NtGdiD3dValidateTextureStageState(
LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
DWORD STDCALL NtGdiD3dValidateTextureStageState(
PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
);
DWORD APIENTRY NtGdiDdAddAttachedSurface(
DWORD STDCALL NtGdiDdAddAttachedSurface(
HANDLE hSurface,
HANDLE hSurfaceAttached,
PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
);
DWORD APIENTRY NtGdiDdAlphaBlt(VOID);
DWORD STDCALL NtGdiDdAlphaBlt(VOID);
BOOL APIENTRY NtGdiDdAttachSurface(
BOOL STDCALL NtGdiDdAttachSurface(
HANDLE hSurfaceFrom,
HANDLE hSurfaceTo
);
DWORD APIENTRY NtGdiDdBeginMoCompFrame(
DWORD STDCALL NtGdiDdBeginMoCompFrame(
HANDLE hMoComp,
PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
);
DWORD APIENTRY NtGdiDdBlt(
DWORD STDCALL NtGdiDdBlt(
HANDLE hSurfaceDest,
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData
);
DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(
DWORD STDCALL NtGdiDdCanCreateD3DBuffer(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
);
DWORD APIENTRY NtGdiDdCanCreateSurface(
DWORD STDCALL NtGdiDdCanCreateSurface(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
);
DWORD APIENTRY NtGdiDdColorControl(
DWORD STDCALL NtGdiDdColorControl(
HANDLE hSurface,
PDD_COLORCONTROLDATA puColorControlData
);
DWORD APIENTRY NtGdiDdCreateD3DBuffer(
DWORD STDCALL NtGdiDdCreateD3DBuffer(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
PDD_CREATESURFACEDATA puCreateSurfaceData,
HANDLE *puhSurface
);
HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(
HANDLE STDCALL NtGdiDdCreateDirectDrawObject(
HDC hdc
);
HANDLE APIENTRY NtGdiDdCreateMoComp(
HANDLE STDCALL NtGdiDdCreateMoComp(
HANDLE hDirectDraw,
PDD_CREATEMOCOMPDATA puCreateMoCompData
);
DWORD APIENTRY NtGdiDdCreateSurface(
DWORD STDCALL NtGdiDdCreateSurface(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
PDD_CREATESURFACEDATA puCreateSurfaceData,
HANDLE *puhSurface
);
DWORD APIENTRY NtGdiDdCreateSurfaceEx(
DWORD STDCALL NtGdiDdCreateSurfaceEx(
HANDLE hDirectDraw,
HANDLE hSurface,
DWORD dwSurfaceHandle
);
HANDLE APIENTRY NtGdiDdCreateSurfaceObject(
HANDLE STDCALL NtGdiDdCreateSurfaceObject(
HANDLE hDirectDrawLocal,
HANDLE hSurface,
PDD_SURFACE_LOCAL puSurfaceLocal,
@ -119,34 +122,34 @@ HANDLE APIENTRY NtGdiDdCreateSurfaceObject(
BOOL bComplete
);
BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(
BOOL STDCALL NtGdiDdDeleteDirectDrawObject(
HANDLE hDirectDrawLocal
);
BOOL APIENTRY NtGdiDdDeleteSurfaceObject(
BOOL STDCALL NtGdiDdDeleteSurfaceObject(
HANDLE hSurface
);
DWORD APIENTRY NtGdiDdDestroyD3DBuffer(
DWORD STDCALL NtGdiDdDestroyD3DBuffer(
HANDLE hSurface
);
DWORD APIENTRY NtGdiDdDestroyMoComp(
DWORD STDCALL NtGdiDdDestroyMoComp(
HANDLE hMoComp,
PDD_DESTROYMOCOMPDATA puBeginFrameData
);
DWORD APIENTRY NtGdiDdDestroySurface(
DWORD STDCALL NtGdiDdDestroySurface(
HANDLE hSurface,
BOOL bRealDestroy
);
DWORD APIENTRY NtGdiDdEndMoCompFrame(
DWORD STDCALL NtGdiDdEndMoCompFrame(
HANDLE hMoComp,
PDD_ENDMOCOMPFRAMEDATA puEndFrameData
);
DWORD APIENTRY NtGdiDdFlip(
DWORD STDCALL NtGdiDdFlip(
HANDLE hSurfaceCurrent,
HANDLE hSurfaceTarget,
HANDLE hSurfaceCurrentLeft,
@ -154,88 +157,88 @@ DWORD APIENTRY NtGdiDdFlip(
PDD_FLIPDATA puFlipData
);
DWORD APIENTRY NtGdiDdFlipToGDISurface(
DWORD STDCALL NtGdiDdFlipToGDISurface(
HANDLE hDirectDraw,
PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
);
DWORD APIENTRY NtGdiDdGetAvailDriverMemory(
DWORD STDCALL NtGdiDdGetAvailDriverMemory(
HANDLE hDirectDraw,
PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
);
DWORD APIENTRY NtGdiDdGetBltStatus(
DWORD STDCALL NtGdiDdGetBltStatus(
HANDLE hSurface,
PDD_GETBLTSTATUSDATA puGetBltStatusData
);
HDC APIENTRY NtGdiDdGetDC(
HDC STDCALL NtGdiDdGetDC(
HANDLE hSurface,
PALETTEENTRY *puColorTable
);
DWORD APIENTRY NtGdiDdGetDriverInfo(
DWORD STDCALL NtGdiDdGetDriverInfo(
HANDLE hDirectDraw,
PDD_GETDRIVERINFODATA puGetDriverInfoData
);
DWORD APIENTRY NtGdiDdGetDriverState(
DWORD STDCALL NtGdiDdGetDriverState(
PDD_GETDRIVERSTATEDATA pdata
);
DWORD APIENTRY NtGdiDdGetDxHandle(
DWORD STDCALL NtGdiDdGetDxHandle(
HANDLE hDirectDraw,
HANDLE hSurface,
BOOL bRelease
);
DWORD APIENTRY NtGdiDdGetFlipStatus(
DWORD STDCALL NtGdiDdGetFlipStatus(
HANDLE hSurface,
PDD_GETFLIPSTATUSDATA puGetFlipStatusData
);
DWORD APIENTRY NtGdiDdGetInternalMoCompInfo(
DWORD STDCALL NtGdiDdGetInternalMoCompInfo(
HANDLE hDirectDraw,
PDD_GETINTERNALMOCOMPDATA puGetInternalData
);
DWORD APIENTRY NtGdiDdGetMoCompBuffInfo(
DWORD STDCALL NtGdiDdGetMoCompBuffInfo(
HANDLE hDirectDraw,
PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
);
DWORD APIENTRY NtGdiDdGetMoCompFormats(
DWORD STDCALL NtGdiDdGetMoCompFormats(
HANDLE hDirectDraw,
PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
);
DWORD APIENTRY NtGdiDdGetMoCompGuids(
DWORD STDCALL NtGdiDdGetMoCompGuids(
HANDLE hDirectDraw,
PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
);
DWORD APIENTRY NtGdiDdGetScanLine(
DWORD STDCALL NtGdiDdGetScanLine(
HANDLE hDirectDraw,
PDD_GETSCANLINEDATA puGetScanLineData
);
DWORD APIENTRY NtGdiDdLock(
DWORD STDCALL NtGdiDdLock(
HANDLE hSurface,
PDD_LOCKDATA puLockData,
HDC hdcClip
);
DWORD APIENTRY NtGdiDdLockD3D(
DWORD STDCALL NtGdiDdLockD3D(
HANDLE hSurface,
PDD_LOCKDATA puLockData
);
BOOL APIENTRY NtGdiDdQueryDirectDrawObject(
BOOL STDCALL NtGdiDdQueryDirectDrawObject(
HANDLE hDirectDrawLocal,
DD_HALINFO *pHalInfo,
DWORD *pCallBackFlags,
LPD3DNTHAL_CALLBACKS puD3dCallbacks,
LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
PD3DNTHAL_CALLBACKS puD3dCallbacks,
PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
LPDDSURFACEDESC puD3dTextureFormats,
DWORD *puNumHeaps,
@ -244,77 +247,80 @@ BOOL APIENTRY NtGdiDdQueryDirectDrawObject(
DWORD *puFourCC
);
DWORD APIENTRY NtGdiDdQueryMoCompStatus(
DWORD STDCALL NtGdiDdQueryMoCompStatus(
HANDLE hMoComp,
PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
);
BOOL APIENTRY NtGdiDdReenableDirectDrawObject(
BOOL STDCALL NtGdiDdReenableDirectDrawObject(
HANDLE hDirectDrawLocal,
BOOL *pubNewMode
);
BOOL APIENTRY NtGdiDdReleaseDC(
BOOL STDCALL NtGdiDdReleaseDC(
HANDLE hSurface
);
DWORD APIENTRY NtGdiDdRenderMoComp(
DWORD STDCALL NtGdiDdRenderMoComp(
HANDLE hMoComp,
PDD_RENDERMOCOMPDATA puRenderMoCompData
);
BOOL APIENTRY NtGdiDdResetVisrgn(
BOOL STDCALL NtGdiDdResetVisrgn(
HANDLE hSurface,
HWND hwnd
);
DWORD APIENTRY NtGdiDdSetColorKey(
DWORD STDCALL NtGdiDdSetColorKey(
HANDLE hSurface,
PDD_SETCOLORKEYDATA puSetColorKeyData
);
DWORD APIENTRY NtGdiDdSetExclusiveMode(
DWORD STDCALL NtGdiDdSetExclusiveMode(
HANDLE hDirectDraw,
PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
);
BOOL APIENTRY NtGdiDdSetGammaRamp(
BOOL STDCALL NtGdiDdSetGammaRamp(
HANDLE hDirectDraw,
HDC hdc,
LPVOID lpGammaRamp
);
DWORD APIENTRY NtGdiDdSetOverlayPosition(
DWORD STDCALL NtGdiDdSetOverlayPosition(
HANDLE hSurfaceSource,
HANDLE hSurfaceDestination,
PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
);
VOID APIENTRY NtGdiDdUnattachSurface(
VOID STDCALL NtGdiDdUnattachSurface(
HANDLE hSurface,
HANDLE hSurfaceAttached
);
DWORD APIENTRY NtGdiDdUnlock(
DWORD STDCALL NtGdiDdUnlock(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
);
DWORD APIENTRY NtGdiDdUnlockD3D(
DWORD STDCALL NtGdiDdUnlockD3D(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
);
DWORD APIENTRY NtGdiDdUpdateOverlay(
DWORD STDCALL NtGdiDdUpdateOverlay(
HANDLE hSurfaceDestination,
HANDLE hSurfaceSource,
PDD_UPDATEOVERLAYDATA puUpdateOverlayData
);
DWORD APIENTRY NtGdiDdWaitForVerticalBlank(
DWORD STDCALL NtGdiDdWaitForVerticalBlank(
HANDLE hDirectDraw,
PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

View file

@ -4,8 +4,6 @@ TARGET_TYPE = dynlink
TARGET_NAME = d3d8thk
TARGET_DEFONLY = yes
#TARGET_BASE = 0x76340000
# require os code to explicitly request A/W version of structs/functions

View file

@ -1,58 +1,58 @@
LIBRARY d3d8thk
EXPORTS
OsThunkD3dContextCreate = NtGdiD3dContextCreate@16
OsThunkD3dContextDestroy = NtGdiD3dContextDestroy@4
OsThunkD3dContextDestroyAll = NtGdiD3dContextDestroyAll@4
OsThunkD3dDrawPrimitives2 = NtGdiD3dDrawPrimitives2@28
OsThunkD3dValidateTextureStageState = NtGdiD3dValidateTextureStageState@4
OsThunkDdAddAttachedSurface = NtGdiDdAddAttachedSurface@12
OsThunkDdAlphaBlt = NtGdiDdAlphaBlt@12
OsThunkDdAttachSurface = NtGdiDdAttachSurface@8
OsThunkDdBeginMoCompFrame = NtGdiDdBeginMoCompFrame@8
OsThunkDdBlt = NtGdiDdBlt@12
OsThunkDdCanCreateD3DBuffer = NtGdiDdCanCreateD3DBuffer@8
OsThunkDdCanCreateSurface = NtGdiDdCanCreateSurface@8
OsThunkDdColorControl = NtGdiDdColorControl@8
OsThunkDdCreateD3DBuffer = NtGdiDdCreateD3DBuffer@32
OsThunkDdCreateDirectDrawObject = NtGdiDdCreateDirectDrawObject@4
OsThunkDdCreateMoComp = NtGdiDdCreateMoComp@8
OsThunkDdCreateSurface = NtGdiDdCreateSurface@32
OsThunkDdCreateSurfaceEx = NtGdiDdCreateSurfaceEx@12
OsThunkDdCreateSurfaceObject = NtGdiDdCreateSurfaceObject@24
OsThunkDdDeleteDirectDrawObject = NtGdiDdDeleteDirectDrawObject@4
OsThunkDdDeleteSurfaceObject = NtGdiDdDeleteSurfaceObject@4
OsThunkDdDestroyD3DBuffer = NtGdiDdDestroyD3DBuffer@4
OsThunkDdDestroyMoComp = NtGdiDdDestroyMoComp@8
OsThunkDdDestroySurface = NtGdiDdDestroySurface@8
OsThunkDdEndMoCompFrame = NtGdiDdEndMoCompFrame@8
OsThunkDdFlip = NtGdiDdFlip@20
OsThunkDdFlipToGDISurface = NtGdiDdFlipToGDISurface@8
OsThunkDdGetAvailDriverMemory = NtGdiDdGetAvailDriverMemory@8
OsThunkDdGetBltStatus = NtGdiDdGetBltStatus@8
OsThunkDdGetDC = NtGdiDdGetDC@8
OsThunkDdGetDriverInfo = NtGdiDdGetDriverInfo@8
OsThunkDdGetDriverState = NtGdiDdGetDriverState@4
OsThunkDdGetDxHandle = NtGdiDdGetDxHandle@12
OsThunkDdGetFlipStatus = NtGdiDdGetFlipStatus@8
OsThunkDdGetInternalMoCompInfo = NtGdiDdGetInternalMoCompInfo@8
OsThunkDdGetMoCompBuffInfo = NtGdiDdGetMoCompBuffInfo@8
OsThunkDdGetMoCompFormats = NtGdiDdGetMoCompFormats@8
OsThunkDdGetMoCompGuids = NtGdiDdGetMoCompGuids@8
OsThunkDdGetScanLine = NtGdiDdGetScanLine@8
OsThunkDdLock = NtGdiDdLock@12
OsThunkDdLockD3D = NtGdiDdLockD3D@8
OsThunkDdQueryDirectDrawObject = NtGdiDdQueryDirectDrawObject@44
OsThunkDdQueryMoCompStatus = NtGdiDdQueryMoCompStatus@8
OsThunkDdReenableDirectDrawObject = NtGdiDdReenableDirectDrawObject@8
OsThunkDdReleaseDC = NtGdiDdReleaseDC@4
OsThunkDdRenderMoComp = NtGdiDdRenderMoComp@8
OsThunkDdResetVisrgn = NtGdiDdResetVisrgn@8
OsThunkDdSetColorKey = NtGdiDdSetColorKey@8
OsThunkDdSetExclusiveMode = NtGdiDdSetExclusiveMode@8
OsThunkDdSetGammaRamp = NtGdiDdSetGammaRamp@12
OsThunkDdSetOverlayPosition = NtGdiDdSetOverlayPosition@12
OsThunkDdUnattachSurface = NtGdiDdUnattachSurface@8
OsThunkDdUnlock = NtGdiDdUnlock@8
OsThunkDdUnlockD3D = NtGdiDdUnlockD3D@8
OsThunkDdUpdateOverlay = NtGdiDdUpdateOverlay@12
OsThunkDdWaitForVerticalBlank = NtGdiDdWaitForVerticalBlank@8
OsThunkD3dContextCreate@16 = NtGdiD3dContextCreate@16
OsThunkD3dContextDestroy@4 = NtGdiD3dContextDestroy@4
OsThunkD3dContextDestroyAll@4 = NtGdiD3dContextDestroyAll@4
OsThunkD3dDrawPrimitives2@28 = NtGdiD3dDrawPrimitives2@28
OsThunkD3dValidateTextureStageState@4 = NtGdiD3dValidateTextureStageState@4
OsThunkDdAddAttachedSurface@12 = NtGdiDdAddAttachedSurface@12
OsThunkDdAlphaBlt@12 = NtGdiDdAlphaBlt@12
OsThunkDdAttachSurface@8 = NtGdiDdAttachSurface@8
OsThunkDdBeginMoCompFrame@8 = NtGdiDdBeginMoCompFrame@8
OsThunkDdBlt@12 = NtGdiDdBlt@12
OsThunkDdCanCreateD3DBuffer@8 = NtGdiDdCanCreateD3DBuffer@8
OsThunkDdCanCreateSurface@8 = NtGdiDdCanCreateSurface@8
OsThunkDdColorControl@8 = NtGdiDdColorControl@8
OsThunkDdCreateD3DBuffer@32 = NtGdiDdCreateD3DBuffer@32
OsThunkDdCreateDirectDrawObject@4 = NtGdiDdCreateDirectDrawObject@4
OsThunkDdCreateMoComp@8 = NtGdiDdCreateMoComp@8
OsThunkDdCreateSurface@32 = NtGdiDdCreateSurface@32
OsThunkDdCreateSurfaceEx@12 = NtGdiDdCreateSurfaceEx@12
OsThunkDdCreateSurfaceObject@24 = NtGdiDdCreateSurfaceObject@24
OsThunkDdDeleteDirectDrawObject@4 = NtGdiDdDeleteDirectDrawObject@4
OsThunkDdDeleteSurfaceObject@4 = NtGdiDdDeleteSurfaceObject@4
OsThunkDdDestroyD3DBuffer@4 = NtGdiDdDestroyD3DBuffer@4
OsThunkDdDestroyMoComp@8 = NtGdiDdDestroyMoComp@8
OsThunkDdDestroySurface@8 = NtGdiDdDestroySurface@8
OsThunkDdEndMoCompFrame@8 = NtGdiDdEndMoCompFrame@8
OsThunkDdFlip@20 = NtGdiDdFlip@20
OsThunkDdFlipToGDISurface@8 = NtGdiDdFlipToGDISurface@8
OsThunkDdGetAvailDriverMemory@8 = NtGdiDdGetAvailDriverMemory@8
OsThunkDdGetBltStatus@8 = NtGdiDdGetBltStatus@8
OsThunkDdGetDC@8 = NtGdiDdGetDC@8
OsThunkDdGetDriverInfo@8 = NtGdiDdGetDriverInfo@8
OsThunkDdGetDriverState@4 = NtGdiDdGetDriverState@4
OsThunkDdGetDxHandle@12 = NtGdiDdGetDxHandle@12
OsThunkDdGetFlipStatus@8 = NtGdiDdGetFlipStatus@8
OsThunkDdGetInternalMoCompInfo@8 = NtGdiDdGetInternalMoCompInfo@8
OsThunkDdGetMoCompBuffInfo@8 = NtGdiDdGetMoCompBuffInfo@8
OsThunkDdGetMoCompFormats@8 = NtGdiDdGetMoCompFormats@8
OsThunkDdGetMoCompGuids@8 = NtGdiDdGetMoCompGuids@8
OsThunkDdGetScanLine@8 = NtGdiDdGetScanLine@8
OsThunkDdLock@12 = NtGdiDdLock@12
OsThunkDdLockD3D@8 = NtGdiDdLockD3D@8
OsThunkDdQueryDirectDrawObject@44 = NtGdiDdQueryDirectDrawObject@44
OsThunkDdQueryMoCompStatus@8 = NtGdiDdQueryMoCompStatus@8
OsThunkDdReenableDirectDrawObject@8 = NtGdiDdReenableDirectDrawObject@8
OsThunkDdReleaseDC@4 = NtGdiDdReleaseDC@4
OsThunkDdRenderMoComp@8 = NtGdiDdRenderMoComp@8
OsThunkDdResetVisrgn@8 = NtGdiDdResetVisrgn@8
OsThunkDdSetColorKey@8 = NtGdiDdSetColorKey@8
OsThunkDdSetExclusiveMode@8 = NtGdiDdSetExclusiveMode@8
OsThunkDdSetGammaRamp@12 = NtGdiDdSetGammaRamp@12
OsThunkDdSetOverlayPosition@12 = NtGdiDdSetOverlayPosition@12
OsThunkDdUnattachSurface@8 = NtGdiDdUnattachSurface@8
OsThunkDdUnlock@8 = NtGdiDdUnlock@8
OsThunkDdUnlockD3D@8 = NtGdiDdUnlockD3D@8
OsThunkDdUpdateOverlay@12 = NtGdiDdUpdateOverlay@12
OsThunkDdWaitForVerticalBlank@8 = NtGdiDdWaitForVerticalBlank@8

View file

@ -0,0 +1,58 @@
LIBRARY d3d8thk
EXPORTS
OsThunkD3dContextCreate = NtGdiD3dContextCreate@16
OsThunkD3dContextDestroy = NtGdiD3dContextDestroy@4
OsThunkD3dContextDestroyAll = NtGdiD3dContextDestroyAll@4
OsThunkD3dDrawPrimitives2 = NtGdiD3dDrawPrimitives2@28
OsThunkD3dValidateTextureStageState = NtGdiD3dValidateTextureStageState@4
OsThunkDdAddAttachedSurface = NtGdiDdAddAttachedSurface@12
OsThunkDdAlphaBlt = NtGdiDdAlphaBlt@12
OsThunkDdAttachSurface = NtGdiDdAttachSurface@8
OsThunkDdBeginMoCompFrame = NtGdiDdBeginMoCompFrame@8
OsThunkDdBlt = NtGdiDdBlt@12
OsThunkDdCanCreateD3DBuffer = NtGdiDdCanCreateD3DBuffer@8
OsThunkDdCanCreateSurface = NtGdiDdCanCreateSurface@8
OsThunkDdColorControl = NtGdiDdColorControl@8
OsThunkDdCreateD3DBuffer = NtGdiDdCreateD3DBuffer@32
OsThunkDdCreateDirectDrawObject = NtGdiDdCreateDirectDrawObject@4
OsThunkDdCreateMoComp = NtGdiDdCreateMoComp@8
OsThunkDdCreateSurface = NtGdiDdCreateSurface@32
OsThunkDdCreateSurfaceEx = NtGdiDdCreateSurfaceEx@12
OsThunkDdCreateSurfaceObject = NtGdiDdCreateSurfaceObject@24
OsThunkDdDeleteDirectDrawObject = NtGdiDdDeleteDirectDrawObject@4
OsThunkDdDeleteSurfaceObject = NtGdiDdDeleteSurfaceObject@4
OsThunkDdDestroyD3DBuffer = NtGdiDdDestroyD3DBuffer@4
OsThunkDdDestroyMoComp = NtGdiDdDestroyMoComp@8
OsThunkDdDestroySurface = NtGdiDdDestroySurface@8
OsThunkDdEndMoCompFrame = NtGdiDdEndMoCompFrame@8
OsThunkDdFlip = NtGdiDdFlip@20
OsThunkDdFlipToGDISurface = NtGdiDdFlipToGDISurface@8
OsThunkDdGetAvailDriverMemory = NtGdiDdGetAvailDriverMemory@8
OsThunkDdGetBltStatus = NtGdiDdGetBltStatus@8
OsThunkDdGetDC = NtGdiDdGetDC@8
OsThunkDdGetDriverInfo = NtGdiDdGetDriverInfo@8
OsThunkDdGetDriverState = NtGdiDdGetDriverState@4
OsThunkDdGetDxHandle = NtGdiDdGetDxHandle@12
OsThunkDdGetFlipStatus = NtGdiDdGetFlipStatus@8
OsThunkDdGetInternalMoCompInfo = NtGdiDdGetInternalMoCompInfo@8
OsThunkDdGetMoCompBuffInfo = NtGdiDdGetMoCompBuffInfo@8
OsThunkDdGetMoCompFormats = NtGdiDdGetMoCompFormats@8
OsThunkDdGetMoCompGuids = NtGdiDdGetMoCompGuids@8
OsThunkDdGetScanLine = NtGdiDdGetScanLine@8
OsThunkDdLock = NtGdiDdLock@12
OsThunkDdLockD3D = NtGdiDdLockD3D@8
OsThunkDdQueryDirectDrawObject = NtGdiDdQueryDirectDrawObject@44
OsThunkDdQueryMoCompStatus = NtGdiDdQueryMoCompStatus@8
OsThunkDdReenableDirectDrawObject = NtGdiDdReenableDirectDrawObject@8
OsThunkDdReleaseDC = NtGdiDdReleaseDC@4
OsThunkDdRenderMoComp = NtGdiDdRenderMoComp@8
OsThunkDdResetVisrgn = NtGdiDdResetVisrgn@8
OsThunkDdSetColorKey = NtGdiDdSetColorKey@8
OsThunkDdSetExclusiveMode = NtGdiDdSetExclusiveMode@8
OsThunkDdSetGammaRamp = NtGdiDdSetGammaRamp@12
OsThunkDdSetOverlayPosition = NtGdiDdSetOverlayPosition@12
OsThunkDdUnattachSurface = NtGdiDdUnattachSurface@8
OsThunkDdUnlock = NtGdiDdUnlock@8
OsThunkDdUnlockD3D = NtGdiDdUnlockD3D@8
OsThunkDdUpdateOverlay = NtGdiDdUpdateOverlay@12
OsThunkDdWaitForVerticalBlank = NtGdiDdWaitForVerticalBlank@8

View file

@ -1,4 +1,4 @@
; $Id: gdi32.def,v 1.10 2003/09/12 17:51:46 vizzini Exp $
; $Id: gdi32.def,v 1.11 2003/10/28 19:30:08 gvg Exp $
;
; gdi32.def
;
@ -90,63 +90,6 @@ CreateScalableFontResourceA@16
CreateScalableFontResourceW@16
CreateSolidBrush@4
DPtoLP@12
DxgGenericThunk@24
D3DContextCreate@16
D3DContextDestroy@4
D3DContextDestroyAll@0
D3DValidateTextureStageState@4
D3DDrawPrimitives2@28
D3DGetDriverState@4
DdAddAttachedSurface@12
DdAlphaBlt@12
DdDdAttachSurface@8
DdBeginMoCompFrame@8
DdBlt@12
DdCanCreateSurface@8
DdCanCreateD3DBuffer@8
DdColorControl@8
DdDdCreateDirectDrawObject@4
DdCreateSurface@32
DdCreateD3DBuffer@32
DdCreateMoComp@8
DdDdCreateSurfaceObject@24
DdDdDeleteDirectDrawObject@4
DdDdDeleteSurfaceObject@4
DdDestroyMoComp@8
DdDestroySurface@8
DdDestroyD3DBuffer@4
DdEndMoCompFrame@8
DdFlip@20
DdFlipToGDISurface@8
DdGetAvailDriverMemory@8
DdGetBltStatus@8
DdDdGetDC@8
DdGetDriverInfo@8
DdDdGetDxHandle@12
DdGetFlipStatus@8
DdGetInternalMoCompInfo@8
DdGetMoCompBuffInfo@8
DdGetMoCompGuids@8
DdGetMoCompFormats@8
DdGetScanLine@8
DdLock@12
DdLockD3D@8
DdDdQueryDirectDrawObject@44
DdQueryMoCompStatus@8
DdDdReenableDirectDrawObject@8
DdDdReleaseDC@4
DdRenderMoComp@8
DdDdResetVisrgn@8
DdSetColorKey@8
DdSetExclusiveMode@8
DdDdSetGammaRamp@12
DdCreateSurfaceEx@12
DdSetOverlayPosition@12
DdDdUnattachSurface@8
DdUnlock@8
DdUnlockD3D@8
DdUpdateOverlay@12
DdWaitForVerticalBlank@8
DeleteColorSpace@4
DeleteDC@4
DeleteEnhMetaFile@4

View file

@ -1,4 +1,4 @@
; $Id: gdi32.edf,v 1.8 2003/09/12 17:51:46 vizzini Exp $
; $Id: gdi32.edf,v 1.9 2003/10/28 19:30:08 gvg Exp $
;
; gdi32.def
;
@ -90,63 +90,6 @@ CreateScalableFontResourceA=CreateScalableFontResourceA@16
CreateScalableFontResourceW=CreateScalableFontResourceW@16
CreateSolidBrush=CreateSolidBrush@4
DPtoLP=DPtoLP@12
DdEntry0=DxgGenericThunk@24
DdEntry1=D3DContextCreate@16
DdEntry2=D3DContextDestroy@4
DdEntry3=D3DContextDestroyAll@0
DdEntry4=D3DValidateTextureStageState@4
DdEntry5=D3DDrawPrimitives2@28
DdEntry6=D3DGetDriverState@4
DdEntry7=DdAddAttachedSurface@12
DdEntry8=DdAlphaBlt@12
DdEntry9=DdDdAttachSurface@8
DdEntry10=DdBeginMoCompFrame@8
DdEntry11=DdBlt@12
DdEntry12=DdCanCreateSurface@8
DdEntry13=DdCanCreateD3DBuffer@8
DdEntry14=DdColorControl@8
DdEntry15=DdDdCreateDirectDrawObject@4
DdEntry16=DdCreateSurface@32
DdEntry17=DdCreateD3DBuffer@32
DdEntry18=DdCreateMoComp@8
DdEntry19=DdDdCreateSurfaceObject@24
DdEntry20=DdDdDeleteDirectDrawObject@4
DdEntry21=DdDdDeleteSurfaceObject@4
DdEntry22=DdDestroyMoComp@8
DdEntry23=DdDestroySurface@8
DdEntry24=DdDestroyD3DBuffer@4
DdEntry25=DdEndMoCompFrame@8
DdEntry26=DdFlip@20
DdEntry27=DdFlipToGDISurface@8
DdEntry28=DdGetAvailDriverMemory@8
DdEntry29=DdGetBltStatus@8
DdEntry30=DdDdGetDC@8
DdEntry31=DdGetDriverInfo@8
DdEntry32=DdDdGetDxHandle@12
DdEntry33=DdGetFlipStatus@8
DdEntry34=DdGetInternalMoCompInfo@8
DdEntry35=DdGetMoCompBuffInfo@8
DdEntry36=DdGetMoCompGuids@8
DdEntry37=DdGetMoCompFormats@8
DdEntry38=DdGetScanLine@8
DdEntry39=DdLock@12
DdEntry40=DdLockD3D@8
DdEntry41=DdDdQueryDirectDrawObject@44
DdEntry42=DdQueryMoCompStatus@8
DdEntry43=DdDdReenableDirectDrawObject@8
DdEntry44=DdDdReleaseDC@4
DdEntry45=DdRenderMoComp@8
DdEntry46=DdDdResetVisrgn@8
DdEntry47=DdSetColorKey@8
DdEntry48=DdSetExclusiveMode@8
DdEntry49=DdDdSetGammaRamp@12
DdEntry50=DdCreateSurfaceEx@12
DdEntry51=DdSetOverlayPosition@12
DdEntry52=DdDdUnattachSurface@8
DdEntry53=DdUnlock@8
DdEntry54=DdUnlockD3D@8
DdEntry55=DdUpdateOverlay@12
DdEntry56=DdWaitForVerticalBlank@8
DeleteColorSpace=DeleteColorSpace@4
DeleteDC=DeleteDC@4
DeleteEnhMetaFile=DeleteEnhMetaFile@4

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.37 2003/09/12 22:17:06 gvg Exp $
/* $Id: stubs.c,v 1.38 2003/10/28 19:30:08 gvg Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
@ -4462,723 +4462,6 @@ LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DxgGenericThunk(ULONG_PTR ulIndex,
ULONG_PTR ulHandle,
SIZE_T *pdwSizeOfPtr1,
PVOID pvPtr1,
SIZE_T *pdwSizeOfPtr2,
PVOID pvPtr2)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL D3DContextCreate(
HANDLE hDirectDrawLocal,
HANDLE hSurfColor,
HANDLE hSurfZ,
D3DNTHAL_CONTEXTCREATEI *pdcci
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL D3DContextDestroy(
LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL D3DContextDestroyAll(VOID)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL D3DValidateTextureStageState(
LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL D3DDrawPrimitives2(
HANDLE hCmdBuf,
HANDLE hVBuf,
LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
FLATPTR *pfpVidMemCmd,
DWORD *pdwSizeCmd,
FLATPTR *pfpVidMemVtx,
DWORD *pdwSizeVtx
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL D3DGetDriverState(
PDD_GETDRIVERSTATEDATA pdata
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdAddAttachedSurface(
HANDLE hSurface,
HANDLE hSurfaceAttached,
PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdAlphaBlt(
HANDLE hSurfaceDest,
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdAttachSurface( /*rename it so it doesnt conflict */
HANDLE hSurfaceFrom,
HANDLE hSurfaceTo
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdBeginMoCompFrame(
HANDLE hMoComp,
PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdBlt(
HANDLE hSurfaceDest,
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdCanCreateSurface(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdCanCreateD3DBuffer(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdColorControl(
HANDLE hSurface,
PDD_COLORCONTROLDATA puColorControlData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
HANDLE STDCALL DdDdCreateDirectDrawObject( /*rename it so it doesnt conflict */
HDC hdc
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdCreateSurface(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
HANDLE *puhSurface
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdCreateD3DBuffer(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
HANDLE *puhSurface
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
HANDLE STDCALL DdCreateMoComp(
HANDLE hDirectDraw,
PDD_CREATEMOCOMPDATA puCreateMoCompData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
HANDLE STDCALL DdDdCreateSurfaceObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal,
HANDLE hSurface,
PDD_SURFACE_LOCAL puSurfaceLocal,
PDD_SURFACE_MORE puSurfaceMore,
PDD_SURFACE_GLOBAL puSurfaceGlobal,
BOOL bComplete
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdDeleteDirectDrawObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdDeleteSurfaceObject( /*rename it so it doesnt conflict */
HANDLE hSurface
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdDestroyMoComp(
HANDLE hMoComp,
PDD_DESTROYMOCOMPDATA puBeginFrameData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdDestroySurface(
HANDLE hSurface,
BOOL bRealDestroy
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdDestroyD3DBuffer(
HANDLE hSurface
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdEndMoCompFrame(
HANDLE hMoComp,
PDD_ENDMOCOMPFRAMEDATA puEndFrameData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdFlip(
HANDLE hSurfaceCurrent,
HANDLE hSurfaceTarget,
HANDLE hSurfaceCurrentLeft,
HANDLE hSurfaceTargetLeft,
PDD_FLIPDATA puFlipData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdFlipToGDISurface(
HANDLE hDirectDraw,
PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetAvailDriverMemory(
HANDLE hDirectDraw,
PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetBltStatus(
HANDLE hSurface,
PDD_GETBLTSTATUSDATA puGetBltStatusData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
HDC STDCALL DdDdGetDC( /*rename it so it doesnt conflict */
HANDLE hSurface,
PALETTEENTRY *puColorTable
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetDriverInfo(
HANDLE hDirectDraw,
PDD_GETDRIVERINFODATA puGetDriverInfoData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdDdGetDxHandle( /*rename it so it doesnt conflict */
HANDLE hDirectDraw,
HANDLE hSurface,
BOOL bRelease
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetFlipStatus(
HANDLE hSurface,
PDD_GETFLIPSTATUSDATA puGetFlipStatusData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetInternalMoCompInfo(
HANDLE hDirectDraw,
PDD_GETINTERNALMOCOMPDATA puGetInternalData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetMoCompBuffInfo(
HANDLE hDirectDraw,
PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetMoCompGuids(
HANDLE hDirectDraw,
PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetMoCompFormats(
HANDLE hDirectDraw,
PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdGetScanLine(
HANDLE hDirectDraw,
PDD_GETSCANLINEDATA puGetScanLineData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdLock(
HANDLE hSurface,
PDD_LOCKDATA puLockData,
HDC hdcClip
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdLockD3D(
HANDLE hSurface,
PDD_LOCKDATA puLockData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdQueryDirectDrawObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal,
DD_HALINFO *pHalInfo,
DWORD *pCallBackFlags,
LPD3DNTHAL_CALLBACKS puD3dCallbacks,
LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
LPDDSURFACEDESC puD3dTextureFormats,
DWORD *puNumHeaps,
VIDEOMEMORY *puvmList,
DWORD *puNumFourCC,
DWORD *puFourCC
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdQueryMoCompStatus(
HANDLE hMoComp,
PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdReenableDirectDrawObject( /*rename it so it doesnt conflict */
HANDLE hDirectDrawLocal,
BOOL *pubNewMode
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdReleaseDC( /*rename it so it doesnt conflict */
HANDLE hSurface
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdRenderMoComp(
HANDLE hMoComp,
PDD_RENDERMOCOMPDATA puRenderMoCompData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdResetVisrgn( /*rename it so it doesnt conflict */
HANDLE hSurface,
HWND hwnd
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdSetColorKey(
HANDLE hSurface,
PDD_SETCOLORKEYDATA puSetColorKeyData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdSetExclusiveMode(
HANDLE hDirectDraw,
PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
BOOL STDCALL DdDdSetGammaRamp( /*rename it so it doesnt conflict */
HANDLE hDirectDraw,
HDC hdc,
LPVOID lpGammaRamp
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdCreateSurfaceEx(
HANDLE hDirectDraw,
HANDLE hSurface,
DWORD dwSurfaceHandle
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdSetOverlayPosition(
HANDLE hSurfaceSource,
HANDLE hSurfaceDestination,
PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
VOID STDCALL DdDdUnattachSurface( /*rename it so it doesnt conflict */
HANDLE hSurface,
HANDLE hSurfaceAttached
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
}
/*
* @unimplemented
*/
DWORD STDCALL DdUnlock(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdUnlockD3D(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdUpdateOverlay(
HANDLE hSurfaceDestination,
HANDLE hSurfaceSource,
PDD_UPDATEOVERLAYDATA puUpdateOverlayData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD STDCALL DdWaitForVerticalBlank(
HANDLE hDirectDraw,
PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.80 2003/10/25 20:34:34 gvg Exp $
# $Id: makefile,v 1.81 2003/10/28 19:30:08 gvg Exp $
PATH_TO_TOP = ../..
@ -72,7 +72,7 @@ DIB_OBJECTS = dib/dib.o dib/dib1bpp.o dib/dib4bpp.o dib/dib8bpp.o dib/dib16bpp.o
STUBS_OBJECTS = stubs/stubs.o stubs/xpstubs.o
NTDDRAW_OBJECTS = ntddraw/stubs.o
NTDDRAW_OBJECTS = ntddraw/stubs.o ntddraw/ddraw.o
TARGET_OBJECTS = \
$(ENG_OBJECTS) $(MAIN_OBJECTS) $(MISC_OBJECTS) $(LDR_OBJECTS) \

View file

@ -0,0 +1,331 @@
/*
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Native DirectDraw implementation
* FILE: subsys/win32k/ntddraw/ddraw.c
* PROGRAMER: Peter Bajusz (hyp-x@stormregion.com)
* REVISION HISTORY:
* 25-10-2003 PB Created
*/
#include <ddk/ntddk.h>
#include <win32k/win32k.h>
#include <win32k/gdiobj.h>
#define NDEBUG
#include <debug.h>
#define GDI_OBJECT_TYPE_DIRECTDRAW 0x00600000
#define GDI_OBJECT_TYPE_DD_SURFACE 0x00610000
#define GDI_OBJECT_TYPE_DD_VIDEOPORT 0x00620000
#define GDI_OBJECT_TYPE_DD_PALETTE 0x00630000
#define GDI_OBJECT_TYPE_DD_CLIPPER 0x00640000
#define GDI_OBJECT_TYPE_DD_MOTIONCOMP 0x00650000
/************************************************************************/
/* DIRECT DRAW OBJECT */
/************************************************************************/
typedef struct
{
DD_DIRECTDRAW_LOCAL Local;
DD_DIRECTDRAW_GLOBAL Global;
// Drv callbacks
PGD_GETDIRECTDRAWINFO DrvGetDirectDrawInfo;
PGD_DISABLEDIRECTDRAW DrvDisableDirectDraw;
// DD callbacks
PDD_CREATESURFACE DdCreateSurface;
PDD_SETCOLORKEY DdDrvSetColorKey; // ?????
PDD_WAITFORVERTICALBLANK DdWaitForVerticalBlank;
PDD_CANCREATESURFACE DdCanCreateSurface;
PDD_CREATEPALETTE DdCreatePalette;
PDD_GETSCANLINE DdGetScanLine;
PDD_MAPMEMORY DdMapMemory;
// Surface callbacks
PDD_SURFCB_DESTROYSURFACE DdDestroySurface;
PDD_SURFCB_FLIP DdFlip;
PDD_SURFCB_SETCLIPLIST DdSetClipList;
PDD_SURFCB_LOCK DdLock;
PDD_SURFCB_UNLOCK DdUnlock;
PDD_SURFCB_BLT DdBlt;
PDD_SURFCB_SETCOLORKEY DdSetColorKey;
PDD_SURFCB_ADDATTACHEDSURFACE DdAddAttachedSurface;
PDD_SURFCB_GETBLTSTATUS DdGetBltStatus;
PDD_SURFCB_GETFLIPSTATUS DdGetFlipStatus;
PDD_SURFCB_UPDATEOVERLAY DdUpdateOverlay;
PDD_SURFCB_SETOVERLAYPOSITION DdSetOverlayPosition;
PDD_SURFCB_SETPALETTE DdSetPalette;
// Palette callbacks
PDD_PALCB_DESTROYPALETTE DdDestroyPalette;
PDD_PALCB_SETENTRIES DdSetEntries;
// D3D Device context callbacks
PD3DNTHAL_CONTEXTCREATECB D3dContextCreate;
PD3DNTHAL_CONTEXTDESTROYCB D3dContextDestroy;
// D3D Buffer callbacks
PDD_CANCREATESURFACE DdCanCreateD3DBuffer;
PDD_CREATESURFACE DdCreateD3DBuffer;
PDD_SURFCB_DESTROYSURFACE DdDestroyD3DBuffer;
PDD_SURFCB_LOCK DdLockD3DBuffer;
PDD_SURFCB_UNLOCK DdUnlockD3DBuffer;
} DD_DIRECTDRAW, *PDD_DIRECTDRAW;
static BOOL FASTCALL DirectDrawCleanup(PDD_DIRECTDRAW pDirectDraw)
{
pDirectDraw->DrvDisableDirectDraw(pDirectDraw->Global.dhpdev);
return TRUE;
}
HANDLE STDCALL NtGdiDdCreateDirectDrawObject(
HDC hdc
)
{
DD_CALLBACKS callbacks;
DD_SURFACECALLBACKS surface_callbacks;
DD_PALETTECALLBACKS palette_callbacks;
RtlZeroMemory(&callbacks, sizeof(callbacks));
callbacks.dwSize = sizeof(callbacks);
RtlZeroMemory(&surface_callbacks, sizeof(surface_callbacks));
surface_callbacks.dwSize = sizeof(surface_callbacks);
RtlZeroMemory(&palette_callbacks, sizeof(palette_callbacks));
palette_callbacks.dwSize = sizeof(palette_callbacks);
DC *pDC = DC_LockDc(hdc);
if (!pDC)
return NULL;
if (!pDC->DriverFunctions.EnableDirectDraw)
{
// Driver doesn't support DirectDraw
DC_UnlockDc(hdc);
return NULL;
}
BOOL success = pDC->DriverFunctions.EnableDirectDraw(
pDC->PDev, &callbacks, &surface_callbacks, &palette_callbacks);
if (!success)
{
// DirectDraw creation failed
DC_UnlockDc(hdc);
return NULL;
}
HANDLE hDirectDraw = GDIOBJ_AllocObj(sizeof(DD_DIRECTDRAW), GDI_OBJECT_TYPE_DIRECTDRAW, (GDICLEANUPPROC)DirectDrawCleanup);
PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDraw, GDI_OBJECT_TYPE_DIRECTDRAW);
pDirectDraw->Global.dhpdev = pDC->PDev;
pDirectDraw->Local.lpGbl = &pDirectDraw->Global;
pDirectDraw->DrvGetDirectDrawInfo = pDC->DriverFunctions.GetDirectDrawInfo;
pDirectDraw->DrvDisableDirectDraw = pDC->DriverFunctions.DisableDirectDraw;
if (callbacks.dwFlags && DDHAL_CB32_CREATESURFACE)
pDirectDraw->DdCreateSurface = callbacks.CreateSurface;
if (callbacks.dwFlags && DDHAL_CB32_SETCOLORKEY)
pDirectDraw->DdDrvSetColorKey = callbacks.SetColorKey;
if (callbacks.dwFlags && DDHAL_CB32_WAITFORVERTICALBLANK)
pDirectDraw->DdWaitForVerticalBlank = callbacks.WaitForVerticalBlank;
if (callbacks.dwFlags && DDHAL_CB32_CANCREATESURFACE)
pDirectDraw->DdCanCreateSurface = callbacks.CanCreateSurface;
if (callbacks.dwFlags && DDHAL_CB32_CREATEPALETTE)
pDirectDraw->DdCreatePalette = callbacks.CreatePalette;
if (callbacks.dwFlags && DDHAL_CB32_GETSCANLINE)
pDirectDraw->DdGetScanLine = callbacks.GetScanLine;
if (callbacks.dwFlags && DDHAL_CB32_MAPMEMORY)
pDirectDraw->DdMapMemory = callbacks.MapMemory;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_DESTROYSURFACE)
pDirectDraw->DdDestroySurface = surface_callbacks.DestroySurface;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_FLIP)
pDirectDraw->DdFlip = surface_callbacks.Flip;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETCLIPLIST)
pDirectDraw->DdSetClipList = surface_callbacks.SetClipList;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_LOCK)
pDirectDraw->DdLock = surface_callbacks.Lock;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_UNLOCK)
pDirectDraw->DdUnlock = surface_callbacks.Unlock;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_BLT)
pDirectDraw->DdBlt = surface_callbacks.Blt;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETCOLORKEY)
pDirectDraw->DdSetColorKey = surface_callbacks.SetColorKey;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_ADDATTACHEDSURFACE)
pDirectDraw->DdAddAttachedSurface = surface_callbacks.AddAttachedSurface;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_GETBLTSTATUS)
pDirectDraw->DdGetBltStatus = surface_callbacks.GetBltStatus;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_GETFLIPSTATUS)
pDirectDraw->DdGetFlipStatus = surface_callbacks.GetFlipStatus;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_UPDATEOVERLAY)
pDirectDraw->DdUpdateOverlay = surface_callbacks.UpdateOverlay;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETOVERLAYPOSITION)
pDirectDraw->DdSetOverlayPosition = surface_callbacks.SetOverlayPosition;
if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETPALETTE)
pDirectDraw->DdSetPalette = surface_callbacks.SetPalette;
if (palette_callbacks.dwFlags && DDHAL_PALCB32_DESTROYPALETTE)
pDirectDraw->DdDestroyPalette = palette_callbacks.DestroyPalette;
if (palette_callbacks.dwFlags && DDHAL_PALCB32_SETENTRIES)
pDirectDraw->DdSetEntries = palette_callbacks.SetEntries;
GDIOBJ_UnlockObj(hDirectDraw, GDI_OBJECT_TYPE_DIRECTDRAW);
DC_UnlockDc(hdc);
return hDirectDraw;
}
BOOL STDCALL NtGdiDdDeleteDirectDrawObject(
HANDLE hDirectDrawLocal
)
{
return GDIOBJ_FreeObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW, 0);
}
BOOL STDCALL NtGdiDdQueryDirectDrawObject(
HANDLE hDirectDrawLocal,
DD_HALINFO *pHalInfo,
DWORD *pCallBackFlags,
PD3DNTHAL_CALLBACKS puD3dCallbacks,
PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
LPDDSURFACEDESC puD3dTextureFormats,
DWORD *puNumHeaps,
VIDEOMEMORY *puvmList,
DWORD *puNumFourCC,
DWORD *puFourCC
)
{
PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
if (!pDirectDraw)
return FALSE;
BOOL success = pDirectDraw->DrvGetDirectDrawInfo(
pDirectDraw->Global.dhpdev,
pHalInfo,
puNumHeaps,
puvmList,
puNumFourCC,
puFourCC);
if (!success)
{
GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
return FALSE;
}
if (pHalInfo->lpD3DHALCallbacks)
{
RtlMoveMemory(puD3dCallbacks, pHalInfo->lpD3DHALCallbacks, sizeof(D3DNTHAL_CALLBACKS));
pDirectDraw->D3dContextCreate = puD3dCallbacks->ContextCreate;
pDirectDraw->D3dContextDestroy = puD3dCallbacks->ContextDestroy;
}
if (pHalInfo->lpD3DGlobalDriverData)
{
RtlMoveMemory(puD3dDriverData, pHalInfo->lpD3DGlobalDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
}
if (pHalInfo->lpD3DBufCallbacks)
{
RtlMoveMemory(puD3dBufferCallbacks, pHalInfo->lpD3DBufCallbacks, sizeof(DD_D3DBUFCALLBACKS));
pDirectDraw->DdCanCreateD3DBuffer = puD3dBufferCallbacks->CanCreateD3DBuffer;
pDirectDraw->DdCreateD3DBuffer = puD3dBufferCallbacks->CreateD3DBuffer;
pDirectDraw->DdDestroyD3DBuffer = puD3dBufferCallbacks->DestroyD3DBuffer;
pDirectDraw->DdLockD3DBuffer = puD3dBufferCallbacks->LockD3DBuffer;
pDirectDraw->DdUnlockD3DBuffer = puD3dBufferCallbacks->UnlockD3DBuffer;
}
GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
return TRUE;
}
/************************************************************************/
/* SURFACE OBJECT */
/************************************************************************/
typedef struct
{
DD_SURFACE_LOCAL Local;
DD_SURFACE_MORE More;
DD_SURFACE_GLOBAL Global;
DD_ATTACHLIST AttachList;
DD_ATTACHLIST AttachListFrom;
BOOL bComplete;
} DD_SURFACE, *PDD_SURFACE;
static BOOL FASTCALL DDSurfaceCleanup(PDD_SURFACE pSurface)
{
//FIXME: implement
return TRUE;
}
HANDLE STDCALL NtGdiDdCreateSurfaceObject(
HANDLE hDirectDrawLocal,
HANDLE hSurface,
PDD_SURFACE_LOCAL puSurfaceLocal,
PDD_SURFACE_MORE puSurfaceMore,
PDD_SURFACE_GLOBAL puSurfaceGlobal,
BOOL bComplete
)
{
PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
if (!pDirectDraw)
return NULL;
if (!hSurface)
hSurface = GDIOBJ_AllocObj(sizeof(DD_SURFACE), GDI_OBJECT_TYPE_DD_SURFACE, (GDICLEANUPPROC)DDSurfaceCleanup);
PDD_SURFACE pSurface = GDIOBJ_LockObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
RtlMoveMemory(&pSurface->Local, puSurfaceLocal, sizeof(DD_SURFACE_LOCAL));
RtlMoveMemory(&pSurface->More, puSurfaceMore, sizeof(DD_SURFACE_MORE));
RtlMoveMemory(&pSurface->Global, puSurfaceGlobal, sizeof(DD_SURFACE_GLOBAL));
pSurface->Local.lpGbl = &pSurface->Global;
pSurface->Local.lpSurfMore = &pSurface->More;
pSurface->Local.lpAttachList = NULL;
pSurface->Local.lpAttachListFrom = NULL;
pSurface->More.lpVideoPort = NULL;
// FIXME: figure out how to use this
pSurface->bComplete = bComplete;
GDIOBJ_UnlockObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
return hSurface;
}
BOOL STDCALL NtGdiDdDeleteSurfaceObject(
HANDLE hSurface
)
{
return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE, 0);
}
/*
BOOL STDCALL NtGdiDdAttachSurface(
HANDLE hSurfaceFrom,
HANDLE hSurfaceTo
)
{
PDD_SURFACE pSurfaceFrom = GDIOBJ_LockObj(hSurfaceFrom, GDI_OBJECT_TYPE_DD_SURFACE);
if (!pSurfaceFrom)
return FALSE;
PDD_SURFACE pSurfaceTo = GDIOBJ_LockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
if (!pSurfaceTo)
{
GDIOBJ_UnlockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
return FALSE;
}
if (pSurfaceFrom->Local.lpAttachListFrom)
{
pSurfaceFrom->Local.lpAttachListFrom = pSurfaceFrom->AttachListFrom;
}
GDIOBJ_UnlockObj(hSurfaceFrom, GDI_OBJECT_TYPE_DD_SURFACE);
GDIOBJ_UnlockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
return TRUE;
}
*/
/* EOF */

View file

@ -15,11 +15,11 @@
#include <debug.h>
BOOL APIENTRY NtGdiD3dContextCreate(
BOOL STDCALL NtGdiD3dContextCreate(
HANDLE hDirectDrawLocal,
HANDLE hSurfColor,
HANDLE hSurfZ,
D3DNTHAL_CONTEXTCREATEDATA *pdcci
PD3DNTHAL_CONTEXTCREATEDATA pdcci
)
{
UNIMPLEMENTED
@ -27,8 +27,8 @@ BOOL APIENTRY NtGdiD3dContextCreate(
return 0;
}
DWORD APIENTRY NtGdiD3dContextDestroy(
LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
DWORD STDCALL NtGdiD3dContextDestroy(
PD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
)
{
UNIMPLEMENTED
@ -36,17 +36,18 @@ DWORD APIENTRY NtGdiD3dContextDestroy(
return 0;
}
DWORD APIENTRY NtGdiD3dContextDestroyAll(VOID)
DWORD STDCALL NtGdiD3dContextDestroyAll(VOID)
{
/* This entry point is not supported on NT5 and ROS */
UNIMPLEMENTED
return 0;
}
DWORD APIENTRY NtGdiD3dDrawPrimitives2(
DWORD STDCALL NtGdiD3dDrawPrimitives2(
HANDLE hCmdBuf,
HANDLE hVBuf,
LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
PD3DNTHAL_DRAWPRIMITIVES2DATA pded,
FLATPTR *pfpVidMemCmd,
DWORD *pdwSizeCmd,
FLATPTR *pfpVidMemVtx,
@ -58,8 +59,8 @@ DWORD APIENTRY NtGdiD3dDrawPrimitives2(
return 0;
}
DWORD APIENTRY NtGdiD3dValidateTextureStageState(
LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
DWORD STDCALL NtGdiD3dValidateTextureStageState(
PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
)
{
UNIMPLEMENTED
@ -67,7 +68,7 @@ DWORD APIENTRY NtGdiD3dValidateTextureStageState(
return 0;
}
DWORD APIENTRY NtGdiDdAddAttachedSurface(
DWORD STDCALL NtGdiDdAddAttachedSurface(
HANDLE hSurface,
HANDLE hSurfaceAttached,
PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
@ -78,14 +79,14 @@ DWORD APIENTRY NtGdiDdAddAttachedSurface(
return 0;
}
DWORD APIENTRY NtGdiDdAlphaBlt(VOID)
DWORD STDCALL NtGdiDdAlphaBlt(VOID)
{
UNIMPLEMENTED
return 0;
}
BOOL APIENTRY NtGdiDdAttachSurface(
BOOL STDCALL NtGdiDdAttachSurface(
HANDLE hSurfaceFrom,
HANDLE hSurfaceTo
)
@ -95,7 +96,7 @@ BOOL APIENTRY NtGdiDdAttachSurface(
return 0;
}
DWORD APIENTRY NtGdiDdBeginMoCompFrame(
DWORD STDCALL NtGdiDdBeginMoCompFrame(
HANDLE hMoComp,
PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
)
@ -105,7 +106,7 @@ DWORD APIENTRY NtGdiDdBeginMoCompFrame(
return 0;
}
DWORD APIENTRY NtGdiDdBlt(
DWORD STDCALL NtGdiDdBlt(
HANDLE hSurfaceDest,
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData
@ -116,7 +117,7 @@ DWORD APIENTRY NtGdiDdBlt(
return 0;
}
DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(
DWORD STDCALL NtGdiDdCanCreateD3DBuffer(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
)
@ -126,7 +127,7 @@ DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(
return 0;
}
DWORD APIENTRY NtGdiDdCanCreateSurface(
DWORD STDCALL NtGdiDdCanCreateSurface(
HANDLE hDirectDraw,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
)
@ -136,7 +137,7 @@ DWORD APIENTRY NtGdiDdCanCreateSurface(
return 0;
}
DWORD APIENTRY NtGdiDdColorControl(
DWORD STDCALL NtGdiDdColorControl(
HANDLE hSurface,
PDD_COLORCONTROLDATA puColorControlData
)
@ -146,14 +147,14 @@ DWORD APIENTRY NtGdiDdColorControl(
return 0;
}
DWORD APIENTRY NtGdiDdCreateD3DBuffer(
DWORD STDCALL NtGdiDdCreateD3DBuffer(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
PDD_CREATESURFACEDATA puCreateSurfaceData,
HANDLE *puhSurface
)
{
@ -162,7 +163,8 @@ DWORD APIENTRY NtGdiDdCreateD3DBuffer(
return 0;
}
HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(
/*
HANDLE STDCALL NtGdiDdCreateDirectDrawObject(
HDC hdc
)
{
@ -170,8 +172,9 @@ HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(
return 0;
}
*/
HANDLE APIENTRY NtGdiDdCreateMoComp(
HANDLE STDCALL NtGdiDdCreateMoComp(
HANDLE hDirectDraw,
PDD_CREATEMOCOMPDATA puCreateMoCompData
)
@ -181,14 +184,14 @@ HANDLE APIENTRY NtGdiDdCreateMoComp(
return 0;
}
DWORD APIENTRY NtGdiDdCreateSurface(
DWORD STDCALL NtGdiDdCreateSurface(
HANDLE hDirectDraw,
HANDLE *hSurface,
DDSURFACEDESC *puSurfaceDescription,
DD_SURFACE_GLOBAL *puSurfaceGlobalData,
DD_SURFACE_LOCAL *puSurfaceLocalData,
DD_SURFACE_MORE *puSurfaceMoreData,
DD_CREATESURFACEDATA *puCreateSurfaceData,
PDD_CREATESURFACEDATA puCreateSurfaceData,
HANDLE *puhSurface
)
{
@ -197,7 +200,7 @@ DWORD APIENTRY NtGdiDdCreateSurface(
return 0;
}
DWORD APIENTRY NtGdiDdCreateSurfaceEx(
DWORD STDCALL NtGdiDdCreateSurfaceEx(
HANDLE hDirectDraw,
HANDLE hSurface,
DWORD dwSurfaceHandle
@ -208,7 +211,8 @@ DWORD APIENTRY NtGdiDdCreateSurfaceEx(
return 0;
}
HANDLE APIENTRY NtGdiDdCreateSurfaceObject(
/*
HANDLE STDCALL NtGdiDdCreateSurfaceObject(
HANDLE hDirectDrawLocal,
HANDLE hSurface,
PDD_SURFACE_LOCAL puSurfaceLocal,
@ -222,7 +226,7 @@ HANDLE APIENTRY NtGdiDdCreateSurfaceObject(
return 0;
}
BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(
BOOL STDCALL NtGdiDdDeleteDirectDrawObject(
HANDLE hDirectDrawLocal
)
{
@ -231,7 +235,17 @@ BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(
return 0;
}
BOOL APIENTRY NtGdiDdDeleteSurfaceObject(
BOOL STDCALL NtGdiDdDeleteSurfaceObject(
HANDLE hSurface
)
{
UNIMPLEMENTED
return 0;
}
*/
DWORD STDCALL NtGdiDdDestroyD3DBuffer(
HANDLE hSurface
)
{
@ -240,16 +254,7 @@ BOOL APIENTRY NtGdiDdDeleteSurfaceObject(
return 0;
}
DWORD APIENTRY NtGdiDdDestroyD3DBuffer(
HANDLE hSurface
)
{
UNIMPLEMENTED
return 0;
}
DWORD APIENTRY NtGdiDdDestroyMoComp(
DWORD STDCALL NtGdiDdDestroyMoComp(
HANDLE hMoComp,
PDD_DESTROYMOCOMPDATA puBeginFrameData
)
@ -259,7 +264,7 @@ DWORD APIENTRY NtGdiDdDestroyMoComp(
return 0;
}
DWORD APIENTRY NtGdiDdDestroySurface(
DWORD STDCALL NtGdiDdDestroySurface(
HANDLE hSurface,
BOOL bRealDestroy
)
@ -269,7 +274,7 @@ DWORD APIENTRY NtGdiDdDestroySurface(
return 0;
}
DWORD APIENTRY NtGdiDdEndMoCompFrame(
DWORD STDCALL NtGdiDdEndMoCompFrame(
HANDLE hMoComp,
PDD_ENDMOCOMPFRAMEDATA puEndFrameData
)
@ -279,7 +284,7 @@ DWORD APIENTRY NtGdiDdEndMoCompFrame(
return 0;
}
DWORD APIENTRY NtGdiDdFlip(
DWORD STDCALL NtGdiDdFlip(
HANDLE hSurfaceCurrent,
HANDLE hSurfaceTarget,
HANDLE hSurfaceCurrentLeft,
@ -292,7 +297,7 @@ DWORD APIENTRY NtGdiDdFlip(
return 0;
}
DWORD APIENTRY NtGdiDdFlipToGDISurface(
DWORD STDCALL NtGdiDdFlipToGDISurface(
HANDLE hDirectDraw,
PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
)
@ -302,7 +307,7 @@ DWORD APIENTRY NtGdiDdFlipToGDISurface(
return 0;
}
DWORD APIENTRY NtGdiDdGetAvailDriverMemory(
DWORD STDCALL NtGdiDdGetAvailDriverMemory(
HANDLE hDirectDraw,
PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
)
@ -312,7 +317,7 @@ DWORD APIENTRY NtGdiDdGetAvailDriverMemory(
return 0;
}
DWORD APIENTRY NtGdiDdGetBltStatus(
DWORD STDCALL NtGdiDdGetBltStatus(
HANDLE hSurface,
PDD_GETBLTSTATUSDATA puGetBltStatusData
)
@ -322,7 +327,7 @@ DWORD APIENTRY NtGdiDdGetBltStatus(
return 0;
}
HDC APIENTRY NtGdiDdGetDC(
HDC STDCALL NtGdiDdGetDC(
HANDLE hSurface,
PALETTEENTRY *puColorTable
)
@ -332,7 +337,7 @@ HDC APIENTRY NtGdiDdGetDC(
return 0;
}
DWORD APIENTRY NtGdiDdGetDriverInfo(
DWORD STDCALL NtGdiDdGetDriverInfo(
HANDLE hDirectDraw,
PDD_GETDRIVERINFODATA puGetDriverInfoData
)
@ -342,7 +347,7 @@ DWORD APIENTRY NtGdiDdGetDriverInfo(
return 0;
}
DWORD APIENTRY NtGdiDdGetDriverState(
DWORD STDCALL NtGdiDdGetDriverState(
PDD_GETDRIVERSTATEDATA pdata
)
{
@ -351,7 +356,7 @@ DWORD APIENTRY NtGdiDdGetDriverState(
return 0;
}
DWORD APIENTRY NtGdiDdGetDxHandle(
DWORD STDCALL NtGdiDdGetDxHandle(
HANDLE hDirectDraw,
HANDLE hSurface,
BOOL bRelease
@ -362,7 +367,7 @@ DWORD APIENTRY NtGdiDdGetDxHandle(
return 0;
}
DWORD APIENTRY NtGdiDdGetFlipStatus(
DWORD STDCALL NtGdiDdGetFlipStatus(
HANDLE hSurface,
PDD_GETFLIPSTATUSDATA puGetFlipStatusData
)
@ -372,7 +377,7 @@ DWORD APIENTRY NtGdiDdGetFlipStatus(
return 0;
}
DWORD APIENTRY NtGdiDdGetInternalMoCompInfo(
DWORD STDCALL NtGdiDdGetInternalMoCompInfo(
HANDLE hDirectDraw,
PDD_GETINTERNALMOCOMPDATA puGetInternalData
)
@ -382,7 +387,7 @@ DWORD APIENTRY NtGdiDdGetInternalMoCompInfo(
return 0;
}
DWORD APIENTRY NtGdiDdGetMoCompBuffInfo(
DWORD STDCALL NtGdiDdGetMoCompBuffInfo(
HANDLE hDirectDraw,
PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
)
@ -392,7 +397,7 @@ DWORD APIENTRY NtGdiDdGetMoCompBuffInfo(
return 0;
}
DWORD APIENTRY NtGdiDdGetMoCompFormats(
DWORD STDCALL NtGdiDdGetMoCompFormats(
HANDLE hDirectDraw,
PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
)
@ -402,7 +407,7 @@ DWORD APIENTRY NtGdiDdGetMoCompFormats(
return 0;
}
DWORD APIENTRY NtGdiDdGetMoCompGuids(
DWORD STDCALL NtGdiDdGetMoCompGuids(
HANDLE hDirectDraw,
PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
)
@ -412,7 +417,7 @@ DWORD APIENTRY NtGdiDdGetMoCompGuids(
return 0;
}
DWORD APIENTRY NtGdiDdGetScanLine(
DWORD STDCALL NtGdiDdGetScanLine(
HANDLE hDirectDraw,
PDD_GETSCANLINEDATA puGetScanLineData
)
@ -422,7 +427,7 @@ DWORD APIENTRY NtGdiDdGetScanLine(
return 0;
}
DWORD APIENTRY NtGdiDdLock(
DWORD STDCALL NtGdiDdLock(
HANDLE hSurface,
PDD_LOCKDATA puLockData,
HDC hdcClip
@ -433,7 +438,7 @@ DWORD APIENTRY NtGdiDdLock(
return 0;
}
DWORD APIENTRY NtGdiDdLockD3D(
DWORD STDCALL NtGdiDdLockD3D(
HANDLE hSurface,
PDD_LOCKDATA puLockData
)
@ -443,12 +448,13 @@ DWORD APIENTRY NtGdiDdLockD3D(
return 0;
}
BOOL APIENTRY NtGdiDdQueryDirectDrawObject(
/*
BOOL STDCALL NtGdiDdQueryDirectDrawObject(
HANDLE hDirectDrawLocal,
DD_HALINFO *pHalInfo,
DWORD *pCallBackFlags,
LPD3DNTHAL_CALLBACKS puD3dCallbacks,
LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
PD3DNTHAL_CALLBACKS puD3dCallbacks,
PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
LPDDSURFACEDESC puD3dTextureFormats,
DWORD *puNumHeaps,
@ -461,8 +467,9 @@ BOOL APIENTRY NtGdiDdQueryDirectDrawObject(
return 0;
}
*/
DWORD APIENTRY NtGdiDdQueryMoCompStatus(
DWORD STDCALL NtGdiDdQueryMoCompStatus(
HANDLE hMoComp,
PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
)
@ -472,7 +479,7 @@ DWORD APIENTRY NtGdiDdQueryMoCompStatus(
return 0;
}
BOOL APIENTRY NtGdiDdReenableDirectDrawObject(
BOOL STDCALL NtGdiDdReenableDirectDrawObject(
HANDLE hDirectDrawLocal,
BOOL *pubNewMode
)
@ -482,7 +489,7 @@ BOOL APIENTRY NtGdiDdReenableDirectDrawObject(
return 0;
}
BOOL APIENTRY NtGdiDdReleaseDC(
BOOL STDCALL NtGdiDdReleaseDC(
HANDLE hSurface
)
{
@ -491,7 +498,7 @@ BOOL APIENTRY NtGdiDdReleaseDC(
return 0;
}
DWORD APIENTRY NtGdiDdRenderMoComp(
DWORD STDCALL NtGdiDdRenderMoComp(
HANDLE hMoComp,
PDD_RENDERMOCOMPDATA puRenderMoCompData
)
@ -501,7 +508,7 @@ DWORD APIENTRY NtGdiDdRenderMoComp(
return 0;
}
BOOL APIENTRY NtGdiDdResetVisrgn(
BOOL STDCALL NtGdiDdResetVisrgn(
HANDLE hSurface,
HWND hwnd
)
@ -511,7 +518,7 @@ BOOL APIENTRY NtGdiDdResetVisrgn(
return 0;
}
DWORD APIENTRY NtGdiDdSetColorKey(
DWORD STDCALL NtGdiDdSetColorKey(
HANDLE hSurface,
PDD_SETCOLORKEYDATA puSetColorKeyData
)
@ -521,7 +528,7 @@ DWORD APIENTRY NtGdiDdSetColorKey(
return 0;
}
DWORD APIENTRY NtGdiDdSetExclusiveMode(
DWORD STDCALL NtGdiDdSetExclusiveMode(
HANDLE hDirectDraw,
PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
)
@ -531,7 +538,7 @@ DWORD APIENTRY NtGdiDdSetExclusiveMode(
return 0;
}
BOOL APIENTRY NtGdiDdSetGammaRamp(
BOOL STDCALL NtGdiDdSetGammaRamp(
HANDLE hDirectDraw,
HDC hdc,
LPVOID lpGammaRamp
@ -542,7 +549,7 @@ BOOL APIENTRY NtGdiDdSetGammaRamp(
return 0;
}
DWORD APIENTRY NtGdiDdSetOverlayPosition(
DWORD STDCALL NtGdiDdSetOverlayPosition(
HANDLE hSurfaceSource,
HANDLE hSurfaceDestination,
PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
@ -553,7 +560,7 @@ DWORD APIENTRY NtGdiDdSetOverlayPosition(
return 0;
}
VOID APIENTRY NtGdiDdUnattachSurface(
VOID STDCALL NtGdiDdUnattachSurface(
HANDLE hSurface,
HANDLE hSurfaceAttached
)
@ -561,7 +568,7 @@ VOID APIENTRY NtGdiDdUnattachSurface(
UNIMPLEMENTED
}
DWORD APIENTRY NtGdiDdUnlock(
DWORD STDCALL NtGdiDdUnlock(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
)
@ -571,7 +578,7 @@ DWORD APIENTRY NtGdiDdUnlock(
return 0;
}
DWORD APIENTRY NtGdiDdUnlockD3D(
DWORD STDCALL NtGdiDdUnlockD3D(
HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData
)
@ -581,7 +588,7 @@ DWORD APIENTRY NtGdiDdUnlockD3D(
return 0;
}
DWORD APIENTRY NtGdiDdUpdateOverlay(
DWORD STDCALL NtGdiDdUpdateOverlay(
HANDLE hSurfaceDestination,
HANDLE hSurfaceSource,
PDD_UPDATEOVERLAYDATA puUpdateOverlayData
@ -592,7 +599,7 @@ DWORD APIENTRY NtGdiDdUpdateOverlay(
return 0;
}
DWORD APIENTRY NtGdiDdWaitForVerticalBlank(
DWORD STDCALL NtGdiDdWaitForVerticalBlank(
HANDLE hDirectDraw,
PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
)

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: dc.c,v 1.91 2003/10/25 10:59:19 gvg Exp $
/* $Id: dc.c,v 1.92 2003/10/28 19:30:08 gvg Exp $
*
* DC.C - Device context functions
*
@ -571,6 +571,9 @@ NtGdiCreatePrimarySurface(LPCWSTR Driver,
DPRINT("Building DDI Functions\n");
/* Make sure the non existant functions are NULL */
RtlZeroMemory(&PrimarySurface.DriverFunctions, sizeof(PrimarySurface.DriverFunctions));
/* Construct DDI driver function dispatch table */
if (!DRIVER_BuildDDIFunctions(&DED, &PrimarySurface.DriverFunctions))
{