More DirectDraw groundwork by Peter Bajusz
[reactos.git] / reactos / include / ddk / ddrawi.h
1 /*
2 * DirectDraw driver interface
3 * (DirectX 7 version)
4 *
5 * Copyright (C) 2001 Ove Kaaven
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22 #ifndef __WINE_DDRAWI_H
23 #define __WINE_DDRAWI_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #include <ddraw.h>
30
31 #ifndef __DDK_DDRAWINT_H
32 typedef struct _DDVIDEOPORTCAPS *LPDDVIDEOPORTCAPS; /* should be in dvp.h */
33 typedef struct _DDKERNELCAPS *LPDDKERNELCAPS; /* should be in ddkernel.h */
34 typedef struct _VMEMHEAP *LPVMEMHEAP; /* should be in dmemmgr.h */
35 #endif
36
37 #define DDAPI WINAPI
38
39 /* the DirectDraw versions */
40 #define DD_VERSION 0x0200 /* compatibility version */
41 #define DD_RUNTIME_VERSION 0x0700 /* actual version */
42
43 /* the HAL version returned from QUERYESCSUPPORT - DCICOMMAND */
44 #define DD_HAL_VERSION 0x0100
45
46 /* more DCICOMMAND escapes */
47 #define DDCREATEDRIVEROBJECT 10
48 #define DDGET32BITDRIVERNAME 11
49 #define DDNEWCALLBACKFNS 12
50 #define DDVERSIONINFO 13
51
52 #define MAX_DRIVER_NAME CCHDEVICENAME
53
54 /*****************************************************************************
55 * Initialization stuff
56 */
57 typedef struct {
58 char szName[260];
59 char szEntryPoint[64];
60 DWORD dwContext;
61 } DD32BITDRIVERDATA,*LPDD32BITDRIVERDATA;
62
63 typedef struct {
64 DWORD dwHALVersion;
65 ULONG_PTR dwReserved1;
66 ULONG_PTR dwReserved2;
67 } DDVERSIONDATA,*LPDDVERSIONDATA;
68
69 typedef DWORD (PASCAL *LPDD32BITDRIVERINIT)(DWORD dwContext);
70
71 #ifndef __DDK_DDRAWINT_H
72 /* pointer to video memory */
73 typedef ULONG_PTR FLATPTR;
74 #endif
75
76 /* predeclare some structures */
77 typedef struct _DDHALINFO *LPDDHALINFO;
78 typedef struct _DDRAWI_DIRECTDRAW_INT *LPDDRAWI_DIRECTDRAW_INT;
79 typedef struct _DDRAWI_DIRECTDRAW_LCL *LPDDRAWI_DIRECTDRAW_LCL;
80 typedef struct _DDRAWI_DIRECTDRAW_GBL *LPDDRAWI_DIRECTDRAW_GBL;
81 typedef struct _DDRAWI_DDRAWSURFACE_INT *LPDDRAWI_DDRAWSURFACE_INT;
82 typedef struct _DDRAWI_DDRAWSURFACE_LCL *LPDDRAWI_DDRAWSURFACE_LCL;
83 typedef struct _DDRAWI_DDRAWSURFACE_GBL *LPDDRAWI_DDRAWSURFACE_GBL;
84 typedef struct _DDRAWI_DDRAWSURFACE_MORE *LPDDRAWI_DDRAWSURFACE_MORE;
85 typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE *LPDDRAWI_DDRAWSURFACE_GBL_MORE;
86 typedef struct _DDRAWI_DDRAWPALETTE_INT *LPDDRAWI_DDRAWPALETTE_INT;
87 typedef struct _DDRAWI_DDRAWPALETTE_LCL *LPDDRAWI_DDRAWPALETTE_LCL;
88 typedef struct _DDRAWI_DDRAWPALETTE_GBL *LPDDRAWI_DDRAWPALETTE_GBL;
89 typedef struct _DDRAWI_DDRAWCLIPPER_INT *LPDDRAWI_DDRAWCLIPPER_INT;
90 typedef struct _DDRAWI_DDRAWCLIPPER_LCL *LPDDRAWI_DDRAWCLIPPER_LCL;
91 typedef struct _DDRAWI_DDRAWCLIPPER_GBL *LPDDRAWI_DDRAWCLIPPER_GBL;
92 typedef struct _DDRAWI_DDVIDEOPORT_INT *LPDDRAWI_DDVIDEOPORT_INT;
93 typedef struct _DDRAWI_DDVIDEOPORT_LCL *LPDDRAWI_DDVIDEOPORT_LCL;
94 typedef struct _DDRAWI_DDMOTIONCOMP_INT *LPDDRAWI_DDMOTIONCOMP_INT;
95 typedef struct _DDRAWI_DDMOTIONCOMP_LCL *LPDDRAWI_DDMOTIONCOMP_LCL;
96
97 /*****************************************************************************
98 * driver->ddraw callbacks
99 */
100 typedef BOOL (DDAPI *LPDDHAL_SETINFO)(LPDDHALINFO lpDDHalInfo, BOOL reset);
101 typedef FLATPTR (DDAPI *LPDDHAL_VIDMEMALLOC)(LPDDRAWI_DIRECTDRAW_GBL lpDD, int heap, DWORD dwWidth, DWORD dwHeight);
102 typedef void (DDAPI *LPDDHAL_VIDMEMFREE)(LPDDRAWI_DIRECTDRAW_GBL lpDD, int heap, FLATPTR fpMem);
103
104 typedef struct {
105 DWORD dwSize;
106 LPDDHAL_SETINFO lpSetInfo;
107 LPDDHAL_VIDMEMALLOC lpVidMemAlloc;
108 LPDDHAL_VIDMEMFREE lpVidMemFree;
109 } DDHALDDRAWFNS,*LPDDHALDDRAWFNS;
110
111 /*****************************************************************************
112 * mode info structure
113 */
114 typedef struct _DDHALMODEINFO {
115 DWORD dwWidth;
116 DWORD dwHeight;
117 LONG lPitch;
118 DWORD dwBPP;
119 WORD wFlags;
120 WORD wRefreshRate;
121 DWORD dwRBitMask;
122 DWORD dwGBitMask;
123 DWORD dwBBitMask;
124 DWORD dwAlphaBitMask;
125 } DDHALMODEINFO,*LPDDHALMODEINFO;
126
127 #define DDMODEINFO_PALETTIZED 0x0001
128 #define DDMODEINFO_MODEX 0x0002
129 #define DDMODEINFO_UNSUPPORTED 0x0004
130 #define DDMODEINFO_STANDARDVGA 0x0008
131 #define DDMODEINFO_MAXREFRESH 0x0010
132 #define DDMODEINFO_STEREO 0x0020
133
134 /*****************************************************************************
135 * video memory info structure
136 */
137 typedef struct _VIDMEM {
138 DWORD dwFlags;
139 FLATPTR fpStart;
140 union {
141 FLATPTR fpEnd;
142 DWORD dwWidth;
143 } DUMMYUNIONNAME1;
144 DDSCAPS ddsCaps;
145 DDSCAPS ddsCapsAlt;
146 union {
147 LPVMEMHEAP lpHeap;
148 DWORD dwHeight;
149 } DUMMYUNIONNAME2;
150 } VIDMEM,*LPVIDMEM;
151
152 #ifndef __DDK_DDRAWINT_H
153 #define VIDMEM_ISLINEAR 0x00000001
154 #define VIDMEM_ISRECTANGULAR 0x00000002
155 #define VIDMEM_ISHEAP 0x00000004
156 #define VIDMEM_ISNONLOCAL 0x00000008
157 #define VIDMEM_ISWC 0x00000010
158 #define VIDMEM_ISDISABLED 0x00000020
159 #endif
160
161 typedef struct _VIDMEMINFO {
162 FLATPTR fpPrimary;
163 DWORD dwFlags;
164 DWORD dwDisplayWidth;
165 DWORD dwDisplayHeight;
166 LONG lDisplayPitch;
167 DDPIXELFORMAT ddpfDisplay;
168 DWORD dwOffscreenAlign;
169 DWORD dwOverlayAlign;
170 DWORD dwTextureAlign;
171 DWORD dwZBufferAlign;
172 DWORD dwAlphaAlign;
173 DWORD dwNumHeaps;
174 LPVIDMEM pvmList;
175 } VIDMEMINFO,*LPVIDMEMINFO;
176
177 typedef struct _HEAPALIAS {
178 FLATPTR fpVidMem;
179 LPVOID lpAlias;
180 DWORD dwAliasSize;
181 } HEAPALIAS,*LPHEAPALIAS;
182
183 typedef struct _HEAPALIASINFO {
184 DWORD dwRefCnt;
185 DWORD dwFlags;
186 DWORD dwNumHeaps;
187 LPHEAPALIAS lpAliases;
188 } HEAPALIASINFO,*LPHEAPALIASINFO;
189
190 #define HEAPALIASINFO_MAPPEDREAL 0x00000001
191 #define HEAPALIASINFO_MAPPEDDUMMY 0x00000002
192
193 /*****************************************************************************
194 * capabilities structures
195 */
196 typedef struct _DDCORECAPS {
197 DWORD dwSize;
198 DWORD dwCaps;
199 DWORD dwCaps2;
200 DWORD dwCKeyCaps;
201 DWORD dwFXCaps;
202 DWORD dwFXAlphaCaps;
203 DWORD dwPalCaps;
204 DWORD dwSVCaps;
205 DWORD dwAlphaBltConstBitDepths;
206 DWORD dwAlphaBltPixelBitDepths;
207 DWORD dwAlphaBltSurfaceBitDepths;
208 DWORD dwAlphaOverlayConstBitDepths;
209 DWORD dwAlphaOverlayPixelBitDepths;
210 DWORD dwAlphaOverlaySurfaceBitDepths;
211 DWORD dwZBufferBitDepths;
212 DWORD dwVidMemTotal;
213 DWORD dwVidMemFree;
214 DWORD dwMaxVisibleOverlays;
215 DWORD dwCurrVisibleOverlays;
216 DWORD dwNumFourCCCodes;
217 DWORD dwAlignBoundarySrc;
218 DWORD dwAlignSizeSrc;
219 DWORD dwAlignBoundaryDest;
220 DWORD dwAlignSizeDest;
221 DWORD dwAlignStrideAlign;
222 DWORD dwRops[DD_ROP_SPACE];
223 DDSCAPS ddsCaps;
224 DWORD dwMinOverlayStretch;
225 DWORD dwMaxOverlayStretch;
226 DWORD dwMinLiveVideoStretch;
227 DWORD dwMaxLiveVideoStretch;
228 DWORD dwMinHwCodecStretch;
229 DWORD dwMaxHwCodecStretch;
230 DWORD dwReserved1;
231 DWORD dwReserved2;
232 DWORD dwReserved3;
233 DWORD dwSVBCaps;
234 DWORD dwSVBCKeyCaps;
235 DWORD dwSVBFXCaps;
236 DWORD dwSVBRops[DD_ROP_SPACE];
237 DWORD dwVSBCaps;
238 DWORD dwVSBCKeyCaps;
239 DWORD dwVSBFXCaps;
240 DWORD dwVSBRops[DD_ROP_SPACE];
241 DWORD dwSSBCaps;
242 DWORD dwSSBCKeyCaps;
243 DWORD dwSSBFXCaps;
244 DWORD dwSSBRops[DD_ROP_SPACE];
245 DWORD dwMaxVideoPorts;
246 DWORD dwCurrVideoPorts;
247 DWORD dwSVBCaps2;
248 } DDCORECAPS,*LPDDCORECAPS;
249
250 typedef struct _DDNONLOCALVIDMEMCAPS {
251 DWORD dwSize;
252 DWORD dwNLVBCaps;
253 DWORD dwNLVBCaps2;
254 DWORD dwNLVBCKeyCaps;
255 DWORD dwNLVBFXCaps;
256 DWORD dwNLVBRops[DD_ROP_SPACE];
257 } DDNONLOCALVIDMEMCAPS,*LPDDNONLOCALVIDMEMCAPS;
258
259 #define DDSCAPS_EXECUTEBUFFER DDSCAPS_RESERVED2
260 #define DDSCAPS2_VERTEXBUFFER DDSCAPS2_RESERVED1
261 #define DDSCAPS2_COMMANDBUFFER DDSCAPS2_RESERVED2
262
263 /*****************************************************************************
264 * ddraw->driver callbacks
265 */
266 #define DDHAL_DRIVER_NOTHANDLED 0
267 #define DDHAL_DRIVER_HANDLED 1
268 #define DDHAL_DRIVER_NOCKEYHW 2
269
270 typedef struct _DDHAL_DESTROYDRIVERDATA *LPDDHAL_DESTROYDRIVERDATA;
271 typedef struct _DDHAL_CREATESURFACEDATA *LPDDHAL_CREATESURFACEDATA;
272 typedef struct _DDHAL_DRVSETCOLORKEYDATA *LPDDHAL_DRVSETCOLORKEYDATA;
273 typedef struct _DDHAL_SETMODEDATA *LPDDHAL_SETMODEDATA;
274 typedef struct _DDHAL_WAITFORVERTICALBLANKDATA *LPDDHAL_WAITFORVERTICALBLANKDATA;
275 typedef struct _DDHAL_CANCREATESURFACEDATA *LPDDHAL_CANCREATESURFACEDATA;
276 typedef struct _DDHAL_CREATEPALETTEDATA *LPDDHAL_CREATEPALETTEDATA;
277 typedef struct _DDHAL_GETSCANLINEDATA *LPDDHAL_GETSCANLINEDATA;
278 typedef struct _DDHAL_SETEXCLUSIVEMODEDATA *LPDDHAL_SETEXCLUSIVEMODEDATA;
279 typedef struct _DDHAL_FLIPTOGDISURFACEDATA *LPDDHAL_FLIPTOGDISURFACEDATA;
280
281 typedef DWORD (PASCAL *LPDDHAL_DESTROYDRIVER) (LPDDHAL_DESTROYDRIVERDATA);
282 typedef DWORD (PASCAL *LPDDHAL_CREATESURFACE) (LPDDHAL_CREATESURFACEDATA);
283 typedef DWORD (PASCAL *LPDDHAL_SETCOLORKEY) (LPDDHAL_DRVSETCOLORKEYDATA);
284 typedef DWORD (PASCAL *LPDDHAL_SETMODE) (LPDDHAL_SETMODEDATA);
285 typedef DWORD (PASCAL *LPDDHAL_WAITFORVERTICALBLANK)(LPDDHAL_WAITFORVERTICALBLANKDATA);
286 typedef DWORD (PASCAL *LPDDHAL_CANCREATESURFACE) (LPDDHAL_CANCREATESURFACEDATA );
287 typedef DWORD (PASCAL *LPDDHAL_CREATEPALETTE) (LPDDHAL_CREATEPALETTEDATA);
288 typedef DWORD (PASCAL *LPDDHAL_GETSCANLINE) (LPDDHAL_GETSCANLINEDATA);
289 typedef DWORD (PASCAL *LPDDHAL_SETEXCLUSIVEMODE) (LPDDHAL_SETEXCLUSIVEMODEDATA);
290 typedef DWORD (PASCAL *LPDDHAL_FLIPTOGDISURFACE) (LPDDHAL_FLIPTOGDISURFACEDATA);
291
292 typedef struct _DDHAL_DDCALLBACKS {
293 DWORD dwSize;
294 DWORD dwFlags;
295 LPDDHAL_DESTROYDRIVER DestroyDriver;
296 LPDDHAL_CREATESURFACE CreateSurface;
297 LPDDHAL_SETCOLORKEY SetColorKey;
298 LPDDHAL_SETMODE SetMode;
299 LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank;
300 LPDDHAL_CANCREATESURFACE CanCreateSurface;
301 LPDDHAL_CREATEPALETTE CreatePalette;
302 LPDDHAL_GETSCANLINE GetScanLine;
303 /* DirectX 2 */
304 LPDDHAL_SETEXCLUSIVEMODE SetExclusiveMode;
305 LPDDHAL_FLIPTOGDISURFACE FlipToGDISurface;
306 } DDHAL_DDCALLBACKS,*LPDDHAL_DDCALLBACKS;
307
308 typedef struct _DDHAL_DESTROYSURFACEDATA *LPDDHAL_DESTROYSURFACEDATA;
309 typedef struct _DDHAL_FLIPDATA *LPDDHAL_FLIPDATA;
310 typedef struct _DDHAL_SETCLIPLISTDATA *LPDDHAL_SETCLIPLISTDATA;
311 typedef struct _DDHAL_LOCKDATA *LPDDHAL_LOCKDATA;
312 typedef struct _DDHAL_UNLOCKDATA *LPDDHAL_UNLOCKDATA;
313 typedef struct _DDHAL_BLTDATA *LPDDHAL_BLTDATA;
314 typedef struct _DDHAL_SETCOLORKEYDATA *LPDDHAL_SETCOLORKEYDATA;
315 typedef struct _DDHAL_ADDATTACHEDSURFACEDATA *LPDDHAL_ADDATTACHEDSURFACEDATA;
316 typedef struct _DDHAL_GETBLTSTATUSDATA *LPDDHAL_GETBLTSTATUSDATA;
317 typedef struct _DDHAL_GETFLIPSTATUSDATA *LPDDHAL_GETFLIPSTATUSDATA;
318 typedef struct _DDHAL_UPDATEOVERLAYDATA *LPDDHAL_UPDATEOVERLAYDATA;
319 typedef struct _DDHAL_SETOVERLAYPOSITIONDATA *LPDDHAL_SETOVERLAYPOSITIONDATA;
320 typedef struct _DDHAL_SETPALETTEDATA *LPDDHAL_SETPALETTEDATA;
321
322 typedef DWORD (PASCAL *LPDDHALSURFCB_DESTROYSURFACE) (LPDDHAL_DESTROYSURFACEDATA);
323 typedef DWORD (PASCAL *LPDDHALSURFCB_FLIP) (LPDDHAL_FLIPDATA);
324 typedef DWORD (PASCAL *LPDDHALSURFCB_SETCLIPLIST) (LPDDHAL_SETCLIPLISTDATA);
325 typedef DWORD (PASCAL *LPDDHALSURFCB_LOCK) (LPDDHAL_LOCKDATA);
326 typedef DWORD (PASCAL *LPDDHALSURFCB_UNLOCK) (LPDDHAL_UNLOCKDATA);
327 typedef DWORD (PASCAL *LPDDHALSURFCB_BLT) (LPDDHAL_BLTDATA);
328 typedef DWORD (PASCAL *LPDDHALSURFCB_SETCOLORKEY) (LPDDHAL_SETCOLORKEYDATA);
329 typedef DWORD (PASCAL *LPDDHALSURFCB_ADDATTACHEDSURFACE)(LPDDHAL_ADDATTACHEDSURFACEDATA);
330 typedef DWORD (PASCAL *LPDDHALSURFCB_GETBLTSTATUS) (LPDDHAL_GETBLTSTATUSDATA);
331 typedef DWORD (PASCAL *LPDDHALSURFCB_GETFLIPSTATUS) (LPDDHAL_GETFLIPSTATUSDATA);
332 typedef DWORD (PASCAL *LPDDHALSURFCB_UPDATEOVERLAY) (LPDDHAL_UPDATEOVERLAYDATA);
333 typedef DWORD (PASCAL *LPDDHALSURFCB_SETOVERLAYPOSITION)(LPDDHAL_SETOVERLAYPOSITIONDATA);
334 typedef DWORD (PASCAL *LPDDHALSURFCB_SETPALETTE) (LPDDHAL_SETPALETTEDATA);
335
336 typedef struct _DDHAL_DDSURFACECALLBACKS {
337 DWORD dwSize;
338 DWORD dwFlags;
339 LPDDHALSURFCB_DESTROYSURFACE DestroySurface;
340 LPDDHALSURFCB_FLIP Flip;
341 LPDDHALSURFCB_SETCLIPLIST SetClipList;
342 LPDDHALSURFCB_LOCK Lock;
343 LPDDHALSURFCB_UNLOCK Unlock;
344 LPDDHALSURFCB_BLT Blt;
345 LPDDHALSURFCB_SETCOLORKEY SetColorKey;
346 LPDDHALSURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
347 LPDDHALSURFCB_GETBLTSTATUS GetBltStatus;
348 LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus;
349 LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay;
350 LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition;
351 LPVOID reserved4;
352 LPDDHALSURFCB_SETPALETTE SetPalette;
353 } DDHAL_DDSURFACECALLBACKS,*LPDDHAL_DDSURFACECALLBACKS;
354
355 typedef struct _DDHAL_DESTROYPALETTEDATA *LPDDHAL_DESTROYPALETTEDATA;
356 typedef struct _DDHAL_SETENTRIESDATA *LPDDHAL_SETENTRIESDATA;
357
358 typedef DWORD (PASCAL *LPDDHALPALCB_DESTROYPALETTE)(LPDDHAL_DESTROYPALETTEDATA);
359 typedef DWORD (PASCAL *LPDDHALPALCB_SETENTRIES) (LPDDHAL_SETENTRIESDATA);
360
361 typedef struct _DDHAL_DDPALETTECALLBACKS {
362 DWORD dwSize;
363 DWORD dwFlags;
364 LPDDHALPALCB_DESTROYPALETTE DestroyPalette;
365 LPDDHALPALCB_SETENTRIES SetEntries;
366 } DDHAL_DDPALETTECALLBACKS,*LPDDHAL_DDPALETTECALLBACKS;
367
368 typedef DWORD (PASCAL *LPDDHALEXEBUFCB_CANCREATEEXEBUF)(LPDDHAL_CANCREATESURFACEDATA);
369 typedef DWORD (PASCAL *LPDDHALEXEBUFCB_CREATEEXEBUF) (LPDDHAL_CREATESURFACEDATA);
370 typedef DWORD (PASCAL *LPDDHALEXEBUFCB_DESTROYEXEBUF) (LPDDHAL_DESTROYSURFACEDATA);
371 typedef DWORD (PASCAL *LPDDHALEXEBUFCB_LOCKEXEBUF) (LPDDHAL_LOCKDATA);
372 typedef DWORD (PASCAL *LPDDHALEXEBUFCB_UNLOCKEXEBUF) (LPDDHAL_UNLOCKDATA);
373
374 typedef struct _DDHAL_DDEXEBUFCALLBACKS {
375 DWORD dwSize;
376 DWORD dwFlags;
377 LPDDHALEXEBUFCB_CANCREATEEXEBUF CanCreateExecuteBuffer;
378 LPDDHALEXEBUFCB_CREATEEXEBUF CreateExecuteBuffer;
379 LPDDHALEXEBUFCB_DESTROYEXEBUF DestroyExecuteBuffer;
380 LPDDHALEXEBUFCB_LOCKEXEBUF LockExecuteBuffer;
381 LPDDHALEXEBUFCB_UNLOCKEXEBUF UnlockExecuteBuffer;
382 } DDHAL_DDEXEBUFCALLBACKS,*LPDDHAL_DDEXEBUFCALLBACKS;
383
384 typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA *LPDDHAL_GETAVAILDRIVERMEMORYDATA;
385 typedef struct _DDHAL_UPDATENONLOCALHEAPDATA *LPDDHAL_UPDATENONLOCALHEAPDATA;
386 typedef struct _DDHAL_GETHEAPALIGNMENTDATA *LPDDHAL_GETHEAPALIGNMENTDATA;
387
388 typedef DWORD (PASCAL *LPDDHAL_GETAVAILDRIVERMEMORY)(LPDDHAL_GETAVAILDRIVERMEMORYDATA);
389 typedef DWORD (PASCAL *LPDDHAL_UPDATENONLOCALHEAP) (LPDDHAL_UPDATENONLOCALHEAPDATA);
390 typedef DWORD (PASCAL *LPDDHAL_GETHEAPALIGNMENT) (LPDDHAL_GETHEAPALIGNMENTDATA);
391
392 typedef struct _DDHAL_DDMISCELLANEOUSCALLBACKS {
393 DWORD dwSize;
394 DWORD dwFlags;
395 LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory;
396 LPDDHAL_UPDATENONLOCALHEAP UpdateNonLocalHeap;
397 LPDDHAL_GETHEAPALIGNMENT GetHeapAlignment;
398 LPDDHALSURFCB_GETBLTSTATUS GetSysmemBltStatus;
399 } DDHAL_DDMISCELLANEOUSCALLBACKS,*LPDDHAL_DDMISCELLANEOUSCALLBACKS;
400
401 typedef struct _DDHAL_CREATESURFACEEXDATA *LPDDHAL_CREATESURFACEEXDATA;
402 typedef struct _DDHAL_GETDRIVERSTATEDATA *LPDDHAL_GETDRIVERSTATEDATA;
403 typedef struct _DDHAL_DESTROYDDLOCALDATA *LPDDHAL_DESTROYDDLOCALDATA;
404
405 typedef DWORD (PASCAL *LPDDHAL_CREATESURFACEEX)(LPDDHAL_CREATESURFACEEXDATA);
406 typedef DWORD (PASCAL *LPDDHAL_GETDRIVERSTATE) (LPDDHAL_GETDRIVERSTATEDATA);
407 typedef DWORD (PASCAL *LPDDHAL_DESTROYDDLOCAL) (LPDDHAL_DESTROYDDLOCALDATA);
408
409 typedef struct _DDHAL_DDMISCELLANEOUS2CALLBACKS {
410 DWORD dwSize;
411 DWORD dwFlags;
412 LPVOID Reserved;
413 LPDDHAL_CREATESURFACEEX CreateSurfaceEx;
414 LPDDHAL_GETDRIVERSTATE GetDriverState;
415 LPDDHAL_DESTROYDDLOCAL DestroyDDLocal;
416 } DDHAL_DDMISCELLANEOUS2CALLBACKS,*LPDDHAL_DDMISCELLANEOUS2CALLBACKS;
417
418 typedef HRESULT (WINAPI *LPDDGAMMACALIBRATORPROC)(LPDDGAMMARAMP, LPBYTE);
419
420 /*****************************************************************************
421 * driver info structure
422 *
423 * The HAL is queried for additional callbacks via the GetDriverInfo callback.
424 */
425 typedef struct _DDHAL_GETDRIVERINFODATA *LPDDHAL_GETDRIVERINFODATA;
426 typedef DWORD (PASCAL *LPDDHAL_GETDRIVERINFO)(LPDDHAL_GETDRIVERINFODATA);
427
428 typedef struct _DDHALINFO {
429 DWORD dwSize;
430 LPDDHAL_DDCALLBACKS lpDDCallbacks;
431 LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks;
432 LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks;
433 VIDMEMINFO vmiData;
434 DDCORECAPS ddCaps;
435 DWORD dwMonitorFrequency;
436 LPDDHAL_GETDRIVERINFO GetDriverInfo;
437 DWORD dwModeIndex;
438 LPDWORD lpdwFourCC;
439 DWORD dwNumModes;
440 LPDDHALMODEINFO lpModeInfo;
441 DWORD dwFlags;
442 LPVOID lpPDevice;
443 DWORD hInstance;
444 /* DirectX 2 */
445 ULONG_PTR lpD3DGlobalDriverData;
446 ULONG_PTR lpD3DHALCallbacks;
447 LPDDHAL_DDEXEBUFCALLBACKS lpDDExeBufCallbacks;
448 } DDHALINFO;
449
450 #define DDHALINFO_ISPRIMARYDISPLAY 0x00000001
451 #define DDHALINFO_MODEXILLEGAL 0x00000002
452 #define DDHALINFO_GETDRIVERINFOSET 0x00000004
453
454 /* where the high-level ddraw implementation stores the callbacks */
455 typedef struct _DDHAL_CALLBACKS {
456 DDHAL_DDCALLBACKS cbDDCallbacks;
457 DDHAL_DDSURFACECALLBACKS cbDDSurfaceCallbacks;
458 DDHAL_DDPALETTECALLBACKS cbDDPaletteCallbacks;
459 DDHAL_DDCALLBACKS HALDD;
460 DDHAL_DDSURFACECALLBACKS HALDDSurface;
461 DDHAL_DDPALETTECALLBACKS HALDDPalette;
462 DDHAL_DDCALLBACKS HELDD;
463 DDHAL_DDSURFACECALLBACKS HELDDSurface;
464 DDHAL_DDPALETTECALLBACKS HELDDPalette;
465 DDHAL_DDEXEBUFCALLBACKS cbDDExeBufCallbacks;
466 DDHAL_DDEXEBUFCALLBACKS HALDDExeBuf;
467 DDHAL_DDEXEBUFCALLBACKS HELDDExeBuf;
468 /* there's more... videoport, colorcontrol, misc, and motion compensation callbacks... */
469 } DDHAL_CALLBACKS,*LPDDHAL_CALLBACKS;
470
471 /*****************************************************************************
472 * parameter structures
473 */
474 typedef struct _DDHAL_DESTROYDRIVERDATA {
475 LPDDRAWI_DIRECTDRAW_GBL lpDD;
476 HRESULT ddRVal;
477 LPDDHAL_DESTROYDRIVER DestroyDriver;
478 } DDHAL_DESTROYDRIVERDATA;
479
480 typedef struct _DDHAL_SETMODEDATA {
481 LPDDRAWI_DIRECTDRAW_GBL lpDD;
482 DWORD dwModeIndex;
483 HRESULT ddRVal;
484 LPDDHAL_SETMODE SetMode;
485 BOOL inexcl;
486 BOOL useRefreshRate;
487 } DDHAL_SETMODEDATA;
488
489 typedef struct _DDHAL_CREATESURFACEDATA {
490 LPDDRAWI_DIRECTDRAW_GBL lpDD;
491 LPDDSURFACEDESC lpDDSurfaceDesc;
492 LPDDRAWI_DDRAWSURFACE_LCL * lplpSList;
493 DWORD dwSCnt;
494 HRESULT ddRVal;
495 LPDDHAL_CREATESURFACE CreateSurface;
496 } DDHAL_CREATESURFACEDATA;
497
498 typedef struct _DDHAL_CANCREATESURFACEDATA {
499 LPDDRAWI_DIRECTDRAW_GBL lpDD;
500 LPDDSURFACEDESC lpDDSurfaceDesc;
501 DWORD bIsDifferentPixelFormat;
502 HRESULT ddRVal;
503 LPDDHAL_CANCREATESURFACE CanCreateSurface;
504 } DDHAL_CANCREATESURFACEDATA;
505
506 typedef struct _DDHAL_CREATEPALETTEDATA {
507 LPDDRAWI_DIRECTDRAW_GBL lpDD;
508 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
509 LPPALETTEENTRY lpColorTable;
510 HRESULT ddRVal;
511 LPDDHAL_CREATEPALETTE CreatePalette;
512 BOOL is_excl;
513 } DDHAL_CREATEPALETTEDATA;
514
515 typedef struct _DDHAL_SETEXCLUSIVEMODEDATA {
516 LPDDRAWI_DIRECTDRAW_GBL lpDD;
517 DWORD dwEnterExcl;
518 DWORD dwReserved;
519 HRESULT ddRVal;
520 LPDDHAL_SETEXCLUSIVEMODE SetExclusiveMode;
521 } DDHAL_SETEXCLUSIVEMODEDATA;
522
523 /* surfaces */
524 typedef struct _DDHAL_DESTROYSURFACEDATA {
525 LPDDRAWI_DIRECTDRAW_GBL lpDD;
526 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
527 HRESULT ddRVal;
528 LPDDHALSURFCB_DESTROYSURFACE DestroySurface;
529 } DDHAL_DESTROYSURFACEDATA;
530
531 typedef struct _DDHAL_FLIPDATA {
532 LPDDRAWI_DIRECTDRAW_GBL lpDD;
533 LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr;
534 LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg;
535 DWORD dwFlags;
536 HRESULT ddRVal;
537 LPDDHALSURFCB_FLIP Flip;
538 LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurrLeft;
539 LPDDRAWI_DDRAWSURFACE_LCL lpSurfTargLeft;
540 } DDHAL_FLIPDATA;
541
542 typedef struct _DDHAL_LOCKDATA {
543 LPDDRAWI_DIRECTDRAW_GBL lpDD;
544 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
545 DWORD bHasRect;
546 RECTL rArea;
547 LPVOID lpSurfData;
548 HRESULT ddRVal;
549 LPDDHALSURFCB_LOCK Lock;
550 DWORD dwFlags;
551 } DDHAL_LOCKDATA;
552
553 typedef struct _DDHAL_UNLOCKDATA {
554 LPDDRAWI_DIRECTDRAW_GBL lpDD;
555 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
556 HRESULT ddRVal;
557 LPDDHALSURFCB_UNLOCK Unlock;
558 } DDHAL_UNLOCKDATA;
559
560 typedef struct _DDHAL_BLTDATA {
561 LPDDRAWI_DIRECTDRAW_GBL lpDD;
562 LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;
563 RECTL rDest;
564 LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface;
565 RECTL rSrc;
566 DWORD dwFlags;
567 DWORD dwROPFlags;
568 DDBLTFX bltFX;
569 HRESULT ddRVal;
570 LPDDHALSURFCB_BLT Blt;
571 BOOL IsClipped;
572 RECTL rOrigDest;
573 RECTL rOrigSrc;
574 DWORD dwRectCnt;
575 LPRECT prDestRects;
576 } DDHAL_BLTDATA;
577
578 typedef struct _DDHAL_SETPALETTEDATA {
579 LPDDRAWI_DIRECTDRAW_GBL lpDD;
580 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
581 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
582 HRESULT ddRVal;
583 LPDDHALSURFCB_SETPALETTE SetPalette;
584 BOOL Attach;
585 } DDHAL_SETPALETTEDATA;
586
587 /* palettes */
588 typedef struct _DDHAL_DESTROYPALETTEDATA {
589 LPDDRAWI_DIRECTDRAW_GBL lpDD;
590 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
591 HRESULT ddRVal;
592 LPDDHALPALCB_DESTROYPALETTE DestroyPalette;
593 } DDHAL_DESTROYPALETTEDATA;
594
595 typedef struct _DDHAL_SETENTRIESDATA {
596 LPDDRAWI_DIRECTDRAW_GBL lpDD;
597 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
598 DWORD dwBase;
599 DWORD dwNumEntries;
600 LPPALETTEENTRY lpEntries;
601 HRESULT ddRVal;
602 LPDDHALPALCB_SETENTRIES SetEntries;
603 } DDHAL_SETENTRIESDATA;
604
605 typedef struct _DDHAL_GETDRIVERINFODATA {
606 DWORD dwSize;
607 DWORD dwFlags;
608 GUID guidInfo;
609 DWORD dwExpectedSize;
610 LPVOID lpvData;
611 DWORD dwActualSize;
612 HRESULT ddRVal;
613 ULONG_PTR dwContext;
614 } DDHAL_GETDRIVERINFODATA;
615
616 /*****************************************************************************
617 * high-level ddraw implementation structures
618 */
619 typedef DWORD IUnknown; /* FIXME: implement proper definition */
620 typedef struct _IUNKNOWN_LIST {
621 struct _IUNKNOWN_LIST * lpLink;
622 LPGUID lpGuid;
623 IUnknown * lpIUnknown;
624 } IUNKNOWN_LIST,*LPIUNKNOWN_LIST;
625
626 typedef struct _PROCESS_LIST {
627 struct _PROCESS_LIST * lpLink;
628 DWORD dwProcessId;
629 DWORD dwRefCnt;
630 DWORD dwAlphaDepth;
631 DWORD dwZDepth;
632 } PROCESS_LIST,*LPPROCESS_LIST;
633
634 typedef struct _ATTACHLIST {
635 DWORD dwFlags;
636 struct _ATTACHLIST * lpLink;
637 LPDDRAWI_DDRAWSURFACE_LCL lpAttached;
638 LPDDRAWI_DDRAWSURFACE_INT lpIAttached;
639 } ATTACHLIST,*LPATTACHLIST;
640
641 #define DDAL_IMPLICIT 0x00000001
642
643 typedef struct _ACCESSRECTLIST {
644 struct _ACCESSRECTLIST * lpLink;
645 RECT rDest;
646 LPDDRAWI_DIRECTDRAW_LCL lpOwner;
647 LPVOID lpSurfaceData;
648 DWORD dwFlags;
649 LPHEAPALIASINFO lpHeapAliasInfo;
650 } ACCESSRECTLIST,*LPACCESSRECTLIST;
651
652 #define ACCESSRECT_VRAMSTYLE 0x00000001
653 #define ACCESSRECT_NOTHOLDINGWIN16LOCK 0x00000002
654 #define ACCESSRECT_BROKEN 0x00000004
655
656 typedef struct _DBLNODE {
657 struct _DBLNODE * next;
658 struct _DBLNODE * prev;
659 LPDDRAWI_DDRAWSURFACE_LCL object;
660 LPDDRAWI_DDRAWSURFACE_INT object_int;
661 } DBLNODE,*LPDBLNODE;
662
663 typedef struct _DDRAWI_DIRECTDRAW_INT {
664 LPVOID lpVtbl;
665 LPDDRAWI_DIRECTDRAW_LCL lpLcl;
666 LPDDRAWI_DIRECTDRAW_INT lpLink;
667 DWORD dwIntRefCnt;
668 } DDRAWI_DIRECTDRAW_INT;
669
670 typedef struct _DDRAWI_DIRECTDRAW_LCL {
671 DWORD lpDDMore;
672 LPDDRAWI_DIRECTDRAW_GBL lpGbl;
673 DWORD dwUnused0;
674 DWORD dwLocalFlags;
675 DWORD dwLocalRefCnt;
676 DWORD dwProcessId;
677 IUnknown * pUnkOuter;
678 DWORD dwObsolete1;
679 ULONG_PTR hWnd;
680 ULONG_PTR hDC;
681 DWORD dwErrorMode;
682 LPDDRAWI_DDRAWSURFACE_INT lpPrimary;
683 LPDDRAWI_DDRAWSURFACE_INT lpCB;
684 DWORD dwPreferredMode;
685 /* DirectX 2 */
686 HINSTANCE hD3DInstance;
687 IUnknown * pD3DIUnknown;
688 LPDDHAL_CALLBACKS lpDDCB;
689 ULONG_PTR hDDVxd;
690 /* DirectX 5.0 */
691 DWORD dwAppHackFlags;
692 /* DirectX 5.0A */
693 ULONG_PTR hFocusWnd;
694 DWORD dwHotTracking;
695 DWORD dwIMEState;
696 /* DirectX 6.0 */
697 ULONG_PTR hWndPopup;
698 ULONG_PTR hDD;
699 ULONG_PTR hGammaCalibrator;
700 LPDDGAMMACALIBRATORPROC lpGammaCalibrator;
701 } DDRAWI_DIRECTDRAW_LCL;
702
703 #define DDRAWILCL_HASEXCLUSIVEMODE 0x00000001
704 #define DDRAWILCL_ISFULLSCREEN 0x00000002
705 #define DDRAWILCL_SETCOOPCALLED 0x00000004
706 #define DDRAWILCL_ACTIVEYES 0x00000008
707 #define DDRAWILCL_ACTIVENO 0x00000010
708 #define DDRAWILCL_HOOKEDHWND 0x00000020
709 #define DDRAWILCL_ALLOWMODEX 0x00000040
710 #define DDRAWILCL_V1SCLBEHAVIOUR 0x00000080
711 #define DDRAWILCL_MODEHASBEENCHANGED 0x00000100
712 #define DDRAWILCL_CREATEDWINDOW 0x00000200
713 #define DDRAWILCL_DIRTYDC 0x00000400
714 #define DDRAWILCL_DISABLEINACTIVATE 0x00000800
715 #define DDRAWILCL_CURSORCLIPPED 0x00001000
716 #define DDRAWILCL_EXPLICITMONITOR 0x00002000
717 #define DDRAWILCL_MULTITHREADED 0x00004000
718 #define DDRAWILCL_FPUSETUP 0x00008000
719 #define DDRAWILCL_POWEREDDOWN 0x00010000
720 #define DDRAWILCL_DIRECTDRAW7 0x00020000
721 #define DDRAWILCL_ATTEMPTEDD3DCONTEXT 0x00040000
722 #define DDRAWILCL_FPUPRESERVE 0x00080000
723
724 typedef struct _DDRAWI_DIRECTDRAW_GBL {
725 DWORD dwRefCnt;
726 DWORD dwFlags;
727 FLATPTR fpPrimaryOrig;
728 DDCORECAPS ddCaps;
729 DWORD dwInternal1;
730 DWORD dwUnused1[9];
731 LPDDHAL_CALLBACKS lpDDCBtmp;
732 LPDDRAWI_DDRAWSURFACE_INT dsList;
733 LPDDRAWI_DDRAWPALETTE_INT palList;
734 LPDDRAWI_DDRAWCLIPPER_INT clipperList;
735 LPDDRAWI_DIRECTDRAW_GBL lp16DD;
736 DWORD dwMaxOverlays;
737 DWORD dwCurrOverlays;
738 DWORD dwMonitorFrequency;
739 DDCORECAPS ddHELCaps;
740 DWORD dwUnused2[50];
741 DDCOLORKEY ddckCKDestOverlay;
742 DDCOLORKEY ddckCKSrcOverlay;
743 VIDMEMINFO vmiData;
744 LPVOID lpDriverHandle;
745 LPDDRAWI_DIRECTDRAW_LCL lpExclusiveOwner;
746 DWORD dwModeIndex;
747 DWORD dwModeIndexOrig;
748 DWORD dwNumFourCC;
749 LPDWORD lpdwFourCC;
750 DWORD dwNumModes;
751 LPDDHALMODEINFO lpModeInfo;
752 PROCESS_LIST plProcessList;
753 DWORD dwSurfaceLockCount;
754 DWORD dwAliasedLockCnt;
755 ULONG_PTR dwReserved3;
756 ULONG_PTR hDD;
757 char cObsolete[12];
758 DWORD dwReserved1;
759 DWORD dwReserved2;
760 DBLNODE dbnOverlayRoot;
761 volatile LPWORD lpwPDeviceFlags;
762 DWORD dwPDevice;
763 DWORD dwWin16LockCnt;
764 DWORD dwUnused3;
765 DWORD hInstance;
766 DWORD dwEvent16;
767 DWORD dwSaveNumModes;
768 /* DirectX 2 */
769 ULONG_PTR lpD3DGlobalDriverData;
770 ULONG_PTR lpD3DHALCallbacks;
771 DDCORECAPS ddBothCaps;
772 /* DirectX 5.0 */
773 LPDDVIDEOPORTCAPS lpDDVideoPortCaps;
774 LPDDRAWI_DDVIDEOPORT_INT dvpList;
775 ULONG_PTR lpD3DHALCallbacks2;
776 RECT rectDevice;
777 DWORD cMonitors;
778 LPVOID gpbmiSrc;
779 LPVOID gpbmiDest;
780 LPHEAPALIASINFO phaiHeapAliases;
781 ULONG_PTR hKernelHandle;
782 ULONG_PTR pfnNotifyProc;
783 LPDDKERNELCAPS lpDDKernelCaps;
784 LPDDNONLOCALVIDMEMCAPS lpddNLVCaps;
785 LPDDNONLOCALVIDMEMCAPS lpddNLVHELCaps;
786 LPDDNONLOCALVIDMEMCAPS lpddNLVBothCaps;
787 ULONG_PTR lpD3DExtendedCaps;
788 /* DirectX 5.0A */
789 DWORD dwDOSBoxEvent;
790 RECT rectDesktop;
791 char cDriverName[MAX_DRIVER_NAME];
792 /* DirectX 6.0 */
793 ULONG_PTR lpD3DHALCallbacks3;
794 DWORD dwNumZPixelFormats;
795 LPDDPIXELFORMAT lpZPixelFormats;
796 LPDDRAWI_DDMOTIONCOMP_INT mcList;
797 DWORD hDDVxd;
798 DDSCAPSEX ddsCapsMore;
799 } DDRAWI_DIRECTDRAW_GBL;
800
801 #define DDRAWI_VIRTUALDESKTOP 0x00000008
802 #define DDRAWI_MODEX 0x00000010
803 #define DDRAWI_DISPLAYDRV 0x00000020
804 #define DDRAWI_FULLSCREEN 0x00000040
805 #define DDRAWI_MODECHANGED 0x00000080
806 #define DDRAWI_NOHARDWARE 0x00000100
807 #define DDRAWI_PALETTEINIT 0x00000200
808 #define DDRAWI_NOEMULATION 0x00000400
809 /* more... */
810
811 /* surfaces */
812 typedef struct _DDRAWI_DDRAWSURFACE_INT {
813 LPVOID lpVtbl;
814 LPDDRAWI_DDRAWSURFACE_LCL lpLcl;
815 LPDDRAWI_DDRAWSURFACE_INT lpLink;
816 DWORD dwIntRefCnt;
817 } DDRAWI_DDRAWSURFACE_INT;
818
819 typedef struct _DDRAWI_DDRAWSURFACE_GBL {
820 DWORD dwRefCnt;
821 DWORD dwGlobalFlags;
822 union {
823 LPACCESSRECTLIST lpRectList;
824 DWORD dwBlockSizeY;
825 } DUMMYUNIONNAME1;
826 union {
827 LPVMEMHEAP lpVidMemHeap;
828 DWORD dwBlockSizeX;
829 } DUMMYUNIONNAME2;
830 union {
831 LPDDRAWI_DIRECTDRAW_GBL lpDD;
832 LPVOID lpDDHandle;
833 } DUMMYUNIONNAME3;
834 FLATPTR fpVidMem;
835 union {
836 LONG lPitch;
837 DWORD dwLinearSize;
838 } DUMMYUNIONNAME4;
839 WORD wHeight;
840 WORD wWidth;
841 DWORD dwUsageCount;
842 ULONG_PTR dwReserved1; /* for display driver use */
843 /* optional (defaults to primary surface pixelformat) */
844 DDPIXELFORMAT ddpfSurface;
845 } DDRAWI_DDRAWSURFACE_GBL;
846
847 #define DDRAWISURFGBL_MEMFREE 0x00000001
848 #define DDRAWISURFGBL_SYSMEMREQUESTED 0x00000002
849 #define DDRAWISURFGBL_ISGDISURFACE 0x00000004
850 #define DDRAWISURFGBL_SOFTWAREAUTOFLIP 0x00000008
851 #define DDRAWISURFGBL_LOCKNOTHOLDINGWIN16LOCK 0x00000010
852 #define DDRAWISURFGBL_LOCKVRAMSTYLE 0x00000020
853 #define DDRAWISURFGBL_LOCKBROKEN 0x00000040
854 #define DDRAWISURFGBL_IMPLICITHANDLE 0x00000080
855 #define DDRAWISURFGBL_ISCLIENTMEM 0x00000100
856 #define DDRAWISURFGBL_HARDWAREOPSOURCE 0x00000200
857 #define DDRAWISURFGBL_HARDWAREOPDEST 0x00000400
858 #define DDRAWISURFGBL_HARDWAREOPSTARTED 0x00000600
859 #define DDRAWISURFGBL_VPORTINTERLEAVED 0x00000800
860 #define DDRAWISURFGBL_VPORTDATA 0x00001000
861 #define DDRAWISURFGBL_LATEALLOCATELINEAR 0x00002000
862 #define DDRAWISURFGBL_SYSMEMEXECUTEBUFFER 0x00004000
863 #define DDRAWISURFGBL_FASTLOCKHELD 0x00008000
864 #define DDRAWISURFGBL_READONLYLOCKHELD 0x00010000
865
866 typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE {
867 DWORD dwSize;
868 union {
869 DWORD dwPhysicalPageTable;
870 FLATPTR fpPhysicalVidMem;
871 } DUMMYUNIONNAME1;
872 LPDWORD pPageTable;
873 DWORD cPages;
874 ULONG_PTR dwSavedDCContext;
875 FLATPTR fpAliasedVidMem;
876 ULONG_PTR dwDriverReserved;
877 ULONG_PTR dwHELReserved;
878 DWORD cPageUnlocks;
879 ULONG_PTR hKernelSurface;
880 DWORD dwKernelRefCnt;
881 LPDDCOLORCONTROL lpColorInfo;
882 FLATPTR fpNTAlias;
883 DWORD dwContentsStamp;
884 LPVOID lpvUnswappedDriverReserved;
885 LPVOID lpDDRAWReserved2;
886 DWORD dwDDRAWReserved1;
887 DWORD dwDDRAWReserved2;
888 FLATPTR fpAliasOfVidMem;
889 } DDRAWI_DDRAWSURFACE_GBL_MORE;
890
891 /* the MS version of this macro was somewhat obfuscated and unreadable
892 * (possibly because of mediocre MS coders)... so I simplified it...
893 * (and so I commit no copyright violations either, hah) */
894 #define GET_LPDDRAWSURFACE_GBL_MORE(psurf_gbl) \
895 (*(((LPDDRAWI_DDRAWSURFACE_GBL_MORE *)(psurf_gbl)) - 1))
896
897 typedef struct _DDRAWI_DDRAWSURFACE_MORE {
898 DWORD dwSize;
899 IUNKNOWN_LIST * lpIUnknowns;
900 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
901 DWORD dwPageLockCount;
902 DWORD dwBytesAllocated;
903 LPDDRAWI_DIRECTDRAW_INT lpDD_int;
904 DWORD dwMipMapCount;
905 LPDDRAWI_DDRAWCLIPPER_INT lpDDIClipper;
906 /* DirectX 5.0 */
907 LPHEAPALIASINFO lpHeapAliasInfo;
908 DWORD dwOverlayFlags;
909 VOID *rgjunc;
910 LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort;
911 LPDDOVERLAYFX lpddOverlayFX;
912 DDSCAPSEX ddsCapsEx;
913 DWORD dwTextureStage;
914 LPVOID lpDDRAWReserved;
915 LPVOID lpDDRAWReserved2;
916 LPVOID lpDDrawReserved3;
917 DWORD dwDDrawReserved4;
918 LPVOID lpDDrawReserved5;
919 LPDWORD lpGammaRamp;
920 LPDWORD lpOriginalGammaRamp;
921 LPVOID lpDDrawReserved6;
922 DWORD dwSurfaceHandle;
923 DWORD qwDDrawReserved8[2];
924 LPVOID lpDDrawReserved9;
925 DWORD cSurfaces;
926 LPDDSURFACEDESC2 pCreatedDDSurfaceDesc2;
927 LPDDRAWI_DDRAWSURFACE_LCL *slist;
928 DWORD dwFVF;
929 LPVOID lpVB;
930 } DDRAWI_DDRAWSURFACE_MORE;
931
932 typedef struct _DDRAWI_DDRAWSURFACE_LCL {
933 LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore;
934 LPDDRAWI_DDRAWSURFACE_GBL lpGbl;
935 ULONG_PTR hDDSurface;
936 LPATTACHLIST lpAttachList;
937 LPATTACHLIST lpAttachListFrom;
938 DWORD dwLocalRefCnt;
939 DWORD dwProcessId;
940 DWORD dwFlags;
941 DDSCAPS ddsCaps;
942 LPDDRAWI_DDRAWPALETTE_INT lpDDPalette;
943 LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper;
944 DWORD dwModeCreatedIn;
945 DWORD dwBackBufferCount;
946 DDCOLORKEY ddckCKDestBlt;
947 DDCOLORKEY ddckCKSrcBlt;
948 ULONG_PTR hDC;
949 ULONG_PTR dwReserved1; /* for display driver use */
950 /* overlays only */
951 DDCOLORKEY ddckCKSrcOverlay;
952 DDCOLORKEY ddckCKDestOverlay;
953 LPDDRAWI_DDRAWSURFACE_INT lpSurfaceOverlaying;
954 DBLNODE dbnOverlayNode;
955 RECT rcOverlaySrc;
956 RECT rcOverlayDest;
957 DWORD dwClrXparent;
958 DWORD dwAlpha;
959 LONG lOverlayX;
960 LONG lOverlayY;
961 } DDRAWI_DDRAWSURFACE_LCL;
962
963 #define DDRAWISURF_ATTACHED 0x00000001
964 #define DDRAWISURF_IMPLICITCREATE 0x00000002
965 #define DDRAWISURF_ISFREE 0x00000004
966 #define DDRAWISURF_ATTACHED_FROM 0x00000008
967 #define DDRAWISURF_IMPLICITROOT 0x00000010
968 #define DDRAWISURF_PARTOFPRIMARYCHAIN 0x00000020
969 #define DDRAWISURF_DATAISALIASED 0x00000040
970 #define DDRAWISURF_HASDC 0x00000080
971 #define DDRAWISURF_HASCKEYDESTOVERLAY 0x00000100
972 #define DDRAWISURF_HASCKEYDESTBLT 0x00000200
973 #define DDRAWISURF_HASCKEYSRCOVERLAY 0x00000400
974 #ifndef DDRAWISURF_HASCKEYSRCBLT
975 #define DDRAWISURF_HASCKEYSRCBLT 0x00000800
976 #endif
977 #define DDRAWISURF_LOCKEXCLUDEDCURSOR 0x00001000
978 #ifndef DDRAWISURF_HASPIXELFORMAT
979 #define DDRAWISURF_HASPIXELFORMAT 0x00002000
980 #endif
981 #ifndef DDRAWISURF_HASOVERLAYDATA
982 #define DDRAWISURF_HASOVERLAYDATA 0x00004000
983 #endif
984 #define DDRAWISURF_SETGAMMA 0x00008000
985 /* more... */
986 #ifndef DDRAWISURF_INVALID
987 #define DDRAWISURF_INVALID 0x10000000
988 #endif
989
990 /* palettes */
991 typedef struct _DDRAWI_DDRAWPALETTE_INT {
992 LPVOID lpVtbl;
993 LPDDRAWI_DDRAWPALETTE_LCL lpLcl;
994 LPDDRAWI_DDRAWPALETTE_INT lpLink;
995 DWORD dwIntRefCnt;
996 } DDRAWI_DDRAWPALETTE_INT;
997
998 typedef struct _DDRAWI_DDRAWPALETTE_GBL {
999 DWORD dwRefCnt;
1000 DWORD dwFlags;
1001 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
1002 DWORD dwProcessId;
1003 LPPALETTEENTRY lpColorTable;
1004 union {
1005 ULONG_PTR dwReserved1; /* for display driver use */
1006 HPALETTE hHELGDIPalette;
1007 } DUMMYUNIONNAME1;
1008 /* DirectX 5.0 */
1009 DWORD dwDriverReserved;
1010 DWORD dwContentsStamp;
1011 /* DirectX 6.0 */
1012 DWORD dwSaveStamp;
1013 /* DirectX 7.0 */
1014 DWORD dwHandle;
1015 } DDRAWI_DDRAWPALETTE_GBL;
1016
1017 #define DDRAWIPAL_256 0x00000001
1018 #define DDRAWIPAL_16 0x00000002
1019 #define DDRAWIPAL_GDI 0x00000004
1020 #define DDRAWIPAL_STORED_8 0x00000008
1021 #define DDRAWIPAL_STORED_16 0x00000010
1022 #define DDRAWIPAL_STORED_24 0x00000020
1023 #define DDRAWIPAL_EXCLUSIVE 0x00000040
1024 #define DDRAWIPAL_INHEL 0x00000080
1025 #define DDRAWIPAL_DIRTY 0x00000100
1026 #define DDRAWIPAL_ALLOW256 0x00000200
1027 #define DDRAWIPAL_4 0x00000400
1028 #define DDRAWIPAL_2 0x00000800
1029 #define DDRAWIPAL_STORED_8INDEX 0x00001000
1030 #define DDRAWIPAL_ALPHA 0x00002000
1031
1032 typedef struct _DDRAWI_DDRAWPALETTE_LCL {
1033 DWORD lpPalMore;
1034 LPDDRAWI_DDRAWPALETTE_GBL lpGbl;
1035 ULONG_PTR dwUnused0;
1036 DWORD dwLocalRefCnt;
1037 IUnknown * pUnkOuter;
1038 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
1039 ULONG_PTR dwReserved1;
1040 /* DirectX 6.0 */
1041 ULONG_PTR dwDDRAWReserved1;
1042 ULONG_PTR dwDDRAWReserved2;
1043 ULONG_PTR dwDDRAWReserved3;
1044 } DDRAWI_DDRAWPALETTE_LCL;
1045
1046 typedef struct _DDHAL_GETMOCOMPGUIDSDATA FAR *LPDDHAL_GETMOCOMPGUIDSDATA;
1047 typedef struct _DDHAL_GETMOCOMPFORMATSDATA FAR *LPDDHAL_GETMOCOMPFORMATSDATA;
1048 typedef struct _DDHAL_CREATEMOCOMPDATA FAR *LPDDHAL_CREATEMOCOMPDATA;
1049 typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA FAR *LPDDHAL_GETMOCOMPCOMPBUFFDATA;
1050 typedef struct _DDHAL_GETINTERNALMOCOMPDATA FAR *LPDDHAL_GETINTERNALMOCOMPDATA;
1051 typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA FAR *LPDDHAL_BEGINMOCOMPFRAMEDATA;
1052 typedef struct _DDHAL_ENDMOCOMPFRAMEDATA FAR *LPDDHAL_ENDMOCOMPFRAMEDATA;
1053 typedef struct _DDHAL_RENDERMOCOMPDATA FAR *LPDDHAL_RENDERMOCOMPDATA;
1054 typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA FAR *LPDDHAL_QUERYMOCOMPSTATUSDATA;
1055 typedef struct _DDHAL_DESTROYMOCOMPDATA FAR *LPDDHAL_DESTROYMOCOMPDATA;
1056 typedef struct _DDHAL_COLORCONTROLDATA FAR *LPDDHAL_COLORCONTROLDATA;
1057
1058 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETGUIDS)( LPDDHAL_GETMOCOMPGUIDSDATA);
1059 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETFORMATS)( LPDDHAL_GETMOCOMPFORMATSDATA);
1060 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_CREATE)( LPDDHAL_CREATEMOCOMPDATA);
1061 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETCOMPBUFFINFO)( LPDDHAL_GETMOCOMPCOMPBUFFDATA);
1062 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETINTERNALINFO)( LPDDHAL_GETINTERNALMOCOMPDATA);
1063 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_BEGINFRAME)( LPDDHAL_BEGINMOCOMPFRAMEDATA);
1064 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_ENDFRAME)( LPDDHAL_ENDMOCOMPFRAMEDATA);
1065 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_RENDER)( LPDDHAL_RENDERMOCOMPDATA);
1066 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_QUERYSTATUS)( LPDDHAL_QUERYMOCOMPSTATUSDATA);
1067 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_DESTROY)( LPDDHAL_DESTROYMOCOMPDATA);
1068 typedef DWORD (FAR PASCAL *LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA);
1069
1070 typedef struct _DDMCCOMPBUFFERINFO
1071 {
1072 DWORD dwSize; // [in] size of the struct
1073 DWORD dwNumCompBuffers; // [out] number of buffers required for compressed data
1074 DWORD dwWidthToCreate; // [out] Width of surface to create
1075 DWORD dwHeightToCreate; // [out] Height of surface to create
1076 DWORD dwBytesToAllocate; // [out] Total number of bytes used by each surface
1077 DDSCAPS2 ddCompCaps; // [out] caps to create surfaces to store compressed data
1078 DDPIXELFORMAT ddPixelFormat; // [out] format to create surfaces to store compressed data
1079 } DDMCCOMPBUFFERINFO, *LPDDMCCOMPBUFFERINFO;
1080
1081 typedef struct _DDMCBUFFERINFO
1082 {
1083 DWORD dwSize; // [in] size of the struct
1084 LPDDRAWI_DDRAWSURFACE_LCL lpCompSurface; // [in] pointer to buffer containing compressed data
1085 DWORD dwDataOffset; // [in] offset of relevant data from the beginning of buffer
1086 DWORD dwDataSize; // [in] size of relevant data
1087 LPVOID lpPrivate; // Reserved for DirectDraw;
1088 } DDMCBUFFERINFO, *LPDDMCBUFFERINFO;
1089
1090 typedef struct _DDHAL_GETDRIVERSTATEDATA {
1091 DWORD dwFlags;
1092 union
1093 {
1094 ULONG_PTR dwhContext;
1095 };
1096 LPDWORD lpdwStates;
1097 DWORD dwLength;
1098 HRESULT ddRVal;
1099 } DDHAL_GETDRIVERSTATEDATA;
1100
1101 typedef struct _DDHAL_ADDATTACHEDSURFACEDATA
1102 {
1103 LPDDRAWI_DIRECTDRAW_GBL lpDD;
1104 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
1105 LPDDRAWI_DDRAWSURFACE_LCL lpSurfAttached;
1106 HRESULT ddRVal;
1107 LPDDHALSURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
1108 } DDHAL_ADDATTACHEDSURFACEDATA;
1109
1110 typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA
1111 {
1112 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1113 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1114 LPDDRAWI_DDRAWSURFACE_LCL lpDestSurface; // [in] destination buffer in which to decoding this frame
1115 DWORD dwInputDataSize; // [in] size of other misc input data to begin frame
1116 LPVOID lpInputData; // [in] pointer to misc input data
1117 DWORD dwOutputDataSize; // [in] size of other misc output data to begin frame
1118 LPVOID lpOutputData; // [in] pointer to output misc data (allocated by client)
1119 HRESULT ddRVal; // [out]
1120 LPDDHALMOCOMPCB_BEGINFRAME BeginMoCompFrame;
1121 } DDHAL_BEGINMOCOMPFRAMEDATA;
1122
1123 typedef struct _DDHAL_COLORCONTROLDATA
1124 {
1125 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1126 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface
1127 LPDDCOLORCONTROL lpColorData; // color control information
1128 DWORD dwFlags; // DDRAWI_GETCOLOR/DDRAWI_SETCOLOR
1129 HRESULT ddRVal; // return value
1130 LPDDHALCOLORCB_COLORCONTROL ColorControl; // PRIVATE: ptr to callback
1131 } DDHAL_COLORCONTROLDATA;
1132
1133 typedef struct _DDHAL_CREATEMOCOMPDATA
1134 {
1135 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1136 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1137 LPGUID lpGuid;
1138 DWORD dwUncompWidth;
1139 DWORD dwUncompHeight;
1140 DDPIXELFORMAT ddUncompPixelFormat;
1141 LPVOID lpData;
1142 DWORD dwDataSize;
1143 HRESULT ddRVal;
1144 LPDDHALMOCOMPCB_CREATE CreateMoComp;
1145 } DDHAL_CREATEMOCOMPDATA;
1146
1147 typedef struct _DDHAL_DESTROYMOCOMPDATA
1148 {
1149 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1150 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1151 HRESULT ddRVal;
1152 LPDDHALMOCOMPCB_DESTROY DestroyMoComp;
1153 } DDHAL_DESTROYMOCOMPDATA;
1154
1155 typedef struct _DDHAL_ENDMOCOMPFRAMEDATA
1156 {
1157 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1158 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1159 LPVOID lpInputData;
1160 DWORD dwInputDataSize;
1161 HRESULT ddRVal;
1162 LPDDHALMOCOMPCB_ENDFRAME EndMoCompFrame;
1163 } DDHAL_ENDMOCOMPFRAMEDATA;
1164
1165 typedef struct _DDHAL_FLIPTOGDISURFACEDATA
1166 {
1167 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1168 DWORD dwToGDI; // TRUE if flipping to the GDI surface, FALSE if flipping away
1169 DWORD dwReserved; // reserved for future use
1170 HRESULT ddRVal; // return value
1171 LPDDHAL_FLIPTOGDISURFACE FlipToGDISurface; // PRIVATE: ptr to callback
1172 } DDHAL_FLIPTOGDISURFACEDATA;
1173
1174 typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA
1175 {
1176 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1177 DDSCAPS DDSCaps; // caps for type of surface memory
1178 DWORD dwTotal; // total memory for this kind of surface
1179 DWORD dwFree; // free memory for this kind of surface
1180 HRESULT ddRVal; // return value
1181 LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory; // PRIVATE: ptr to callback
1182 DDSCAPSEX ddsCapsEx; // Added in V6. Driver should check DDVERSION info
1183 // to see if this field is present.
1184 } DDHAL_GETAVAILDRIVERMEMORYDATA;
1185
1186 typedef struct _DDHAL_GETBLTSTATUSDATA
1187 {
1188 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1189 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct
1190 DWORD dwFlags; // flags
1191 HRESULT ddRVal; // return value
1192 LPDDHALSURFCB_GETBLTSTATUS GetBltStatus; // PRIVATE: ptr to callback
1193 } DDHAL_GETBLTSTATUSDATA;
1194
1195 typedef struct _DDHAL_GETFLIPSTATUSDATA
1196 {
1197 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1198 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct
1199 DWORD dwFlags; // flags
1200 HRESULT ddRVal; // return value
1201 LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus; // PRIVATE: ptr to callback
1202 } DDHAL_GETFLIPSTATUSDATA;
1203
1204 typedef struct _DDHAL_GETINTERNALMOCOMPDATA
1205 {
1206 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1207 LPGUID lpGuid;
1208 DWORD dwWidth; // [in] width of uncompressed data
1209 DWORD dwHeight; // [in] height of uncompressed data
1210 DDPIXELFORMAT ddPixelFormat; // [in] pixel-format of uncompressed data
1211 DWORD dwScratchMemAlloc; // [out] amount of scratch memory will the hal allocate for its private use
1212 HRESULT ddRVal; // [out]
1213 LPDDHALMOCOMPCB_GETINTERNALINFO GetInternalMoCompInfo;
1214 } DDHAL_GETINTERNALMOCOMPDATA;
1215
1216 typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA
1217 {
1218 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1219 LPGUID lpGuid;
1220 DWORD dwWidth; // [in] width of uncompressed data
1221 DWORD dwHeight; // [in] height of uncompressed data
1222 DDPIXELFORMAT ddPixelFormat; // [in] pixel-format of uncompressed data
1223 DWORD dwNumTypesCompBuffs;// [in/out] number of memory types required for comp buffers
1224 LPDDMCCOMPBUFFERINFO lpCompBuffInfo; // [in] driver supplied info regarding comp buffers (allocated by client)
1225 HRESULT ddRVal; // [out]
1226 LPDDHALMOCOMPCB_GETCOMPBUFFINFO GetMoCompBuffInfo;
1227 } DDHAL_GETMOCOMPCOMPBUFFDATA;
1228
1229 typedef struct _DDHAL_GETMOCOMPGUIDSDATA
1230 {
1231 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1232 DWORD dwNumGuids;
1233 LPGUID lpGuids;
1234 HRESULT ddRVal;
1235 LPDDHALMOCOMPCB_GETGUIDS GetMoCompGuids;
1236 } DDHAL_GETMOCOMPGUIDSDATA;
1237
1238 typedef struct _DDHAL_GETMOCOMPFORMATSDATA
1239 {
1240 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1241 LPGUID lpGuid;
1242 DWORD dwNumFormats;
1243 LPDDPIXELFORMAT lpFormats;
1244 HRESULT ddRVal;
1245 LPDDHALMOCOMPCB_GETFORMATS GetMoCompFormats;
1246 } DDHAL_GETMOCOMPFORMATSDATA;
1247
1248 typedef struct _DDHAL_GETSCANLINEDATA
1249 {
1250 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1251 DWORD dwScanLine; // returned scan line
1252 HRESULT ddRVal; // return value
1253 LPDDHAL_GETSCANLINE GetScanLine; // PRIVATE: ptr to callback
1254 } DDHAL_GETSCANLINEDATA;
1255
1256 typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA
1257 {
1258 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1259 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1260 LPDDRAWI_DDRAWSURFACE_LCL lpSurface; // [in] Surface being queried
1261 DWORD dwFlags; // [in] DDMCQUERY_XXX falgs
1262 HRESULT ddRVal; // [out]
1263 LPDDHALMOCOMPCB_QUERYSTATUS QueryMoCompStatus;
1264 } DDHAL_QUERYMOCOMPSTATUSDATA;
1265
1266 typedef struct _DDHAL_RENDERMOCOMPDATA
1267 {
1268 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1269 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1270 DWORD dwNumBuffers; // [in] Number of entries in the lpMacroBlockInfo array
1271 LPDDMCBUFFERINFO lpBufferInfo; // [in] Surfaces containing macro block info
1272 DWORD dwFunction; // [in] Function
1273 LPVOID lpInputData;
1274 DWORD dwInputDataSize;
1275 LPVOID lpOutputData;
1276 DWORD dwOutputDataSize;
1277 HRESULT ddRVal; // [out]
1278 LPDDHALMOCOMPCB_RENDER RenderMoComp;
1279 } DDHAL_RENDERMOCOMPDATA;
1280
1281 typedef struct _DDHAL_SETCOLORKEYDATA
1282 {
1283 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1284 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct
1285 DWORD dwFlags; // flags
1286 DDCOLORKEY ckNew; // new color key
1287 HRESULT ddRVal; // return value
1288 LPDDHALSURFCB_SETCOLORKEY SetColorKey; // PRIVATE: ptr to callback
1289 } DDHAL_SETCOLORKEYDATA;
1290
1291 typedef struct _DDHAL_SETOVERLAYPOSITIONDATA
1292 {
1293 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1294 LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface; // src surface
1295 LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;// dest surface
1296 LONG lXPos; // x position
1297 LONG lYPos; // y position
1298 HRESULT ddRVal; // return value
1299 LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition; // PRIVATE: ptr to callback
1300 } DDHAL_SETOVERLAYPOSITIONDATA;
1301
1302 typedef struct _DDHAL_UPDATEOVERLAYDATA
1303 {
1304 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1305 LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;// dest surface
1306 RECTL rDest; // dest rect
1307 LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface; // src surface
1308 RECTL rSrc; // src rect
1309 DWORD dwFlags; // flags
1310 DDOVERLAYFX overlayFX; // overlay FX
1311 HRESULT ddRVal; // return value
1312 LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay; // PRIVATE: ptr to callback
1313 } DDHAL_UPDATEOVERLAYDATA;
1314
1315 typedef struct _DDHAL_WAITFORVERTICALBLANKDATA
1316 {
1317 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1318 DWORD dwFlags; // flags
1319 DWORD bIsInVB; // is in vertical blank
1320 ULONG_PTR hEvent; // event
1321 HRESULT ddRVal; // return value
1322 LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank; // PRIVATE: ptr to callback
1323 } DDHAL_WAITFORVERTICALBLANKDATA;
1324
1325 #ifdef __cplusplus
1326 } /* extern "C" */
1327 #endif
1328
1329 #endif /* __WINE_DDRAWI_H */