Removed ddk/ddrawi.h because we have it twice, also removed some defines from ddrawin...
[reactos.git] / reactos / include / ddk / ddrawint.h
1 /*
2 * DirectDraw NT driver interface
3 */
4
5 #ifndef __DD_INCLUDED__
6 #define __DD_INCLUDED__
7
8 #include <ddraw.h>
9 #include <ddrawi.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 // FIXME: These should have been defined in other header files!
16 typedef struct _DDVIDEOPORTDESC *LPDDVIDEOPORTDESC; /* should be in dvp.h */
17 typedef struct _DDVIDEOPORTBANDWIDTH *LPDDVIDEOPORTBANDWIDTH; /* should be in dvp.h */
18 typedef struct _DDVIDEOPORTCONNECT *LPDDVIDEOPORTCONNECT; /* should be in dvp.h */
19 typedef struct _DDVIDEOPORTINFO *LPDDVIDEOPORTINFO; /* should be in dvp.h */
20 typedef struct _DD_VIDEOPORT_LOCAL *PDD_VIDEOPORT_LOCAL; /* should be defined here once we have dvp.h */
21
22 /************************************************************************/
23 /* Video memory info structures */
24 /************************************************************************/
25
26 typedef struct
27 {
28 DWORD dwFlags;
29 FLATPTR fpStart;
30 union
31 {
32 FLATPTR fpEnd;
33 DWORD dwWidth;
34 };
35 DDSCAPS ddsCaps;
36 DDSCAPS ddsCapsAlt;
37 union
38 {
39 LPVMEMHEAP lpHeap;
40 DWORD dwHeight;
41 };
42 } VIDEOMEMORY, *PVIDEOMEMORY;
43
44 typedef struct
45 {
46 FLATPTR fpPrimary;
47 DWORD dwFlags;
48 DWORD dwDisplayWidth;
49 DWORD dwDisplayHeight;
50 LONG lDisplayPitch;
51 DDPIXELFORMAT ddpfDisplay;
52 DWORD dwOffscreenAlign;
53 DWORD dwOverlayAlign;
54 DWORD dwTextureAlign;
55 DWORD dwZBufferAlign;
56 DWORD dwAlphaAlign;
57 PVOID pvPrimary;
58 } VIDEOMEMORYINFO;
59 typedef VIDEOMEMORYINFO *LPVIDEOMEMORYINFO;
60
61 /************************************************************************/
62 /* DDI representation of the DirectDraw object */
63 /************************************************************************/
64
65 typedef struct
66 {
67 PVOID dhpdev;
68 ULONG_PTR dwReserved1;
69 ULONG_PTR dwReserved2;
70 LPDDVIDEOPORTCAPS lpDDVideoPortCaps;
71 } DD_DIRECTDRAW_GLOBAL, *PDD_DIRECTDRAW_GLOBAL;
72
73 typedef struct
74 {
75 PDD_DIRECTDRAW_GLOBAL lpGbl;
76 } DD_DIRECTDRAW_LOCAL, *PDD_DIRECTDRAW_LOCAL;
77
78 /************************************************************************/
79 /* DDI representation of the DirectDrawSurface object */
80 /************************************************************************/
81
82 typedef struct
83 {
84 union
85 {
86 DWORD dwBlockSizeY;
87 LONG lSlicePitch;
88 };
89
90 union
91 {
92 PVIDEOMEMORY lpVidMemHeap;
93 DWORD dwBlockSizeX;
94 DWORD dwUserMemSize;
95 };
96
97 FLATPTR fpVidMem;
98 union
99 {
100 LONG lPitch;
101 DWORD dwLinearSize;
102 };
103 LONG yHint;
104 LONG xHint;
105 DWORD wHeight;
106 DWORD wWidth;
107 ULONG_PTR dwReserved1;
108 DDPIXELFORMAT ddpfSurface;
109 FLATPTR fpHeapOffset;
110 HANDLE hCreatorProcess;
111 } DD_SURFACE_GLOBAL, *PDD_SURFACE_GLOBAL;
112
113 typedef struct
114 {
115 DWORD dwMipMapCount;
116 PDD_VIDEOPORT_LOCAL lpVideoPort;
117 DWORD dwOverlayFlags;
118 DDSCAPSEX ddsCapsEx;
119 DWORD dwSurfaceHandle;
120 } DD_SURFACE_MORE, *PDD_SURFACE_MORE;
121
122 typedef struct _DD_ATTACHLIST *PDD_ATTACHLIST;
123
124 typedef struct
125 {
126 PDD_SURFACE_GLOBAL lpGbl;
127 DWORD dwFlags;
128 DDSCAPS ddsCaps;
129 ULONG_PTR dwReserved1;
130 union
131 {
132 DDCOLORKEY ddckCKSrcOverlay;
133 DDCOLORKEY ddckCKSrcBlt;
134 };
135 union
136 {
137 DDCOLORKEY ddckCKDestOverlay;
138 DDCOLORKEY ddckCKDestBlt;
139 };
140 PDD_SURFACE_MORE lpSurfMore;
141 PDD_ATTACHLIST lpAttachList;
142 PDD_ATTACHLIST lpAttachListFrom;
143 RECT rcOverlaySrc;
144 } DD_SURFACE_LOCAL, *PDD_SURFACE_LOCAL;
145
146 typedef struct _DD_ATTACHLIST
147 {
148 PDD_ATTACHLIST lpLink;
149 PDD_SURFACE_LOCAL lpAttached;
150 } DD_ATTACHLIST;
151
152 typedef struct
153 {
154 PDD_SURFACE_LOCAL lpLcl;
155 } DD_SURFACE_INT, *PDD_SURFACE_INT;
156
157 /************************************************************************/
158 /* DDI representation of the DirectDrawPalette object */
159 /************************************************************************/
160
161 typedef struct
162 {
163 ULONG_PTR Reserved1;
164 } DD_PALETTE_GLOBAL, *PDD_PALETTE_GLOBAL;
165
166 /************************************************************************/
167 /* DDI representation of the DirectDrawVideo object */
168 /************************************************************************/
169
170 typedef struct
171 {
172 PDD_DIRECTDRAW_LOCAL lpDD;
173 GUID guid;
174 DWORD dwUncompWidth;
175 DWORD dwUncompHeight;
176 DDPIXELFORMAT ddUncompPixelFormat;
177 DWORD dwDriverReserved1;
178 DWORD dwDriverReserved2;
179 DWORD dwDriverReserved3;
180 LPVOID lpDriverReserved1;
181 LPVOID lpDriverReserved2;
182 LPVOID lpDriverReserved3;
183 } DD_MOTIONCOMP_LOCAL, *PDD_MOTIONCOMP_LOCAL;
184
185 /************************************************************************/
186 /* IDirectDrawSurface callbacks */
187 /************************************************************************/
188
189 typedef struct
190 {
191 PDD_DIRECTDRAW_GLOBAL lpDD;
192 PDD_SURFACE_LOCAL lpDDSurface;
193 DWORD bHasRect;
194 RECTL rArea;
195 LPVOID lpSurfData;
196 HRESULT ddRVal;
197 PVOID Lock;
198 DWORD dwFlags;
199 FLATPTR fpProcess;
200 } DD_LOCKDATA, *PDD_LOCKDATA;
201 typedef DWORD (STDCALL *PDD_SURFCB_LOCK)(PDD_LOCKDATA);
202
203 typedef struct
204 {
205 PDD_DIRECTDRAW_GLOBAL lpDD;
206 PDD_SURFACE_LOCAL lpDDSurface;
207 HRESULT ddRVal;
208 PVOID Unlock;
209 } DD_UNLOCKDATA, *PDD_UNLOCKDATA;
210 typedef DWORD (STDCALL *PDD_SURFCB_UNLOCK)(PDD_UNLOCKDATA);
211
212 #define DDABLT_SRCOVERDEST 0x00000001
213 #define DDBLT_AFLAGS 0x80000000
214
215 typedef struct
216 {
217 BYTE blue, green, red, alpha;
218 } DDARGB, *PDDARGB;
219
220 typedef struct
221 {
222 PDD_DIRECTDRAW_GLOBAL lpDD;
223 PDD_SURFACE_LOCAL lpDDDestSurface;
224 RECTL rDest;
225 PDD_SURFACE_LOCAL lpDDSrcSurface;
226 RECTL rSrc;
227 DWORD dwFlags;
228 DWORD dwROPFlags;
229 DDBLTFX bltFX;
230 HRESULT ddRVal;
231 PVOID Blt;
232 BOOL IsClipped;
233 RECTL rOrigDest;
234 RECTL rOrigSrc;
235 DWORD dwRectCnt;
236 LPRECT prDestRects;
237 DWORD dwAFlags;
238 DDARGB ddargbScaleFactors;
239 } DD_BLTDATA, *PDD_BLTDATA;
240 typedef DWORD (STDCALL *PDD_SURFCB_BLT)(PDD_BLTDATA);
241
242 typedef struct
243 {
244 PDD_DIRECTDRAW_GLOBAL lpDD;
245 PDD_SURFACE_LOCAL lpDDDestSurface;
246 RECTL rDest;
247 PDD_SURFACE_LOCAL lpDDSrcSurface;
248 RECTL rSrc;
249 DWORD dwFlags;
250 DDOVERLAYFX overlayFX;
251 HRESULT ddRVal;
252 PVOID UpdateOverlay;
253 } DD_UPDATEOVERLAYDATA, *PDD_UPDATEOVERLAYDATA;
254 typedef DWORD (STDCALL *PDD_SURFCB_UPDATEOVERLAY)(PDD_UPDATEOVERLAYDATA);
255
256 typedef struct
257 {
258 PDD_DIRECTDRAW_GLOBAL lpDD;
259 PDD_SURFACE_LOCAL lpDDSrcSurface;
260 PDD_SURFACE_LOCAL lpDDDestSurface;
261 LONG lXPos;
262 LONG lYPos;
263 HRESULT ddRVal;
264 PVOID SetOverlayPosition;
265 } DD_SETOVERLAYPOSITIONDATA, *PDD_SETOVERLAYPOSITIONDATA;
266 typedef DWORD (STDCALL *PDD_SURFCB_SETOVERLAYPOSITION)(PDD_SETOVERLAYPOSITIONDATA);
267
268 typedef struct
269 {
270 PDD_DIRECTDRAW_GLOBAL lpDD;
271 PDD_SURFACE_LOCAL lpDDSurface;
272 PDD_PALETTE_GLOBAL lpDDPalette;
273 HRESULT ddRVal;
274 PVOID SetPalette;
275 BOOL Attach;
276 } DD_SETPALETTEDATA, *PDD_SETPALETTEDATA;
277 typedef DWORD (STDCALL *PDD_SURFCB_SETPALETTE)(PDD_SETPALETTEDATA);
278
279 typedef struct
280 {
281 PDD_DIRECTDRAW_GLOBAL lpDD;
282 PDD_SURFACE_LOCAL lpSurfCurr;
283 PDD_SURFACE_LOCAL lpSurfTarg;
284 DWORD dwFlags;
285 HRESULT ddRVal;
286 PVOID Flip;
287 PDD_SURFACE_LOCAL lpSurfCurrLeft;
288 PDD_SURFACE_LOCAL lpSurfTargLeft;
289 } DD_FLIPDATA, *PDD_FLIPDATA;
290 typedef DWORD (STDCALL *PDD_SURFCB_FLIP)(PDD_FLIPDATA);
291
292 typedef struct
293 {
294 PDD_DIRECTDRAW_GLOBAL lpDD;
295 PDD_SURFACE_LOCAL lpDDSurface;
296 HRESULT ddRVal;
297 PVOID DestroySurface;
298 } DD_DESTROYSURFACEDATA, *PDD_DESTROYSURFACEDATA;
299 typedef DWORD (STDCALL *PDD_SURFCB_DESTROYSURFACE)(PDD_DESTROYSURFACEDATA);
300
301 typedef struct
302 {
303 PDD_DIRECTDRAW_GLOBAL lpDD;
304 PDD_SURFACE_LOCAL lpDDSurface;
305 HRESULT ddRVal;
306 PVOID SetClipList;
307 } DD_SETCLIPLISTDATA, *PDD_SETCLIPLISTDATA;
308 typedef DWORD (STDCALL *PDD_SURFCB_SETCLIPLIST)(PDD_SETCLIPLISTDATA);
309
310 typedef struct
311 {
312 PDD_DIRECTDRAW_GLOBAL lpDD;
313 PDD_SURFACE_LOCAL lpDDSurface;
314 PDD_SURFACE_LOCAL lpSurfAttached;
315 HRESULT ddRVal;
316 PVOID AddAttachedSurface;
317 } DD_ADDATTACHEDSURFACEDATA, *PDD_ADDATTACHEDSURFACEDATA;
318 typedef DWORD (STDCALL *PDD_SURFCB_ADDATTACHEDSURFACE)(PDD_ADDATTACHEDSURFACEDATA);
319
320 typedef struct
321 {
322 PDD_DIRECTDRAW_GLOBAL lpDD;
323 PDD_SURFACE_LOCAL lpDDSurface;
324 DWORD dwFlags;
325 DDCOLORKEY ckNew;
326 HRESULT ddRVal;
327 PVOID SetColorKey;
328 } DD_SETCOLORKEYDATA, *PDD_SETCOLORKEYDATA;
329 typedef DWORD (STDCALL *PDD_SURFCB_SETCOLORKEY)(PDD_SETCOLORKEYDATA);
330
331 typedef struct
332 {
333 PDD_DIRECTDRAW_GLOBAL lpDD;
334 PDD_SURFACE_LOCAL lpDDSurface;
335 DWORD dwFlags;
336 HRESULT ddRVal;
337 PVOID GetBltStatus;
338 } DD_GETBLTSTATUSDATA, *PDD_GETBLTSTATUSDATA;
339 typedef DWORD (STDCALL *PDD_SURFCB_GETBLTSTATUS)(PDD_GETBLTSTATUSDATA);
340
341 typedef struct
342 {
343 PDD_DIRECTDRAW_GLOBAL lpDD;
344 PDD_SURFACE_LOCAL lpDDSurface;
345 DWORD dwFlags;
346 HRESULT ddRVal;
347 PVOID GetFlipStatus;
348 } DD_GETFLIPSTATUSDATA, *PDD_GETFLIPSTATUSDATA;
349 typedef DWORD (STDCALL *PDD_SURFCB_GETFLIPSTATUS)(PDD_GETFLIPSTATUSDATA);
350
351 typedef struct
352 {
353 DWORD dwSize;
354 DWORD dwFlags;
355 PDD_SURFCB_DESTROYSURFACE DestroySurface;
356 PDD_SURFCB_FLIP Flip;
357 PDD_SURFCB_SETCLIPLIST SetClipList;
358 PDD_SURFCB_LOCK Lock;
359 PDD_SURFCB_UNLOCK Unlock;
360 PDD_SURFCB_BLT Blt;
361 PDD_SURFCB_SETCOLORKEY SetColorKey;
362 PDD_SURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
363 PDD_SURFCB_GETBLTSTATUS GetBltStatus;
364 PDD_SURFCB_GETFLIPSTATUS GetFlipStatus;
365 PDD_SURFCB_UPDATEOVERLAY UpdateOverlay;
366 PDD_SURFCB_SETOVERLAYPOSITION SetOverlayPosition;
367 PVOID Reserved;
368 PDD_SURFCB_SETPALETTE SetPalette;
369 } DD_SURFACECALLBACKS, *PDD_SURFACECALLBACKS;
370
371 enum
372 {
373 DDHAL_SURFCB32_DESTROYSURFACE = 1<<0,
374 DDHAL_SURFCB32_FLIP = 1<<1,
375 DDHAL_SURFCB32_SETCLIPLIST = 1<<2,
376 DDHAL_SURFCB32_LOCK = 1<<3,
377 DDHAL_SURFCB32_UNLOCK = 1<<4,
378 DDHAL_SURFCB32_BLT = 1<<5,
379 DDHAL_SURFCB32_SETCOLORKEY = 1<<6,
380 DDHAL_SURFCB32_ADDATTACHEDSURFACE = 1<<7,
381 DDHAL_SURFCB32_GETBLTSTATUS = 1<<8,
382 DDHAL_SURFCB32_GETFLIPSTATUS = 1<<9,
383 DDHAL_SURFCB32_UPDATEOVERLAY = 1<<10,
384 DDHAL_SURFCB32_SETOVERLAYPOSITION = 1<<11,
385 DDHAL_SURFCB32_SETPALETTE = 1<<13,
386 };
387
388 /************************************************************************/
389 /* IDirectDraw callbacks */
390 /************************************************************************/
391
392 typedef struct
393 {
394 PDD_DIRECTDRAW_GLOBAL lpDD;
395 DDSURFACEDESC *lpDDSurfaceDesc;
396 PDD_SURFACE_LOCAL *lplpSList;
397 DWORD dwSCnt;
398 HRESULT ddRVal;
399 PVOID CreateSurface;
400 } DD_CREATESURFACEDATA, *PDD_CREATESURFACEDATA;
401 typedef DWORD (STDCALL *PDD_CREATESURFACE)(PDD_CREATESURFACEDATA);
402
403 typedef struct
404 {
405 PDD_SURFACE_LOCAL lpDDSurface;
406 DWORD dwFlags;
407 DDCOLORKEY ckNew;
408 HRESULT ddRVal;
409 PVOID SetColorKey;
410 } DD_DRVSETCOLORKEYDATA, *PDD_DRVSETCOLORKEYDATA;
411 typedef DWORD (STDCALL *PDD_SETCOLORKEY)(PDD_DRVSETCOLORKEYDATA);
412
413 #define DDWAITVB_I_TESTVB 0x80000006
414
415 typedef struct
416 {
417 PDD_DIRECTDRAW_GLOBAL lpDD;
418 DWORD dwFlags;
419 DWORD bIsInVB;
420 DWORD hEvent;
421 HRESULT ddRVal;
422 PVOID WaitForVerticalBlank;
423 } DD_WAITFORVERTICALBLANKDATA, *PDD_WAITFORVERTICALBLANKDATA;
424 typedef DWORD (STDCALL *PDD_WAITFORVERTICALBLANK)(PDD_WAITFORVERTICALBLANKDATA);
425
426 typedef struct
427 {
428 PDD_DIRECTDRAW_GLOBAL lpDD;
429 DDSURFACEDESC *lpDDSurfaceDesc;
430 DWORD bIsDifferentPixelFormat;
431 HRESULT ddRVal;
432 PVOID CanCreateSurface;
433 } DD_CANCREATESURFACEDATA, *PDD_CANCREATESURFACEDATA;
434 typedef DWORD (STDCALL *PDD_CANCREATESURFACE)(PDD_CANCREATESURFACEDATA);
435
436 typedef struct
437 {
438 PDD_DIRECTDRAW_GLOBAL lpDD;
439 PDD_PALETTE_GLOBAL lpDDPalette;
440 LPPALETTEENTRY lpColorTable;
441 HRESULT ddRVal;
442 PVOID CreatePalette;
443 BOOL is_excl;
444 } DD_CREATEPALETTEDATA, *PDD_CREATEPALETTEDATA;
445 typedef DWORD (STDCALL *PDD_CREATEPALETTE)(PDD_CREATEPALETTEDATA);
446
447 typedef struct
448 {
449 PDD_DIRECTDRAW_GLOBAL lpDD;
450 DWORD dwScanLine;
451 HRESULT ddRVal;
452 PVOID GetScanLine;
453 } DD_GETSCANLINEDATA, *PDD_GETSCANLINEDATA;
454 typedef DWORD (STDCALL *PDD_GETSCANLINE)(PDD_GETSCANLINEDATA);
455
456 typedef struct
457 {
458 PDD_DIRECTDRAW_GLOBAL lpDD;
459 BOOL bMap;
460 HANDLE hProcess;
461 FLATPTR fpProcess;
462 HRESULT ddRVal;
463 } DD_MAPMEMORYDATA, *PDD_MAPMEMORYDATA;
464 typedef DWORD (STDCALL *PDD_MAPMEMORY)(PDD_MAPMEMORYDATA);
465
466 typedef struct
467 {
468 DWORD dwSize;
469 DWORD dwFlags;
470 PVOID Reserved1;
471 PDD_CREATESURFACE CreateSurface;
472 PDD_SETCOLORKEY SetColorKey;
473 PVOID Reserved2;
474 PDD_WAITFORVERTICALBLANK WaitForVerticalBlank;
475 PDD_CANCREATESURFACE CanCreateSurface;
476 PDD_CREATEPALETTE CreatePalette;
477 PDD_GETSCANLINE GetScanLine;
478 PDD_MAPMEMORY MapMemory;
479 } DD_CALLBACKS, *PDD_CALLBACKS;
480
481 enum
482 {
483 DDHAL_CB32_CREATESURFACE = 1<<1,
484 DDHAL_CB32_SETCOLORKEY = 1<<2,
485 DDHAL_CB32_WAITFORVERTICALBLANK = 1<<4,
486 DDHAL_CB32_CANCREATESURFACE = 1<<5,
487 DDHAL_CB32_CREATEPALETTE = 1<<6,
488 DDHAL_CB32_GETSCANLINE = 1<<7,
489 DDHAL_CB32_MAPMEMORY = 1<<31,
490 };
491
492 typedef struct
493 {
494 PDD_DIRECTDRAW_GLOBAL lpDD;
495 DDSCAPS DDSCaps;
496 DWORD dwTotal;
497 DWORD dwFree;
498 HRESULT ddRVal;
499 PVOID GetAvailDriverMemory;
500 } DD_GETAVAILDRIVERMEMORYDATA, *PDD_GETAVAILDRIVERMEMORYDATA;
501 typedef DWORD (STDCALL *PDD_GETAVAILDRIVERMEMORY)(PDD_GETAVAILDRIVERMEMORYDATA);
502
503 DEFINE_GUID(GUID_MiscellaneousCallbacks, 0xEFD60CC0, 0x49E7, 0x11D0, 0x88, 0x9D, 0x00, 0xAA, 0x00, 0xBB, 0xB7, 0x6A);
504
505 typedef struct
506 {
507 DWORD dwSize;
508 DWORD dwFlags;
509 PDD_GETAVAILDRIVERMEMORY GetAvailDriverMemory;
510 } DD_MISCELLANEOUSCALLBACKS, *PDD_MISCELLANEOUSCALLBACKS;
511
512 enum
513 {
514 DDHAL_MISCCB32_GETAVAILDRIVERMEMORY = 1<<0,
515 };
516
517 typedef DWORD (STDCALL *PDD_ALPHABLT)(PDD_BLTDATA);
518
519 typedef struct
520 {
521 DWORD dwFlags;
522 PDD_DIRECTDRAW_LOCAL lpDDLcl;
523 PDD_SURFACE_LOCAL lpDDSLcl;
524 HRESULT ddRVal;
525 } DD_CREATESURFACEEXDATA, *PDD_CREATESURFACEEXDATA;
526 typedef DWORD (STDCALL *PDD_CREATESURFACEEX)(PDD_CREATESURFACEEXDATA);
527
528 typedef struct
529 {
530 DWORD dwFlags;
531 union
532 {
533 PDD_DIRECTDRAW_GLOBAL lpDD;
534 DWORD_PTR dwhContext;
535 };
536 LPDWORD lpdwStates;
537 DWORD dwLength;
538 HRESULT ddRVal;
539 } DD_GETDRIVERSTATEDATA, *PDD_GETDRIVERSTATEDATA;
540 typedef DWORD (STDCALL *PDD_GETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA);
541
542 typedef struct
543 {
544 DWORD dwFlags;
545 PDD_DIRECTDRAW_LOCAL pDDLcl;
546 HRESULT ddRVal;
547 } DD_DESTROYDDLOCALDATA, *PDD_DESTROYDDLOCALDATA;
548 typedef DWORD (STDCALL *PDD_DESTROYDDLOCAL)(PDD_DESTROYDDLOCALDATA);
549
550 DEFINE_GUID(GUID_Miscellaneous2Callbacks, 0x406B2F00, 0x3E5A, 0x11D1, 0xB6, 0x40, 0x00, 0xAA, 0x00, 0xA1, 0xF9, 0x6A);
551
552 typedef struct
553 {
554 DWORD dwSize;
555 DWORD dwFlags;
556 PDD_ALPHABLT AlphaBlt;
557 PDD_CREATESURFACEEX CreateSurfaceEx;
558 PDD_GETDRIVERSTATE GetDriverState;
559 PDD_DESTROYDDLOCAL DestroyDDLocal;
560 } DD_MISCELLANEOUS2CALLBACKS, *PDD_MISCELLANEOUS2CALLBACKS;
561
562 enum
563 {
564 DDHAL_MISC2CB32_ALPHABLT = 1<<0,
565 DDHAL_MISC2CB32_CREATESURFACEEX = 1<<1,
566 DDHAL_MISC2CB32_GETDRIVERSTATE = 1<<2,
567 DDHAL_MISC2CB32_DESTROYDDLOCAL = 1<<3,
568 };
569
570 typedef struct
571 {
572 PDD_DIRECTDRAW_GLOBAL lpDD;
573 PDD_SURFACE_LOCAL lpDDSurface;
574 HRESULT ddRVal;
575 PVOID FreeDriverMemory;
576 } DD_FREEDRIVERMEMORYDATA, *PDD_FREEDRIVERMEMORYDATA;
577 typedef DWORD (STDCALL *PDD_FREEDRIVERMEMORY)(PDD_FREEDRIVERMEMORYDATA);
578
579 typedef struct
580 {
581 PDD_DIRECTDRAW_GLOBAL lpDD;
582 DWORD dwEnterExcl;
583 DWORD dwReserved;
584 HRESULT ddRVal;
585 PVOID SetExclusiveMode;
586 } DD_SETEXCLUSIVEMODEDATA, *PDD_SETEXCLUSIVEMODEDATA;
587 typedef DWORD (STDCALL *PDD_SETEXCLUSIVEMODE)(PDD_SETEXCLUSIVEMODEDATA);
588
589 typedef struct
590 {
591 PDD_DIRECTDRAW_GLOBAL lpDD;
592 DWORD dwToGDI;
593 DWORD dwReserved;
594 HRESULT ddRVal;
595 PVOID FlipToGDISurface;
596 } DD_FLIPTOGDISURFACEDATA, *PDD_FLIPTOGDISURFACEDATA;
597 typedef DWORD (STDCALL *PDD_FLIPTOGDISURFACE)(PDD_FLIPTOGDISURFACEDATA);
598
599 DEFINE_GUID(GUID_NTCallbacks, 0x6FE9ECDE, 0xDF89, 0x11D1, 0x9D, 0xB0, 0x00, 0x60, 0x08, 0x27, 0x71, 0xBA);
600
601 typedef struct
602 {
603 DWORD dwSize;
604 DWORD dwFlags;
605 PDD_FREEDRIVERMEMORY FreeDriverMemory;
606 PDD_SETEXCLUSIVEMODE SetExclusiveMode;
607 PDD_FLIPTOGDISURFACE FlipToGDISurface;
608 } DD_NTCALLBACKS, *PDD_NTCALLBACKS;
609
610 enum
611 {
612 DDHAL_NTCB32_FREEDRIVERMEMORY = 1<<0,
613 DDHAL_NTCB32_SETEXCLUSIVEMODE = 1<<1,
614 DDHAL_NTCB32_FLIPTOGDISURFACE = 1<<2,
615 };
616
617 /************************************************************************/
618 /* IDirectDrawPalette callbacks */
619 /************************************************************************/
620
621 typedef struct
622 {
623 PDD_DIRECTDRAW_GLOBAL lpDD;
624 PDD_PALETTE_GLOBAL lpDDPalette;
625 HRESULT ddRVal;
626 PVOID DestroyPalette;
627 } DD_DESTROYPALETTEDATA, *PDD_DESTROYPALETTEDATA;
628 typedef DWORD (STDCALL *PDD_PALCB_DESTROYPALETTE)(PDD_DESTROYPALETTEDATA);
629
630 typedef struct
631 {
632 PDD_DIRECTDRAW_GLOBAL lpDD;
633 PDD_PALETTE_GLOBAL lpDDPalette;
634 DWORD dwBase;
635 DWORD dwNumEntries;
636 LPPALETTEENTRY lpEntries;
637 HRESULT ddRVal;
638 PVOID SetEntries;
639 } DD_SETENTRIESDATA, *PDD_SETENTRIESDATA;
640 typedef DWORD (STDCALL *PDD_PALCB_SETENTRIES)(PDD_SETENTRIESDATA);
641
642 typedef struct
643 {
644 DWORD dwSize;
645 DWORD dwFlags;
646 PDD_PALCB_DESTROYPALETTE DestroyPalette;
647 PDD_PALCB_SETENTRIES SetEntries;
648 } DD_PALETTECALLBACKS, *PDD_PALETTECALLBACKS;
649
650 enum
651 {
652 DDHAL_PALCB32_DESTROYPALETTE = 1<<0,
653 DDHAL_PALCB32_SETENTRIES = 1<<1,
654 };
655
656 /************************************************************************/
657 /* IDirectDrawVideoport callbacks */
658 /************************************************************************/
659
660 typedef struct
661 {
662 PDD_DIRECTDRAW_LOCAL lpDD;
663 LPDDVIDEOPORTDESC lpDDVideoPortDesc;
664 HRESULT ddRVal;
665 PVOID CanCreateVideoPort;
666 } DD_CANCREATEVPORTDATA, *PDD_CANCREATEVPORTDATA;
667 typedef DWORD (STDCALL *PDD_VPORTCB_CANCREATEVIDEOPORT)(PDD_CANCREATEVPORTDATA);
668
669 typedef struct
670 {
671 PDD_DIRECTDRAW_LOCAL lpDD;
672 LPDDVIDEOPORTDESC lpDDVideoPortDesc;
673 PDD_VIDEOPORT_LOCAL lpVideoPort;
674 HRESULT ddRVal;
675 PVOID CreateVideoPort;
676 } DD_CREATEVPORTDATA, *PDD_CREATEVPORTDATA;
677 typedef DWORD (STDCALL *PDD_VPORTCB_CREATEVIDEOPORT)(PDD_CREATEVPORTDATA);
678
679 typedef struct
680 {
681 PDD_DIRECTDRAW_LOCAL lpDD;
682 PDD_VIDEOPORT_LOCAL lpVideoPort;
683 PDD_SURFACE_LOCAL lpSurfCurr;
684 PDD_SURFACE_LOCAL lpSurfTarg;
685 HRESULT ddRVal;
686 PVOID FlipVideoPort;
687 } DD_FLIPVPORTDATA, *PDD_FLIPVPORTDATA;
688 typedef DWORD (STDCALL *PDD_VPORTCB_FLIP)(PDD_FLIPVPORTDATA);
689
690 typedef struct
691 {
692 PDD_DIRECTDRAW_LOCAL lpDD;
693 PDD_VIDEOPORT_LOCAL lpVideoPort;
694 LPDDPIXELFORMAT lpddpfFormat;
695 DWORD dwWidth;
696 DWORD dwHeight;
697 DWORD dwFlags;
698 LPDDVIDEOPORTBANDWIDTH lpBandwidth;
699 HRESULT ddRVal;
700 PVOID GetVideoPortBandwidth;
701 } DD_GETVPORTBANDWIDTHDATA, *PDD_GETVPORTBANDWIDTHDATA;
702 typedef DWORD (STDCALL *PDD_VPORTCB_GETBANDWIDTH)(PDD_GETVPORTBANDWIDTHDATA);
703
704 typedef struct
705 {
706 PDD_DIRECTDRAW_LOCAL lpDD;
707 PDD_VIDEOPORT_LOCAL lpVideoPort;
708 DWORD dwFlags;
709 LPDDPIXELFORMAT lpddpfFormat;
710 DWORD dwNumFormats;
711 HRESULT ddRVal;
712 PVOID GetVideoPortInputFormats;
713 } DD_GETVPORTINPUTFORMATDATA, *PDD_GETVPORTINPUTFORMATDATA;
714 typedef DWORD (STDCALL *PDD_VPORTCB_GETINPUTFORMATS)(PDD_GETVPORTINPUTFORMATDATA);
715
716 typedef struct
717 {
718 PDD_DIRECTDRAW_LOCAL lpDD;
719 PDD_VIDEOPORT_LOCAL lpVideoPort;
720 DWORD dwFlags;
721 LPDDPIXELFORMAT lpddpfInputFormat;
722 LPDDPIXELFORMAT lpddpfOutputFormats;
723 DWORD dwNumFormats;
724 HRESULT ddRVal;
725 PVOID GetVideoPortInputFormats;
726 } DD_GETVPORTOUTPUTFORMATDATA, *PDD_GETVPORTOUTPUTFORMATDATA;
727 typedef DWORD (STDCALL *PDD_VPORTCB_GETOUTPUTFORMATS)(PDD_GETVPORTOUTPUTFORMATDATA);
728
729 typedef struct
730 {
731 PDD_DIRECTDRAW_LOCAL lpDD;
732 PDD_VIDEOPORT_LOCAL lpVideoPort;
733 BOOL bField;
734 HRESULT ddRVal;
735 PVOID GetVideoPortField;
736 } DD_GETVPORTFIELDDATA, *PDD_GETVPORTFIELDDATA;
737 typedef DWORD (STDCALL *PDD_VPORTCB_GETFIELD)(PDD_GETVPORTFIELDDATA);
738
739 typedef struct
740 {
741 PDD_DIRECTDRAW_LOCAL lpDD;
742 PDD_VIDEOPORT_LOCAL lpVideoPort;
743 DWORD dwLine;
744 HRESULT ddRVal;
745 PVOID GetVideoPortLine;
746 } DD_GETVPORTLINEDATA, *PDD_GETVPORTLINEDATA;
747 typedef DWORD (STDCALL *PDD_VPORTCB_GETLINE)(PDD_GETVPORTLINEDATA);
748
749 typedef struct
750 {
751 PDD_DIRECTDRAW_LOCAL lpDD;
752 DWORD dwPortId;
753 LPDDVIDEOPORTCONNECT lpConnect;
754 DWORD dwNumEntries;
755 HRESULT ddRVal;
756 PVOID GetVideoPortConnectInfo;
757 } DD_GETVPORTCONNECTDATA, *PDD_GETVPORTCONNECTDATA;
758 typedef DWORD (STDCALL *PDD_VPORTCB_GETVPORTCONNECT)(PDD_GETVPORTCONNECTDATA);
759
760 typedef struct
761 {
762 PDD_DIRECTDRAW_LOCAL lpDD;
763 PDD_VIDEOPORT_LOCAL lpVideoPort;
764 HRESULT ddRVal;
765 PVOID DestroyVideoPort;
766 } DD_DESTROYVPORTDATA, *PDD_DESTROYVPORTDATA;
767 typedef DWORD (STDCALL *PDD_VPORTCB_DESTROYVPORT)(PDD_DESTROYVPORTDATA);
768
769 typedef struct
770 {
771 PDD_DIRECTDRAW_LOCAL lpDD;
772 FLATPTR fpSurface;
773 HRESULT ddRVal;
774 PVOID GetVideoPortFlipStatus;
775 } DD_GETVPORTFLIPSTATUSDATA, *PDD_GETVPORTFLIPSTATUSDATA;
776 typedef DWORD (STDCALL *PDD_VPORTCB_GETFLIPSTATUS)(PDD_GETVPORTFLIPSTATUSDATA);
777
778 #define DDRAWI_VPORTSTART 1
779 #define DDRAWI_VPORTSTOP 2
780 #define DDRAWI_VPORTUPDATE 3
781
782 typedef struct
783 {
784 PDD_DIRECTDRAW_LOCAL lpDD;
785 PDD_VIDEOPORT_LOCAL lpVideoPort;
786 PDD_SURFACE_INT *lplpDDSurface;
787 PDD_SURFACE_INT *lplpDDVBISurface;
788 LPDDVIDEOPORTINFO lpVideoInfo;
789 DWORD dwFlags;
790 DWORD dwNumAutoflip;
791 DWORD dwNumVBIAutoflip;
792 HRESULT ddRVal;
793 PVOID UpdateVideoPort;
794 } DD_UPDATEVPORTDATA, *PDD_UPDATEVPORTDATA;
795 typedef DWORD (STDCALL *PDD_VPORTCB_UPDATE)(PDD_UPDATEVPORTDATA);
796
797 typedef struct
798 {
799 PDD_DIRECTDRAW_LOCAL lpDD;
800 PDD_VIDEOPORT_LOCAL lpVideoPort;
801 DWORD dwFlags;
802 DWORD dwLine;
803 DWORD dwTimeOut;
804 HRESULT ddRVal;
805 PVOID UpdateVideoPort;
806 } DD_WAITFORVPORTSYNCDATA, *PDD_WAITFORVPORTSYNCDATA;
807 typedef DWORD (STDCALL *PDD_VPORTCB_WAITFORSYNC)(PDD_WAITFORVPORTSYNCDATA);
808
809 typedef struct
810 {
811 PDD_DIRECTDRAW_LOCAL lpDD;
812 PDD_VIDEOPORT_LOCAL lpVideoPort;
813 DWORD dwStatus;
814 HRESULT ddRVal;
815 PVOID GetVideoSignalStatus;
816 } DD_GETVPORTSIGNALDATA, *PDD_GETVPORTSIGNALDATA;
817 typedef DWORD (STDCALL *PDD_VPORTCB_GETSIGNALSTATUS)(PDD_GETVPORTSIGNALDATA);
818
819 #define DDRAWI_VPORTGETCOLOR 1
820 #define DDRAWI_VPORTSETCOLOR 2
821
822 typedef struct
823 {
824 PDD_DIRECTDRAW_LOCAL lpDD;
825 PDD_VIDEOPORT_LOCAL lpVideoPort;
826 DWORD dwFlags;
827 LPDDCOLORCONTROL lpColorData;
828 HRESULT ddRVal;
829 PVOID ColorControl;
830 } DD_VPORTCOLORDATA, *PDD_VPORTCOLORDATA;
831 typedef DWORD (STDCALL *PDD_VPORTCB_COLORCONTROL)(PDD_VPORTCOLORDATA);
832
833 DEFINE_GUID(GUID_VideoPortCallbacks, 0xEFD60CC1, 0x49E7, 0x11D0, 0x88, 0x9D, 0x00, 0xAA, 0x00, 0xBB, 0xB7, 0x6A);
834
835 typedef struct
836 {
837 DWORD dwSize;
838 DWORD dwFlags;
839 PDD_VPORTCB_CANCREATEVIDEOPORT CanCreateVideoPort;
840 PDD_VPORTCB_CREATEVIDEOPORT CreateVideoPort;
841 PDD_VPORTCB_FLIP FlipVideoPort;
842 PDD_VPORTCB_GETBANDWIDTH GetVideoPortBandwidth;
843 PDD_VPORTCB_GETINPUTFORMATS GetVideoPortInputFormats;
844 PDD_VPORTCB_GETOUTPUTFORMATS GetVideoPortOutputFormats;
845 PVOID Reserved;
846 PDD_VPORTCB_GETFIELD GetVideoPortField;
847 PDD_VPORTCB_GETLINE GetVideoPortLine;
848 PDD_VPORTCB_GETVPORTCONNECT GetVideoPortConnectInfo;
849 PDD_VPORTCB_DESTROYVPORT DestroyVideoPort;
850 PDD_VPORTCB_GETFLIPSTATUS GetVideoPortFlipStatus;
851 PDD_VPORTCB_UPDATE UpdateVideoPort;
852 PDD_VPORTCB_WAITFORSYNC WaitForVideoPortSync;
853 PDD_VPORTCB_GETSIGNALSTATUS GetVideoSignalStatus;
854 PDD_VPORTCB_COLORCONTROL ColorControl;
855 } DD_VIDEOPORTCALLBACKS, *PDD_VIDEOPORTCALLBACKS;
856
857 enum
858 {
859 DDHAL_VPORT32_CANCREATEVIDEOPORT = 1<<0,
860 DDHAL_VPORT32_CREATEVIDEOPORT = 1<<1,
861 DDHAL_VPORT32_FLIP = 1<<2,
862 DDHAL_VPORT32_GETBANDWIDTH = 1<<3,
863 DDHAL_VPORT32_GETINPUTFORMATS = 1<<4,
864 DDHAL_VPORT32_GETOUTPUTFORMATS = 1<<5,
865 DDHAL_VPORT32_GETFIELD = 1<<7,
866 DDHAL_VPORT32_GETLINE = 1<<8,
867 DDHAL_VPORT32_GETCONNECT = 1<<9,
868 DDHAL_VPORT32_DESTROY = 1<<10,
869 DDHAL_VPORT32_GETFLIPSTATUS = 1<<11,
870 DDHAL_VPORT32_UPDATE = 1<<12,
871 DDHAL_VPORT32_WAITFORSYNC = 1<<13,
872 DDHAL_VPORT32_GETSIGNALSTATUS = 1<<14,
873 DDHAL_VPORT32_COLORCONTROL = 1<<15,
874 };
875
876 /************************************************************************/
877 /* IDirectDrawColorControl callbacks */
878 /************************************************************************/
879
880 #define DDRAWI_GETCOLOR 1
881 #define DDRAWI_SETCOLOR 2
882
883 typedef struct
884 {
885 PDD_DIRECTDRAW_GLOBAL lpDD;
886 PDD_SURFACE_LOCAL lpDDSurface;
887 LPDDCOLORCONTROL lpColorData;
888 DWORD dwFlags;
889 HRESULT ddRVal;
890 PVOID ColorControl;
891 } DD_COLORCONTROLDATA, *PDD_COLORCONTROLDATA;
892 typedef DWORD (STDCALL *PDD_COLORCB_COLORCONTROL)(PDD_COLORCONTROLDATA);
893
894 DEFINE_GUID(GUID_ColorControlCallbacks, 0xEFD60CC2, 0x49E7, 0x11D0, 0x88, 0x9D, 0x00, 0xAA, 0x00, 0xBB, 0xB7, 0x6A);
895
896 typedef struct
897 {
898 DWORD dwSize;
899 DWORD dwFlags;
900 PDD_COLORCB_COLORCONTROL ColorControl;
901 } DD_COLORCONTROLCALLBACKS, *PDD_COLORCONTROLCALLBACKS;
902
903 enum
904 {
905 DDHAL_COLOR_COLORCONTROL = 1<<0,
906 };
907
908 /************************************************************************/
909 /* IDirectDrawVideo callbacks */
910 /************************************************************************/
911
912 typedef struct
913 {
914 PDD_DIRECTDRAW_LOCAL lpDD;
915 DWORD dwNumGuids;
916 GUID *lpGuids;
917 HRESULT ddRVal;
918 } DD_GETMOCOMPGUIDSDATA, *PDD_GETMOCOMPGUIDSDATA;
919 typedef DWORD (STDCALL *PDD_MOCOMPCB_GETGUIDS)(PDD_GETMOCOMPGUIDSDATA);
920
921 typedef struct
922 {
923 PDD_DIRECTDRAW_LOCAL lpDD;
924 GUID *lpGuid;
925 DWORD dwNumFormats;
926 LPDDPIXELFORMAT lpFormats;
927 HRESULT ddRVal;
928 } DD_GETMOCOMPFORMATSDATA, *PDD_GETMOCOMPFORMATSDATA;
929 typedef DWORD (STDCALL *PDD_MOCOMPCB_GETFORMATS)(PDD_GETMOCOMPFORMATSDATA);
930
931 typedef struct
932 {
933 PDD_DIRECTDRAW_LOCAL lpDD;
934 PDD_MOTIONCOMP_LOCAL lpMoComp;
935 GUID *lpGuid;
936 DWORD dwUncompWidth;
937 DWORD dwUncompHeight;
938 DDPIXELFORMAT ddUncompPixelFormat;
939 LPVOID lpData;
940 DWORD dwDataSize;
941 HRESULT ddRVal;
942 } DD_CREATEMOCOMPDATA, *PDD_CREATEMOCOMPDATA;
943 typedef DWORD (STDCALL *PDD_MOCOMPCB_CREATE)(PDD_CREATEMOCOMPDATA);
944
945 typedef struct
946 {
947 DWORD dwSize;
948 DWORD dwNumCompBuffers;
949 DWORD dwWidthToCreate;
950 DWORD dwHeightToCreate;
951 DWORD dwBytesToAllocate;
952 DDSCAPS2 ddCompCaps;
953 DDPIXELFORMAT ddPixelFormat;
954 } DDCOMPBUFFERINFO, *PDDCOMPBUFFERINFO;
955
956 typedef struct
957 {
958 PDD_DIRECTDRAW_LOCAL lpDD;
959 GUID *lpGuid;
960 DWORD dwWidth;
961 DWORD dwHeight;
962 DDPIXELFORMAT ddPixelFormat;
963 DWORD dwNumTypesCompBuffs;
964 PDDCOMPBUFFERINFO lpCompBuffInfo;
965 HRESULT ddRVal;
966 } DD_GETMOCOMPCOMPBUFFDATA, *PDD_GETMOCOMPCOMPBUFFDATA;
967 typedef DWORD (STDCALL *PDD_MOCOMPCB_GETCOMPBUFFINFO)(PDD_GETMOCOMPCOMPBUFFDATA);
968
969 typedef struct
970 {
971 PDD_DIRECTDRAW_LOCAL lpDD;
972 GUID *lpGuid;
973 DWORD dwWidth;
974 DWORD dwHeight;
975 DDPIXELFORMAT ddPixelFormat;
976 DWORD dwScratchMemAlloc;
977 HRESULT ddRVal;
978 } DD_GETINTERNALMOCOMPDATA, *PDD_GETINTERNALMOCOMPDATA;
979 typedef DWORD (STDCALL *PDD_MOCOMPCB_GETINTERNALINFO)(PDD_GETINTERNALMOCOMPDATA);
980
981 typedef struct
982 {
983 PDD_DIRECTDRAW_LOCAL lpDD;
984 PDD_MOTIONCOMP_LOCAL lpMoComp;
985 PDD_SURFACE_LOCAL lpDestSurface;
986 DWORD dwInputDataSize;
987 LPVOID lpInputData;
988 DWORD dwOutputDataSize;
989 LPVOID lpOutputData;
990 HRESULT ddRVal;
991 } DD_BEGINMOCOMPFRAMEDATA, *PDD_BEGINMOCOMPFRAMEDATA;
992 typedef DWORD (STDCALL *PDD_MOCOMPCB_BEGINFRAME)(PDD_BEGINMOCOMPFRAMEDATA);
993
994 typedef struct
995 {
996 PDD_DIRECTDRAW_LOCAL lpDD;
997 PDD_MOTIONCOMP_LOCAL lpMoComp;
998 LPVOID lpInputData;
999 DWORD dwInputDataSize;
1000 HRESULT ddRVal;
1001 } DD_ENDMOCOMPFRAMEDATA, *PDD_ENDMOCOMPFRAMEDATA;
1002 typedef DWORD (STDCALL *PDD_MOCOMPCB_ENDFRAME)(PDD_ENDMOCOMPFRAMEDATA);
1003
1004 typedef struct
1005 {
1006 DWORD dwSize;
1007 PDD_SURFACE_LOCAL lpCompSurface;
1008 DWORD dwDataOffset;
1009 DWORD dwDataSize;
1010 LPVOID lpPrivate;
1011 } DDMOCOMPBUFFERINFO, *PDDMOCOMPBUFFERINFO;
1012
1013 typedef struct
1014 {
1015 PDD_DIRECTDRAW_LOCAL lpDD;
1016 PDD_MOTIONCOMP_LOCAL lpMoComp;
1017 DWORD dwNumBuffers;
1018 PDDMOCOMPBUFFERINFO lpBufferInfo;
1019 DWORD dwFunction;
1020 LPVOID lpInputData;
1021 DWORD dwInputDataSize;
1022 LPVOID lpOutputData;
1023 DWORD dwOutputDataSize;
1024 HRESULT ddRVal;
1025 } DD_RENDERMOCOMPDATA, *PDD_RENDERMOCOMPDATA;
1026 typedef DWORD (STDCALL *PDD_MOCOMPCB_RENDER)(PDD_RENDERMOCOMPDATA);
1027
1028 #define DDMCQUERY_READ 1
1029
1030 typedef struct
1031 {
1032 PDD_DIRECTDRAW_LOCAL lpDD;
1033 PDD_MOTIONCOMP_LOCAL lpMoComp;
1034 PDD_SURFACE_LOCAL lpSurface;
1035 DWORD dwFlags;
1036 HRESULT ddRVal;
1037 } DD_QUERYMOCOMPSTATUSDATA, *PDD_QUERYMOCOMPSTATUSDATA;
1038 typedef DWORD (STDCALL *PDD_MOCOMPCB_QUERYSTATUS)(PDD_QUERYMOCOMPSTATUSDATA);
1039
1040 typedef struct
1041 {
1042 PDD_DIRECTDRAW_LOCAL lpDD;
1043 PDD_MOTIONCOMP_LOCAL lpMoComp;
1044 HRESULT ddRVal;
1045 } DD_DESTROYMOCOMPDATA, *PDD_DESTROYMOCOMPDATA;
1046 typedef DWORD (STDCALL *PDD_MOCOMPCB_DESTROY)(PDD_DESTROYMOCOMPDATA);
1047
1048 DEFINE_GUID(GUID_MotionCompCallbacks, 0xB1122B40, 0x5DA5, 0x11D1, 0x8F, 0xCF, 0x00, 0xC0, 0x4F, 0xC2, 0x9B, 0x4E);
1049
1050 typedef struct
1051 {
1052 DWORD dwSize;
1053 DWORD dwFlags;
1054 PDD_MOCOMPCB_GETGUIDS GetMoCompGuids;
1055 PDD_MOCOMPCB_GETFORMATS GetMoCompFormats;
1056 PDD_MOCOMPCB_CREATE CreateMoComp;
1057 PDD_MOCOMPCB_GETCOMPBUFFINFO GetMoCompBuffInfo;
1058 PDD_MOCOMPCB_GETINTERNALINFO GetInternalMoCompInfo;
1059 PDD_MOCOMPCB_BEGINFRAME BeginMoCompFrame;
1060 PDD_MOCOMPCB_ENDFRAME EndMoCompFrame;
1061 PDD_MOCOMPCB_RENDER RenderMoComp;
1062 PDD_MOCOMPCB_QUERYSTATUS QueryMoCompStatus;
1063 PDD_MOCOMPCB_DESTROY DestroyMoComp;
1064 } DD_MOTIONCOMPCALLBACKS;
1065 typedef DD_MOTIONCOMPCALLBACKS *PDD_MOTIONCOMPCALLBACKS;
1066
1067 enum
1068 {
1069 DDHAL_MOCOMP32_GETGUIDS = 1<<0,
1070 DDHAL_MOCOMP32_GETFORMATS = 1<<1,
1071 DDHAL_MOCOMP32_CREATE = 1<<2,
1072 DDHAL_MOCOMP32_GETCOMPBUFFINFO = 1<<3,
1073 DDHAL_MOCOMP32_GETINTERNALINFO = 1<<4,
1074 DDHAL_MOCOMP32_BEGINFRAME = 1<<5,
1075 DDHAL_MOCOMP32_ENDFRAME = 1<<6,
1076 DDHAL_MOCOMP32_RENDER = 1<<7,
1077 DDHAL_MOCOMP32_QUERYSTATUS = 1<<8,
1078 DDHAL_MOCOMP32_DESTROY = 1<<9,
1079 };
1080
1081 /************************************************************************/
1082 /* D3D buffer callbacks */
1083 /************************************************************************/
1084
1085 typedef struct
1086 {
1087 DWORD dwSize;
1088 DWORD dwFlags;
1089 PDD_CANCREATESURFACE CanCreateD3DBuffer;
1090 PDD_CREATESURFACE CreateD3DBuffer;
1091 PDD_SURFCB_DESTROYSURFACE DestroyD3DBuffer;
1092 PDD_SURFCB_LOCK LockD3DBuffer;
1093 PDD_SURFCB_UNLOCK UnlockD3DBuffer;
1094 } DD_D3DBUFCALLBACKS, *PDD_D3DBUFCALLBACKS;
1095
1096 /************************************************************************/
1097 /* DdGetDriverInfo callback */
1098 /************************************************************************/
1099
1100 typedef struct
1101 {
1102 // Input:
1103 PVOID dhpdev;
1104 DWORD dwSize;
1105 DWORD dwFlags;
1106 GUID guidInfo;
1107 DWORD dwExpectedSize;
1108 PVOID lpvData;
1109 // Output:
1110 DWORD dwActualSize;
1111 HRESULT ddRVal;
1112 ULONG_PTR dwContext;
1113 } DD_GETDRIVERINFODATA, *PDD_GETDRIVERINFODATA;
1114 typedef DWORD (STDCALL *PDD_GETDRIVERINFO)(PDD_GETDRIVERINFODATA);
1115
1116
1117
1118
1119 /************************************************************************/
1120 /* Driver info structures */
1121 /************************************************************************/
1122
1123 typedef struct
1124 {
1125 DWORD dwSize;
1126 DWORD dwCaps;
1127 DWORD dwCaps2;
1128 DWORD dwCKeyCaps;
1129 DWORD dwFXCaps;
1130 DWORD dwFXAlphaCaps;
1131 DWORD dwPalCaps;
1132 DWORD dwSVCaps;
1133 DWORD dwAlphaBltConstBitDepths;
1134 DWORD dwAlphaBltPixelBitDepths;
1135 DWORD dwAlphaBltSurfaceBitDepths;
1136 DWORD dwAlphaOverlayConstBitDepths;
1137 DWORD dwAlphaOverlayPixelBitDepths;
1138 DWORD dwAlphaOverlaySurfaceBitDepths;
1139 DWORD dwZBufferBitDepths;
1140 DWORD dwVidMemTotal;
1141 DWORD dwVidMemFree;
1142 DWORD dwMaxVisibleOverlays;
1143 DWORD dwCurrVisibleOverlays;
1144 DWORD dwNumFourCCCodes;
1145 DWORD dwAlignBoundarySrc;
1146 DWORD dwAlignSizeSrc;
1147 DWORD dwAlignBoundaryDest;
1148 DWORD dwAlignSizeDest;
1149 DWORD dwAlignStrideAlign;
1150 DWORD dwRops[DD_ROP_SPACE];
1151 DDSCAPS ddsCaps;
1152 DWORD dwMinOverlayStretch;
1153 DWORD dwMaxOverlayStretch;
1154 DWORD dwMinLiveVideoStretch;
1155 DWORD dwMaxLiveVideoStretch;
1156 DWORD dwMinHwCodecStretch;
1157 DWORD dwMaxHwCodecStretch;
1158 DWORD dwReserved1;
1159 DWORD dwReserved2;
1160 DWORD dwReserved3;
1161 DWORD dwSVBCaps;
1162 DWORD dwSVBCKeyCaps;
1163 DWORD dwSVBFXCaps;
1164 DWORD dwSVBRops[DD_ROP_SPACE];
1165 DWORD dwVSBCaps;
1166 DWORD dwVSBCKeyCaps;
1167 DWORD dwVSBFXCaps;
1168 DWORD dwVSBRops[DD_ROP_SPACE];
1169 DWORD dwSSBCaps;
1170 DWORD dwSSBCKeyCaps;
1171 DWORD dwSSBFXCaps;
1172 DWORD dwSSBRops[DD_ROP_SPACE];
1173 DWORD dwMaxVideoPorts;
1174 DWORD dwCurrVideoPorts;
1175 DWORD dwSVBCaps2;
1176 } DDNTCORECAPS, *PDDNTCORECAPS;
1177
1178 typedef struct
1179 {
1180 DWORD dwSize;
1181 VIDEOMEMORYINFO vmiData;
1182 DDNTCORECAPS ddCaps;
1183 PDD_GETDRIVERINFO GetDriverInfo;
1184 DWORD dwFlags;
1185 PVOID lpD3DGlobalDriverData;
1186 PVOID lpD3DHALCallbacks;
1187 PDD_D3DBUFCALLBACKS lpD3DBufCallbacks;
1188 } DD_HALINFO, *PDD_HALINFO;
1189
1190
1191 DEFINE_GUID(GUID_NonLocalVidMemCaps, 0x86C4FA80, 0x8D84, 0x11D0, 0x94, 0xE8, 0x00, 0xC0, 0x4F, 0xC3, 0x41, 0x37);
1192
1193 typedef struct
1194 {
1195 DWORD dwSize;
1196 DWORD dwNLVBCaps;
1197 DWORD dwNLVBCaps2;
1198 DWORD dwNLVBCKeyCaps;
1199 DWORD dwNLVBFXCaps;
1200 DWORD dwNLVBRops[DD_ROP_SPACE];
1201 } DD_NONLOCALVIDMEMCAPS, *PDD_NONLOCALVIDMEMCAPS;
1202
1203 DEFINE_GUID(GUID_DDMoreSurfaceCaps, 0x3B8A0466, 0xF269, 0x11D1, 0x88, 0x0B, 0x00, 0xC0, 0x4F, 0xD9, 0x30, 0xC5);
1204
1205 typedef struct
1206 {
1207 DWORD dwSize;
1208 DDSCAPSEX ddsCapsMore;
1209 struct
1210 {
1211 DDSCAPSEX ddsCapsEx;
1212 DDSCAPSEX ddsCapsExAlt;
1213 } ddsExtendedHeapRestrictions[1];
1214 } DD_MORESURFACECAPS, *PDD_MORESURFACECAPS;
1215
1216
1217
1218 #ifdef __cplusplus
1219 } /* extern "C" */
1220 #endif
1221
1222 #endif /* __DD_INCLUDED__ */