Maarten Bosma wrote:
I wrote:
Uncomment
these lines in subsys/win32k/objects/gdiobj.c:
/*{GDI_OBJECT_TYPE_DIRECTDRAW, sizeof(DD_DIRECTDRAW), DD_Cleanup},
{GDI_OBJECT_TYPE_DD_SURFACE, sizeof(DD_SURFACE),
DDSURF_Cleanup},*/
If I do so, I get a lot of errors. I guess "win32k/ntddraw.h" has to
be included somewhere.
If I include "intddraw.h", where GDI_OBJECT_TYPE_DIRECTDRAW is
defined, I get a lot of errors. I think something in the header system
has to be changed.
See attached patch.
Index: include/win32k/ntddraw.h
===================================================================
RCS file: /CVS/ReactOS/reactos/include/win32k/ntddraw.h,v
retrieving revision 1.2
diff -u -r1.2 ntddraw.h
--- include/win32k/ntddraw.h 28 Oct 2003 19:30:08 -0000 1.2
+++ include/win32k/ntddraw.h 30 Dec 2004 13:35:30 -0000
@@ -2,8 +2,6 @@
#ifndef __WIN32K_NTDDRAW_H
#define __WIN32K_NTDDRAW_H
-#include <windows.h>
-#include <ddk/ddrawint.h>
#include <ddk/d3dnthal.h>
#ifdef __cplusplus
Index: subsys/win32k/w32k.h
===================================================================
RCS file: /CVS/ReactOS/reactos/subsys/win32k/w32k.h,v
retrieving revision 1.7
diff -u -r1.7 w32k.h
--- subsys/win32k/w32k.h 12 Dec 2004 01:40:37 -0000 1.7
+++ subsys/win32k/w32k.h 30 Dec 2004 13:37:58 -0000
@@ -8,6 +8,8 @@
#include <roscfg.h>
#include <roskrnl.h>
+#include <win32k/ntddraw.h>
+
#include <ddk/winddi.h>
#include <ddk/ntddk.h>
#include <ddk/ntddmou.h>
@@ -49,6 +51,7 @@
#include <include/input.h>
#include <include/inteng.h>
#include <include/intgdi.h>
+#include <include/intddraw.h>
#include <include/menu.h>
#include <include/monitor.h>
#include <include/mouse.h>
Index: subsys/win32k/include/intddraw.h
===================================================================
RCS file: /CVS/ReactOS/reactos/subsys/win32k/include/intddraw.h,v
retrieving revision 1.2
diff -u -r1.2 intddraw.h
--- subsys/win32k/include/intddraw.h 12 Dec 2004 01:40:37 -0000 1.2
+++ subsys/win32k/include/intddraw.h 30 Dec 2004 13:39:10 -0000
@@ -61,7 +61,7 @@
PDD_SURFCB_UNLOCK DdUnlockD3DBuffer;
} DD_DIRECTDRAW, *PDD_DIRECTDRAW;
-BOOL FASTCALL DD_Cleanup(PDD_DIRECTDRAW pDD);
-BOOL FASTCALL DDSURF_Cleanup(PDD_SURFACE pDDSurf);
+BOOL INTERNAL_CALL DD_Cleanup(PVOID ObjectBody);
+BOOL INTERNAL_CALL DDSURF_Cleanup(PVOID ObjectBody);
#endif /* _INT_W32k_DDRAW */
Index: subsys/win32k/ntddraw/ddraw.c
===================================================================
RCS file: /CVS/ReactOS/reactos/subsys/win32k/ntddraw/ddraw.c,v
retrieving revision 1.3
diff -u -r1.3 ddraw.c
--- subsys/win32k/ntddraw/ddraw.c 12 Dec 2004 01:40:37 -0000 1.3
+++ subsys/win32k/ntddraw/ddraw.c 30 Dec 2004 13:42:22 -0000
@@ -9,11 +9,7 @@
* 25-10-2003 PB Created
*/
-#include <ddk/ntddk.h>
-#include <win32k/ntddraw.h>
-#include <win32k/win32k.h>
-#include <include/intddraw.h>
-#include <win32k/gdiobj.h>
+#include <w32k.h>
#define NDEBUG
#include <debug.h>
@@ -22,9 +18,11 @@
/* DIRECT DRAW OBJECT */
/************************************************************************/
-BOOL FASTCALL
-DD_Cleanup(PDD_DIRECTDRAW pDD)
+BOOL INTERNAL_CALL
+DD_Cleanup(PVOID ObjectBody)
{
+ PDD_DIRECTDRAW pDD = (PDD_DIRECTDRAW)ObjectBody;
+
pDD->DrvDisableDirectDraw(pDD->Global.dhpdev);
return TRUE;
}
@@ -197,9 +195,10 @@
/* SURFACE OBJECT */
/************************************************************************/
-BOOL FASTCALL
-DDSURF_Cleanup(PDD_SURFACE pDDSurf)
+BOOL INTERNAL_CALL
+DDSURF_Cleanup(PVOID ObjectBody)
{
+ /* PDD_SURFACE pDDSurf = (PDD_SURFACE)ObjectBody; */
//FIXME: implement
return TRUE;
}
Index: subsys/win32k/objects/gdiobj.c
===================================================================
RCS file: /CVS/ReactOS/reactos/subsys/win32k/objects/gdiobj.c,v
retrieving revision 1.83
diff -u -r1.83 gdiobj.c
--- subsys/win32k/objects/gdiobj.c 21 Dec 2004 04:05:18 -0000 1.83
+++ subsys/win32k/objects/gdiobj.c 30 Dec 2004 13:31:28 -0000
@@ -97,8 +97,8 @@
{GDI_OBJECT_TYPE_PEN, sizeof(GDIBRUSHOBJ), GDI_CleanupDummy},
{GDI_OBJECT_TYPE_FONT, sizeof(TEXTOBJ), GDI_CleanupDummy},
{GDI_OBJECT_TYPE_DCE, sizeof(DCE), DCE_Cleanup},
-/*{GDI_OBJECT_TYPE_DIRECTDRAW, sizeof(DD_DIRECTDRAW), DD_Cleanup},
- {GDI_OBJECT_TYPE_DD_SURFACE, sizeof(DD_SURFACE), DDSURF_Cleanup},*/
+ {GDI_OBJECT_TYPE_DIRECTDRAW, sizeof(DD_DIRECTDRAW), DD_Cleanup},
+ {GDI_OBJECT_TYPE_DD_SURFACE, sizeof(DD_SURFACE), DDSURF_Cleanup},
{GDI_OBJECT_TYPE_EXTPEN, 0, GDI_CleanupDummy},
{GDI_OBJECT_TYPE_METADC, 0, GDI_CleanupDummy},
{GDI_OBJECT_TYPE_METAFILE, 0, GDI_CleanupDummy},