xref: /reactos/sdk/include/psdk/ddrawint.h (revision c2c66aff)
1 /*
2  * ddrawint.h
3  *
4  * DirectDraw NT driver interface
5  *
6  * Contributors:
7  *   Created by Ge van Geldorp
8  *
9  * THIS SOFTWARE IS NOT COPYRIGHTED
10  *
11  * This source code is offered for use in the public domain. You may
12  * use, modify or distribute it freely.
13  *
14  * This code is distributed in the hope that it will be useful but
15  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
16  * DISCLAIMED. This includes but is not limited to warranties of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18  *
19  */
20 
21 #ifndef __DD_INCLUDED__
22 #define __DD_INCLUDED__
23 
24 DEFINE_GUID( GUID_MiscellaneousCallbacks,  0xEFD60CC0, 0x49e7, 0x11d0, 0x88, 0x9d, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x6a);
25 DEFINE_GUID( GUID_Miscellaneous2Callbacks, 0x406B2F00, 0x3E5A, 0x11D1, 0xB6, 0x40, 0x00, 0xAA, 0x00, 0xA1, 0xF9, 0x6A);
26 DEFINE_GUID( GUID_VideoPortCallbacks,      0xefd60cc1, 0x49e7, 0x11d0, 0x88, 0x9d, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x6a);
27 DEFINE_GUID( GUID_ColorControlCallbacks,   0xefd60cc2, 0x49e7, 0x11d0, 0x88, 0x9d, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x6a);
28 DEFINE_GUID( GUID_MotionCompCallbacks,     0xb1122b40, 0x5dA5, 0x11d1, 0x8f, 0xcF, 0x00, 0xc0, 0x4f, 0xc2, 0x9b, 0x4e);
29 DEFINE_GUID( GUID_VideoPortCaps,           0xefd60cc3, 0x49e7, 0x11d0, 0x88, 0x9d, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x6a);
30 DEFINE_GUID( GUID_D3DCaps,                 0x7bf06991, 0x8794, 0x11d0, 0x91, 0x39, 0x08, 0x00, 0x36, 0xd2, 0xef, 0x02);
31 DEFINE_GUID( GUID_D3DExtendedCaps,         0x7de41f80, 0x9d93, 0x11d0, 0x89, 0xab, 0x00, 0xa0, 0xc9, 0x05, 0x41, 0x29);
32 DEFINE_GUID( GUID_D3DCallbacks,            0x7bf06990, 0x8794, 0x11d0, 0x91, 0x39, 0x08, 0x00, 0x36, 0xd2, 0xef, 0x02);
33 DEFINE_GUID( GUID_D3DCallbacks2,           0xba584e1, 0x70b6, 0x11d0, 0x88, 0x9d, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x6a);
34 DEFINE_GUID( GUID_D3DCallbacks3,           0xddf41230, 0xec0a, 0x11d0, 0xa9, 0xb6, 0x00, 0xaa, 0x00, 0xc0, 0x99, 0x3e);
35 DEFINE_GUID( GUID_NonLocalVidMemCaps,      0x86c4fa80, 0x8d84, 0x11d0, 0x94, 0xe8, 0x00, 0xc0, 0x4f, 0xc3, 0x41, 0x37);
36 DEFINE_GUID( GUID_KernelCallbacks,         0x80863800, 0x6B06, 0x11D0, 0x9B, 0x06, 0x0, 0xA0, 0xC9, 0x03, 0xA3, 0xB8);
37 DEFINE_GUID( GUID_KernelCaps,              0xFFAA7540, 0x7AA8, 0x11D0, 0x9B, 0x06, 0x00, 0xA0, 0xC9, 0x03, 0xA3, 0xB8);
38 DEFINE_GUID( GUID_ZPixelFormats,           0x93869880, 0x36cf, 0x11d1, 0x9b, 0x1b, 0x0, 0xaa, 0x0, 0xbb, 0xb8, 0xae);
39 DEFINE_GUID( GUID_DDMoreCaps,              0x880baf30, 0xb030, 0x11d0, 0x8e, 0xa7, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b);
40 DEFINE_GUID( GUID_D3DParseUnknownCommandCallback, 0x2e04ffa0, 0x98e4, 0x11d1, 0x8c, 0xe1, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
41 DEFINE_GUID( GUID_NTCallbacks,             0x6fe9ecde, 0xdf89, 0x11d1, 0x9d, 0xb0, 0x00, 0x60, 0x08, 0x27, 0x71, 0xba);
42 DEFINE_GUID( GUID_DDMoreSurfaceCaps,       0x3b8a0466, 0xf269, 0x11d1, 0x88, 0x0b, 0x0, 0xc0, 0x4f, 0xd9, 0x30, 0xc5);
43 DEFINE_GUID( GUID_GetHeapAlignment,        0x42e02f16, 0x7b41, 0x11d2, 0x8b, 0xff, 0x0, 0xa0, 0xc9, 0x83, 0xea, 0xf6);
44 DEFINE_GUID( GUID_UpdateNonLocalHeap,      0x42e02f17, 0x7b41, 0x11d2, 0x8b, 0xff, 0x0, 0xa0, 0xc9, 0x83, 0xea, 0xf6);
45 DEFINE_GUID( GUID_NTPrivateDriverCaps,     0xfad16a23, 0x7b66, 0x11d2, 0x83, 0xd7, 0x0, 0xc0, 0x4f, 0x7c, 0xe5, 0x8c);
46 DEFINE_GUID( GUID_DDStereoMode,            0xf828169c, 0xa8e8, 0x11d2, 0xa1, 0xf2, 0x0, 0xa0, 0xc9, 0x83, 0xea, 0xf6);
47 DEFINE_GUID( GUID_VPE2Callbacks,           0x52882147, 0x2d47, 0x469a, 0xa0, 0xd1, 0x3, 0x45, 0x58, 0x90, 0xf6, 0xc8);
48 
49 
50 #ifndef GUID_DEFS_ONLY
51 
52 #ifndef _NO_DDRAWINT_NO_COM
53 #ifndef _NO_COM
54 #define _NO_COM
55 #include <ddraw.h>
56 #include <dvp.h>
57 #undef _NO_COM
58 #else
59 #include <ddraw.h>
60 #include <dvp.h>
61 #endif
62 #else
63 #include <ddraw.h>
64 #include <dvp.h>
65 #endif
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 #ifndef MAKE_HRESULT // fixme this if statment should not be here, but MAKE_HRESULT should be here
72 #define MAKE_HRESULT(sev,fac,code) ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
73 #endif
74 
75 #ifndef FLATPTR_DEFINED
76 typedef ULONG_PTR FLATPTR;
77 #define FLATPTR_DEFINED
78 #endif
79 
80 typedef struct _DD_VIDEOPORT_LOCAL   *PDD_VIDEOPORT_LOCAL;
81 
82 /************************************************************************/
83 /* _DD_GETHEAPALIGNMENTDATA is defined in dmemmgr.h                     */
84  /************************************************************************/
85 struct _DD_GETHEAPALIGNMENTDATA;
86 #ifndef DD_GETHEAPALIGNMENTDATA_DECLARED
87 typedef struct _DD_GETHEAPALIGNMENTDATA *PDD_GETHEAPALIGNMENTDATA;
88 #define DD_GETHEAPALIGNMENTDATA_DECLARED
89 #endif
90 
91 /************************************************************************/
92 /* Video memory info structures                                         */
93 /************************************************************************/
94 
95 typedef struct _VIDEOMEMORY {
96   DWORD dwFlags;
97   FLATPTR fpStart;
98   __GNU_EXTENSION union {
99     FLATPTR fpEnd;
100     DWORD dwWidth;
101   };
102   DDSCAPS ddsCaps;
103   DDSCAPS ddsCapsAlt;
104   __GNU_EXTENSION union {
105     struct _VMEMHEAP *lpHeap;
106     DWORD dwHeight;
107   };
108 } VIDEOMEMORY, *PVIDEOMEMORY;
109 
110 typedef struct _VIDEOMEMORYINFO {
111   FLATPTR fpPrimary;
112   DWORD dwFlags;
113   DWORD dwDisplayWidth;
114   DWORD dwDisplayHeight;
115   LONG lDisplayPitch;
116   DDPIXELFORMAT ddpfDisplay;
117   DWORD dwOffscreenAlign;
118   DWORD dwOverlayAlign;
119   DWORD dwTextureAlign;
120   DWORD dwZBufferAlign;
121   DWORD dwAlphaAlign;
122   PVOID pvPrimary;
123 } VIDEOMEMORYINFO, *LPVIDEOMEMORYINFO;
124 
125 typedef struct _DD_DIRECTDRAW_GLOBAL {
126   PVOID dhpdev;
127   ULONG_PTR dwReserved1;
128   ULONG_PTR dwReserved2;
129   LPDDVIDEOPORTCAPS lpDDVideoPortCaps;
130 } DD_DIRECTDRAW_GLOBAL, *PDD_DIRECTDRAW_GLOBAL;
131 
132 typedef struct _DD_DIRECTDRAW_LOCAL {
133   PDD_DIRECTDRAW_GLOBAL lpGbl;
134 } DD_DIRECTDRAW_LOCAL, *PDD_DIRECTDRAW_LOCAL;
135 
136 typedef struct _DD_SURFACE_GLOBAL {
137   __GNU_EXTENSION union {
138     DWORD dwBlockSizeY;
139     LONG lSlicePitch;
140   };
141   __GNU_EXTENSION union {
142     PVIDEOMEMORY lpVidMemHeap;
143     DWORD dwBlockSizeX;
144     DWORD dwUserMemSize;
145   };
146   FLATPTR fpVidMem;
147   __GNU_EXTENSION union {
148     LONG lPitch;
149     DWORD dwLinearSize;
150   };
151   LONG yHint;
152   LONG xHint;
153   DWORD wHeight;
154   DWORD wWidth;
155   ULONG_PTR dwReserved1;
156   DDPIXELFORMAT ddpfSurface;
157   FLATPTR fpHeapOffset;
158   HANDLE hCreatorProcess;
159 } DD_SURFACE_GLOBAL, *PDD_SURFACE_GLOBAL;
160 
161 typedef struct _DD_SURFACE_MORE {
162   DWORD dwMipMapCount;
163   PDD_VIDEOPORT_LOCAL lpVideoPort;
164   DWORD dwOverlayFlags;
165   DDSCAPSEX ddsCapsEx;
166   DWORD dwSurfaceHandle;
167 } DD_SURFACE_MORE, *PDD_SURFACE_MORE;
168 
169 typedef struct _DD_ATTACHLIST *PDD_ATTACHLIST;
170 
171 typedef struct _DD_SURFACE_LOCAL {
172   PDD_SURFACE_GLOBAL lpGbl;
173   DWORD dwFlags;
174   DDSCAPS ddsCaps;
175   ULONG_PTR dwReserved1;
176   __GNU_EXTENSION union {
177     DDCOLORKEY ddckCKSrcOverlay;
178     DDCOLORKEY ddckCKSrcBlt;
179   };
180   __GNU_EXTENSION union {
181     DDCOLORKEY ddckCKDestOverlay;
182     DDCOLORKEY ddckCKDestBlt;
183   };
184   PDD_SURFACE_MORE lpSurfMore;
185   PDD_ATTACHLIST lpAttachList;
186   PDD_ATTACHLIST lpAttachListFrom;
187   RECT rcOverlaySrc;
188 } DD_SURFACE_LOCAL, *PDD_SURFACE_LOCAL;
189 
190 typedef struct _DD_ATTACHLIST {
191   PDD_ATTACHLIST lpLink;
192   PDD_SURFACE_LOCAL lpAttached;
193 } DD_ATTACHLIST;
194 
195 typedef struct _DD_SURFACE_INT {
196   PDD_SURFACE_LOCAL lpLcl;
197 } DD_SURFACE_INT, *PDD_SURFACE_INT;
198 
199 /************************************************************************/
200 /* DDI representation of the DirectDrawPalette object                   */
201 /************************************************************************/
202 
203 typedef struct _DD_PALETTE_GLOBAL {
204   ULONG_PTR Reserved1;
205 } DD_PALETTE_GLOBAL, *PDD_PALETTE_GLOBAL;
206 
207 /************************************************************************/
208 /* DDI representation of the DirectDrawVideo object                     */
209 /************************************************************************/
210 
211 typedef struct {
212   PDD_DIRECTDRAW_LOCAL lpDD;
213   GUID guid;
214   DWORD dwUncompWidth;
215   DWORD dwUncompHeight;
216   DDPIXELFORMAT ddUncompPixelFormat;
217   DWORD dwDriverReserved1;
218   DWORD dwDriverReserved2;
219   DWORD dwDriverReserved3;
220   LPVOID lpDriverReserved1;
221   LPVOID lpDriverReserved2;
222   LPVOID lpDriverReserved3;
223 } DD_MOTIONCOMP_LOCAL, *PDD_MOTIONCOMP_LOCAL;
224 
225 typedef struct _DD_VIDEOPORT_LOCAL {
226   PDD_DIRECTDRAW_LOCAL lpDD;
227   DDVIDEOPORTDESC ddvpDesc;
228   DDVIDEOPORTINFO ddvpInfo;
229   PDD_SURFACE_INT lpSurface;
230   PDD_SURFACE_INT lpVBISurface;
231   DWORD dwNumAutoflip;
232   DWORD dwNumVBIAutoflip;
233   ULONG_PTR dwReserved1;
234   ULONG_PTR dwReserved2;
235   ULONG_PTR dwReserved3;
236 } DD_VIDEOPORT_LOCAL;
237 
238 /************************************************************************/
239 /* IDirectDrawSurface callbacks                                         */
240 /************************************************************************/
241 
242 typedef struct _DD_LOCKDATA {
243   PDD_DIRECTDRAW_GLOBAL lpDD;
244   PDD_SURFACE_LOCAL lpDDSurface;
245   DWORD bHasRect;
246   RECTL rArea;
247   LPVOID lpSurfData;
248   HRESULT ddRVal;
249   PVOID Lock;
250   DWORD dwFlags;
251   FLATPTR fpProcess;
252 } DD_LOCKDATA, *PDD_LOCKDATA;
253 typedef DWORD (WINAPI *PDD_SURFCB_LOCK)(PDD_LOCKDATA);
254 
255 typedef struct _DD_UNLOCKDATA {
256   PDD_DIRECTDRAW_GLOBAL lpDD;
257   PDD_SURFACE_LOCAL lpDDSurface;
258   HRESULT ddRVal;
259   PVOID Unlock;
260 } DD_UNLOCKDATA, *PDD_UNLOCKDATA;
261 typedef DWORD (WINAPI *PDD_SURFCB_UNLOCK)(PDD_UNLOCKDATA);
262 
263 #define DDABLT_SRCOVERDEST        0x00000001
264 #define DDBLT_AFLAGS              0x80000000
265 
266 typedef struct _DD_BLTDATA {
267   PDD_DIRECTDRAW_GLOBAL lpDD;
268   PDD_SURFACE_LOCAL lpDDDestSurface;
269   RECTL rDest;
270   PDD_SURFACE_LOCAL lpDDSrcSurface;
271   RECTL rSrc;
272   DWORD dwFlags;
273   DWORD dwROPFlags;
274   DDBLTFX bltFX;
275   HRESULT ddRVal;
276   PVOID Blt;
277   BOOL IsClipped;
278   RECTL rOrigDest;
279   RECTL rOrigSrc;
280   DWORD dwRectCnt;
281   LPRECT prDestRects;
282   DWORD dwAFlags;
283   DDARGB ddargbScaleFactors;
284 } DD_BLTDATA, *PDD_BLTDATA;
285 typedef DWORD (WINAPI *PDD_SURFCB_BLT)(PDD_BLTDATA);
286 
287 typedef struct _DD_UPDATEOVERLAYDATA {
288   PDD_DIRECTDRAW_GLOBAL lpDD;
289   PDD_SURFACE_LOCAL lpDDDestSurface;
290   RECTL rDest;
291   PDD_SURFACE_LOCAL lpDDSrcSurface;
292   RECTL rSrc;
293   DWORD dwFlags;
294   DDOVERLAYFX overlayFX;
295   HRESULT ddRVal;
296   PVOID UpdateOverlay;
297 } DD_UPDATEOVERLAYDATA, *PDD_UPDATEOVERLAYDATA;
298 typedef DWORD (WINAPI *PDD_SURFCB_UPDATEOVERLAY)(PDD_UPDATEOVERLAYDATA);
299 
300 typedef struct _DD_SETOVERLAYPOSITIONDATA {
301   PDD_DIRECTDRAW_GLOBAL lpDD;
302   PDD_SURFACE_LOCAL lpDDSrcSurface;
303   PDD_SURFACE_LOCAL lpDDDestSurface;
304   LONG lXPos;
305   LONG lYPos;
306   HRESULT ddRVal;
307   PVOID SetOverlayPosition;
308 } DD_SETOVERLAYPOSITIONDATA, *PDD_SETOVERLAYPOSITIONDATA;
309 typedef DWORD (WINAPI *PDD_SURFCB_SETOVERLAYPOSITION)(PDD_SETOVERLAYPOSITIONDATA);
310 
311 typedef struct _DD_SETPALETTEDATA {
312   PDD_DIRECTDRAW_GLOBAL lpDD;
313   PDD_SURFACE_LOCAL lpDDSurface;
314   PDD_PALETTE_GLOBAL lpDDPalette;
315   HRESULT ddRVal;
316   PVOID SetPalette;
317   BOOL Attach;
318 } DD_SETPALETTEDATA, *PDD_SETPALETTEDATA;
319 typedef DWORD (WINAPI *PDD_SURFCB_SETPALETTE)(PDD_SETPALETTEDATA);
320 
321 typedef struct _DD_FLIPDATA {
322   PDD_DIRECTDRAW_GLOBAL lpDD;
323   PDD_SURFACE_LOCAL lpSurfCurr;
324   PDD_SURFACE_LOCAL lpSurfTarg;
325   DWORD dwFlags;
326   HRESULT ddRVal;
327   PVOID Flip;
328   PDD_SURFACE_LOCAL lpSurfCurrLeft;
329   PDD_SURFACE_LOCAL lpSurfTargLeft;
330 } DD_FLIPDATA, *PDD_FLIPDATA;
331 typedef DWORD (WINAPI *PDD_SURFCB_FLIP)(PDD_FLIPDATA);
332 
333 typedef struct _DD_DESTROYSURFACEDATA {
334   PDD_DIRECTDRAW_GLOBAL lpDD;
335   PDD_SURFACE_LOCAL lpDDSurface;
336   HRESULT ddRVal;
337   PVOID DestroySurface;
338 } DD_DESTROYSURFACEDATA, *PDD_DESTROYSURFACEDATA;
339 typedef DWORD (WINAPI *PDD_SURFCB_DESTROYSURFACE)(PDD_DESTROYSURFACEDATA);
340 
341 typedef struct _DD_SETCLIPLISTDATA {
342   PDD_DIRECTDRAW_GLOBAL lpDD;
343   PDD_SURFACE_LOCAL lpDDSurface;
344   HRESULT ddRVal;
345   PVOID SetClipList;
346 } DD_SETCLIPLISTDATA, *PDD_SETCLIPLISTDATA;
347 typedef DWORD (WINAPI *PDD_SURFCB_SETCLIPLIST)(PDD_SETCLIPLISTDATA);
348 
349 typedef struct _DD_ADDATTACHEDSURFACEDATA {
350   PDD_DIRECTDRAW_GLOBAL lpDD;
351   PDD_SURFACE_LOCAL lpDDSurface;
352   PDD_SURFACE_LOCAL lpSurfAttached;
353   HRESULT ddRVal;
354   PVOID AddAttachedSurface;
355 } DD_ADDATTACHEDSURFACEDATA, *PDD_ADDATTACHEDSURFACEDATA;
356 typedef DWORD (WINAPI *PDD_SURFCB_ADDATTACHEDSURFACE)(PDD_ADDATTACHEDSURFACEDATA);
357 
358 typedef struct _DD_SETCOLORKEYDATA {
359   PDD_DIRECTDRAW_GLOBAL lpDD;
360   PDD_SURFACE_LOCAL lpDDSurface;
361   DWORD dwFlags;
362   DDCOLORKEY ckNew;
363   HRESULT ddRVal;
364   PVOID SetColorKey;
365 } DD_SETCOLORKEYDATA, *PDD_SETCOLORKEYDATA;
366 typedef DWORD (WINAPI *PDD_SURFCB_SETCOLORKEY)(PDD_SETCOLORKEYDATA);
367 
368 typedef struct _DD_GETBLTSTATUSDATA {
369   PDD_DIRECTDRAW_GLOBAL lpDD;
370   PDD_SURFACE_LOCAL lpDDSurface;
371   DWORD dwFlags;
372   HRESULT ddRVal;
373   PVOID GetBltStatus;
374 } DD_GETBLTSTATUSDATA, *PDD_GETBLTSTATUSDATA;
375 typedef DWORD (WINAPI *PDD_SURFCB_GETBLTSTATUS)(PDD_GETBLTSTATUSDATA);
376 
377 typedef struct _DD_GETFLIPSTATUSDATA {
378   PDD_DIRECTDRAW_GLOBAL lpDD;
379   PDD_SURFACE_LOCAL lpDDSurface;
380   DWORD dwFlags;
381   HRESULT ddRVal;
382   PVOID GetFlipStatus;
383 } DD_GETFLIPSTATUSDATA, *PDD_GETFLIPSTATUSDATA;
384 typedef DWORD (WINAPI *PDD_SURFCB_GETFLIPSTATUS)(PDD_GETFLIPSTATUSDATA);
385 
386 typedef struct DD_SURFACECALLBACKS {
387   DWORD dwSize;
388   DWORD dwFlags;
389   PDD_SURFCB_DESTROYSURFACE DestroySurface;
390   PDD_SURFCB_FLIP Flip;
391   PDD_SURFCB_SETCLIPLIST SetClipList;
392   PDD_SURFCB_LOCK Lock;
393   PDD_SURFCB_UNLOCK Unlock;
394   PDD_SURFCB_BLT Blt;
395   PDD_SURFCB_SETCOLORKEY SetColorKey;
396   PDD_SURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
397   PDD_SURFCB_GETBLTSTATUS GetBltStatus;
398   PDD_SURFCB_GETFLIPSTATUS GetFlipStatus;
399   PDD_SURFCB_UPDATEOVERLAY UpdateOverlay;
400   PDD_SURFCB_SETOVERLAYPOSITION SetOverlayPosition;
401   PVOID reserved4;
402   PDD_SURFCB_SETPALETTE SetPalette;
403 } DD_SURFACECALLBACKS, *PDD_SURFACECALLBACKS;
404 
405 #define DDHAL_SURFCB32_DESTROYSURFACE       0x00000001
406 #define DDHAL_SURFCB32_FLIP                 0x00000002
407 #define DDHAL_SURFCB32_SETCLIPLIST          0x00000004
408 #define DDHAL_SURFCB32_LOCK                 0x00000008
409 #define DDHAL_SURFCB32_UNLOCK               0x00000010
410 #define DDHAL_SURFCB32_BLT                  0x00000020
411 #define DDHAL_SURFCB32_SETCOLORKEY          0x00000040
412 #define DDHAL_SURFCB32_ADDATTACHEDSURFACE   0x00000080
413 #define DDHAL_SURFCB32_GETBLTSTATUS         0x00000100
414 #define DDHAL_SURFCB32_GETFLIPSTATUS        0x00000200
415 #define DDHAL_SURFCB32_UPDATEOVERLAY        0x00000400
416 #define DDHAL_SURFCB32_SETOVERLAYPOSITION   0x00000800
417 #define DDHAL_SURFCB32_RESERVED4            0x00001000
418 #define DDHAL_SURFCB32_SETPALETTE           0x00002000
419 
420 /************************************************************************/
421 /* IDirectDraw callbacks                                                */
422 /************************************************************************/
423 
424 typedef struct _DD_CREATESURFACEDATA {
425   PDD_DIRECTDRAW_GLOBAL lpDD;
426   DDSURFACEDESC *lpDDSurfaceDesc;
427   PDD_SURFACE_LOCAL *lplpSList;
428   DWORD dwSCnt;
429   HRESULT ddRVal;
430   PVOID CreateSurface;
431 } DD_CREATESURFACEDATA, *PDD_CREATESURFACEDATA;
432 typedef DWORD (WINAPI *PDD_CREATESURFACE)(PDD_CREATESURFACEDATA);
433 
434 typedef struct _DD_DRVSETCOLORKEYDATA {
435   PDD_SURFACE_LOCAL lpDDSurface;
436   DWORD dwFlags;
437   DDCOLORKEY ckNew;
438   HRESULT ddRVal;
439   PVOID SetColorKey;
440 } DD_DRVSETCOLORKEYDATA, *PDD_DRVSETCOLORKEYDATA;
441 typedef DWORD (WINAPI *PDD_SETCOLORKEY)(PDD_DRVSETCOLORKEYDATA);
442 
443 #define DDWAITVB_I_TESTVB    0x80000006
444 
445 typedef struct _DD_WAITFORVERTICALBLANKDATA {
446   PDD_DIRECTDRAW_GLOBAL lpDD;
447   DWORD dwFlags;
448   DWORD bIsInVB;
449   DWORD hEvent;
450   HRESULT ddRVal;
451   PVOID WaitForVerticalBlank;
452 } DD_WAITFORVERTICALBLANKDATA, *PDD_WAITFORVERTICALBLANKDATA;
453 typedef DWORD (WINAPI *PDD_WAITFORVERTICALBLANK)(PDD_WAITFORVERTICALBLANKDATA);
454 
455 typedef struct _DD_CANCREATESURFACEDATA {
456   PDD_DIRECTDRAW_GLOBAL lpDD;
457   DDSURFACEDESC *lpDDSurfaceDesc;
458   DWORD bIsDifferentPixelFormat;
459   HRESULT ddRVal;
460   PVOID CanCreateSurface;
461 } DD_CANCREATESURFACEDATA, *PDD_CANCREATESURFACEDATA;
462 typedef DWORD (WINAPI *PDD_CANCREATESURFACE)(PDD_CANCREATESURFACEDATA);
463 
464 typedef struct _DD_CREATEPALETTEDATA {
465   PDD_DIRECTDRAW_GLOBAL lpDD;
466   PDD_PALETTE_GLOBAL lpDDPalette;
467   LPPALETTEENTRY lpColorTable;
468   HRESULT ddRVal;
469   PVOID CreatePalette;
470   BOOL is_excl;
471 } DD_CREATEPALETTEDATA, *PDD_CREATEPALETTEDATA;
472 typedef DWORD (WINAPI *PDD_CREATEPALETTE)(PDD_CREATEPALETTEDATA);
473 
474 typedef struct _DD_GETSCANLINEDATA {
475   PDD_DIRECTDRAW_GLOBAL lpDD;
476   DWORD dwScanLine;
477   HRESULT ddRVal;
478   PVOID GetScanLine;
479 } DD_GETSCANLINEDATA, *PDD_GETSCANLINEDATA;
480 typedef DWORD (WINAPI *PDD_GETSCANLINE)(PDD_GETSCANLINEDATA);
481 
482 typedef struct _DD_MAPMEMORYDATA {
483   PDD_DIRECTDRAW_GLOBAL lpDD;
484   BOOL bMap;
485   HANDLE hProcess;
486   FLATPTR fpProcess;
487   HRESULT ddRVal;
488 } DD_MAPMEMORYDATA, *PDD_MAPMEMORYDATA;
489 typedef DWORD (WINAPI *PDD_MAPMEMORY)(PDD_MAPMEMORYDATA);
490 
491 typedef struct _DD_DESTROYDRIVERDATA *PDD_DESTROYDRIVERDATA;
492 typedef struct _DD_SETMODEDATA *PDD_SETMODEDATA;
493 
494 typedef DWORD (APIENTRY *PDD_DESTROYDRIVER)(PDD_DESTROYDRIVERDATA);
495 typedef DWORD (APIENTRY *PDD_SETMODE)(PDD_SETMODEDATA);
496 
497 typedef struct DD_CALLBACKS {
498   DWORD dwSize;
499   DWORD dwFlags;
500   PDD_DESTROYDRIVER DestroyDriver;
501   PDD_CREATESURFACE CreateSurface;
502   PDD_SETCOLORKEY SetColorKey;
503   PDD_SETMODE SetMode;
504   PDD_WAITFORVERTICALBLANK WaitForVerticalBlank;
505   PDD_CANCREATESURFACE CanCreateSurface;
506   PDD_CREATEPALETTE CreatePalette;
507   PDD_GETSCANLINE GetScanLine;
508   PDD_MAPMEMORY MapMemory;
509 } DD_CALLBACKS, *PDD_CALLBACKS;
510 
511 #define DDHAL_CB32_DESTROYDRIVER        0x00000001l
512 #define DDHAL_CB32_CREATESURFACE        0x00000002l
513 #define DDHAL_CB32_SETCOLORKEY          0x00000004l
514 #define DDHAL_CB32_SETMODE              0x00000008l
515 #define DDHAL_CB32_WAITFORVERTICALBLANK 0x00000010l
516 #define DDHAL_CB32_CANCREATESURFACE     0x00000020l
517 #define DDHAL_CB32_CREATEPALETTE        0x00000040l
518 #define DDHAL_CB32_GETSCANLINE          0x00000080l
519 #define DDHAL_CB32_MAPMEMORY            0x80000000l
520 
521 typedef struct _DD_GETAVAILDRIVERMEMORYDATA {
522   PDD_DIRECTDRAW_GLOBAL lpDD;
523   DDSCAPS DDSCaps;
524   DWORD dwTotal;
525   DWORD dwFree;
526   HRESULT ddRVal;
527   PVOID GetAvailDriverMemory;
528 } DD_GETAVAILDRIVERMEMORYDATA, *PDD_GETAVAILDRIVERMEMORYDATA;
529 typedef DWORD (WINAPI *PDD_GETAVAILDRIVERMEMORY)(PDD_GETAVAILDRIVERMEMORYDATA);
530 
531 typedef struct _DD_MISCELLANEOUSCALLBACKS {
532   DWORD dwSize;
533   DWORD dwFlags;
534   PDD_GETAVAILDRIVERMEMORY GetAvailDriverMemory;
535 } DD_MISCELLANEOUSCALLBACKS, *PDD_MISCELLANEOUSCALLBACKS;
536 
537 #define DDHAL_MISCCB32_GETAVAILDRIVERMEMORY 0x00000001
538 
539 typedef DWORD (WINAPI *PDD_ALPHABLT)(PDD_BLTDATA);
540 
541 typedef struct _DD_CREATESURFACEEXDATA {
542   DWORD dwFlags;
543   PDD_DIRECTDRAW_LOCAL lpDDLcl;
544   PDD_SURFACE_LOCAL lpDDSLcl;
545   HRESULT ddRVal;
546 } DD_CREATESURFACEEXDATA, *PDD_CREATESURFACEEXDATA;
547 typedef DWORD (WINAPI *PDD_CREATESURFACEEX)(PDD_CREATESURFACEEXDATA);
548 
549 typedef struct _DD_GETDRIVERSTATEDATA {
550   DWORD dwFlags;
551   __GNU_EXTENSION union {
552     PDD_DIRECTDRAW_GLOBAL lpDD;
553     DWORD_PTR dwhContext;
554   };
555   LPDWORD lpdwStates;
556   DWORD dwLength;
557   HRESULT ddRVal;
558 } DD_GETDRIVERSTATEDATA, *PDD_GETDRIVERSTATEDATA;
559 typedef DWORD (WINAPI *PDD_GETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA);
560 
561 typedef struct _DD_DESTROYDDLOCALDATA {
562   DWORD dwFlags;
563   PDD_DIRECTDRAW_LOCAL pDDLcl;
564   HRESULT ddRVal;
565 } DD_DESTROYDDLOCALDATA, *PDD_DESTROYDDLOCALDATA;
566 typedef DWORD (WINAPI *PDD_DESTROYDDLOCAL)(PDD_DESTROYDDLOCALDATA);
567 
568 typedef struct _DD_MISCELLANEOUS2CALLBACKS {
569   DWORD dwSize;
570   DWORD dwFlags;
571   PDD_ALPHABLT AlphaBlt;
572   PDD_CREATESURFACEEX CreateSurfaceEx;
573   PDD_GETDRIVERSTATE GetDriverState;
574   PDD_DESTROYDDLOCAL DestroyDDLocal;
575 } DD_MISCELLANEOUS2CALLBACKS, *PDD_MISCELLANEOUS2CALLBACKS;
576 
577 #define DDHAL_MISC2CB32_ALPHABLT            0x00000001
578 #define DDHAL_MISC2CB32_CREATESURFACEEX     0x00000002
579 #define DDHAL_MISC2CB32_GETDRIVERSTATE      0x00000004
580 #define DDHAL_MISC2CB32_DESTROYDDLOCAL      0x00000008
581 
582 typedef struct _DD_FREEDRIVERMEMORYDATA {
583   PDD_DIRECTDRAW_GLOBAL lpDD;
584   PDD_SURFACE_LOCAL lpDDSurface;
585   HRESULT ddRVal;
586   PVOID FreeDriverMemory;
587 } DD_FREEDRIVERMEMORYDATA, *PDD_FREEDRIVERMEMORYDATA;
588 typedef DWORD (WINAPI *PDD_FREEDRIVERMEMORY)(PDD_FREEDRIVERMEMORYDATA);
589 
590 typedef struct _DD_SETEXCLUSIVEMODEDATA {
591   PDD_DIRECTDRAW_GLOBAL lpDD;
592   DWORD dwEnterExcl;
593   DWORD dwReserved;
594   HRESULT ddRVal;
595   PVOID SetExclusiveMode;
596 } DD_SETEXCLUSIVEMODEDATA, *PDD_SETEXCLUSIVEMODEDATA;
597 typedef DWORD (WINAPI *PDD_SETEXCLUSIVEMODE)(PDD_SETEXCLUSIVEMODEDATA);
598 
599 typedef struct _DD_FLIPTOGDISURFACEDATA {
600   PDD_DIRECTDRAW_GLOBAL lpDD;
601   DWORD dwToGDI;
602   DWORD dwReserved;
603   HRESULT ddRVal;
604   PVOID FlipToGDISurface;
605 } DD_FLIPTOGDISURFACEDATA, *PDD_FLIPTOGDISURFACEDATA;
606 typedef DWORD (WINAPI *PDD_FLIPTOGDISURFACE)(PDD_FLIPTOGDISURFACEDATA);
607 
608 typedef struct _DD_NTCALLBACKS {
609   DWORD dwSize;
610   DWORD dwFlags;
611   PDD_FREEDRIVERMEMORY FreeDriverMemory;
612   PDD_SETEXCLUSIVEMODE SetExclusiveMode;
613   PDD_FLIPTOGDISURFACE FlipToGDISurface;
614 } DD_NTCALLBACKS, *PDD_NTCALLBACKS;
615 
616 #define DDHAL_NTCB32_FREEDRIVERMEMORY 0x00000001
617 #define DDHAL_NTCB32_SETEXCLUSIVEMODE 0x00000002
618 #define DDHAL_NTCB32_FLIPTOGDISURFACE 0x00000004
619 
620 /************************************************************************/
621 /* IDirectDrawPalette callbacks                                         */
622 /************************************************************************/
623 
624 typedef struct _DD_DESTROYPALETTEDATA {
625   PDD_DIRECTDRAW_GLOBAL lpDD;
626   PDD_PALETTE_GLOBAL lpDDPalette;
627   HRESULT ddRVal;
628   PVOID DestroyPalette;
629 } DD_DESTROYPALETTEDATA, *PDD_DESTROYPALETTEDATA;
630 typedef DWORD (WINAPI *PDD_PALCB_DESTROYPALETTE)(PDD_DESTROYPALETTEDATA);
631 
632 typedef struct _DD_SETENTRIESDATA {
633   PDD_DIRECTDRAW_GLOBAL lpDD;
634   PDD_PALETTE_GLOBAL lpDDPalette;
635   DWORD dwBase;
636   DWORD dwNumEntries;
637   LPPALETTEENTRY lpEntries;
638   HRESULT ddRVal;
639   PVOID SetEntries;
640 } DD_SETENTRIESDATA, *PDD_SETENTRIESDATA;
641 typedef DWORD (WINAPI *PDD_PALCB_SETENTRIES)(PDD_SETENTRIESDATA);
642 
643 typedef struct DD_PALETTECALLBACKS {
644   DWORD dwSize;
645   DWORD dwFlags;
646   PDD_PALCB_DESTROYPALETTE DestroyPalette;
647   PDD_PALCB_SETENTRIES SetEntries;
648 } DD_PALETTECALLBACKS, *PDD_PALETTECALLBACKS;
649 
650 #define DDHAL_PALCB32_DESTROYPALETTE  0x00000001l
651 #define DDHAL_PALCB32_SETENTRIES      0x00000002l
652 
653 /************************************************************************/
654 /* IDirectDrawVideoport callbacks                                       */
655 /************************************************************************/
656 
657 typedef struct _DD_CANCREATEVPORTDATA {
658   PDD_DIRECTDRAW_LOCAL lpDD;
659   LPDDVIDEOPORTDESC lpDDVideoPortDesc;
660   HRESULT ddRVal;
661   PVOID CanCreateVideoPort;
662 } DD_CANCREATEVPORTDATA, *PDD_CANCREATEVPORTDATA;
663 typedef DWORD (WINAPI *PDD_VPORTCB_CANCREATEVIDEOPORT)(PDD_CANCREATEVPORTDATA);
664 
665 typedef struct _DD_CREATEVPORTDATA {
666   PDD_DIRECTDRAW_LOCAL lpDD;
667   LPDDVIDEOPORTDESC lpDDVideoPortDesc;
668   PDD_VIDEOPORT_LOCAL lpVideoPort;
669   HRESULT ddRVal;
670   PVOID CreateVideoPort;
671 } DD_CREATEVPORTDATA, *PDD_CREATEVPORTDATA;
672 typedef DWORD (WINAPI *PDD_VPORTCB_CREATEVIDEOPORT)(PDD_CREATEVPORTDATA);
673 
674 typedef struct _DD_FLIPVPORTDATA {
675   PDD_DIRECTDRAW_LOCAL lpDD;
676   PDD_VIDEOPORT_LOCAL lpVideoPort;
677   PDD_SURFACE_LOCAL lpSurfCurr;
678   PDD_SURFACE_LOCAL lpSurfTarg;
679   HRESULT ddRVal;
680   PVOID FlipVideoPort;
681 } DD_FLIPVPORTDATA, *PDD_FLIPVPORTDATA;
682 typedef DWORD (WINAPI *PDD_VPORTCB_FLIP)(PDD_FLIPVPORTDATA);
683 
684 typedef struct _DD_GETVPORTBANDWIDTHDATA {
685   PDD_DIRECTDRAW_LOCAL lpDD;
686   PDD_VIDEOPORT_LOCAL lpVideoPort;
687   LPDDPIXELFORMAT lpddpfFormat;
688   DWORD dwWidth;
689   DWORD dwHeight;
690   DWORD dwFlags;
691   LPDDVIDEOPORTBANDWIDTH lpBandwidth;
692   HRESULT ddRVal;
693   PVOID GetVideoPortBandwidth;
694 } DD_GETVPORTBANDWIDTHDATA, *PDD_GETVPORTBANDWIDTHDATA;
695 typedef DWORD (WINAPI *PDD_VPORTCB_GETBANDWIDTH)(PDD_GETVPORTBANDWIDTHDATA);
696 
697 typedef struct _DD_GETVPORTINPUTFORMATDATA {
698   PDD_DIRECTDRAW_LOCAL lpDD;
699   PDD_VIDEOPORT_LOCAL lpVideoPort;
700   DWORD dwFlags;
701   LPDDPIXELFORMAT lpddpfFormat;
702   DWORD dwNumFormats;
703   HRESULT ddRVal;
704   PVOID GetVideoPortInputFormats;
705 } DD_GETVPORTINPUTFORMATDATA, *PDD_GETVPORTINPUTFORMATDATA;
706 typedef DWORD (WINAPI *PDD_VPORTCB_GETINPUTFORMATS)(PDD_GETVPORTINPUTFORMATDATA);
707 
708 typedef struct _DD_GETVPORTOUTPUTFORMATDATA {
709   PDD_DIRECTDRAW_LOCAL lpDD;
710   PDD_VIDEOPORT_LOCAL lpVideoPort;
711   DWORD dwFlags;
712   LPDDPIXELFORMAT lpddpfInputFormat;
713   LPDDPIXELFORMAT lpddpfOutputFormats;
714   DWORD dwNumFormats;
715   HRESULT ddRVal;
716   PVOID GetVideoPortInputFormats;
717 } DD_GETVPORTOUTPUTFORMATDATA, *PDD_GETVPORTOUTPUTFORMATDATA;
718 typedef DWORD (WINAPI *PDD_VPORTCB_GETOUTPUTFORMATS)(PDD_GETVPORTOUTPUTFORMATDATA);
719 
720 typedef struct _DD_GETVPORTFIELDDATA {
721   PDD_DIRECTDRAW_LOCAL lpDD;
722   PDD_VIDEOPORT_LOCAL lpVideoPort;
723   BOOL bField;
724   HRESULT ddRVal;
725   PVOID GetVideoPortField;
726 } DD_GETVPORTFIELDDATA, *PDD_GETVPORTFIELDDATA;
727 typedef DWORD (WINAPI *PDD_VPORTCB_GETFIELD)(PDD_GETVPORTFIELDDATA);
728 
729 typedef struct _DD_GETVPORTLINEDATA {
730   PDD_DIRECTDRAW_LOCAL lpDD;
731   PDD_VIDEOPORT_LOCAL lpVideoPort;
732   DWORD dwLine;
733   HRESULT ddRVal;
734   PVOID GetVideoPortLine;
735 } DD_GETVPORTLINEDATA, *PDD_GETVPORTLINEDATA;
736 typedef DWORD (WINAPI *PDD_VPORTCB_GETLINE)(PDD_GETVPORTLINEDATA);
737 
738 typedef struct _DD_GETVPORTCONNECTDATA {
739   PDD_DIRECTDRAW_LOCAL lpDD;
740   DWORD dwPortId;
741   LPDDVIDEOPORTCONNECT lpConnect;
742   DWORD dwNumEntries;
743   HRESULT ddRVal;
744   PVOID GetVideoPortConnectInfo;
745 } DD_GETVPORTCONNECTDATA, *PDD_GETVPORTCONNECTDATA;
746 typedef DWORD (WINAPI *PDD_VPORTCB_GETVPORTCONNECT)(PDD_GETVPORTCONNECTDATA);
747 
748 typedef struct _DD_DESTROYVPORTDATA {
749   PDD_DIRECTDRAW_LOCAL lpDD;
750   PDD_VIDEOPORT_LOCAL lpVideoPort;
751   HRESULT ddRVal;
752   PVOID DestroyVideoPort;
753 } DD_DESTROYVPORTDATA, *PDD_DESTROYVPORTDATA;
754 typedef DWORD (WINAPI *PDD_VPORTCB_DESTROYVPORT)(PDD_DESTROYVPORTDATA);
755 
756 typedef struct _DD_GETVPORTFLIPSTATUSDATA {
757   PDD_DIRECTDRAW_LOCAL lpDD;
758   FLATPTR fpSurface;
759   HRESULT ddRVal;
760   PVOID GetVideoPortFlipStatus;
761 } DD_GETVPORTFLIPSTATUSDATA, *PDD_GETVPORTFLIPSTATUSDATA;
762 typedef DWORD (WINAPI *PDD_VPORTCB_GETFLIPSTATUS)(PDD_GETVPORTFLIPSTATUSDATA);
763 
764 typedef struct _DD_UPDATEVPORTDATA {
765   PDD_DIRECTDRAW_LOCAL lpDD;
766   PDD_VIDEOPORT_LOCAL lpVideoPort;
767   PDD_SURFACE_INT *lplpDDSurface;
768   PDD_SURFACE_INT *lplpDDVBISurface;
769   LPDDVIDEOPORTINFO lpVideoInfo;
770   DWORD dwFlags;
771   DWORD dwNumAutoflip;
772   DWORD dwNumVBIAutoflip;
773   HRESULT ddRVal;
774   PVOID UpdateVideoPort;
775 } DD_UPDATEVPORTDATA, *PDD_UPDATEVPORTDATA;
776 typedef DWORD (WINAPI *PDD_VPORTCB_UPDATE)(PDD_UPDATEVPORTDATA);
777 
778 typedef struct _DD_WAITFORVPORTSYNCDATA {
779   PDD_DIRECTDRAW_LOCAL lpDD;
780   PDD_VIDEOPORT_LOCAL lpVideoPort;
781   DWORD dwFlags;
782   DWORD dwLine;
783   DWORD dwTimeOut;
784   HRESULT ddRVal;
785   PVOID UpdateVideoPort;
786 } DD_WAITFORVPORTSYNCDATA, *PDD_WAITFORVPORTSYNCDATA;
787 typedef DWORD (WINAPI *PDD_VPORTCB_WAITFORSYNC)(PDD_WAITFORVPORTSYNCDATA);
788 
789 typedef struct _DD_GETVPORTSIGNALDATA {
790   PDD_DIRECTDRAW_LOCAL lpDD;
791   PDD_VIDEOPORT_LOCAL lpVideoPort;
792   DWORD dwStatus;
793   HRESULT ddRVal;
794   PVOID GetVideoSignalStatus;
795 } DD_GETVPORTSIGNALDATA, *PDD_GETVPORTSIGNALDATA;
796 typedef DWORD (WINAPI *PDD_VPORTCB_GETSIGNALSTATUS)(PDD_GETVPORTSIGNALDATA);
797 
798 typedef struct _DD_VPORTCOLORDATA {
799   PDD_DIRECTDRAW_LOCAL lpDD;
800   PDD_VIDEOPORT_LOCAL lpVideoPort;
801   DWORD dwFlags;
802   LPDDCOLORCONTROL lpColorData;
803   HRESULT ddRVal;
804   PVOID ColorControl;
805 } DD_VPORTCOLORDATA, *PDD_VPORTCOLORDATA;
806 typedef DWORD (WINAPI *PDD_VPORTCB_COLORCONTROL)(PDD_VPORTCOLORDATA);
807 
808 typedef struct DD_VIDEOPORTCALLBACKS {
809   DWORD dwSize;
810   DWORD dwFlags;
811   PDD_VPORTCB_CANCREATEVIDEOPORT CanCreateVideoPort;
812   PDD_VPORTCB_CREATEVIDEOPORT CreateVideoPort;
813   PDD_VPORTCB_FLIP FlipVideoPort;
814   PDD_VPORTCB_GETBANDWIDTH GetVideoPortBandwidth;
815   PDD_VPORTCB_GETINPUTFORMATS GetVideoPortInputFormats;
816   PDD_VPORTCB_GETOUTPUTFORMATS GetVideoPortOutputFormats;
817   PVOID lpReserved1;
818   PDD_VPORTCB_GETFIELD GetVideoPortField;
819   PDD_VPORTCB_GETLINE GetVideoPortLine;
820   PDD_VPORTCB_GETVPORTCONNECT GetVideoPortConnectInfo;
821   PDD_VPORTCB_DESTROYVPORT DestroyVideoPort;
822   PDD_VPORTCB_GETFLIPSTATUS GetVideoPortFlipStatus;
823   PDD_VPORTCB_UPDATE UpdateVideoPort;
824   PDD_VPORTCB_WAITFORSYNC WaitForVideoPortSync;
825   PDD_VPORTCB_GETSIGNALSTATUS GetVideoSignalStatus;
826   PDD_VPORTCB_COLORCONTROL ColorControl;
827 } DD_VIDEOPORTCALLBACKS, *PDD_VIDEOPORTCALLBACKS;
828 
829 #define DDHAL_VPORT32_CANCREATEVIDEOPORT    0x00000001
830 #define DDHAL_VPORT32_CREATEVIDEOPORT       0x00000002
831 #define DDHAL_VPORT32_FLIP                  0x00000004
832 #define DDHAL_VPORT32_GETBANDWIDTH          0x00000008
833 #define DDHAL_VPORT32_GETINPUTFORMATS       0x00000010
834 #define DDHAL_VPORT32_GETOUTPUTFORMATS      0x00000020
835 #define DDHAL_VPORT32_GETFIELD              0x00000080
836 #define DDHAL_VPORT32_GETLINE               0x00000100
837 #define DDHAL_VPORT32_GETCONNECT            0x00000200
838 #define DDHAL_VPORT32_DESTROY               0x00000400
839 #define DDHAL_VPORT32_GETFLIPSTATUS         0x00000800
840 #define DDHAL_VPORT32_UPDATE                0x00001000
841 #define DDHAL_VPORT32_WAITFORSYNC           0x00002000
842 #define DDHAL_VPORT32_GETSIGNALSTATUS       0x00004000
843 #define DDHAL_VPORT32_COLORCONTROL          0x00008000
844 
845 
846 /************************************************************************/
847 /* IDirectDrawColorControl callbacks                                    */
848 /************************************************************************/
849 
850 #define DDRAWI_GETCOLOR      0x0001
851 #define DDRAWI_SETCOLOR      0x0002
852 
853 typedef struct _DD_COLORCONTROLDATA {
854   PDD_DIRECTDRAW_GLOBAL lpDD;
855   PDD_SURFACE_LOCAL lpDDSurface;
856   LPDDCOLORCONTROL lpColorData;
857   DWORD dwFlags;
858   HRESULT ddRVal;
859   PVOID ColorControl;
860 } DD_COLORCONTROLDATA, *PDD_COLORCONTROLDATA;
861 typedef DWORD (WINAPI *PDD_COLORCB_COLORCONTROL)(PDD_COLORCONTROLDATA);
862 
863 typedef struct _DD_COLORCONTROLCALLBACKS {
864   DWORD dwSize;
865   DWORD dwFlags;
866   PDD_COLORCB_COLORCONTROL ColorControl;
867 } DD_COLORCONTROLCALLBACKS, *PDD_COLORCONTROLCALLBACKS;
868 
869 #define DDHAL_COLOR_COLORCONTROL            0x00000001
870 
871 /************************************************************************/
872 /* IDirectDrawVideo callbacks                                           */
873 /************************************************************************/
874 
875 typedef struct _DD_GETMOCOMPGUIDSDATA {
876   PDD_DIRECTDRAW_LOCAL lpDD;
877   DWORD dwNumGuids;
878   GUID *lpGuids;
879   HRESULT ddRVal;
880 } DD_GETMOCOMPGUIDSDATA, *PDD_GETMOCOMPGUIDSDATA;
881 typedef DWORD (WINAPI *PDD_MOCOMPCB_GETGUIDS)(PDD_GETMOCOMPGUIDSDATA);
882 
883 typedef struct _DD_GETMOCOMPFORMATSDATA {
884   PDD_DIRECTDRAW_LOCAL lpDD;
885   GUID *lpGuid;
886   DWORD dwNumFormats;
887   LPDDPIXELFORMAT lpFormats;
888   HRESULT ddRVal;
889 } DD_GETMOCOMPFORMATSDATA, *PDD_GETMOCOMPFORMATSDATA;
890 typedef DWORD (WINAPI *PDD_MOCOMPCB_GETFORMATS)(PDD_GETMOCOMPFORMATSDATA);
891 
892 typedef struct _DD_CREATEMOCOMPDATA {
893   PDD_DIRECTDRAW_LOCAL lpDD;
894   PDD_MOTIONCOMP_LOCAL lpMoComp;
895   GUID *lpGuid;
896   DWORD dwUncompWidth;
897   DWORD dwUncompHeight;
898   DDPIXELFORMAT ddUncompPixelFormat;
899   LPVOID lpData;
900   DWORD dwDataSize;
901   HRESULT ddRVal;
902 } DD_CREATEMOCOMPDATA, *PDD_CREATEMOCOMPDATA;
903 typedef DWORD (WINAPI *PDD_MOCOMPCB_CREATE)(PDD_CREATEMOCOMPDATA);
904 
905 typedef struct _DDCOMPBUFFERINFO {
906   DWORD dwSize;
907   DWORD dwNumCompBuffers;
908   DWORD dwWidthToCreate;
909   DWORD dwHeightToCreate;
910   DWORD dwBytesToAllocate;
911   DDSCAPS2 ddCompCaps;
912   DDPIXELFORMAT ddPixelFormat;
913 } DDCOMPBUFFERINFO, *LPDDCOMPBUFFERINFO;
914 
915 typedef struct _DD_GETMOCOMPCOMPBUFFDATA {
916   PDD_DIRECTDRAW_LOCAL lpDD;
917   GUID *lpGuid;
918   DWORD dwWidth;
919   DWORD dwHeight;
920   DDPIXELFORMAT ddPixelFormat;
921   DWORD dwNumTypesCompBuffs;
922   LPDDCOMPBUFFERINFO lpCompBuffInfo;
923   HRESULT ddRVal;
924 } DD_GETMOCOMPCOMPBUFFDATA, *PDD_GETMOCOMPCOMPBUFFDATA;
925 typedef DWORD (WINAPI *PDD_MOCOMPCB_GETCOMPBUFFINFO)(PDD_GETMOCOMPCOMPBUFFDATA);
926 
927 typedef struct _DD_GETINTERNALMOCOMPDATA {
928   PDD_DIRECTDRAW_LOCAL lpDD;
929   GUID *lpGuid;
930   DWORD dwWidth;
931   DWORD dwHeight;
932   DDPIXELFORMAT ddPixelFormat;
933   DWORD dwScratchMemAlloc;
934   HRESULT ddRVal;
935 } DD_GETINTERNALMOCOMPDATA, *PDD_GETINTERNALMOCOMPDATA;
936 typedef DWORD (WINAPI *PDD_MOCOMPCB_GETINTERNALINFO)(PDD_GETINTERNALMOCOMPDATA);
937 
938 typedef struct _DD_BEGINMOCOMPFRAMEDATA {
939   PDD_DIRECTDRAW_LOCAL lpDD;
940   PDD_MOTIONCOMP_LOCAL lpMoComp;
941   PDD_SURFACE_LOCAL lpDestSurface;
942   DWORD dwInputDataSize;
943   LPVOID lpInputData;
944   DWORD dwOutputDataSize;
945   LPVOID lpOutputData;
946   HRESULT ddRVal;
947 } DD_BEGINMOCOMPFRAMEDATA, *PDD_BEGINMOCOMPFRAMEDATA;
948 typedef DWORD (WINAPI *PDD_MOCOMPCB_BEGINFRAME)(PDD_BEGINMOCOMPFRAMEDATA);
949 
950 typedef struct _DD_ENDMOCOMPFRAMEDATA {
951   PDD_DIRECTDRAW_LOCAL lpDD;
952   PDD_MOTIONCOMP_LOCAL lpMoComp;
953   LPVOID lpInputData;
954   DWORD dwInputDataSize;
955   HRESULT ddRVal;
956 } DD_ENDMOCOMPFRAMEDATA, *PDD_ENDMOCOMPFRAMEDATA;
957 typedef DWORD (WINAPI *PDD_MOCOMPCB_ENDFRAME)(PDD_ENDMOCOMPFRAMEDATA);
958 
959 typedef struct _DDMOCOMPBUFFERINFO {
960   DWORD dwSize;
961   PDD_SURFACE_LOCAL lpCompSurface;
962   DWORD dwDataOffset;
963   DWORD dwDataSize;
964   LPVOID lpPrivate;
965 } DDMOCOMPBUFFERINFO, *LPDDMOCOMPBUFFERINFO;
966 
967 typedef struct _DD_RENDERMOCOMPDATA {
968   PDD_DIRECTDRAW_LOCAL lpDD;
969   PDD_MOTIONCOMP_LOCAL lpMoComp;
970   DWORD dwNumBuffers;
971   LPDDMOCOMPBUFFERINFO lpBufferInfo;
972   DWORD dwFunction;
973   LPVOID lpInputData;
974   DWORD dwInputDataSize;
975   LPVOID lpOutputData;
976   DWORD dwOutputDataSize;
977   HRESULT ddRVal;
978 } DD_RENDERMOCOMPDATA, *PDD_RENDERMOCOMPDATA;
979 typedef DWORD (WINAPI *PDD_MOCOMPCB_RENDER)(PDD_RENDERMOCOMPDATA);
980 
981 #define DDMCQUERY_READ 0x00000001
982 
983 typedef struct _DD_QUERYMOCOMPSTATUSDATA {
984   PDD_DIRECTDRAW_LOCAL lpDD;
985   PDD_MOTIONCOMP_LOCAL lpMoComp;
986   PDD_SURFACE_LOCAL lpSurface;
987   DWORD dwFlags;
988   HRESULT ddRVal;
989 } DD_QUERYMOCOMPSTATUSDATA, *PDD_QUERYMOCOMPSTATUSDATA;
990 typedef DWORD (WINAPI *PDD_MOCOMPCB_QUERYSTATUS)(PDD_QUERYMOCOMPSTATUSDATA);
991 
992 typedef struct _DD_DESTROYMOCOMPDATA {
993   PDD_DIRECTDRAW_LOCAL lpDD;
994   PDD_MOTIONCOMP_LOCAL lpMoComp;
995   HRESULT ddRVal;
996 } DD_DESTROYMOCOMPDATA, *PDD_DESTROYMOCOMPDATA;
997 typedef DWORD (WINAPI *PDD_MOCOMPCB_DESTROY)(PDD_DESTROYMOCOMPDATA);
998 
999 typedef struct DD_MOTIONCOMPCALLBACKS {
1000   DWORD dwSize;
1001   DWORD dwFlags;
1002   PDD_MOCOMPCB_GETGUIDS GetMoCompGuids;
1003   PDD_MOCOMPCB_GETFORMATS GetMoCompFormats;
1004   PDD_MOCOMPCB_CREATE CreateMoComp;
1005   PDD_MOCOMPCB_GETCOMPBUFFINFO GetMoCompBuffInfo;
1006   PDD_MOCOMPCB_GETINTERNALINFO GetInternalMoCompInfo;
1007   PDD_MOCOMPCB_BEGINFRAME BeginMoCompFrame;
1008   PDD_MOCOMPCB_ENDFRAME EndMoCompFrame;
1009   PDD_MOCOMPCB_RENDER RenderMoComp;
1010   PDD_MOCOMPCB_QUERYSTATUS QueryMoCompStatus;
1011   PDD_MOCOMPCB_DESTROY DestroyMoComp;
1012 } DD_MOTIONCOMPCALLBACKS, *PDD_MOTIONCOMPCALLBACKS;
1013 
1014 #define DDHAL_MOCOMP32_GETGUIDS             0x00000001
1015 #define DDHAL_MOCOMP32_GETFORMATS           0x00000002
1016 #define DDHAL_MOCOMP32_CREATE               0x00000004
1017 #define DDHAL_MOCOMP32_GETCOMPBUFFINFO      0x00000008
1018 #define DDHAL_MOCOMP32_GETINTERNALINFO      0x00000010
1019 #define DDHAL_MOCOMP32_BEGINFRAME           0x00000020
1020 #define DDHAL_MOCOMP32_ENDFRAME             0x00000040
1021 #define DDHAL_MOCOMP32_RENDER               0x00000080
1022 #define DDHAL_MOCOMP32_QUERYSTATUS          0x00000100
1023 #define DDHAL_MOCOMP32_DESTROY              0x00000200
1024 
1025 /************************************************************************/
1026 /* D3D buffer callbacks                                                 */
1027 /************************************************************************/
1028 
1029 typedef struct _DD_D3DBUFCALLBACKS {
1030   DWORD dwSize;
1031   DWORD dwFlags;
1032   PDD_CANCREATESURFACE CanCreateD3DBuffer;
1033   PDD_CREATESURFACE CreateD3DBuffer;
1034   PDD_SURFCB_DESTROYSURFACE DestroyD3DBuffer;
1035   PDD_SURFCB_LOCK LockD3DBuffer;
1036   PDD_SURFCB_UNLOCK UnlockD3DBuffer;
1037 } DD_D3DBUFCALLBACKS, *PDD_D3DBUFCALLBACKS;
1038 
1039 /************************************************************************/
1040 /* DdGetDriverInfo callback                                             */
1041 /************************************************************************/
1042 
1043 typedef struct _DD_GETDRIVERINFODATA {
1044 // Input:
1045   PVOID dhpdev;
1046   DWORD dwSize;
1047   DWORD dwFlags;
1048   GUID guidInfo;
1049   DWORD dwExpectedSize;
1050   PVOID lpvData;
1051 // Output:
1052   DWORD dwActualSize;
1053   HRESULT ddRVal;
1054 } DD_GETDRIVERINFODATA, *PDD_GETDRIVERINFODATA;
1055 typedef DWORD (WINAPI *PDD_GETDRIVERINFO)(PDD_GETDRIVERINFODATA);
1056 
1057 /************************************************************************/
1058 /* Driver info structures                                               */
1059 /************************************************************************/
1060 
1061 typedef struct _DDNTCORECAPS {
1062   DWORD dwSize;
1063   DWORD dwCaps;
1064   DWORD dwCaps2;
1065   DWORD dwCKeyCaps;
1066   DWORD dwFXCaps;
1067   DWORD dwFXAlphaCaps;
1068   DWORD dwPalCaps;
1069   DWORD dwSVCaps;
1070   DWORD dwAlphaBltConstBitDepths;
1071   DWORD dwAlphaBltPixelBitDepths;
1072   DWORD dwAlphaBltSurfaceBitDepths;
1073   DWORD dwAlphaOverlayConstBitDepths;
1074   DWORD dwAlphaOverlayPixelBitDepths;
1075   DWORD dwAlphaOverlaySurfaceBitDepths;
1076   DWORD dwZBufferBitDepths;
1077   DWORD dwVidMemTotal;
1078   DWORD dwVidMemFree;
1079   DWORD dwMaxVisibleOverlays;
1080   DWORD dwCurrVisibleOverlays;
1081   DWORD dwNumFourCCCodes;
1082   DWORD dwAlignBoundarySrc;
1083   DWORD dwAlignSizeSrc;
1084   DWORD dwAlignBoundaryDest;
1085   DWORD dwAlignSizeDest;
1086   DWORD dwAlignStrideAlign;
1087   DWORD dwRops[DD_ROP_SPACE];
1088   DDSCAPS ddsCaps;
1089   DWORD dwMinOverlayStretch;
1090   DWORD dwMaxOverlayStretch;
1091   DWORD dwMinLiveVideoStretch;
1092   DWORD dwMaxLiveVideoStretch;
1093   DWORD dwMinHwCodecStretch;
1094   DWORD dwMaxHwCodecStretch;
1095   DWORD dwReserved1;
1096   DWORD dwReserved2;
1097   DWORD dwReserved3;
1098   DWORD dwSVBCaps;
1099   DWORD dwSVBCKeyCaps;
1100   DWORD dwSVBFXCaps;
1101   DWORD dwSVBRops[DD_ROP_SPACE];
1102   DWORD dwVSBCaps;
1103   DWORD dwVSBCKeyCaps;
1104   DWORD dwVSBFXCaps;
1105   DWORD dwVSBRops[DD_ROP_SPACE];
1106   DWORD dwSSBCaps;
1107   DWORD dwSSBCKeyCaps;
1108   DWORD dwSSBFXCaps;
1109   DWORD dwSSBRops[DD_ROP_SPACE];
1110   DWORD dwMaxVideoPorts;
1111   DWORD dwCurrVideoPorts;
1112   DWORD dwSVBCaps2;
1113 } DDNTCORECAPS, *PDDNTCORECAPS;
1114 
1115 typedef struct _DD_HALINFO_V4 {
1116   DWORD dwSize;
1117   VIDEOMEMORYINFO vmiData;
1118   DDNTCORECAPS ddCaps;
1119   PDD_GETDRIVERINFO GetDriverInfo;
1120   DWORD dwFlags;
1121 } DD_HALINFO_V4, *PDD_HALINFO_V4;
1122 
1123 typedef struct _DD_HALINFO {
1124   DWORD dwSize;
1125   VIDEOMEMORYINFO vmiData;
1126   DDNTCORECAPS ddCaps;
1127   PDD_GETDRIVERINFO GetDriverInfo;
1128   DWORD dwFlags;
1129   PVOID lpD3DGlobalDriverData;
1130   PVOID lpD3DHALCallbacks;
1131   PDD_D3DBUFCALLBACKS lpD3DBufCallbacks;
1132 } DD_HALINFO, *PDD_HALINFO;
1133 
1134 typedef struct _DD_NONLOCALVIDMEMCAPS {
1135   DWORD dwSize;
1136   DWORD dwNLVBCaps;
1137   DWORD dwNLVBCaps2;
1138   DWORD dwNLVBCKeyCaps;
1139   DWORD dwNLVBFXCaps;
1140   DWORD dwNLVBRops[DD_ROP_SPACE];
1141 } DD_NONLOCALVIDMEMCAPS, *PDD_NONLOCALVIDMEMCAPS;
1142 
1143 typedef struct _DD_MORESURFACECAPS {
1144   DWORD dwSize;
1145   DDSCAPSEX ddsCapsMore;
1146   struct tagNTExtendedHeapRestrictions {
1147     DDSCAPSEX ddsCapsEx;
1148     DDSCAPSEX ddsCapsExAlt;
1149   } ddsExtendedHeapRestrictions[1];
1150 } DD_MORESURFACECAPS, *PDD_MORESURFACECAPS;
1151 
1152 
1153 /*********************************************************/
1154 /* Kernel Callbacks                                      */
1155 /*********************************************************/
1156 typedef struct _DD_SYNCSURFACEDATA {
1157   PDD_DIRECTDRAW_LOCAL lpDD;
1158   PDD_SURFACE_LOCAL lpDDSurface;
1159   DWORD dwSurfaceOffset;
1160   ULONG_PTR fpLockPtr;
1161   LONG lPitch;
1162   DWORD dwOverlayOffset;
1163   ULONG dwDriverReserved1;
1164   ULONG dwDriverReserved2;
1165   ULONG dwDriverReserved3;
1166   ULONG dwDriverReserved4;
1167   HRESULT ddRVal;
1168 } DD_SYNCSURFACEDATA, *PDD_SYNCSURFACEDATA;
1169 typedef DWORD (WINAPI *PDD_KERNELCB_SYNCSURFACE)(PDD_SYNCSURFACEDATA);
1170 
1171 typedef struct _DD_SYNCVIDEOPORTDATA {
1172   PDD_DIRECTDRAW_LOCAL lpDD;
1173   PDD_VIDEOPORT_LOCAL lpVideoPort;
1174   DWORD dwOriginOffset;
1175   DWORD dwHeight;
1176   DWORD dwVBIHeight;
1177   ULONG dwDriverReserved1;
1178   ULONG dwDriverReserved2;
1179   ULONG dwDriverReserved3;
1180   HRESULT ddRVal;
1181 } DD_SYNCVIDEOPORTDATA, *PDD_SYNCVIDEOPORTDATA;
1182 typedef DWORD (WINAPI *PDD_KERNELCB_SYNCVIDEOPORT)(PDD_SYNCVIDEOPORTDATA);
1183 
1184 typedef struct DD_NTPRIVATEDRIVERCAPS {
1185   DWORD dwSize;
1186   DWORD dwPrivateCaps;
1187 } DD_NTPRIVATEDRIVERCAPS;
1188 
1189 typedef struct _DD_UPDATENONLOCALHEAPDATA {
1190   PDD_DIRECTDRAW_GLOBAL lpDD;
1191   DWORD dwHeap;
1192   FLATPTR fpGARTLin;
1193   FLATPTR fpGARTDev;
1194   ULONG_PTR ulPolicyMaxBytes;
1195   HRESULT ddRVal;
1196   VOID* UpdateNonLocalHeap;
1197 } DD_UPDATENONLOCALHEAPDATA, *PDD_UPDATENONLOCALHEAPDATA;
1198 
1199 typedef struct _DD_STEREOMODE {
1200   DWORD dwSize;
1201   DWORD dwHeight;
1202   DWORD dwWidth;
1203   DWORD dwBpp;
1204   DWORD dwRefreshRate;
1205   BOOL bSupported;
1206 } DD_STEREOMODE, *PDD_STEREOMODE;
1207 
1208 typedef struct _DD_MORECAPS {
1209   DWORD dwSize;
1210   DWORD dwAlphaCaps;
1211   DWORD dwSVBAlphaCaps;
1212   DWORD dwVSBAlphaCaps;
1213   DWORD dwSSBAlphaCaps;
1214   DWORD dwFilterCaps;
1215   DWORD dwSVBFilterCaps;
1216   DWORD dwVSBFilterCaps;
1217   DWORD dwSSBFilterCaps;
1218 } DD_MORECAPS, *PDD_MORECAPS;
1219 
1220 typedef struct _DD_CLIPPER_GLOBAL {
1221   ULONG_PTR dwReserved1;
1222 } DD_CLIPPER_GLOBAL;
1223 
1224 typedef struct _DD_CLIPPER_LOCAL {
1225   ULONG_PTR dwReserved1;
1226 } DD_CLIPPER_LOCAL;
1227 
1228 typedef struct _DD_PALETTE_LOCAL {
1229   ULONG dwReserved0;
1230   ULONG_PTR dwReserved1;
1231 } DD_PALETTE_LOCAL;
1232 
1233 typedef struct DD_KERNELCALLBACKS {
1234   DWORD dwSize;
1235   DWORD dwFlags;
1236   PDD_KERNELCB_SYNCSURFACE SyncSurfaceData;
1237   PDD_KERNELCB_SYNCVIDEOPORT SyncVideoPortData;
1238 } DD_KERNELCALLBACKS, *PDD_KERNELCALLBACKS;
1239 
1240 #define MAX_AUTOFLIP_BUFFERS                  10
1241 #define DDSCAPS_EXECUTEBUFFER                 DDSCAPS_RESERVED2
1242 #define DDSCAPS_COMMANDBUFFER                 DDSCAPS_RESERVED3
1243 #define DDSCAPS_VERTEXBUFFER                  DDSCAPS_RESERVED4
1244 #define DDPF_D3DFORMAT                        0x00200000l
1245 #define D3DFORMAT_OP_TEXTURE                  0x00000001L
1246 #define D3DFORMAT_OP_VOLUMETEXTURE            0x00000002L
1247 #define D3DFORMAT_OP_CUBETEXTURE              0x00000004L
1248 #define D3DFORMAT_OP_OFFSCREEN_RENDERTARGET   0x00000008L
1249 #define D3DFORMAT_OP_SAME_FORMAT_RENDERTARGET 0x00000010L
1250 #define D3DFORMAT_OP_ZSTENCIL                 0x00000040L
1251 #define D3DFORMAT_OP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH  0x00000080L
1252 #define D3DFORMAT_OP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET 0x00000100L
1253 #define D3DFORMAT_OP_DISPLAYMODE              0x00000400L
1254 #define D3DFORMAT_OP_3DACCELERATION           0x00000800L
1255 #define D3DFORMAT_OP_PIXELSIZE                0x00001000L
1256 #define D3DFORMAT_OP_CONVERT_TO_ARGB          0x00002000L
1257 #define D3DFORMAT_OP_OFFSCREENPLAIN           0x00004000L
1258 #define D3DFORMAT_OP_SRGBREAD                 0x00008000L
1259 #define D3DFORMAT_OP_BUMPMAP                  0x00010000L
1260 #define D3DFORMAT_OP_DMAP                     0x00020000L
1261 #define D3DFORMAT_OP_NOFILTER                 0x00040000L
1262 #define D3DFORMAT_MEMBEROFGROUP_ARGB          0x00080000L
1263 #define D3DFORMAT_OP_SRGBWRITE                0x00100000L
1264 #define D3DFORMAT_OP_NOALPHABLEND             0x00200000L
1265 #define D3DFORMAT_OP_AUTOGENMIPMAP            0x00400000L
1266 #define D3DFORMAT_OP_VERTEXTEXTURE            0x00800000L
1267 #define D3DFORMAT_OP_NOTEXCOORDWRAPNORMIP     0x01000000L
1268 #define DDHAL_PLEASEALLOC_BLOCKSIZE           0x00000002l
1269 #define DDHAL_PLEASEALLOC_USERMEM             0x00000004l
1270 
1271 #define VIDMEM_ISLINEAR                       0x00000001l
1272 #define VIDMEM_ISRECTANGULAR                  0x00000002l
1273 #define VIDMEM_ISHEAP                         0x00000004l
1274 #define VIDMEM_ISNONLOCAL                     0x00000008l
1275 #define VIDMEM_ISWC                           0x00000010l
1276 #define VIDMEM_HEAPDISABLED                   0x00000020l
1277 
1278 #define DDHAL_CREATESURFACEEX_SWAPHANDLES     0x00000001l
1279 
1280 #define DDHAL_KERNEL_SYNCSURFACEDATA          0x00000001l
1281 #define DDHAL_KERNEL_SYNCVIDEOPORTDATA        0x00000002l
1282 
1283 #define DDHAL_DRIVER_NOTHANDLED               0x00000000l
1284 #define DDHAL_DRIVER_HANDLED                  0x00000001l
1285 #define DDHAL_DRIVER_NOCKEYHW                 0x00000002l
1286 
1287 #define DDRAWISURF_HASCKEYSRCBLT              0x00000800L
1288 #define DDRAWISURF_HASPIXELFORMAT             0x00002000L
1289 #define DDRAWISURF_HASOVERLAYDATA             0x00004000L
1290 #define DDRAWISURF_FRONTBUFFER                0x04000000L
1291 #define DDRAWISURF_BACKBUFFER                 0x08000000L
1292 #define DDRAWISURF_INVALID                    0x10000000L
1293 #define DDRAWISURF_DRIVERMANAGED              0x40000000L
1294 
1295 #define ROP_HAS_SOURCE                        0x00000001l
1296 #define ROP_HAS_PATTERN                       0x00000002l
1297 #define ROP_HAS_SOURCEPATTERN                 ROP_HAS_SOURCE | ROP_HAS_PATTERN
1298 
1299 #define DDHAL_EXEBUFCB32_CANCREATEEXEBUF      0x00000001l
1300 #define DDHAL_EXEBUFCB32_CREATEEXEBUF         0x00000002l
1301 #define DDHAL_EXEBUFCB32_DESTROYEXEBUF        0x00000004l
1302 #define DDHAL_EXEBUFCB32_LOCKEXEBUF           0x00000008l
1303 #define DDHAL_EXEBUFCB32_UNLOCKEXEBUF         0x00000010l
1304 
1305 #define DDHAL_D3DBUFCB32_CANCREATED3DBUF      DDHAL_EXEBUFCB32_CANCREATEEXEBUF
1306 #define DDHAL_D3DBUFCB32_CREATED3DBUF         DDHAL_EXEBUFCB32_CREATEEXEBUF
1307 #define DDHAL_D3DBUFCB32_DESTROYD3DBUF        DDHAL_EXEBUFCB32_DESTROYEXEBUF
1308 #define DDHAL_D3DBUFCB32_LOCKD3DBUF           DDHAL_EXEBUFCB32_LOCKEXEBUF
1309 #define DDHAL_D3DBUFCB32_UNLOCKD3DBUF         DDHAL_EXEBUFCB32_UNLOCKEXEBUF
1310 
1311 #define DDHALINFO_ISPRIMARYDISPLAY            0x00000001
1312 #define DDHALINFO_MODEXILLEGAL                0x00000002
1313 #define DDHALINFO_GETDRIVERINFOSET            0x00000004
1314 #define DDHALINFO_GETDRIVERINFO2              0x00000008
1315 
1316 #define DDRAWIVPORT_ON                        0x00000001
1317 #define DDRAWIVPORT_SOFTWARE_AUTOFLIP         0x00000002
1318 #define DDRAWIVPORT_COLORKEYANDINTERP         0x00000004
1319 
1320 #define DDHAL_PRIVATECAP_ATOMICSURFACECREATION   0x00000001l
1321 #define DDHAL_PRIVATECAP_NOTIFYPRIMARYCREATION   0x00000002l
1322 #define DDHAL_PRIVATECAP_RESERVED1               0x00000004l
1323 
1324 #define DDRAWI_VPORTSTART                     0x0001
1325 #define DDRAWI_VPORTSTOP                      0x0002
1326 #define DDRAWI_VPORTUPDATE                    0x0003
1327 #define DDRAWI_VPORTGETCOLOR                  0x0001
1328 #define DDRAWI_VPORTSETCOLOR                  0x0002
1329 
1330 #ifdef __cplusplus
1331 } /* extern "C" */
1332 #endif
1333 
1334 #endif /* GUID_DEFS_ONLY */
1335 
1336 #endif /* __DD_INCLUDED__ */
1337