Author: greatlrd
Date: Thu Jul 20 11:23:21 2006
New Revision: 23189
URL:
http://svn.reactos.org/svn/reactos?rev=23189&view=rev
Log:
start spliting up my code. I been writing
1. DD_CALLBACKS code writen by me have been move to dd.c
2. follow DD_CALLBACKS api is working as they should
NtGdiDdWaitForVerticalBlank, NtGdiDdCanCreateSurface, NtGdiDdGetScanLine
3. follow api does not working as it should, is it gdi32 problem or win32k problem for it
?
NtGdiDdCreateSurface
4. Start rewriten surf callback and cleanup some code
alot wrong with them.
5. start moving surface callback to ddsurf.c
Added:
trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c (with props)
trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c (with props)
Modified:
trunk/reactos/subsystems/win32/win32k/include/intddraw.h
trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
trunk/reactos/subsystems/win32/win32k/win32k.rbuild
Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/intddraw.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/intddraw.h Thu Jul 20 11:23:21 2006
@@ -11,7 +11,8 @@
#define GDI_OBJECT_TYPE_DD_MOTIONCOMP 0x00650000
typedef struct
-{
+{
+ HANDLE hDirectDrawLocal;
DD_SURFACE_LOCAL Local;
DD_SURFACE_MORE More;
DD_SURFACE_GLOBAL Global;
Added: trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c (added)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c Thu Jul 20 11:23:21 2006
@@ -1,0 +1,191 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Native DirectDraw implementation
+ * FILE: subsys/win32k/ntddraw/dd.c
+ * PROGRAMER: Magnus Olsen (greatlord(a)reactos.org)
+ * REVISION HISTORY:
+ * 19/7-2006 Magnus Olsen
+ */
+
+#include <w32k.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define DdHandleTable GdiHandleTable
+
+/*
+ DdMapMemory, DdDestroyDriver are not exported as NtGdi Call
+ This file is compelete for DD_CALLBACKS setup
+
+ ToDO fix the NtGdiDdCreateSurface, shall we fix it
+ from GdiEntry or gdientry callbacks for DdCreateSurface
+ have we miss some thing there
+*/
+
+/************************************************************************/
+/* NtGdiDdCreateSurface */
+/* status : Bugs out */
+/************************************************************************/
+
+DWORD STDCALL NtGdiDdCreateSurface(
+ HANDLE hDirectDrawLocal,
+ HANDLE *hSurface,
+ DDSURFACEDESC *puSurfaceDescription,
+ DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+ DD_SURFACE_LOCAL *puSurfaceLocalData,
+ DD_SURFACE_MORE *puSurfaceMoreData,
+ PDD_CREATESURFACEDATA puCreateSurfaceData,
+ HANDLE *puhSurface
+)
+{
+ DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
+ PDD_DIRECTDRAW pDirectDraw;
+ PDD_DIRECTDRAW_GLOBAL lgpl;
+
+ DPRINT1("NtGdiDdCreateSurface\n");
+
+ pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
+
+ if (pDirectDraw != NULL)
+ {
+
+ /*
+ FIXME Get the darn surface handle and and put all
+ surface struct to it
+
+ FIXME rewrite the darn code complete
+
+ FIXME fill the puCreateSurfaceData correct
+
+ FIXME loading back info from it right
+ */
+
+ if ((pDirectDraw->DD.dwFlags & DDHAL_CB32_CREATESURFACE))
+ {
+ /* backup the orignal PDev and info */
+ lgpl = puCreateSurfaceData->lpDD;
+
+ /* use our cache version instead */
+ puCreateSurfaceData->lpDD = &pDirectDraw->Global;
+
+ /* make the call */
+ ddRVal = pDirectDraw->DD.CreateSurface(puCreateSurfaceData);
+
+ /* But back the orignal PDev */
+ puCreateSurfaceData->lpDD = lgpl;
+
+ }
+
+ GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
+ }
+
+ return ddRVal;
+}
+
+/************************************************************************/
+/* NtGdiDdWaitForVerticalBlank */
+/* status : OK working as it should */
+/************************************************************************/
+
+
+DWORD STDCALL NtGdiDdWaitForVerticalBlank(
+ HANDLE hDirectDrawLocal,
+ PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
+)
+{
+ DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
+ PDD_DIRECTDRAW_GLOBAL lgpl;
+ PDD_DIRECTDRAW pDirectDraw;
+
+ DPRINT1("NtGdiDdWaitForVerticalBlank\n");
+
+ pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
+
+ if (pDirectDraw != NULL)
+ {
+ if (pDirectDraw->DD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
+ {
+ lgpl = puWaitForVerticalBlankData->lpDD;
+ puWaitForVerticalBlankData->lpDD = &pDirectDraw->Global;
+
+ ddRVal = pDirectDraw->DD.WaitForVerticalBlank(puWaitForVerticalBlankData);
+
+ puWaitForVerticalBlankData->lpDD = lgpl;
+ }
+ GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
+ }
+
+ return ddRVal;
+}
+
+
+/************************************************************************/
+/* CanCreateSurface */
+/* status : OK working as it should */
+/************************************************************************/
+
+DWORD STDCALL NtGdiDdCanCreateSurface(
+ HANDLE hDirectDrawLocal,
+ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+)
+{
+ DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
+ PDD_DIRECTDRAW_GLOBAL lgpl;
+
+ PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
+
+ DPRINT1("NtGdiDdCanCreateSurface\n");
+
+ if (pDirectDraw != NULL)
+ {
+
+ if (pDirectDraw->DD.dwFlags & DDHAL_CB32_CANCREATESURFACE)
+ {
+ lgpl = puCanCreateSurfaceData->lpDD;
+ puCanCreateSurfaceData->lpDD = &pDirectDraw->Global;
+
+ ddRVal = pDirectDraw->DD.CanCreateSurface(puCanCreateSurfaceData);
+
+ puCanCreateSurfaceData->lpDD = lgpl;
+ }
+
+ GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
+ }
+
+ return ddRVal;
+}
+
+/************************************************************************/
+/* GetScanLine */
+/* status : not implement, was undoc in msdn now it is doc */
+/************************************************************************/
+DWORD STDCALL
+NtGdiDdGetScanLine( HANDLE hDirectDrawLocal, PDD_GETSCANLINEDATA puGetScanLineData)
+{
+ DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
+ PDD_DIRECTDRAW_GLOBAL lgpl;
+
+ PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
+
+ DPRINT1("NtGdiDdGetScanLine\n");
+
+ if (pDirectDraw != NULL)
+ {
+
+ if (pDirectDraw->DD.dwFlags & DDHAL_CB32_GETSCANLINE)
+ {
+ lgpl = puGetScanLineData->lpDD;
+ puGetScanLineData->lpDD = &pDirectDraw->Global;
+
+ ddRVal = pDirectDraw->DD.GetScanLine(puGetScanLineData);
+
+ puGetScanLineData->lpDD = lgpl;
+ }
+
+ GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
+ }
+
+ return ddRVal;
+}
Propchange: trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Thu Jul 20 11:23:21 2006
@@ -316,255 +316,8 @@
return ddRVal;
}
-/************************************************************************/
-/* DD CALLBACKS */
-/* FIXME NtGdiDdCreateSurface we do not call to ddCreateSurface */
-/************************************************************************/
-
-DWORD STDCALL NtGdiDdCreateSurface(
- HANDLE hDirectDrawLocal,
- HANDLE *hSurface,
- DDSURFACEDESC *puSurfaceDescription,
- DD_SURFACE_GLOBAL *puSurfaceGlobalData,
- DD_SURFACE_LOCAL *puSurfaceLocalData,
- DD_SURFACE_MORE *puSurfaceMoreData,
- PDD_CREATESURFACEDATA puCreateSurfaceData,
- HANDLE *puhSurface
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_DIRECTDRAW pDirectDraw;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- DPRINT1("NtGdiDdCreateSurface\n");
-
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- if (pDirectDraw != NULL)
- {
-
- if ((pDirectDraw->DD.dwFlags & DDHAL_CB32_CREATESURFACE))
- {
- /* backup the orignal PDev and info */
- lgpl = puCreateSurfaceData->lpDD;
-
- /* use our cache version instead */
- puCreateSurfaceData->lpDD = &pDirectDraw->Global;
-
- /* make the call */
- ddRVal = pDirectDraw->DD.CreateSurface(puCreateSurfaceData);
-
- /* But back the orignal PDev */
- puCreateSurfaceData->lpDD = lgpl;
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdWaitForVerticalBlank(
- HANDLE hDirectDrawLocal,
- PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_DIRECTDRAW_GLOBAL lgpl;
- PDD_DIRECTDRAW pDirectDraw;
-
- DPRINT1("NtGdiDdWaitForVerticalBlank\n");
-
- pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- if (pDirectDraw != NULL)
- {
- if (pDirectDraw->DD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
- {
- lgpl = puWaitForVerticalBlankData->lpDD;
- puWaitForVerticalBlankData->lpDD = &pDirectDraw->Global;
-
- ddRVal = pDirectDraw->DD.WaitForVerticalBlank(puWaitForVerticalBlankData);
-
- puWaitForVerticalBlankData->lpDD = lgpl;
- }
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdCanCreateSurface(
- HANDLE hDirectDrawLocal,
- PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- DPRINT1("NtGdiDdCanCreateSurface\n");
-
- if (pDirectDraw == NULL)
- return DDHAL_DRIVER_NOTHANDLED;
-
- if (pDirectDraw != NULL)
- {
-
- if (pDirectDraw->DD.dwFlags & DDHAL_CB32_CANCREATESURFACE)
- {
- lgpl = puCanCreateSurfaceData->lpDD;
- puCanCreateSurfaceData->lpDD = &pDirectDraw->Global;
-
- ddRVal = pDirectDraw->DD.CanCreateSurface(puCanCreateSurfaceData);
-
- puCanCreateSurfaceData->lpDD = lgpl;
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdGetScanLine(
- HANDLE hDirectDrawLocal,
- PDD_GETSCANLINEDATA puGetScanLineData
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- DPRINT1("NtGdiDdGetScanLine\n");
-
- if (pDirectDraw != NULL)
- {
- if (pDirectDraw->DD.dwFlags & DDHAL_CB32_GETSCANLINE)
- {
- lgpl = puGetScanLineData->lpDD;
- puGetScanLineData->lpDD = &pDirectDraw->Global;
-
- ddRVal = pDirectDraw->DD.GetScanLine(puGetScanLineData);
-
- puGetScanLineData->lpDD = lgpl;
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- return ddRVal;
-}
-
-
-
-/************************************************************************/
-/* Surface CALLBACKS */
-/* FIXME */
-/* NtGdiDdDestroySurface */
-/************************************************************************/
-
-DWORD STDCALL NtGdiDdDestroySurface(
- HANDLE hSurface,
- BOOL bRealDestroy
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- DPRINT1("NtGdiDdDestroySurface\n");
-
- if (pDirectDraw != NULL)
- {
- if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE)
- {
- DD_DESTROYSURFACEDATA DestroySurf;
-
- /* FIXME
- * bRealDestroy
- * are we doing right ??
- */
-
- DestroySurf.lpDD = &pDirectDraw->Global;
- DestroySurf.lpDDSurface = hSurface; // ?
- DestroySurf.DestroySurface = pDirectDraw->Surf.DestroySurface;
-
- ddRVal = pDirectDraw->Surf.DestroySurface(&DestroySurf);
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdFlip(
- HANDLE hSurfaceCurrent,
- HANDLE hSurfaceTarget,
- HANDLE hSurfaceCurrentLeft,
- HANDLE hSurfaceTargetLeft,
- PDD_FLIPDATA puFlipData
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurfaceTarget,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- DPRINT1("NtGdiDdFlip\n");
-
-
- if (pDirectDraw != NULL)
- {
- if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_FLIP)
- {
- lgpl = puFlipData->lpDD;
- puFlipData->lpDD = &pDirectDraw->Global;
-
- ddRVal = pDirectDraw->Surf.Flip(puFlipData);
-
- puFlipData->lpDD = lgpl;
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- return ddRVal;
-}
-
-DWORD STDCALL NtGdiDdLock(
- HANDLE hSurface,
- PDD_LOCKDATA puLockData,
- HDC hdcClip
-)
-{
- DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
- PDD_DIRECTDRAW_GLOBAL lgpl;
-
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
-
- DPRINT1("NtGdiDdLock\n");
-
- if (pDirectDraw != NULL)
- {
- if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_LOCK)
- {
- lgpl = puLockData->lpDD;
- puLockData->lpDD = &pDirectDraw->Global;
-
- ddRVal = pDirectDraw->Surf.Lock(puLockData);
-
- puLockData->lpDD = lgpl;
- }
-
- GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
- }
-
- return ddRVal;
-}
+
+
DWORD STDCALL NtGdiDdUnlock(
HANDLE hSurface,
@@ -887,6 +640,8 @@
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));
Added: trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c (added)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c Thu Jul 20 11:23:21 2006
@@ -1,0 +1,165 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Native DirectDraw implementation
+ * FILE: subsys/win32k/ntddraw/dd.c
+ * PROGRAMER: Magnus Olsen (greatlord(a)reactos.org)
+ * REVISION HISTORY:
+ * 19/7-2006 Magnus Olsen
+ */
+
+#include <w32k.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define DdHandleTable GdiHandleTable
+
+
+/************************************************************************/
+/* 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;
+*/
+
Propchange: trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/win32k.rbuild (original)
+++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild Thu Jul 20 11:23:21 2006
@@ -77,6 +77,8 @@
<directory name="ntddraw">
<compilationunit name="ntddraw.c">
<file>ddraw.c</file>
+ <file>dd.c</file>
+ <file>ddsurf.c</file>
<file>stubs.c</file>
</compilationunit>
</directory>