--- trunk/reactos/w32api/include/ddk/ddrawi.h 2005-10-14 23:13:08 UTC (rev 18463)
+++ trunk/reactos/w32api/include/ddk/ddrawi.h 2005-10-15 00:09:45 UTC (rev 18464)
@@ -28,10 +28,10 @@
#include <ddraw.h>
#include <dvp.h>
+#include "dmemmgr.h"
#ifndef __DDK_DDRAWINT_H
typedef struct _DDKERNELCAPS *LPDDKERNELCAPS; /* should be in ddkernel.h */
-typedef struct _VMEMHEAP *LPVMEMHEAP; /* should be in dmemmgr.h */
#endif
#define DDAPI WINAPI
@@ -72,11 +72,8 @@
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;
typedef struct _DDRAWI_DIRECTDRAW_INT *LPDDRAWI_DIRECTDRAW_INT;
@@ -154,7 +151,7 @@
LPVMEMHEAP lpHeap;
DWORD dwHeight;
};
-} VIDMEM,*LPVIDMEM;
+} VIDMEM;
@@ -493,9 +490,35 @@
} DDHAL_DDVIDEOPORTCALLBACKS;
+typedef struct _DDHAL_COLORCONTROLDATA *LPDDHAL_COLORCONTROLDATA;
+typedef DWORD (PASCAL *LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA);
+typedef struct _DDHAL_DDCOLORCONTROLCALLBACKS
+{
+ DWORD dwSize;
+ DWORD dwFlags;
+ LPDDHALCOLORCB_COLORCONTROL ColorControl;
+} DDHAL_DDCOLORCONTROLCALLBACKS;
+
+typedef struct _DDHAL_SYNCSURFACEDATA *LPDDHAL_SYNCSURFACEDATA;
+typedef struct _DDHAL_SYNCVIDEOPORTDATA *LPDDHAL_SYNCVIDEOPORTDATA;
+
+typedef DWORD (PASCAL *LPDDHALKERNELCB_SYNCSURFACE)(LPDDHAL_SYNCSURFACEDATA);
+typedef DWORD (PASCAL *LPDDHALKERNELCB_SYNCVIDEOPORT)(LPDDHAL_SYNCVIDEOPORTDATA);
+
+typedef struct _DDHAL_DDKERNELCALLBACKS
+{
+ DWORD dwSize;
+ DWORD dwFlags;
+ LPDDHALKERNELCB_SYNCSURFACE SyncSurfaceData;
+ LPDDHALKERNELCB_SYNCVIDEOPORT SyncVideoPortData;
+} DDHAL_DDKERNELCALLBACKS, *LPDDHAL_DDKERNELCALLBACKS;
+
+
+
+
typedef HRESULT (WINAPI *LPDDGAMMACALIBRATORPROC)(LPDDGAMMARAMP, LPBYTE);
@@ -537,6 +560,13 @@
#define DDHALINFO_GETDRIVERINFOSET 0x00000004
#define DDHALINFO_GETDRIVERINFO2 0x00000008
+#define DDRAWI_VPORTSTART 0x0001
+#define DDRAWI_VPORTSTOP 0x0002
+#define DDRAWI_VPORTUPDATE 0x0003
+
+#define DDRAWI_VPORTGETCOLOR 0x0001
+#define DDRAWI_VPORTSETCOLOR 0x0002
+
/* where the high-level ddraw implementation stores the callbacks */
typedef struct _DDHAL_CALLBACKS {
DDHAL_DDCALLBACKS cbDDCallbacks;
@@ -553,8 +583,8 @@
DDHAL_DDEXEBUFCALLBACKS HELDDExeBuf;
DDHAL_DDVIDEOPORTCALLBACKS cbDDVideoPortCallbacks;
DDHAL_DDVIDEOPORTCALLBACKS HALDDVideoPort;
-// DDHAL_DDCOLORCONTROLCALLBACKS cbDDColorControlCallbacks;
-// DDHAL_DDCOLORCONTROLCALLBACKS HALDDColorControl;
+ DDHAL_DDCOLORCONTROLCALLBACKS cbDDColorControlCallbacks;
+ DDHAL_DDCOLORCONTROLCALLBACKS HALDDColorControl;
DDHAL_DDMISCELLANEOUSCALLBACKS cbDDMiscellaneousCallbacks;
DDHAL_DDMISCELLANEOUSCALLBACKS HALDDMiscellaneous;
// DDHAL_DDKERNELCALLBACKS cbDDKernelCallbacks;
@@ -697,6 +727,7 @@
LPDDHALPALCB_SETENTRIES SetEntries;
} DDHAL_SETENTRIESDATA;
+
typedef struct _DDHAL_CANCREATEVPORTDATA
{
LPDDRAWI_DIRECTDRAW_LCL lpDD;
@@ -828,7 +859,83 @@
LPDDHALVPORTCB_COLORCONTROL ColorControl;
} DDHAL_VPORTCOLORDATA;
+typedef struct _DDHAL_FLIPVPORTDATA
+{
+ LPDDRAWI_DIRECTDRAW_LCL lpDD;
+ LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort;
+ LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr;
+ LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg;
+ HRESULT ddRVal;
+ LPDDHALVPORTCB_FLIP FlipVideoPort;
+} DDHAL_FLIPVPORTDATA;
+typedef struct _DDHAL_GETVPORTCONNECTDATA
+{
+ LPDDRAWI_DIRECTDRAW_LCL lpDD;
+ DWORD dwPortId;
+ LPDDVIDEOPORTCONNECT lpConnect;
+ DWORD dwNumEntries;
+ HRESULT ddRVal;
+ LPDDHALVPORTCB_GETVPORTCONNECT GetVideoPortConnectInfo;
+} DDHAL_GETVPORTCONNECTDATA;
+
+typedef struct _DDHAL_SYNCSURFACEDATA
+{
+ DWORD dwSize;
+ LPDDRAWI_DIRECTDRAW_LCL lpDD;
+ LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
+ DWORD dwSurfaceOffset;
+ ULONG_PTR fpLockPtr;
+ LONG lPitch;
+ DWORD dwOverlayOffset;
+ DWORD dwOverlaySrcWidth;
+ DWORD dwOverlaySrcHeight;
+ DWORD dwOverlayDestWidth;
+ DWORD dwOverlayDestHeight;
+ ULONG_PTR dwDriverReserved1;
+ ULONG_PTR dwDriverReserved2;
+ ULONG_PTR dwDriverReserved3;
+ HRESULT ddRVal;
+} DDHAL_SYNCSURFACEDATA;
+
+typedef struct _DDHAL_SYNCVIDEOPORTDATA
+{
+ DWORD dwSize;
+ LPDDRAWI_DIRECTDRAW_LCL lpDD;
+ LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort;
+ DWORD dwOriginOffset;
+ DWORD dwHeight;
+ DWORD dwVBIHeight;
+ ULONG_PTR dwDriverReserved1;
+ ULONG_PTR dwDriverReserved2;
+ ULONG_PTR dwDriverReserved3;
+ HRESULT ddRVal;
+} DDHAL_SYNCVIDEOPORTDATA;
+
+typedef struct _DDHAL_DESTROYDDLOCALDATA
+{
+ DWORD dwFlags;
+ LPDDRAWI_DIRECTDRAW_LCL pDDLcl;
+ HRESULT ddRVal;
+} DDHAL_DESTROYDDLOCALDATA;
+
+typedef struct _DDHAL_CREATESURFACEEXDATA {
+ DWORD dwFlags;
+ LPDDRAWI_DIRECTDRAW_LCL lpDDLcl;
+ LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl;
+ HRESULT ddRVal;
+} DDHAL_CREATESURFACEEXDATA;
+
+typedef struct _DDHAL_GETHEAPALIGNMENTDATA
+{
+ ULONG_PTR dwInstance;
+ DWORD dwHeap;
+ HRESULT ddRVal;
+ LPDDHAL_GETHEAPALIGNMENT GetHeapAlignment;
+ HEAPALIGNMENT Alignment;
+} DDHAL_GETHEAPALIGNMENTDATA;
+
+
/*****************************************************************************
* high-level ddraw implementation structures
*/
@@ -934,12 +1041,15 @@
#define DDRAWILCL_CURSORCLIPPED 0x00001000
#define DDRAWILCL_EXPLICITMONITOR 0x00002000
#define DDRAWILCL_MULTITHREADED 0x00004000
-#define DDRAWILCL_FPUSETUP 0x00008000
+#define DDRAWILCL_FPUSETUP 0x00008000
#define DDRAWILCL_POWEREDDOWN 0x00010000
#define DDRAWILCL_DIRECTDRAW7 0x00020000
#define DDRAWILCL_ATTEMPTEDD3DCONTEXT 0x00040000
#define DDRAWILCL_FPUPRESERVE 0x00080000
+#define DDRAWILCL_DX8DRIVER 0x00100000
+#define DDRAWILCL_DIRECTDRAW8 0x00200000
+
typedef struct _DDRAWI_DIRECTDRAW_GBL {
DWORD dwRefCnt;
DWORD dwFlags;
@@ -1017,16 +1127,38 @@
DDSCAPSEX ddsCapsMore;
} DDRAWI_DIRECTDRAW_GBL;
-#define DDRAWI_VIRTUALDESKTOP 0x00000008
-#define DDRAWI_MODEX 0x00000010
-#define DDRAWI_DISPLAYDRV 0x00000020
-#define DDRAWI_FULLSCREEN 0x00000040
-#define DDRAWI_MODECHANGED 0x00000080
-#define DDRAWI_NOHARDWARE 0x00000100
-#define DDRAWI_PALETTEINIT 0x00000200
-#define DDRAWI_NOEMULATION 0x00000400
-/* more... */
+#define DDRAWI_xxxxxxxxx1 0x00000001
+#define DDRAWI_xxxxxxxxx2 0x00000002
+#define DDRAWI_VIRTUALDESKTOP 0x00000008
+#define DDRAWI_MODEX 0x00000010
+#define DDRAWI_DISPLAYDRV 0x00000020
+#define DDRAWI_FULLSCREEN 0x00000040
+#define DDRAWI_MODECHANGED 0x00000080
+#define DDRAWI_NOHARDWARE 0x00000100
+#define DDRAWI_PALETTEINIT 0x00000200
+#define DDRAWI_NOEMULATION 0x00000400
+#define DDRAWI_HASCKEYDESTOVERLAY 0x00000800
+#define DDRAWI_HASCKEYSRCOVERLAY 0x00001000
+#define DDRAWI_HASGDIPALETTE 0x00002000
+#define DDRAWI_EMULATIONINITIALIZED 0x00004000
+#define DDRAWI_HASGDIPALETTE_EXCLUSIVE 0x00008000
+#define DDRAWI_MODEXILLEGAL 0x00010000
+#define DDRAWI_FLIPPEDTOGDI 0x00020000
+#define DDRAWI_NEEDSWIN16FORVRAMLOCK 0x00040000
+#define DDRAWI_PDEVICEVRAMBITCLEARED 0x00080000
+#define DDRAWI_STANDARDVGA 0x00100000
+#define DDRAWI_EXTENDEDALIGNMENT 0x00200000
+#define DDRAWI_CHANGINGMODE 0x00400000
+#define DDRAWI_GDIDRV 0x00800000
+#define DDRAWI_ATTACHEDTODESKTOP 0x01000000
+#define DDRAWI_UMODELOADED 0x02000000
+#define DDRAWI_DDRAWDATANOTFETCHED 0x04000000
+#define DDRAWI_SECONDARYDRIVERLOADED 0x08000000
+#define DDRAWI_TESTINGMODES 0x10000000
+#define DDRAWI_DRIVERINFO2 0x20000000
+#define DDRAWI_BADPDEV 0x40000000
+
/* surfaces */
typedef struct _DDRAWI_DDRAWSURFACE_INT {
LPVOID lpVtbl;
@@ -1040,55 +1172,58 @@
DWORD dwGlobalFlags;
union {
LPACCESSRECTLIST lpRectList;
- DWORD dwBlockSizeY;
- } DUMMYUNIONNAME1;
+ DWORD dwBlockSizeY;
+ LONG lSlicePitch;
+ };
union {
LPVMEMHEAP lpVidMemHeap;
DWORD dwBlockSizeX;
- } DUMMYUNIONNAME2;
+ };
union {
LPDDRAWI_DIRECTDRAW_GBL lpDD;
LPVOID lpDDHandle;
- } DUMMYUNIONNAME3;
+ };
FLATPTR fpVidMem;
union {
LONG lPitch;
DWORD dwLinearSize;
- } DUMMYUNIONNAME4;
+ };
WORD wHeight;
WORD wWidth;
DWORD dwUsageCount;
- ULONG_PTR dwReserved1; /* for display driver use */
- /* optional (defaults to primary surface pixelformat) */
+ ULONG_PTR dwReserved1;
DDPIXELFORMAT ddpfSurface;
} DDRAWI_DDRAWSURFACE_GBL;
-#define DDRAWISURFGBL_MEMFREE 0x00000001L
-#define DDRAWISURFGBL_SYSMEMREQUESTED 0x00000002L
-#define DDRAWISURFGBL_ISGDISURFACE 0x00000004L
-#define DDRAWISURFGBL_SOFTWAREAUTOFLIP 0x00000008L
-#define DDRAWISURFGBL_LOCKNOTHOLDINGWIN16LOCK 0x00000010L
-#define DDRAWISURFGBL_LOCKVRAMSTYLE 0x00000020L
-#define DDRAWISURFGBL_LOCKBROKEN 0x00000040L
-#define DDRAWISURFGBL_IMPLICITHANDLE 0x00000080L
-#define DDRAWISURFGBL_ISCLIENTMEM 0x00000100L
-#define DDRAWISURFGBL_HARDWAREOPSOURCE 0x00000200L
-#define DDRAWISURFGBL_HARDWAREOPDEST 0x00000400L
-#define DDRAWISURFGBL_HARDWAREOPSTARTED 0x00000600L
-#define DDRAWISURFGBL_VPORTINTERLEAVED 0x00000800L
-#define DDRAWISURFGBL_VPORTDATA 0x00001000L
-#define DDRAWISURFGBL_LATEALLOCATELINEAR 0x00002000L
-#define DDRAWISURFGBL_SYSMEMEXECUTEBUFFER 0x00004000L
-#define DDRAWISURFGBL_FASTLOCKHELD 0x00008000L
-#define DDRAWISURFGBL_READONLYLOCKHELD 0x00010000L
-#define DDRAWISURFGBL_NOTIFYWHENUNLOCKED 0x00200000L
+#define DDRAWISURFGBL_MEMFREE 0x00000001L
+#define DDRAWISURFGBL_SYSMEMREQUESTED 0x00000002L
+#define DDRAWISURFGBL_ISGDISURFACE 0x00000004L
+#define DDRAWISURFGBL_SOFTWAREAUTOFLIP 0x00000008L
+#define DDRAWISURFGBL_LOCKNOTHOLDINGWIN16LOCK 0x00000010L
+#define DDRAWISURFGBL_LOCKVRAMSTYLE 0x00000020L
+#define DDRAWISURFGBL_LOCKBROKEN 0x00000040L
+#define DDRAWISURFGBL_IMPLICITHANDLE 0x00000080L
+#define DDRAWISURFGBL_ISCLIENTMEM 0x00000100L
+#define DDRAWISURFGBL_HARDWAREOPSOURCE 0x00000200L
+#define DDRAWISURFGBL_HARDWAREOPDEST 0x00000400L
+#define DDRAWISURFGBL_HARDWAREOPSTARTED (DDRAWISURFGBL_HARDWAREOPSOURCE|DDRAWISURFGBL_HARDWAREOPDEST)
+#define DDRAWISURFGBL_VPORTINTERLEAVED 0x00000800L
+#define DDRAWISURFGBL_VPORTDATA 0x00001000L
+#define DDRAWISURFGBL_LATEALLOCATELINEAR 0x00002000L
+#define DDRAWISURFGBL_SYSMEMEXECUTEBUFFER 0x00004000L
+#define DDRAWISURFGBL_FASTLOCKHELD 0x00008000L
+#define DDRAWISURFGBL_READONLYLOCKHELD 0x00010000L
+#define DDRAWISURFGBL_DX8SURFACE 0x00080000L
+#define DDRAWISURFGBL_DDHELDONTFREE 0x00100000L
+#define DDRAWISURFGBL_NOTIFYWHENUNLOCKED 0x00200000L
+#define DDRAWISURFGBL_RESERVED0 0x80000000L // Reserved flag
typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE {
DWORD dwSize;
union {
DWORD dwPhysicalPageTable;
FLATPTR fpPhysicalVidMem;
- } DUMMYUNIONNAME1;
+ };
LPDWORD pPageTable;
DWORD cPages;
ULONG_PTR dwSavedDCContext;
@@ -1114,6 +1249,9 @@
#define GET_LPDDRAWSURFACE_GBL_MORE(psurf_gbl) \
(*(((LPDDRAWI_DDRAWSURFACE_GBL_MORE *)(psurf_gbl)) - 1))
+
+
+
#ifndef _NO_COM
typedef struct _DDRAWI_DDRAWSURFACE_MORE {
DWORD dwSize;
@@ -1241,7 +1379,7 @@
#define DDRAWISURF_HW_CKEYDESTBLT 0x00200000L
#define DDRAWISURF_HW_CKEYSRCOVERLAY 0x00400000L
#define DDRAWISURF_HW_CKEYSRCBLT 0x00800000L
-#define DDRAWISURF_INMASTERSPRITELIST 0x01000000l
+#define DDRAWISURF_INMASTERSPRITELIST 0x01000000L
#define DDRAWISURF_HELCB 0x02000000L
#define DDRAWISURF_FRONTBUFFER 0x04000000L
#define DDRAWISURF_BACKBUFFER 0x08000000L
@@ -1320,8 +1458,8 @@
typedef struct _DDHAL_RENDERMOCOMPDATA FAR *LPDDHAL_RENDERMOCOMPDATA;
typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA FAR *LPDDHAL_QUERYMOCOMPSTATUSDATA;
typedef struct _DDHAL_DESTROYMOCOMPDATA FAR *LPDDHAL_DESTROYMOCOMPDATA;
-typedef struct _DDHAL_COLORCONTROLDATA FAR *LPDDHAL_COLORCONTROLDATA;
+
typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETGUIDS)( LPDDHAL_GETMOCOMPGUIDSDATA);
typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETFORMATS)( LPDDHAL_GETMOCOMPFORMATSDATA);
typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_CREATE)( LPDDHAL_CREATEMOCOMPDATA);
@@ -1332,8 +1470,8 @@
typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_RENDER)( LPDDHAL_RENDERMOCOMPDATA);
typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_QUERYSTATUS)( LPDDHAL_QUERYMOCOMPSTATUSDATA);
typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_DESTROY)( LPDDHAL_DESTROYMOCOMPDATA);
-typedef DWORD (FAR PASCAL *LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA);
+
typedef struct _DDMCCOMPBUFFERINFO
{
DWORD dwSize; // [in] size of the struct