Author: greatlrd
Date: Sun Oct 14 16:07:23 2007
New Revision: 29557
URL:
http://svn.reactos.org/svn/reactos?rev=29557&view=rev
Log:
This change can not compile win32k for they are not complete, and it is start on the
loading process of dxg.sys
FIXED : One wrong protyped accoding MSDN
ADD : Load process of DXG.SYS (not completed)
Redrirect : Allot DirectX api from win32k to dxg.sys (allot of code that have been remove
will be readdit in new api or in dxg.sys, when it being commit)
Allot cleanup as well
Added:
branches/reactx/reactos/include/reactos/drivers/directx/
branches/reactx/reactos/include/reactos/drivers/directx/dxg.h (with props)
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c (with props)
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/mocomp.c (with props)
Modified:
branches/reactx/reactos/include/psdk/ntgdi.h
branches/reactx/reactos/include/reactos/win32k/ntgdityp.h
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dd.c
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/stubs.c
branches/reactx/reactos/subsystems/win32/win32k/win32k.rbuild
Modified: branches/reactx/reactos/include/psdk/ntgdi.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/include/psdk/ntg…
==============================================================================
--- branches/reactx/reactos/include/psdk/ntgdi.h (original)
+++ branches/reactx/reactos/include/psdk/ntgdi.h Sun Oct 14 16:07:23 2007
@@ -794,7 +794,7 @@
);
W32KAPI
-DWORD
+BOOL
APIENTRY
NtGdiD3dContextCreate(
IN HANDLE hDirectDrawLocal,
@@ -2013,15 +2013,6 @@
OUT OPTIONAL PVOID pvBuf
);
-// Note from SDK:
-//
-// NtGdiResetDC
-// The exact size of the buffer at pdm is pdm->dmSize + pdm->dmDriverExtra.
-// But this can't be specified with current annotation language.
-//
-// typedef struct _DRIVER_INFO_2W DRIVER_INFO_2W;
-//
-// :end note.
W32KAPI
BOOL
APIENTRY
@@ -2029,7 +2020,7 @@
IN HDC hdc,
IN LPDEVMODEW pdm,
OUT PBOOL pbBanding,
- IN OPTIONAL VOID *pDriverInfo2, // this is "typedef struct _DRIVER_INFO_2W
DRIVER_INFO_2W;"
+ IN OPTIONAL VOID *pDriverInfo2,
OUT VOID *ppUMdhpdev
);
@@ -2070,11 +2061,11 @@
APIENTRY
NtGdiOpenDCW(
IN OPTIONAL PUNICODE_STRING pustrDevice,
- IN DEVMODEW *pdm, // See note for NtGdiResetDC
+ IN DEVMODEW *pdm,
IN PUNICODE_STRING pustrLogAddr,
IN ULONG iType,
IN OPTIONAL HANDLE hspool,
- IN OPTIONAL VOID *pDriverInfo2, // this is "typedef struct _DRIVER_INFO_2W
DRIVER_INFO_2W;"
+ IN OPTIONAL VOID *pDriverInfo2,
OUT VOID *pUMdhpdev
);
Added: branches/reactx/reactos/include/reactos/drivers/directx/dxg.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/include/reactos/…
==============================================================================
--- branches/reactx/reactos/include/reactos/drivers/directx/dxg.h (added)
+++ branches/reactx/reactos/include/reactos/drivers/directx/dxg.h Sun Oct 14 16:07:23
2007
@@ -1,0 +1,105 @@
+
+
+/* win32k driver functions table it have created for the engine the DxEng* api */
+
+
+/* DXG.SYS FUNCTIONS INDEX */
+#define DXG_INDEX_DxDxgGenericThunk 0x00
+#define DXG_INDEX_DxD3dContextCreate 0x01
+#define DXG_INDEX_DxD3dContextDestroy 0x02
+#define DXG_INDEX_DxD3dContextDestroyAll 0x03
+#define DXG_INDEX_DxD3dValidateTextureStageState 0x04
+#define DXG_INDEX_DxD3dDrawPrimitives2 0x05
+#define DXG_INDEX_DxDdGetDriverState 0x06
+#define DXG_INDEX_DxDdAddAttachedSurface 0x07
+#define DXG_INDEX_DxDdAlphaBlt 0x08
+#define DXG_INDEX_DxDdAttachSurface 0x09
+#define DXG_INDEX_DxDdBeginMoCompFrame 0x0A
+#define DXG_INDEX_DxDdBlt 0x0B
+#define DXG_INDEX_DxDdCanCreateSurface 0x0C
+#define DXG_INDEX_DxDdCanCreateD3DBuffer 0x0D
+#define DXG_INDEX_DxDdColorControl 0x0E
+#define DXG_INDEX_DxDdCreateDirectDrawObject 0x0F
+/* DXG_INDEX_DxDdCreateD3DBuffer and DXG_INDEX_DxDdCreateD3DBuffer2 are same */
+#define DXG_INDEX_DxDdCreateD3DBuffer 0x10
+#define DXG_INDEX_DxDdCreateD3DBuffer2 0x11
+#define DXG_INDEX_DxDdCreateMoComp 0x12
+#define DXG_INDEX_DxDdCreateSurfaceObject 0x13
+#define DXG_INDEX_DxDdDeleteDirectDrawObject 0x14
+#define DXG_INDEX_DxDdDeleteSurfaceObject 0x15
+#define DXG_INDEX_DxDdDestroyMoComp 0x16
+#define DXG_INDEX_DxDdDestroySurface 0x17
+#define DXG_INDEX_DxDdDestroyD3DBuffer 0x18
+#define DXG_INDEX_DxDdFlip 0x1A
+
+#define DXG_INDEX_DxDdGetBltStatus 0x1D
+#define DXG_INDEX_DxDdGetFlipStatus 0x21
+/* DXG_INDEX_DxDdLock and DXG_INDEX_DxDdLockD3D are same */
+#define DXG_INDEX_DxDdLock 0x27
+#define DXG_INDEX_DxDdSetColorKey 0x2F
+#define DXG_INDEX_DxDdSetOverlayPosition 0x33
+/* DXG_INDEX_DxDdUnlock and DXG_INDEX_DxDdUnlockD3D are same */
+#define DXG_INDEX_DxDdUnlock 0x35
+#define DXG_INDEX_DxDdUpdateOverlay 0x37
+
+
+#define DXG_INDEX_DxDdEndMoCompFrame 0x19
+#define DXG_INDEX_DxDdFlipToGDISurface 0x1B
+#define DXG_INDEX_DxDdGetAvailDriverMemory 0x1C
+#define DXG_INDEX_DxDdGetDC 0x1E
+#define DXG_INDEX_DxDdGetDriverInfo 0x1F
+#define DXG_INDEX_DxDdGetDxHandle 0x20
+#define DXG_INDEX_DxDdGetInternalMoCompInfo 0x22
+#define DXG_INDEX_DxDdGetMoCompBuffInfo 0x23
+#define DXG_INDEX_DxDdGetMoCompGuids 0x24
+#define DXG_INDEX_DxDdGetMoCompFormats 0x25
+#define DXG_INDEX_DxDdGetScanLine 0x26
+#define DXG_INDEX_DxDdLockD3D 0x28
+#define DXG_INDEX_DxDdQueryDirectDrawObject 0x29
+#define DXG_INDEX_DxDdQueryMoCompStatus 0x2A
+#define DXG_INDEX_DxDdReenableDirectDrawObject 0x2B
+#define DXG_INDEX_DxDdReleaseDC 0x2C
+#define DXG_INDEX_DxDdRenderMoComp 0x2D
+#define DXG_INDEX_DxDdResetVisrgn 0x2E
+#define DXG_INDEX_DxDdSetExclusiveMode 0x30
+#define DXG_INDEX_DxDdSetGammaRamp 0x31
+#define DXG_INDEX_DxDdCreateSurfaceEx 0x32
+
+#define DXG_INDEX_DxDdUnattachSurface 0x34
+#define DXG_INDEX_DxDdUnlockD3D 0x36
+#define DXG_INDEX_DxDdWaitForVerticalBlank 0x38
+#define DXG_INDEX_DxDvpCanCreateVideoPort 0x39
+#define DXG_INDEX_DxDvpColorControl 0x3A
+#define DXG_INDEX_DxDvpCreateVideoPort 0x3B
+#define DXG_INDEX_DxDvpDestroyVideoPort 0x3C
+#define DXG_INDEX_DxDvpFlipVideoPort 0x3D
+#define DXG_INDEX_DxDvpGetVideoPortBandwidth 0x3E
+#define DXG_INDEX_DxDvpGetVideoPortField 0x3F
+#define DXG_INDEX_DxDvpGetVideoPortFlipStatus 0x40
+#define DXG_INDEX_DxDvpGetVideoPortInputFormats 0x41
+#define DXG_INDEX_DxDvpGetVideoPortLine 0x42
+#define DXG_INDEX_DxDvpGetVideoPortOutputFormats 0x43
+#define DXG_INDEX_DxDvpGetVideoPortConnectInfo 0x44
+#define DXG_INDEX_DxDvpGetVideoSignalStatus 0x45
+#define DXG_INDEX_DxDvpUpdateVideoPort 0x46
+#define DXG_INDEX_DxDvpWaitForVideoPortSync 0x47
+#define DXG_INDEX_DxDvpAcquireNotification 0x48
+#define DXG_INDEX_DxDvpReleaseNotification 0x49
+#define DXG_INDEX_DxDdHeapVidMemAllocAligned 0x4A
+#define DXG_INDEX_DxDdHeapVidMemFree 0x4B
+#define DXG_INDEX_DxDdEnableDirectDraw 0x4C
+#define DXG_INDEX_DxDdDisableDirectDraw 0x4D
+#define DXG_INDEX_DxDdSuspendDirectDraw 0x4E
+#define DXG_INDEX_DxDdResumeDirectDraw 0x4F
+#define DXG_INDEX_DxDdDynamicModeChange 0x50
+#define DXG_INDEX_DxDdCloseProcess 0x51
+#define DXG_INDEX_DxDdGetDirectDrawBound 0x52
+#define DXG_INDEX_DxDdEnableDirectDrawRedirection 0x53
+#define DXG_INDEX_DxDdAllocPrivateUserMem 0x54
+#define DXG_INDEX_DxDdFreePrivateUserMem 0x55
+#define DXG_INDEX_DxDdLockDirectDrawSurface 0x56
+#define DXG_INDEX_DxDdUnlockDirectDrawSurface 0x57
+#define DXG_INDEX_DxDdSetAccelLevel 0x58
+#define DXG_INDEX_DxDdGetSurfaceLock 0x59
+#define DXG_INDEX_DxDdEnumLockedSurfaceRect 0x5A
+#define DXG_INDEX_DxDdIoctl 0x5B
Propchange: branches/reactx/reactos/include/reactos/drivers/directx/dxg.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/reactx/reactos/include/reactos/win32k/ntgdityp.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/include/reactos/…
==============================================================================
--- branches/reactx/reactos/include/reactos/win32k/ntgdityp.h (original)
+++ branches/reactx/reactos/include/reactos/win32k/ntgdityp.h Sun Oct 14 16:07:23 2007
@@ -157,11 +157,11 @@
} MATRIX_S;
/* Gdi XForm storage union */
-typedef union
-{
- FLOAT f;
- ULONG l;
-} gxf_long;
-
+typedef union
+{
+ FLOAT f;
+ ULONG l;
+} gxf_long;
+
#endif
Added: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c (added)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c Sun Oct 14 16:07:23
2007
@@ -1,0 +1,180 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Native DirectDraw implementation
+ * FILE: subsys/win32k/ntddraw/d3d.c
+ * PROGRAMER: Magnus olsen (magnus(a)greatlord.com)
+ * REVISION HISTORY:
+ * 19/1-2006 Magnus Olsen
+ */
+
+
+#include <w32k.h>
+#include <reactos/drivers/directx/dxg.h>
+
+//#define NDEBUG
+#include <debug.h>
+
+/********************************************************************************/
+/* D3D interface from DXG.SYS */
+/********************************************************************************/
+
+extern PDRVFN gpDxFuncs;
+
+
+
+typedef DWORD (NTAPI
*PGD_D3DVALIDATETEXTURESTAGESTATE)(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA);
+typedef DWORD (NTAPI *PGD_D3DDRAWPRIMITIVES2)(HANDLE, HANDLE,
LPD3DNTHAL_DRAWPRIMITIVES2DATA, FLATPTR *, DWORD *, FLATPTR *, DWORD *);
+typedef DWORD (NTAPI *PGD_DDCREATED3DBUFFER)(HANDLE, HANDLE *, DDSURFACEDESC *,
DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA , HANDLE
*);
+typedef BOOL (NTAPI *PGD_D3DCONTEXTCREATE)(HANDLE, HANDLE, HANDLE,
LPD3DNTHAL_CONTEXTCREATEDATA);
+typedef DWORD (NTAPI *PGD_D3DCONTEXTDESTROY)(LPD3DNTHAL_CONTEXTDESTROYDATA);
+typedef DWORD (NTAPI *PGD_D3DCONTEXTDESTROYALL)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
+
+#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
+ if (gpDxFuncs) \
+ { \
+ for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
+ { \
+ if (gpDxFuncs[i].iFunc == INDEX) \
+ { \
+ FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
+ break; \
+ } \
+ } \
+ }
+
+BOOL
+STDCALL
+NtGdiD3dContextCreate(HANDLE hDirectDrawLocal,
+ HANDLE hSurfColor,
+ HANDLE hSurfZ,
+ D3DNTHAL_CONTEXTCREATEDATA* pdcci)
+{
+ PGD_D3DCONTEXTCREATE pfnD3dContextCreate = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dContextCreate, pfnD3dContextCreate);
+
+ if (pfnD3dContextCreate == NULL)
+ {
+ DPRINT1("Warring no pfnD3dContextCreate");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys D3dContextCreate");
+ return pfnD3dContextCreate(hDirectDrawLocal, hSurfColor, hSurfZ, pdcci);
+}
+
+DWORD
+STDCALL
+NtGdiD3dContextDestroy(LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData)
+{
+ PGD_D3DCONTEXTDESTROY pfnD3dContextDestroy = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dContextDestroy, pfnD3dContextDestroy);
+
+ if ( pfnD3dContextDestroy == NULL)
+ {
+ DPRINT1("Warring no pfnD3dContextDestroy");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys D3dContextDestroy");
+ return pfnD3dContextDestroy(pContextDestroyData);
+}
+
+DWORD
+STDCALL
+NtGdiD3dContextDestroyAll(LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcad)
+{
+ PGD_D3DCONTEXTDESTROYALL pfnD3dContextDestroyAll = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dContextDestroyAll, pfnD3dContextDestroyAll);
+
+ if (pfnD3dContextDestroyAll == NULL)
+ {
+ DPRINT1("Warring no pfnD3dContextDestroyAll");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys D3dContextDestroyAll");
+ return pfnD3dContextDestroyAll(pdcad);
+}
+
+DWORD
+STDCALL
+NtGdiD3dValidateTextureStageState(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData)
+{
+ PGD_D3DVALIDATETEXTURESTAGESTATE pfnD3dValidateTextureStageState = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dValidateTextureStageState,
pfnD3dValidateTextureStageState);
+
+ if (pfnD3dValidateTextureStageState == NULL)
+ {
+ DPRINT1("Warring no pfnD3dValidateTextureStageState");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys D3dValidateTextureStageState");
+ return pfnD3dValidateTextureStageState(pData);
+}
+
+DWORD
+STDCALL
+NtGdiD3dDrawPrimitives2(HANDLE hCmdBuf,
+ HANDLE hVBuf,
+ LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+ FLATPTR *pfpVidMemCmd,
+ DWORD *pdwSizeCmd,
+ FLATPTR *pfpVidMemVtx,
+ DWORD *pdwSizeVtx)
+{
+ PGD_D3DDRAWPRIMITIVES2 pfnD3dDrawPrimitives2 = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dDrawPrimitives2, pfnD3dDrawPrimitives2);
+
+ if (pfnD3dDrawPrimitives2 == NULL)
+ {
+ DPRINT1("Warring no pfnD3dDrawPrimitives2");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys D3dDrawPrimitives2");
+ return
pfnD3dDrawPrimitives2(hCmdBuf,hVBuf,pded,pfpVidMemCmd,pdwSizeCmd,pfpVidMemVtx,pdwSizeVtx);
+}
+
+
+
+DWORD
+STDCALL
+NtGdiDdCreateD3DBuffer(HANDLE hDirectDraw,
+ HANDLE *hSurface,
+ DDSURFACEDESC *puSurfaceDescription,
+ DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+ DD_SURFACE_LOCAL *puSurfaceLocalData,
+ DD_SURFACE_MORE *puSurfaceMoreData,
+ PDD_CREATESURFACEDATA puCreateSurfaceData,
+ HANDLE *puhSurface)
+{
+ PGD_DDCREATED3DBUFFER pfnDdCreateD3DBuffer = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCreateD3DBuffer, pfnDdCreateD3DBuffer);
+
+ if (pfnDdCreateD3DBuffer == NULL)
+ {
+ DPRINT1("Warring no pfnDdCreateD3DBuffer");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdCreateD3DBuffer");
+ return pfnDdCreateD3DBuffer(hDirectDraw, hSurface,
+ puSurfaceDescription, puSurfaceGlobalData,
+ puSurfaceLocalData, puSurfaceMoreData,
+ puCreateSurfaceData, puhSurface);
+}
+
Propchange: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dd.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dd.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dd.c Sun Oct 14 16:07:23 2007
@@ -5,13 +5,91 @@
* FILE: subsys/win32k/ntddraw/dd.c
* PROGRAMER: Magnus Olsen (greatlord(a)reactos.org)
* REVISION HISTORY:
- * 19/7-2006 Magnus Olsen
+ * 19/1-2006 Magnus Olsen
*/
#include <w32k.h>
-#define NDEBUG
+//#define NDEBUG
#include <debug.h>
+#include <reactos/drivers/directx/dxg.h>
+
+
+
+extern PDRVFN gpDxFuncs;
+
+// PDD_DESTROYDRIVER DestroyDriver;
+// PDD_CREATESURFACE CreateSurface;
+/* see ddsurf.c for PDD_SETCOLORKEY SetColorKey; */
+// PDD_SETMODE SetMode;
+// PDD_WAITFORVERTICALBLANK WaitForVerticalBlank;
+typedef DWORD (NTAPI *PGD_DDCANCREATESURFACE)(HANDLE hDirectDrawLocal,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData);
+// PDD_CREATEPALETTE CreatePalette;
+// PDD_GETSCANLINE GetScanLine;
+// PDD_MAPMEMORY MapMemory;
+
+
+
+
+
+
+#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
+ if (gpDxFuncs) \
+ { \
+ for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
+ { \
+ if (gpDxFuncs[i].iFunc == INDEX) \
+ { \
+ FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
+ break; \
+ } \
+ } \
+ }
+
+
+DWORD
+STDCALL
+NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal,
+ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
+{
+ PGD_DDCANCREATESURFACE pfnDdCanCreateSurface = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCanCreateSurface, pfnDdCanCreateSurface);
+
+ if (pfnDdCanCreateSurface == NULL)
+ {
+ DPRINT1("Warring no pfnDdCanCreateSurface");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdCanCreateSurface");
+ return pfnDdCanCreateSurface(hDirectDrawLocal,puCanCreateSurfaceData);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#define DdHandleTable GdiHandleTable
@@ -440,88 +518,7 @@
}
-/************************************************************************/
-/* CanCreateSurface */
-/* status : Works as intended */
-/************************************************************************/
-
-DWORD STDCALL NtGdiDdCanCreateSurface(
- HANDLE hDirectDrawLocal,
- PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
-
-
-
- if ((puCanCreateSurfaceData) &&
- (hDirectDrawLocal))
- {
- DDSURFACEDESC desc;
- DWORD descSize = 0;
- NTSTATUS Status = FALSE;
- PDD_DIRECTDRAW pDirectDraw = NULL;
- DD_CANCREATESURFACEDATA CanCreateSurfaceData;
- LPDDHAL_CANCREATESURFACEDATA pCanCreateSurfaceData =
(LPDDHAL_CANCREATESURFACEDATA)puCanCreateSurfaceData;
-
- RtlZeroMemory(&CanCreateSurfaceData,sizeof(DDSURFACEDESC));
- RtlZeroMemory(&desc,sizeof(DDSURFACEDESC));
-
- _SEH_TRY
- {
- ProbeForRead(pCanCreateSurfaceData, sizeof(DDHAL_CANCREATESURFACEDATA), 1);
- CanCreateSurfaceData.bIsDifferentPixelFormat =
pCanCreateSurfaceData->bIsDifferentPixelFormat;
-
- if (pCanCreateSurfaceData->lpDDSurfaceDesc)
- {
- ProbeForRead(pCanCreateSurfaceData->lpDDSurfaceDesc,
sizeof(DDSURFACEDESC), 1);
- RtlCopyMemory(&desc,pCanCreateSurfaceData->lpDDSurfaceDesc,
sizeof(DDSURFACEDESC));
-
- /*if it was DDSURFACEDESC2 been pass down */
- descSize = desc.dwSize;
- desc.dwSize = sizeof(DDSURFACEDESC);
- }
- }
- _SEH_HANDLE
- {
- Status = _SEH_GetExceptionCode();
- }
- _SEH_END;
-
- if ((NT_SUCCESS(Status)) &&
- (desc.dwSize != 0))
- {
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
- if ((pDirectDraw) &&
- (pDirectDraw->DD.dwFlags & DDHAL_CB32_CANCREATESURFACE))
- {
- CanCreateSurfaceData.ddRVal = DDERR_GENERIC;
- CanCreateSurfaceData.lpDD = &pDirectDraw->Global;
- CanCreateSurfaceData.lpDDSurfaceDesc = &desc;
- ddRVal = pDirectDraw->DD.CanCreateSurface(&CanCreateSurfaceData);
-
- /*if it was DDSURFACEDESC2 been pass down */
- desc.dwSize = descSize;
- _SEH_TRY
- {
- ProbeForWrite(puCanCreateSurfaceData,
sizeof(DDHAL_CANCREATESURFACEDATA), 1);
- puCanCreateSurfaceData->ddRVal = CanCreateSurfaceData.ddRVal;
-
- ProbeForWrite(puCanCreateSurfaceData->lpDDSurfaceDesc,
sizeof(DDSURFACEDESC), 1);
- RtlCopyMemory(puCanCreateSurfaceData->lpDDSurfaceDesc,&desc,
sizeof(DDSURFACEDESC));
-
- }
- _SEH_HANDLE
- {
- Status = _SEH_GetExceptionCode();
- }
- _SEH_END;
- }
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
- }
- return ddRVal;
-}
+
/************************************************************************/
/* GetScanLine */
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Sun Oct 14 16:07:23
2007
@@ -13,6 +13,7 @@
*/
#include <w32k.h>
+#include <reactos/drivers/directx/dxg.h>
//#define NDEBUG
#include <debug.h>
@@ -22,6 +23,437 @@
#define DdHandleTable GdiHandleTable
+
+typedef NTSTATUS (NTAPI *PGD_DXDDSTARTUPDXGRAPHICS) (ULONG, PDRVENABLEDATA, ULONG,
PDRVENABLEDATA, PULONG, PEPROCESS);
+typedef NTSTATUS (NTAPI *PGD_DXDDCLEANUPDXGRAPHICS) (VOID);
+typedef HANDLE (NTAPI *PGD_DDCREATEDIRECTDRAWOBJECT) (HDC hdc);
+typedef DWORD (NTAPI *PGD_DDGETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA);
+typedef DWORD (NTAPI *PGD_DDALPHABLT)(HANDLE, HANDLE, PDD_BLTDATA);
+typedef BOOL (NTAPI *PGD_DDATTACHSURFACE)(HANDLE, HANDLE);
+typedef DWORD (NTAPI *PGD_DDCANCREATED3DBUFFER)(HANDLE, PDD_CANCREATESURFACEDATA);
+typedef DWORD (NTAPI *PGD_DDCOLORCONTROL)(HANDLE hSurface,PDD_COLORCONTROLDATA
puColorControlData);
+typedef HANDLE (NTAPI *PGD_DXDDCREATESURFACEOBJECT)(HANDLE, HANDLE, PDD_SURFACE_LOCAL,
PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL);
+typedef BOOL (NTAPI *PGD_DXDDDELETEDIRECTDRAWOBJECT)(HANDLE);
+typedef BOOL (NTAPI *PGD_DXDDDELETESURFACEOBJECT)(HANDLE);
+
+typedef DWORD (NTAPI *PGD_DXDDDESTROYD3DBUFFER)(HANDLE);
+
+typedef DWORD (NTAPI *PGD_DXDDFLIPTOGDISURFACE)(HANDLE, PDD_FLIPTOGDISURFACEDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETAVAILDRIVERMEMORY)(HANDLE ,
PDD_GETAVAILDRIVERMEMORYDATA);
+
+/*
+typedef DWORD (NTAPI *PGD_DXDDGETBLTSTATUS)(
+typedef DWORD (NTAPI *PGD_DXDDGETDC)(
+typedef DWORD (NTAPI *PGD_DXDDGETDRIVERINFO)(
+typedef DWORD (NTAPI *PGD_DXDDGETDXHANDLE)(
+typedef DWORD (NTAPI *PGD_DXDDGETFLIPSTATUS)(
+typedef DWORD (NTAPI *PGD_DXDDGETSCANLINE)(
+typedef DWORD (NTAPI *PGD_DXDDLOCK)(
+typedef DWORD (NTAPI *PGD_DXDDLOCKD3D)(
+typedef DWORD (NTAPI *PGD_DXDDQUERYDIRECTDRAWOBJECT)(
+typedef DWORD (NTAPI *PGD_DXDDQUERYMOCOMPSTATUS)(
+typedef DWORD (NTAPI *PGD_DXDDREENABLEDIRECTDRAWOBJECT)(
+typedef DWORD (NTAPI *PGD_DXDDRELEASEDC)(
+typedef DWORD (NTAPI *PGD_DXDDRENDERMOCOMP)(
+typedef DWORD (NTAPI *PGD_DXDDRESETVISRGN)(
+typedef DWORD (NTAPI *PGD_DXDDSETCOLORKEY)(
+typedef DWORD (NTAPI *PGD_DXDDSETEXCLUSIVEMODE)(
+typedef DWORD (NTAPI *PGD_DXDDSETGAMMARAMP)(
+typedef DWORD (NTAPI *PGD_DXDDCREATESURFACEEX)(
+typedef DWORD (NTAPI *PGD_DXDDSETOVERLAYPOSITION)(
+typedef DWORD (NTAPI *PGD_DXDDUNATTACHSURFACE)(
+*/
+
+
+
+PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics = NULL;
+PGD_DXDDCLEANUPDXGRAPHICS gpfnCleanupDxGraphics = NULL;
+
+DRVFN gaEngFuncs;
+PDRVFN gpDxFuncs;
+HANDLE ghDxGraphics;
+ULONG gdwDirectDrawContext;
+ULONG gcEngFuncs;
+
+#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
+ if (gpDxFuncs) \
+ { \
+ for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
+ { \
+ if (gpDxFuncs[i].iFunc == INDEX) \
+ { \
+ FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
+ break; \
+ } \
+ } \
+ }
+
+
+
+/************************************************************************/
+/* DirectX graphic/video driver loading */
+/************************************************************************/
+NTSTATUS
+STDCALL
+DxDdStartupDxGraphics( ULONG ulc1,
+ PDRVENABLEDATA pDrved1,
+ ULONG ulc2,
+ PDRVENABLEDATA pDrved2,
+ PULONG DDContext,
+ PEPROCESS Proc)
+{
+ DRVENABLEDATA EngDrv;
+ DRVENABLEDATA DXG_API;
+
+ NTSTATUS Status = STATUS_DLL_NOT_FOUND;
+
+ /* FIXME setup of gaEngFuncs driver export list
+ * but not in this api, we can add it here tempary until we figout where
+ * no code have been writen for it yet
+ */
+
+
+ /* FIXME ReactOS does not loading the dxapi.sys or import functions from it yet */
+ // DxApiGetVersion()
+
+ /* Loading the kernel interface of directx for win32k */
+ ghDxGraphics = EngLoadImage(L"drivers\\dxg.sys");
+ if (!ghDxGraphics)
+ {
+ DPRINT1("Warring no dxg.sys in ReactOS");
+ return Status;
+ }
+
+ /* import DxDdStartupDxGraphics and DxDdCleanupDxGraphics */
+ gpfnStartupDxGraphics =
EngFindImageProcAddress(ghDxGraphics,"DxDdStartupDxGraphics");
+ gpfnCleanupDxGraphics =
EngFindImageProcAddress(ghDxGraphics,"DxDdCleanupDxGraphics");
+
+ if ((gpfnStartupDxGraphics) &&
+ (gpfnCleanupDxGraphics))
+ {
+ /* Setup driver data for activate the dx interface */
+ EngDrv.iDriverVersion = DDI_DRIVER_VERSION_NT5_01;
+ EngDrv.pdrvfn = &gaEngFuncs;
+ EngDrv.c = gcEngFuncs;
+
+ Status = gpfnStartupDxGraphics ( sizeof(DRVENABLEDATA),
+ &EngDrv,
+ sizeof(DRVENABLEDATA),
+ &DXG_API,
+ &gdwDirectDrawContext,
+ Proc );
+ }
+
+ /* check if we manger loading the data and execute the dxStartupDxGraphics and it
susscess */
+ if (!NT_SUCCESS(Status))
+ {
+ gpfnStartupDxGraphics = NULL;
+ gpfnCleanupDxGraphics = NULL;
+ EngUnloadImage( ghDxGraphics);
+ ghDxGraphics = NULL;
+ DPRINT1("Warring no init of DirectX graphic interface");
+ }
+ else
+ {
+ gpDxFuncs = DXG_API.pdrvfn;
+ DPRINT1("DirectX interface is Activated");
+ }
+
+ /* return the status */
+ return Status;
+}
+
+HANDLE
+STDCALL
+NtGdiDdCreateDirectDrawObject(HDC hdc)
+{
+
+ PGD_DDCREATEDIRECTDRAWOBJECT pfnDdCreateDirectDrawObject = NULL;
+ NTSTATUS Status;
+ PEPROCESS Proc = NULL;
+ INT i=0;
+
+ /* FIXME get the process data */
+ /* FIXME this code should be add where the driver being load */
+ Status = DxDdStartupDxGraphics(0,NULL,0,NULL,NULL, Proc);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("Warring : Fail to statup the directx interface");
+ return 0;
+ }
+
+ /* This is in correct place */
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCreateDirectDrawObject,
pfnDdCreateDirectDrawObject);
+
+ if (pfnDdCreateDirectDrawObject == NULL)
+ {
+ DPRINT1("Warring no pfnDdCreateDirectDrawObject");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdCreateDirectDrawObject");
+ return pfnDdCreateDirectDrawObject(hdc);
+
+}
+
+HANDLE
+STDCALL
+NtGdiDdCreateMoComp(HANDLE hDirectDraw, PDD_CREATEMOCOMPDATA puCreateMoCompData)
+{
+ PGD_DXDDCREATEMOCOMP pfnDdCreateMoComp = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCreateMoComp, pfnDdCreateMoComp);
+
+ if (pfnDdCreateMoComp == NULL)
+ {
+ DPRINT1("Warring no pfnDdCreateMoComp");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdCreateMoComp");
+ return pfnDdCreateMoComp(hDirectDraw, puCreateMoCompData);
+}
+
+
+DWORD
+STDCALL
+NtGdiDdGetDriverState(PDD_GETDRIVERSTATEDATA pdata)
+{
+ PGD_DDGETDRIVERSTATE pfnDdGetDriverState = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdGetDriverState, pfnDdGetDriverState);
+
+ if (pfnDdGetDriverState == NULL)
+ {
+ DPRINT1("Warring no pfnDdGetDriverState");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdGetDriverState");
+ return pfnDdGetDriverState(pdata);
+}
+
+
+
+
+DWORD
+STDCALL
+NtGdiDdAlphaBlt(HANDLE hSurfaceDest,
+ HANDLE hSurfaceSrc,
+ PDD_BLTDATA puBltData)
+{
+ PGD_DDALPHABLT pfnDdAlphaBlt = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdAlphaBlt, pfnDdAlphaBlt);
+
+ if (pfnDdAlphaBlt == NULL)
+ {
+ DPRINT1("Warring no pfnDdAlphaBlt");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdAlphaBlt");
+ return pfnDdAlphaBlt(hSurfaceDest,hSurfaceSrc,puBltData);
+}
+
+
+BOOL
+STDCALL
+NtGdiDdAttachSurface(HANDLE hSurfaceFrom,
+ HANDLE hSurfaceTo
+)
+{
+ PGD_DDATTACHSURFACE pfnDdAttachSurface = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdAttachSurface, pfnDdAttachSurface);
+
+ if (pfnDdAttachSurface == NULL)
+ {
+ DPRINT1("Warring no pfnDdAttachSurface");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdAttachSurface");
+ return pfnDdAttachSurface(hSurfaceFrom,hSurfaceTo);
+}
+
+DWORD
+STDCALL
+NtGdiDdBeginMoCompFrame(HANDLE hMoComp,
+ PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData)
+{
+ PGD_DDBEGINMOCOMPFRAME pfnDdBeginMoCompFrame = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdBeginMoCompFrame, pfnDdBeginMoCompFrame);
+
+ if (pfnDdBeginMoCompFrame == NULL)
+ {
+ DPRINT1("Warring no pfnDdBeginMoCompFrame");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdBeginMoCompFrame");
+ return pfnDdBeginMoCompFrame(hMoComp,puBeginFrameData);
+}
+
+DWORD
+STDCALL
+NtGdiDdCanCreateD3DBuffer(HANDLE hDirectDraw,
+ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+)
+{
+ PGD_DDCANCREATED3DBUFFER pfnDdCanCreateD3DBuffer = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCanCreateD3DBuffer, pfnDdCanCreateD3DBuffer);
+
+ if (pfnDdCanCreateD3DBuffer == NULL)
+ {
+ DPRINT1("Warring no pfnDdCanCreateD3DBuffer");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdCanCreateD3DBuffer");
+ return pfnDdCanCreateD3DBuffer(hDirectDraw,puCanCreateSurfaceData);
+}
+
+
+DWORD
+STDCALL
+NtGdiDdColorControl(HANDLE hSurface,
+ PDD_COLORCONTROLDATA puColorControlData)
+{
+ PGD_DDCOLORCONTROL pfnDdColorControl = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdColorControl, pfnDdColorControl);
+
+ if (pfnDdColorControl == NULL)
+ {
+ DPRINT1("Warring no pfnDdColorControl");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdColorControl");
+ return pfnDdColorControl(hSurface,puColorControlData);
+}
+
+HANDLE
+STDCALL
+NtGdiDdCreateSurfaceObject(HANDLE hDirectDrawLocal,
+ HANDLE hSurface,
+ PDD_SURFACE_LOCAL puSurfaceLocal,
+ PDD_SURFACE_MORE puSurfaceMore,
+ PDD_SURFACE_GLOBAL puSurfaceGlobal,
+ BOOL bComplete
+)
+{
+ PGD_DXDDCREATESURFACEOBJECT pfnDdCreateSurfaceObject = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCreateSurfaceObject, pfnDdCreateSurfaceObject);
+
+ if (pfnDdCreateSurfaceObject == NULL)
+ {
+ DPRINT1("Warring no pfnDdCreateSurfaceObject");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdCreateSurfaceObject");
+ return pfnDdCreateSurfaceObject(hDirectDrawLocal, hSurface, puSurfaceLocal,
puSurfaceMore, puSurfaceGlobal, bComplete);
+}
+
+BOOL
+STDCALL
+NtGdiDdDeleteDirectDrawObject( HANDLE hDirectDrawLocal)
+{
+ PGD_DXDDDELETEDIRECTDRAWOBJECT pfnDdDeleteDirectDrawObject = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdDeleteDirectDrawObject,
pfnDdDeleteDirectDrawObject);
+
+ if (pfnDdDeleteDirectDrawObject == NULL)
+ {
+ DPRINT1("Warring no pfnDdDeleteDirectDrawObject");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdDeleteDirectDrawObject");
+ return pfnDdDeleteDirectDrawObject(hDirectDrawLocal);
+}
+
+BOOL
+STDCALL
+NtGdiDdDeleteSurfaceObject(HANDLE hSurface)
+{
+ PGD_DXDDDELETESURFACEOBJECT pfnDdDeleteSurfaceObject = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdDeleteSurfaceObject, pfnDdDeleteSurfaceObject);
+
+ if (pfnDdDeleteSurfaceObject == NULL)
+ {
+ DPRINT1("Warring no pfnDdDeleteSurfaceObject");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdDeleteSurfaceObject");
+ return pfnDdDeleteSurfaceObject(hSurface);
+}
+
+DWORD
+STDCALL
+NtGdiDdDestroyMoComp(HANDLE hMoComp,
+ PDD_DESTROYMOCOMPDATA puBeginFrameData)
+{
+ PGD_DXDDDESTROYMOCOMP pfnDxDdDestroyMoComp = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdDestroyMoComp, pfnDxDdDestroyMoComp);
+
+ if (pfnDxDdDestroyMoComp == NULL)
+ {
+ DPRINT1("Warring no pfnDxDdDestroyMoComp");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DxDdDestroyMoComp");
+ return pfnDxDdDestroyMoComp(hMoComp, puBeginFrameData);
+}
+
+
+
+
+DWORD
+STDCALL
+NtGdiDdDestroyD3DBuffer(HANDLE hSurface)
+{
+ PGD_DXDDDESTROYD3DBUFFER pfnDdDestroyD3DBuffer = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdDestroyD3DBuffer, pfnDdDestroyD3DBuffer);
+
+ if (pfnDdDestroyD3DBuffer == NULL)
+ {
+ DPRINT1("Warring no pfnDdDestroyD3DBuffer");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdDestroyD3DBuffer");
+ return pfnDdDestroyD3DBuffer(hSurface);
+}
+
+
+
+
+typedef DWORD (NTAPI *PGD_DXDDENDMOCOMPFRAME)(HANDLE, PDD_ENDMOCOMPFRAMEDATA);
+typedef DWORD (NTAPI *PGD_DXDDFLIPTOGDISURFACE)(HANDLE, PDD_FLIPTOGDISURFACEDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETAVAILDRIVERMEMORY)(HANDLE ,
PDD_GETAVAILDRIVERMEMORYDATA);
@@ -192,76 +624,6 @@
}
-/* NtGdiDdCreateDirectDrawObject is finish and works as it should
- * it maybe have some memory leack or handler leack in this code
- * if you found any case you maybe think it leacks the handler
- * or memory please tell me, before you start fixing the code
- * Magnus Olsen
- */
-HANDLE STDCALL
-NtGdiDdCreateDirectDrawObject(HDC hdc)
-{
- DC *pDC;
- HANDLE hDirectDraw;
- PDD_DIRECTDRAW pDirectDraw;
-
- /* Create a hdc if we do not have one */
- if (hdc == NULL)
- {
- return NULL;
- }
-
- /* Look the hdc to gain the internal struct */
- pDC = DC_LockDc(hdc);
- if (!pDC)
- {
- return NULL;
- }
-
- /* test see if drv got a dx interface or not */
- if ( ( pDC->DriverFunctions.DisableDirectDraw == NULL) ||
- ( pDC->DriverFunctions.EnableDirectDraw == NULL))
- {
- DC_UnlockDc(pDC);
- return NULL;
- }
-
- /* alloc and lock the stucrt */
- hDirectDraw = GDIOBJ_AllocObj(DdHandleTable, GDI_OBJECT_TYPE_DIRECTDRAW);
- if (!hDirectDraw)
- {
- /* No more memmory */
- DC_UnlockDc(pDC);
- return NULL;
- }
-
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDraw,
GDI_OBJECT_TYPE_DIRECTDRAW);
- if (!pDirectDraw)
- {
- /* invalid handle */
- DC_UnlockDc(pDC);
- return NULL;
- }
-
- /* setup the internal stuff */
- pDirectDraw->Global.dhpdev = pDC->PDev;
- pDirectDraw->Local.lpGbl = &pDirectDraw->Global;
-
- pDirectDraw->DrvGetDirectDrawInfo = pDC->DriverFunctions.GetDirectDrawInfo;
- pDirectDraw->DrvDisableDirectDraw = pDC->DriverFunctions.DisableDirectDraw;
- pDirectDraw->EnableDirectDraw = pDC->DriverFunctions.EnableDirectDraw;
-
- if (intEnableDriver(pDirectDraw) == FALSE)
- {
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- DC_UnlockDc(pDC);
- return NULL;
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- DC_UnlockDc(pDC);
- return hDirectDraw;
-}
/* NtGdiDdCreateDirectDrawObject is finish and works as it should
@@ -505,17 +867,7 @@
}
-BOOL STDCALL
-NtGdiDdDeleteDirectDrawObject( HANDLE hDirectDrawLocal)
-{
- DPRINT1("NtGdiDdDeleteDirectDrawObject\n");
- if (hDirectDrawLocal == NULL)
- {
- return FALSE;
- }
-
- return GDIOBJ_FreeObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
-}
+
BOOL STDCALL NtGdiDdReenableDirectDrawObject(
@@ -613,249 +965,7 @@
-DWORD STDCALL NtGdiDdUnlock(
- HANDLE hSurface,
- PDD_UNLOCKDATA puUnlockData
-)
-{
- DWORD ddRVal;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdUnlock\n");
-#endif
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- /* backup the orignal PDev and info */
- lgpl = puUnlockData->lpDD;
-
- /* use our cache version instead */
- puUnlockData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_UNLOCK))
- ddRVal = DDHAL_DRIVER_NOTHANDLED;
- else
- ddRVal = pDirectDraw->Surf.Unlock(puUnlockData);
-
- /* But back the orignal PDev */
- puUnlockData->lpDD = lgpl;
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
-}
-
-
-
-DWORD STDCALL NtGdiDdSetColorKey(
- HANDLE hSurface,
- PDD_SETCOLORKEYDATA puSetColorKeyData
-)
-{
- DWORD ddRVal;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdSetColorKey\n");
-#endif
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- /* backup the orignal PDev and info */
- lgpl = puSetColorKeyData->lpDD;
-
- /* use our cache version instead */
- puSetColorKeyData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_SETCOLORKEY))
- ddRVal = DDHAL_DRIVER_NOTHANDLED;
- else
- ddRVal = pDirectDraw->Surf.SetColorKey(puSetColorKeyData);
-
- /* But back the orignal PDev */
- puSetColorKeyData->lpDD = lgpl;
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
-}
-
-
-DWORD STDCALL NtGdiDdAddAttachedSurface(
- HANDLE hSurface,
- HANDLE hSurfaceAttached,
- PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
-)
-{
- DWORD ddRVal;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurfaceAttached,
GDI_OBJECT_TYPE_DIRECTDRAW);
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdAddAttachedSurface\n");
-#endif
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- /* backup the orignal PDev and info */
- lgpl = puAddAttachedSurfaceData->lpDD;
-
- /* use our cache version instead */
- puAddAttachedSurfaceData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE))
- ddRVal = DDHAL_DRIVER_NOTHANDLED;
- else
- ddRVal = pDirectDraw->Surf.AddAttachedSurface(puAddAttachedSurfaceData);
-
- /* But back the orignal PDev */
- puAddAttachedSurfaceData->lpDD = lgpl;
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdGetBltStatus(
- HANDLE hSurface,
- PDD_GETBLTSTATUSDATA puGetBltStatusData
-)
-{
- DWORD ddRVal;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdGetBltStatus\n");
-#endif
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- /* backup the orignal PDev and info */
- lgpl = puGetBltStatusData->lpDD;
-
- /* use our cache version instead */
- puGetBltStatusData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS))
- ddRVal = DDHAL_DRIVER_NOTHANDLED;
- else
- ddRVal = pDirectDraw->Surf.GetBltStatus(puGetBltStatusData);
-
- /* But back the orignal PDev */
- puGetBltStatusData->lpDD = lgpl;
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdGetFlipStatus(
- HANDLE hSurface,
- PDD_GETFLIPSTATUSDATA puGetFlipStatusData
-)
-{
- DWORD ddRVal;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdGetFlipStatus\n");
-#endif
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- /* backup the orignal PDev and info */
- lgpl = puGetFlipStatusData->lpDD;
-
- /* use our cache version instead */
- puGetFlipStatusData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS))
- ddRVal = DDHAL_DRIVER_NOTHANDLED;
- else
- ddRVal = pDirectDraw->Surf.GetFlipStatus(puGetFlipStatusData);
-
- /* But back the orignal PDev */
- puGetFlipStatusData->lpDD = lgpl;
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdUpdateOverlay(
- HANDLE hSurfaceDestination,
- HANDLE hSurfaceSource,
- PDD_UPDATEOVERLAYDATA puUpdateOverlayData
-)
-{
- DWORD ddRVal;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurfaceDestination,
GDI_OBJECT_TYPE_DIRECTDRAW);
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdUpdateOverlay\n");
-#endif
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- /* backup the orignal PDev and info */
- lgpl = puUpdateOverlayData->lpDD;
-
- /* use our cache version instead */
- puUpdateOverlayData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY))
- ddRVal = DDHAL_DRIVER_NOTHANDLED;
- else
- ddRVal = pDirectDraw->Surf.UpdateOverlay(puUpdateOverlayData);
-
- /* But back the orignal PDev */
- puUpdateOverlayData->lpDD = lgpl;
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdSetOverlayPosition(
- HANDLE hSurfaceSource,
- HANDLE hSurfaceDestination,
- PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
-)
-{
- DWORD ddRVal;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurfaceDestination,
GDI_OBJECT_TYPE_DIRECTDRAW);
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdSetOverlayPosition\n");
-#endif
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- /* backup the orignal PDev and info */
- lgpl = puSetOverlayPositionData->lpDD;
-
- /* use our cache version instead */
- puSetOverlayPositionData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION))
- ddRVal = DDHAL_DRIVER_NOTHANDLED;
- else
- ddRVal = pDirectDraw->Surf.SetOverlayPosition(puSetOverlayPositionData);
-
- /* But back the orignal PDev */
- puSetOverlayPositionData->lpDD = lgpl;
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
-}
+
/************************************************************************/
@@ -874,66 +984,8 @@
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(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
- PDD_SURFACE pSurface;
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdCreateSurfaceObject\n");
-#endif
- if (!pDirectDraw)
- return NULL;
-
- if (!hSurface)
- hSurface = GDIOBJ_AllocObj(DdHandleTable, GDI_OBJECT_TYPE_DD_SURFACE);
-
- pSurface = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
-
- if (!pSurface)
- {
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return NULL;
- }
-
- pSurface->hDirectDrawLocal = hDirectDrawLocal;
-
- 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_UnlockObjByPtr(DdHandleTable, pSurface);
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
-
- return hSurface;
-}
-
-BOOL STDCALL NtGdiDdDeleteSurfaceObject(
- HANDLE hSurface
-)
-{
-#ifdef DX_DEBUG
- DPRINT1("NtGdiDdDeleteSurfaceObject\n");
-#endif
- /* FIXME add right GDI_OBJECT_TYPE_ for everthing for now
- we are using same type */
- /* return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE); */
- return GDIOBJ_FreeObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
-
-}
+
+
@@ -942,32 +994,7 @@
/************************************************************************/
-/*
-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_UnlockObjByPtr(pSurfaceFrom);
- return FALSE;
- }
-
- if (pSurfaceFrom->Local.lpAttachListFrom)
- {
- pSurfaceFrom->Local.lpAttachListFrom = pSurfaceFrom->AttachListFrom;
- }
-
- GDIOBJ_UnlockObjByPtr(pSurfaceFrom);
- GDIOBJ_UnlockObjByPtr(pSurfaceTo);
- return TRUE;
-}
-*/
+
DWORD STDCALL NtGdiDdGetAvailDriverMemory(
HANDLE hDirectDrawLocal,
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c Sun Oct 14 16:07:23
2007
@@ -9,264 +9,303 @@
*/
#include <w32k.h>
-
-#define NDEBUG
+#include <reactos/drivers/directx/dxg.h>
+
+//#define NDEBUG
#include <debug.h>
-#define DdHandleTable GdiHandleTable
-
-
-
-DWORD STDCALL NtGdiDdBlt(
- HANDLE hSurfaceDest,
- HANDLE hSurfaceSrc,
- PDD_BLTDATA puBltData
-)
-{
- NTSTATUS Status = FALSE;
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- DD_BLTDATA Blt;
- PDD_SURFACE pDstSurface = NULL;
- PDD_SURFACE pSrcSurface = NULL;
- PDD_DIRECTDRAW pDirectDraw;
-
- DPRINT1("NtGdiDdBlt\n");
-
- _SEH_TRY
- {
- ProbeForRead(puBltData, sizeof(DD_BLTDATA), 1);
- RtlCopyMemory( &Blt, puBltData, sizeof( DD_BLTDATA ) );
- }
- _SEH_HANDLE
- {
- Status = _SEH_GetExceptionCode();
- }
- _SEH_END;
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return ddRVal;
- }
-
- pDstSurface = GDIOBJ_LockObj(DdHandleTable, hSurfaceDest,
GDI_OBJECT_TYPE_DD_SURFACE);
- if (!pDstSurface)
- {
- DPRINT1("Fail\n");
- return ddRVal;
- }
-
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, pDstSurface->hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
- if (!pDirectDraw)
- {
- DPRINT1("Fail\n");
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pSrcSurface);
- return ddRVal;
- }
-
- if (pSrcSurface)
- {
- pSrcSurface = GDIOBJ_LockObj(DdHandleTable, pSrcSurface,
GDI_OBJECT_TYPE_DD_SURFACE);
- if (!pSrcSurface)
- {
- DPRINT1("Fail\n");
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDstSurface);
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- return ddRVal;
- }
- }
-
- Blt.lpDDDestSurface = &pDstSurface->Local;
- if (pDstSurface)
- {
- Blt.lpDDSrcSurface = &pDstSurface->Local;
- }
-
- Blt.ddRVal = DDERR_GENERIC;
-
- /* MSDN say this member is always set to FALSE in windows 2000 or higher */
- Blt.IsClipped = FALSE;
-
- /* MSDN say this member is always unuse in windows 2000 or higher */
- Blt.dwROPFlags = 0;
-
- if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_BLT)
- {
- Blt.lpDD = &pDirectDraw->Global;
- Blt.Blt = NULL;
- ddRVal = pDirectDraw->Surf.Blt(&Blt);
- }
-
- DPRINT1("Retun value is %04x and driver return code is
%04x\n",ddRVal,Blt.ddRVal);
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDstSurface);
-
- if(pSrcSurface)
- {
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pSrcSurface);
- }
-
- _SEH_TRY
- {
- ProbeForWrite(puBltData, sizeof(DD_BLTDATA), 1);
- puBltData->ddRVal = Blt.ddRVal;
- }
- _SEH_HANDLE
- {
- Status = _SEH_GetExceptionCode();
- }
- _SEH_END;
-
- DPRINT1("Retun value is %04x and driver return code is
%04x\n",ddRVal,Blt.ddRVal);
- return ddRVal;
- }
-
-
-
-/************************************************************************/
-/* NtGdiDdCreateSurface */
-/* status : untested */
-/************************************************************************/
-DWORD STDCALL NtGdiDdDestroySurface(
- HANDLE hSurface,
- BOOL bRealDestroy
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_SURFACE pSurface;
- PDD_DIRECTDRAW pDirectDraw;
- DD_DESTROYSURFACEDATA DestroySurf;
-
- DPRINT1("NtGdiDdDestroySurface\n");
-
- pSurface = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
- if (pSurface != NULL)
- {
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, pSurface->hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
- if (pDirectDraw != NULL)
- {
- if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE)
- {
- //DestroySurf.lpDD = pSurface->Global;
- DestroySurf.lpDDSurface = hSurface;
-
- /* FIXME
- in parma bRealDestroy
- Specifies how to destroy the surface. Can be one of the following values.
- TRUE = Destroy the surface and free video memory.
- FALSE = Free the video memory but leave the surface in an
uninitialized state
- */
-
- DestroySurf.DestroySurface = pDirectDraw->Surf.DestroySurface;
- ddRVal = pDirectDraw->Surf.DestroySurface(&DestroySurf);
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pSurface);
- }
-
- return ddRVal;
-}
-
-
-
-/************************************************************************/
-/* NtGdiDdFlip */
-/* status : untested */
-/************************************************************************/
-
-DWORD STDCALL NtGdiDdFlip(
- HANDLE hSurfaceCurrent,
- HANDLE hSurfaceTarget,
- HANDLE hSurfaceCurrentLeft,
- HANDLE hSurfaceTargetLeft,
- PDD_FLIPDATA puFlipData
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_SURFACE pSurface;
- PDD_DIRECTDRAW pDirectDraw;
- DPRINT1("NtGdiDdFlip\n");
-
- /* DO we need looking all surface or is okay for one */
- pSurface = GDIOBJ_LockObj(DdHandleTable, hSurfaceCurrent, GDI_OBJECT_TYPE_DD_SURFACE);
- if (pSurface != NULL)
- {
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, pSurface->hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- if (pDirectDraw != NULL)
- {
- if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_FLIP)
- {
- /* FIXME is lpDD typecasted tp driver PEV ?? */
- ddRVal = pDirectDraw->Surf.Flip(puFlipData);
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pSurface);
- }
-
- return ddRVal;
-}
-
-
-
-
-/************************************************************************/
-/* NtGdiDdLock */
-/* status : untested */
-/************************************************************************/
-
-DWORD STDCALL NtGdiDdLock(
- HANDLE hSurface,
- PDD_LOCKDATA puLockData,
- HDC hdcClip)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_SURFACE pSurface;
- PDD_DIRECTDRAW pDirectDraw;
-
- DPRINT1("NtGdiDdLock\n");
-
- pSurface = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
- if (pSurface != NULL)
- {
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, pSurface->hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- if (pDirectDraw != NULL)
- {
- /* Do we need lock hdc from hdcClip ?? */
- if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_LOCK)
- {
- /* FIXME is lpDD typecasted tp driver PEV ?? */
- ddRVal = pDirectDraw->Surf.Lock(puLockData);
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pSurface);
- }
-
- return ddRVal;
-}
-
-/*
-00414 PDD_SURFCB_SETCLIPLIST SetClipList;
-00416 PDD_SURFCB_UNLOCK Unlock;
-00417 PDD_SURFCB_BLT Blt;
-00418 PDD_SURFCB_SETCOLORKEY SetColorKey;
-00419 PDD_SURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
-00420 PDD_SURFCB_GETBLTSTATUS GetBltStatus;
-00421 PDD_SURFCB_GETFLIPSTATUS GetFlipStatus;
-00422 PDD_SURFCB_UPDATEOVERLAY UpdateOverlay;
-00423 PDD_SURFCB_SETOVERLAYPOSITION SetOverlayPosition;
-00424 PVOID reserved4;
-00425 PDD_SURFCB_SETPALETTE SetPalette;
-00426 } DD_SURFACECALLBACKS, *PDD_SURFACECALLBACKS;
-*/
-
+extern PDRVFN gpDxFuncs;
+
+typedef DWORD (NTAPI *PGD_DXDDDESTROYSURFACE)(HANDLE, BOOL);
+typedef DWORD (NTAPI *PGD_DXDDFLIP)(HANDLE, HANDLE, HANDLE, HANDLE, PDD_FLIPDATA);
+/* Does not exists in win32k or dxg.sys PDD_SURFCB_SETCLIPLIST SetClipList; */
+typedef DWORD (NTAPI *PGD_DXDDLOCK)(HANDLE, PDD_LOCKDATA, HDC);
+typedef DWORD (NTAPI *PGD_DXDDUNLOCK(HANDLE, PDD_UNLOCKDATA );
+typedef DWORD (NTAPI *PGD_DDBLT)(HANDLE, HANDLE, PDD_BLTDATA);
+typedef DWORD (NTAPI *PGD_DXDDSETCOLORKEY)(HANDLE, PDD_SETCOLORKEYDATA);
+typedef DWORD (NTAPI *PGD_DDADDATTACHEDSURFACE)(HANDLE,
HANDLE,PDD_ADDATTACHEDSURFACEDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETBLTSTATUS)(HANDLE, PDD_GETBLTSTATUSDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETFLIPSTATUS)(HANDLE, PDD_GETFLIPSTATUSDATA);
+typedef DWORD (NTAPI *PGD_DXDDUPDATEOVERLAY)(HANDLE, HANDLE, PDD_UPDATEOVERLAYDATA);
+typedef DWORD (NTAPI *PGD_DXDDSETOVERLAYPOSITION)(HANDLE, HANDLE,
PDD_SETOVERLAYPOSITIONDATA);
+/* from MSDN LPVOID reserved4; are not inuse */
+/* Does not exists in win32k or dxg.sys PDD_SURFCB_SETPALETTE SetPalette */
+
+#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
+ if (gpDxFuncs) \
+ { \
+ for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
+ { \
+ if (gpDxFuncs[i].iFunc == INDEX) \
+ { \
+ FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
+ break; \
+ } \
+ } \
+ }
+
+/************************************************************************/
+/* NtGdiDdDestroySurface */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdDestroySurface(HANDLE hSurface, BOOL bRealDestroy)
+{
+ PGD_DXDDDESTROYSURFACE pfnDdDestroySurface = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdDestroySurface, pfnDdDestroySurface);
+
+ if (pfnDdDestroySurface == NULL)
+ {
+ DPRINT1("Warring no pfnDdDestroySurface");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdDestroySurface");
+ return pfnDdDestroySurface(hSurface, bRealDestroy);
+}
+
+/************************************************************************/
+/* NtGdiDdFlip */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdFlip(HANDLE hSurfaceCurrent,
+ HANDLE hSurfaceTarget,
+ HANDLE hSurfaceCurrentLeft,
+ HANDLE hSurfaceTargetLeft,
+ PDD_FLIPDATA puFlipData)
+{
+ PGD_DXDDDESTROYSURFACE pfnDdDdFlip = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdFlip, pfnDdDdFlip);
+
+ if (pfnDdDdFlip == NULL)
+ {
+ DPRINT1("Warring no pfnDdDdFlip");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdDdFlip");
+ return pfnDdDdFlip(hSurfaceCurrent, hSurfaceTarget, hSurfaceCurrentLeft,
hSurfaceTargetLeft, puFlipData);
+}
+
+/************************************************************************/
+/* NtGdiDdUnlock */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdLock(HANDLE hSurface,
+ PDD_LOCKDATA puLockData,
+ HDC hdcClip)
+{
+ PGD_DXDDLOCK pfnDdLock = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdLock, pfnDdLock);
+
+ if (pfnDdLock == NULL)
+ {
+ DPRINT1("Warring no pfnDdLock");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdLock");
+ return pfnDdLock(hSurface, puLockData, hdcClip);
+}
+
+/************************************************************************/
+/* NtGdiDdunlock */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdUnlock(HANDLE hSurface,
+ PDD_UNLOCKDATA puUnlockData)
+{
+ PGD_DXDDUNLOCK pfnDdUnlock = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdUnlock, pfnDdUnlock);
+
+ if (pfnDdLock == NULL)
+ {
+ DPRINT1("Warring no pfnDdUnlock");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdUnlock");
+ return pfnDdUnlock(hSurface, puUnlockData);
+}
+
+/************************************************************************/
+/* NtGdiDdBlt */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdBlt(HANDLE hSurfaceDest,
+ HANDLE hSurfaceSrc,
+ PDD_BLTDATA puBltData)
+{
+ PGD_DDBLT pfnDdBlt = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdBlt, pfnDdBlt);
+
+ if (pfnDdBlt == NULL)
+ {
+ DPRINT1("Warring no pfnDdBlt");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdBlt");
+ return pfnDdBlt(hSurfaceDest,hSurfaceSrc,puBltData);
+}
+
+/************************************************************************/
+/* NtGdiDdSetColorKey */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdSetColorKey(HANDLE hSurface,
+ PDD_SETCOLORKEYDATA puSetColorKeyData)
+{
+ PGD_DXDDSETCOLORKEY pfnDdSetColorKey;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdSetColorKey, pfnDdSetColorKey);
+
+ if (pfnDdSetColorKey == NULL)
+ {
+ DPRINT1("Warring no pfnDdSetColorKey");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdSetColorKey");
+ return pfnDdSetColorKey(hSurface,puSetColorKeyData);
+
+}
+
+/************************************************************************/
+/* NtGdiDdAddAttachedSurface */
+/************************************************************************/
+
+DWORD
+STDCALL
+NtGdiDdAddAttachedSurface(HANDLE hSurface,
+ HANDLE hSurfaceAttached,
+ PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData)
+{
+ PGD_DDADDATTACHEDSURFACE pfnDdAddAttachedSurface = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdAddAttachedSurface, pfnDdAddAttachedSurface);
+
+ if (pfnDdAddAttachedSurface == NULL)
+ {
+ DPRINT1("Warring no pfnDdAddAttachedSurface");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys DdAddAttachedSurface");
+ return pfnDdAddAttachedSurface(hSurface,hSurfaceAttached,puAddAttachedSurfaceData);
+}
+
+/************************************************************************/
+/* NtGdiDdGetBltStatus */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdGetBltStatus(HANDLE hSurface,
+ PDD_GETBLTSTATUSDATA puGetBltStatusData)
+{
+ PGD_DXDDGETBLTSTATUS pfnDdGetBltStatus = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdGetBltStatus, pfnDdGetBltStatus);
+
+ if (pfnDdGetBltStatus == NULL)
+ {
+ DPRINT1("Warring no pfnDdGetBltStatus");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdGetBltStatus");
+ return pfnDdGetBltStatus(hSurface,puGetBltStatusData);
+}
+
+/************************************************************************/
+/* NtGdiDdGetFlipStatus */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdGetFlipStatus(HANDLE hSurface,
+ PDD_GETFLIPSTATUSDATA puGetFlipStatusData)
+{
+ PGD_DXDDGETFLIPSTATUS pfnDdGetFlipStatus = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdGetFlipStatus, pfnDdGetFlipStatus);
+
+ if (pfnDdGetFlipStatus == NULL)
+ {
+ DPRINT1("Warring no pfnDdGetFlipStatus");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdGetFlipStatus");
+ return pfnDdGetFlipStatus(hSurface,puGetFlipStatusData);
+}
+
+/************************************************************************/
+/* NtGdiDdUpdateOverlay */
+/************************************************************************/
+DWORD
+STDCALL
+NtGdiDdUpdateOverlay(HANDLE hSurfaceDestination,
+ HANDLE hSurfaceSource,
+ PDD_UPDATEOVERLAYDATA puUpdateOverlayData)
+{
+ PGD_DXDDUPDATEOVERLAY pfnDdUpdateOverlay = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdUpdateOverlay, pfnDdUpdateOverlay);
+
+ if (pfnDdUpdateOverlay == NULL)
+ {
+ DPRINT1("Warring no pfnDdUpdateOverlay");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdUpdateOverlay");
+ return pfnDdUpdateOverlay(hSurfaceDestination,hSurfaceSource,puUpdateOverlayData);
+}
+
+/************************************************************************/
+/* NtGdiDdSetOverlayPosition */
+/************************************************************************/
+
+DWORD
+STDCALL
+NtGdiDdSetOverlayPosition(HANDLE hSurfaceSource,
+ HANDLE hSurfaceDestination,
+ PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData)
+{
+ PGD_DXDDUPDATEOVERLAY pfnDdSetOverlayPosition = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdSetOverlayPosition, pfnDdSetOverlayPosition);
+
+ if (pfnDdSetOverlayPosition == NULL)
+ {
+ DPRINT1("Warring no pfnDdSetOverlayPosition");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDdSetOverlayPosition");
+ return
pfnDdSetOverlayPosition(hSurfaceSource,hSurfaceDestination,puSetOverlayPositionData);
+}
+
+
+
Added: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/mocomp.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/mocomp.c (added)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/mocomp.c Sun Oct 14 16:07:23
2007
@@ -1,0 +1,96 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Native DirectDraw implementation
+ * FILE: subsys/win32k/ntddraw/d3d.c
+ * PROGRAMER: Magnus olsen (magnus(a)greatlord.com)
+ * REVISION HISTORY:
+ * 19/1-2006 Magnus Olsen
+ */
+
+
+#include <w32k.h>
+#include <reactos/drivers/directx/dxg.h>
+
+//#define NDEBUG
+#include <debug.h>
+
+extern PDRVFN gpDxFuncs;
+
+#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
+ if (gpDxFuncs) \
+ { \
+ for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
+ { \
+ if (gpDxFuncs[i].iFunc == INDEX) \
+ { \
+ FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
+ break; \
+ } \
+ } \
+ }
+
+typedef DWORD (NTAPI *PGD_DDBEGINMOCOMPFRAME)(HANDLE, PDD_BEGINMOCOMPFRAMEDATA);
+typedef HANDLE (NTAPI *PGD_DXDDCREATEMOCOMP)(HANDLE, PDD_CREATEMOCOMPDATA );
+typedef DWORD (NTAPI *PGD_DXDDDESTROYMOCOMP)(HANDLE, BOOL);
+typedef DWORD (NTAPI *PGD_DXDDENDMOCOMPFRAME)(HANDLE, PDD_ENDMOCOMPFRAMEDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETINTERNALMOCOMPINFO)(HANDLE, PDD_GETINTERNALMOCOMPDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPBUFFINFO)(HANDLE, PDD_GETMOCOMPCOMPBUFFDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPGUIDS)(HANDLE, PDD_GETMOCOMPGUIDSDATA);
+typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPFORMATS)(HANDLE, PDD_GETMOCOMPFORMATSDATA);
+
+DWORD
+STDCALL
+NtGdiDdEndMoCompFrame(HANDLE hMoComp, PDD_ENDMOCOMPFRAMEDATA puEndFrameData)
+{
+
+}
+
+DWORD
+STDCALL
+NtGdiDdGetInternalMoCompInfo(HANDLE hDirectDraw,
+ PDD_GETINTERNALMOCOMPDATA puGetInternalData)
+{
+
+}
+
+DWORD STDCALL NtGdiDdGetMoCompBuffInfo(
+ HANDLE hDirectDraw,
+ PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData)
+{
+
+}
+
+DWORD
+STDCALL
+NtGdiDdGetMoCompFormats(HANDLE hDirectDraw,
+ PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData)
+{
+
+}
+
+
+DWORD
+STDCALL
+NtGdiDdGetMoCompGuids(HANDLE hDirectDraw,
+ PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData)
+{
+
+}
+
+DWORD
+STDCALL NtGdiDdQueryMoCompStatus(HANDLE hMoComp,
+ PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData)
+{
+
+}
+
+
+DWORD
+STDCALL
+NtGdiDdRenderMoComp(HANDLE hMoComp,
+ PDD_RENDERMOCOMPDATA puRenderMoCompData)
+{
+
+}
+
Propchange: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/mocomp.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/stubs.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/stubs.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/stubs.c Sun Oct 14 16:07:23
2007
@@ -13,139 +13,6 @@
#define NDEBUG
#include <debug.h>
-
-
-
-DWORD STDCALL NtGdiD3dContextCreate(
- HANDLE hDirectDrawLocal,
- HANDLE hSurfColor,
- HANDLE hSurfZ,
- LPD3DNTHAL_CONTEXTCREATEDATA pdcci
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiD3dContextDestroy(
- LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiD3dContextDestroyAll(LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcad)
-{
- /* This entry point is not supported on NT5 and ROS */
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiD3dDrawPrimitives2(
- HANDLE hCmdBuf,
- HANDLE hVBuf,
- LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
- FLATPTR *pfpVidMemCmd,
- DWORD *pdwSizeCmd,
- FLATPTR *pfpVidMemVtx,
- DWORD *pdwSizeVtx
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiD3dValidateTextureStageState(
- LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
-
-
-BOOL STDCALL NtGdiDdAttachSurface(
- HANDLE hSurfaceFrom,
- HANDLE hSurfaceTo
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiDdBeginMoCompFrame(
- HANDLE hMoComp,
- PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-DWORD STDCALL NtGdiDdCanCreateD3DBuffer(
- HANDLE hDirectDraw,
- PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
-DWORD STDCALL NtGdiDdColorControl(
- HANDLE hSurface,
- PDD_COLORCONTROLDATA puColorControlData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiDdCreateD3DBuffer(
- HANDLE hDirectDraw,
- HANDLE *hSurface,
- DDSURFACEDESC *puSurfaceDescription,
- DD_SURFACE_GLOBAL *puSurfaceGlobalData,
- DD_SURFACE_LOCAL *puSurfaceLocalData,
- DD_SURFACE_MORE *puSurfaceMoreData,
- PDD_CREATESURFACEDATA puCreateSurfaceData,
- HANDLE *puhSurface
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
-HANDLE STDCALL NtGdiDdCreateMoComp(
- HANDLE hDirectDraw,
- PDD_CREATEMOCOMPDATA puCreateMoCompData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
DWORD STDCALL NtGdiDdCreateSurfaceEx(
HANDLE hDirectDraw,
HANDLE hSurface,
@@ -157,41 +24,6 @@
return 0;
}
-
-
-DWORD STDCALL NtGdiDdDestroyD3DBuffer(
- HANDLE hSurface
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiDdDestroyMoComp(
- HANDLE hMoComp,
- PDD_DESTROYMOCOMPDATA puBeginFrameData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
-DWORD STDCALL NtGdiDdEndMoCompFrame(
- HANDLE hMoComp,
- PDD_ENDMOCOMPFRAMEDATA puEndFrameData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
DWORD STDCALL NtGdiDdFlipToGDISurface(
HANDLE hDirectDraw,
PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
@@ -202,23 +34,9 @@
return 0;
}
-
-
-
HDC STDCALL NtGdiDdGetDC(
HANDLE hSurface,
PALETTEENTRY *puColorTable
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
-DWORD STDCALL NtGdiDdGetDriverState(
- PDD_GETDRIVERSTATEDATA pdata
)
{
UNIMPLEMENTED
@@ -237,52 +55,6 @@
return 0;
}
-
-
-DWORD STDCALL NtGdiDdGetInternalMoCompInfo(
- HANDLE hDirectDraw,
- PDD_GETINTERNALMOCOMPDATA puGetInternalData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiDdGetMoCompBuffInfo(
- HANDLE hDirectDraw,
- PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiDdGetMoCompFormats(
- HANDLE hDirectDraw,
- PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiDdGetMoCompGuids(
- HANDLE hDirectDraw,
- PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-
-
-
DWORD STDCALL NtGdiDdLockD3D(
HANDLE hSurface,
PDD_LOCKDATA puLockData
@@ -293,30 +65,8 @@
return 0;
}
-
-DWORD STDCALL NtGdiDdQueryMoCompStatus(
- HANDLE hMoComp,
- PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
BOOL STDCALL NtGdiDdReleaseDC(
HANDLE hSurface
-)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-DWORD STDCALL NtGdiDdRenderMoComp(
- HANDLE hMoComp,
- PDD_RENDERMOCOMPDATA puRenderMoCompData
)
{
UNIMPLEMENTED
@@ -329,23 +79,9 @@
HWND hwnd
)
{
- DPRINT1("UNIMPLEMENTED NtGdiDdResetVisrgn \n");
- /* see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winu…
- for more info, I pasted some part of it here
- Clipping can change asynchronously from the point of view of user-mode threads.
- The kernel-mode parts of DirectDraw and Microsoft Windows Graphics Device Interface
(GDI)
- maintain a counter that is incremented whenever the clipping list for the entire
desktop
- changes. A call to this function records this counter with every existing DirectDraw
- primary surface on the system.
-
- */
return TRUE;
}
-
-
-
-
BOOL STDCALL NtGdiDdSetGammaRamp(
HANDLE hDirectDraw,
@@ -358,8 +94,6 @@
return 0;
}
-
-
VOID STDCALL NtGdiDdUnattachSurface(
HANDLE hSurface,
HANDLE hSurfaceAttached
@@ -367,8 +101,6 @@
{
UNIMPLEMENTED
}
-
-
DWORD STDCALL NtGdiDdUnlockD3D(
HANDLE hSurface,
@@ -381,14 +113,4 @@
}
-
-
-DWORD STDCALL NtGdiDdAlphaBlt(IN HANDLE hSurfaceDest,
- IN OPTIONAL HANDLE hSurfaceSrc,
- IN OUT PDD_BLTDATA puBltData)
-{
- UNIMPLEMENTED
-
- return 0;
-}
/* EOF */
Modified: branches/reactx/reactos/subsystems/win32/win32k/win32k.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/win32k.rbuild (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/win32k.rbuild Sun Oct 14 16:07:23
2007
@@ -96,6 +96,8 @@
<file>ddraw.c</file>
<file>dd.c</file>
<file>ddsurf.c</file>
+ <file>d3d.c</file>
+ <file>mocomp.c</file>
<file>stubs.c</file>
</directory>
<directory name="ntuser">