894676f7e7cd355acfd26e7df18f7439f70d6336
[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 __DDRAWI_INCLUDED__
23 #define __DDRAWI_INCLUDED__
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 #ifndef __USE_W32API
620 typedef DWORD IUnknown; /* FIXME: implement proper definition */
621 #endif
622 typedef struct _IUNKNOWN_LIST {
623 struct _IUNKNOWN_LIST * lpLink;
624 LPGUID lpGuid;
625 IUnknown * lpIUnknown;
626 } IUNKNOWN_LIST,*LPIUNKNOWN_LIST;
627
628 typedef struct _PROCESS_LIST {
629 struct _PROCESS_LIST * lpLink;
630 DWORD dwProcessId;
631 DWORD dwRefCnt;
632 DWORD dwAlphaDepth;
633 DWORD dwZDepth;
634 } PROCESS_LIST,*LPPROCESS_LIST;
635
636 typedef struct _ATTACHLIST {
637 DWORD dwFlags;
638 struct _ATTACHLIST * lpLink;
639 LPDDRAWI_DDRAWSURFACE_LCL lpAttached;
640 LPDDRAWI_DDRAWSURFACE_INT lpIAttached;
641 } ATTACHLIST,*LPATTACHLIST;
642
643 #define DDAL_IMPLICIT 0x00000001
644
645 typedef struct _ACCESSRECTLIST {
646 struct _ACCESSRECTLIST * lpLink;
647 RECT rDest;
648 LPDDRAWI_DIRECTDRAW_LCL lpOwner;
649 LPVOID lpSurfaceData;
650 DWORD dwFlags;
651 LPHEAPALIASINFO lpHeapAliasInfo;
652 } ACCESSRECTLIST,*LPACCESSRECTLIST;
653
654 #define ACCESSRECT_VRAMSTYLE 0x00000001
655 #define ACCESSRECT_NOTHOLDINGWIN16LOCK 0x00000002
656 #define ACCESSRECT_BROKEN 0x00000004
657
658 typedef struct _DBLNODE {
659 struct _DBLNODE * next;
660 struct _DBLNODE * prev;
661 LPDDRAWI_DDRAWSURFACE_LCL object;
662 LPDDRAWI_DDRAWSURFACE_INT object_int;
663 } DBLNODE,*LPDBLNODE;
664
665 typedef struct _DDRAWI_DIRECTDRAW_INT {
666 LPVOID lpVtbl;
667 LPDDRAWI_DIRECTDRAW_LCL lpLcl;
668 LPDDRAWI_DIRECTDRAW_INT lpLink;
669 DWORD dwIntRefCnt;
670 } DDRAWI_DIRECTDRAW_INT;
671
672 typedef struct _DDRAWI_DIRECTDRAW_LCL {
673 DWORD lpDDMore;
674 LPDDRAWI_DIRECTDRAW_GBL lpGbl;
675 DWORD dwUnused0;
676 DWORD dwLocalFlags;
677 DWORD dwLocalRefCnt;
678 DWORD dwProcessId;
679 IUnknown * pUnkOuter;
680 DWORD dwObsolete1;
681 ULONG_PTR hWnd;
682 ULONG_PTR hDC;
683 DWORD dwErrorMode;
684 LPDDRAWI_DDRAWSURFACE_INT lpPrimary;
685 LPDDRAWI_DDRAWSURFACE_INT lpCB;
686 DWORD dwPreferredMode;
687 /* DirectX 2 */
688 HINSTANCE hD3DInstance;
689 IUnknown * pD3DIUnknown;
690 LPDDHAL_CALLBACKS lpDDCB;
691 ULONG_PTR hDDVxd;
692 /* DirectX 5.0 */
693 DWORD dwAppHackFlags;
694 /* DirectX 5.0A */
695 ULONG_PTR hFocusWnd;
696 DWORD dwHotTracking;
697 DWORD dwIMEState;
698 /* DirectX 6.0 */
699 ULONG_PTR hWndPopup;
700 ULONG_PTR hDD;
701 ULONG_PTR hGammaCalibrator;
702 LPDDGAMMACALIBRATORPROC lpGammaCalibrator;
703 } DDRAWI_DIRECTDRAW_LCL;
704
705 #define DDRAWILCL_HASEXCLUSIVEMODE 0x00000001
706 #define DDRAWILCL_ISFULLSCREEN 0x00000002
707 #define DDRAWILCL_SETCOOPCALLED 0x00000004
708 #define DDRAWILCL_ACTIVEYES 0x00000008
709 #define DDRAWILCL_ACTIVENO 0x00000010
710 #define DDRAWILCL_HOOKEDHWND 0x00000020
711 #define DDRAWILCL_ALLOWMODEX 0x00000040
712 #define DDRAWILCL_V1SCLBEHAVIOUR 0x00000080
713 #define DDRAWILCL_MODEHASBEENCHANGED 0x00000100
714 #define DDRAWILCL_CREATEDWINDOW 0x00000200
715 #define DDRAWILCL_DIRTYDC 0x00000400
716 #define DDRAWILCL_DISABLEINACTIVATE 0x00000800
717 #define DDRAWILCL_CURSORCLIPPED 0x00001000
718 #define DDRAWILCL_EXPLICITMONITOR 0x00002000
719 #define DDRAWILCL_MULTITHREADED 0x00004000
720 #define DDRAWILCL_FPUSETUP 0x00008000
721 #define DDRAWILCL_POWEREDDOWN 0x00010000
722 #define DDRAWILCL_DIRECTDRAW7 0x00020000
723 #define DDRAWILCL_ATTEMPTEDD3DCONTEXT 0x00040000
724 #define DDRAWILCL_FPUPRESERVE 0x00080000
725
726 typedef struct _DDRAWI_DIRECTDRAW_GBL {
727 DWORD dwRefCnt;
728 DWORD dwFlags;
729 FLATPTR fpPrimaryOrig;
730 DDCORECAPS ddCaps;
731 DWORD dwInternal1;
732 DWORD dwUnused1[9];
733 LPDDHAL_CALLBACKS lpDDCBtmp;
734 LPDDRAWI_DDRAWSURFACE_INT dsList;
735 LPDDRAWI_DDRAWPALETTE_INT palList;
736 LPDDRAWI_DDRAWCLIPPER_INT clipperList;
737 LPDDRAWI_DIRECTDRAW_GBL lp16DD;
738 DWORD dwMaxOverlays;
739 DWORD dwCurrOverlays;
740 DWORD dwMonitorFrequency;
741 DDCORECAPS ddHELCaps;
742 DWORD dwUnused2[50];
743 DDCOLORKEY ddckCKDestOverlay;
744 DDCOLORKEY ddckCKSrcOverlay;
745 VIDMEMINFO vmiData;
746 LPVOID lpDriverHandle;
747 LPDDRAWI_DIRECTDRAW_LCL lpExclusiveOwner;
748 DWORD dwModeIndex;
749 DWORD dwModeIndexOrig;
750 DWORD dwNumFourCC;
751 LPDWORD lpdwFourCC;
752 DWORD dwNumModes;
753 LPDDHALMODEINFO lpModeInfo;
754 PROCESS_LIST plProcessList;
755 DWORD dwSurfaceLockCount;
756 DWORD dwAliasedLockCnt;
757 ULONG_PTR dwReserved3;
758 ULONG_PTR hDD;
759 char cObsolete[12];
760 DWORD dwReserved1;
761 DWORD dwReserved2;
762 DBLNODE dbnOverlayRoot;
763 volatile LPWORD lpwPDeviceFlags;
764 DWORD dwPDevice;
765 DWORD dwWin16LockCnt;
766 DWORD dwUnused3;
767 DWORD hInstance;
768 DWORD dwEvent16;
769 DWORD dwSaveNumModes;
770 /* DirectX 2 */
771 ULONG_PTR lpD3DGlobalDriverData;
772 ULONG_PTR lpD3DHALCallbacks;
773 DDCORECAPS ddBothCaps;
774 /* DirectX 5.0 */
775 LPDDVIDEOPORTCAPS lpDDVideoPortCaps;
776 LPDDRAWI_DDVIDEOPORT_INT dvpList;
777 ULONG_PTR lpD3DHALCallbacks2;
778 RECT rectDevice;
779 DWORD cMonitors;
780 LPVOID gpbmiSrc;
781 LPVOID gpbmiDest;
782 LPHEAPALIASINFO phaiHeapAliases;
783 ULONG_PTR hKernelHandle;
784 ULONG_PTR pfnNotifyProc;
785 LPDDKERNELCAPS lpDDKernelCaps;
786 LPDDNONLOCALVIDMEMCAPS lpddNLVCaps;
787 LPDDNONLOCALVIDMEMCAPS lpddNLVHELCaps;
788 LPDDNONLOCALVIDMEMCAPS lpddNLVBothCaps;
789 ULONG_PTR lpD3DExtendedCaps;
790 /* DirectX 5.0A */
791 DWORD dwDOSBoxEvent;
792 RECT rectDesktop;
793 char cDriverName[MAX_DRIVER_NAME];
794 /* DirectX 6.0 */
795 ULONG_PTR lpD3DHALCallbacks3;
796 DWORD dwNumZPixelFormats;
797 LPDDPIXELFORMAT lpZPixelFormats;
798 LPDDRAWI_DDMOTIONCOMP_INT mcList;
799 DWORD hDDVxd;
800 DDSCAPSEX ddsCapsMore;
801 } DDRAWI_DIRECTDRAW_GBL;
802
803 #define DDRAWI_VIRTUALDESKTOP 0x00000008
804 #define DDRAWI_MODEX 0x00000010
805 #define DDRAWI_DISPLAYDRV 0x00000020
806 #define DDRAWI_FULLSCREEN 0x00000040
807 #define DDRAWI_MODECHANGED 0x00000080
808 #define DDRAWI_NOHARDWARE 0x00000100
809 #define DDRAWI_PALETTEINIT 0x00000200
810 #define DDRAWI_NOEMULATION 0x00000400
811 /* more... */
812
813 /* surfaces */
814 typedef struct _DDRAWI_DDRAWSURFACE_INT {
815 LPVOID lpVtbl;
816 LPDDRAWI_DDRAWSURFACE_LCL lpLcl;
817 LPDDRAWI_DDRAWSURFACE_INT lpLink;
818 DWORD dwIntRefCnt;
819 } DDRAWI_DDRAWSURFACE_INT;
820
821 typedef struct _DDRAWI_DDRAWSURFACE_GBL {
822 DWORD dwRefCnt;
823 DWORD dwGlobalFlags;
824 union {
825 LPACCESSRECTLIST lpRectList;
826 DWORD dwBlockSizeY;
827 } DUMMYUNIONNAME1;
828 union {
829 LPVMEMHEAP lpVidMemHeap;
830 DWORD dwBlockSizeX;
831 } DUMMYUNIONNAME2;
832 union {
833 LPDDRAWI_DIRECTDRAW_GBL lpDD;
834 LPVOID lpDDHandle;
835 } DUMMYUNIONNAME3;
836 FLATPTR fpVidMem;
837 union {
838 LONG lPitch;
839 DWORD dwLinearSize;
840 } DUMMYUNIONNAME4;
841 WORD wHeight;
842 WORD wWidth;
843 DWORD dwUsageCount;
844 ULONG_PTR dwReserved1; /* for display driver use */
845 /* optional (defaults to primary surface pixelformat) */
846 DDPIXELFORMAT ddpfSurface;
847 } DDRAWI_DDRAWSURFACE_GBL;
848
849 #define DDRAWISURFGBL_MEMFREE 0x00000001
850 #define DDRAWISURFGBL_SYSMEMREQUESTED 0x00000002
851 #define DDRAWISURFGBL_ISGDISURFACE 0x00000004
852 #define DDRAWISURFGBL_SOFTWAREAUTOFLIP 0x00000008
853 #define DDRAWISURFGBL_LOCKNOTHOLDINGWIN16LOCK 0x00000010
854 #define DDRAWISURFGBL_LOCKVRAMSTYLE 0x00000020
855 #define DDRAWISURFGBL_LOCKBROKEN 0x00000040
856 #define DDRAWISURFGBL_IMPLICITHANDLE 0x00000080
857 #define DDRAWISURFGBL_ISCLIENTMEM 0x00000100
858 #define DDRAWISURFGBL_HARDWAREOPSOURCE 0x00000200
859 #define DDRAWISURFGBL_HARDWAREOPDEST 0x00000400
860 #define DDRAWISURFGBL_HARDWAREOPSTARTED 0x00000600
861 #define DDRAWISURFGBL_VPORTINTERLEAVED 0x00000800
862 #define DDRAWISURFGBL_VPORTDATA 0x00001000
863 #define DDRAWISURFGBL_LATEALLOCATELINEAR 0x00002000
864 #define DDRAWISURFGBL_SYSMEMEXECUTEBUFFER 0x00004000
865 #define DDRAWISURFGBL_FASTLOCKHELD 0x00008000
866 #define DDRAWISURFGBL_READONLYLOCKHELD 0x00010000
867
868 typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE {
869 DWORD dwSize;
870 union {
871 DWORD dwPhysicalPageTable;
872 FLATPTR fpPhysicalVidMem;
873 } DUMMYUNIONNAME1;
874 LPDWORD pPageTable;
875 DWORD cPages;
876 ULONG_PTR dwSavedDCContext;
877 FLATPTR fpAliasedVidMem;
878 ULONG_PTR dwDriverReserved;
879 ULONG_PTR dwHELReserved;
880 DWORD cPageUnlocks;
881 ULONG_PTR hKernelSurface;
882 DWORD dwKernelRefCnt;
883 LPDDCOLORCONTROL lpColorInfo;
884 FLATPTR fpNTAlias;
885 DWORD dwContentsStamp;
886 LPVOID lpvUnswappedDriverReserved;
887 LPVOID lpDDRAWReserved2;
888 DWORD dwDDRAWReserved1;
889 DWORD dwDDRAWReserved2;
890 FLATPTR fpAliasOfVidMem;
891 } DDRAWI_DDRAWSURFACE_GBL_MORE;
892
893 /* the MS version of this macro was somewhat obfuscated and unreadable
894 * (possibly because of mediocre MS coders)... so I simplified it...
895 * (and so I commit no copyright violations either, hah) */
896 #define GET_LPDDRAWSURFACE_GBL_MORE(psurf_gbl) \
897 (*(((LPDDRAWI_DDRAWSURFACE_GBL_MORE *)(psurf_gbl)) - 1))
898
899 typedef struct _DDRAWI_DDRAWSURFACE_MORE {
900 DWORD dwSize;
901 IUNKNOWN_LIST * lpIUnknowns;
902 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
903 DWORD dwPageLockCount;
904 DWORD dwBytesAllocated;
905 LPDDRAWI_DIRECTDRAW_INT lpDD_int;
906 DWORD dwMipMapCount;
907 LPDDRAWI_DDRAWCLIPPER_INT lpDDIClipper;
908 /* DirectX 5.0 */
909 LPHEAPALIASINFO lpHeapAliasInfo;
910 DWORD dwOverlayFlags;
911 VOID *rgjunc;
912 LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort;
913 LPDDOVERLAYFX lpddOverlayFX;
914 DDSCAPSEX ddsCapsEx;
915 DWORD dwTextureStage;
916 LPVOID lpDDRAWReserved;
917 LPVOID lpDDRAWReserved2;
918 LPVOID lpDDrawReserved3;
919 DWORD dwDDrawReserved4;
920 LPVOID lpDDrawReserved5;
921 LPDWORD lpGammaRamp;
922 LPDWORD lpOriginalGammaRamp;
923 LPVOID lpDDrawReserved6;
924 DWORD dwSurfaceHandle;
925 DWORD qwDDrawReserved8[2];
926 LPVOID lpDDrawReserved9;
927 DWORD cSurfaces;
928 LPDDSURFACEDESC2 pCreatedDDSurfaceDesc2;
929 LPDDRAWI_DDRAWSURFACE_LCL *slist;
930 DWORD dwFVF;
931 LPVOID lpVB;
932 } DDRAWI_DDRAWSURFACE_MORE;
933
934 typedef struct _DDRAWI_DDRAWSURFACE_LCL {
935 LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore;
936 LPDDRAWI_DDRAWSURFACE_GBL lpGbl;
937 ULONG_PTR hDDSurface;
938 LPATTACHLIST lpAttachList;
939 LPATTACHLIST lpAttachListFrom;
940 DWORD dwLocalRefCnt;
941 DWORD dwProcessId;
942 DWORD dwFlags;
943 DDSCAPS ddsCaps;
944 LPDDRAWI_DDRAWPALETTE_INT lpDDPalette;
945 LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper;
946 DWORD dwModeCreatedIn;
947 DWORD dwBackBufferCount;
948 DDCOLORKEY ddckCKDestBlt;
949 DDCOLORKEY ddckCKSrcBlt;
950 ULONG_PTR hDC;
951 ULONG_PTR dwReserved1; /* for display driver use */
952 /* overlays only */
953 DDCOLORKEY ddckCKSrcOverlay;
954 DDCOLORKEY ddckCKDestOverlay;
955 LPDDRAWI_DDRAWSURFACE_INT lpSurfaceOverlaying;
956 DBLNODE dbnOverlayNode;
957 RECT rcOverlaySrc;
958 RECT rcOverlayDest;
959 DWORD dwClrXparent;
960 DWORD dwAlpha;
961 LONG lOverlayX;
962 LONG lOverlayY;
963 } DDRAWI_DDRAWSURFACE_LCL;
964
965 #define DDRAWISURF_ATTACHED 0x00000001
966 #define DDRAWISURF_IMPLICITCREATE 0x00000002
967 #define DDRAWISURF_ISFREE 0x00000004
968 #define DDRAWISURF_ATTACHED_FROM 0x00000008
969 #define DDRAWISURF_IMPLICITROOT 0x00000010
970 #define DDRAWISURF_PARTOFPRIMARYCHAIN 0x00000020
971 #define DDRAWISURF_DATAISALIASED 0x00000040
972 #define DDRAWISURF_HASDC 0x00000080
973 #define DDRAWISURF_HASCKEYDESTOVERLAY 0x00000100
974 #define DDRAWISURF_HASCKEYDESTBLT 0x00000200
975 #define DDRAWISURF_HASCKEYSRCOVERLAY 0x00000400
976 #ifndef DDRAWISURF_HASCKEYSRCBLT
977 #define DDRAWISURF_HASCKEYSRCBLT 0x00000800
978 #endif
979 #define DDRAWISURF_LOCKEXCLUDEDCURSOR 0x00001000
980 #ifndef DDRAWISURF_HASPIXELFORMAT
981 #define DDRAWISURF_HASPIXELFORMAT 0x00002000
982 #endif
983 #ifndef DDRAWISURF_HASOVERLAYDATA
984 #define DDRAWISURF_HASOVERLAYDATA 0x00004000
985 #endif
986 #define DDRAWISURF_SETGAMMA 0x00008000
987 /* more... */
988 #ifndef DDRAWISURF_INVALID
989 #define DDRAWISURF_INVALID 0x10000000
990 #endif
991
992 /* palettes */
993 typedef struct _DDRAWI_DDRAWPALETTE_INT {
994 LPVOID lpVtbl;
995 LPDDRAWI_DDRAWPALETTE_LCL lpLcl;
996 LPDDRAWI_DDRAWPALETTE_INT lpLink;
997 DWORD dwIntRefCnt;
998 } DDRAWI_DDRAWPALETTE_INT;
999
1000 typedef struct _DDRAWI_DDRAWPALETTE_GBL {
1001 DWORD dwRefCnt;
1002 DWORD dwFlags;
1003 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
1004 DWORD dwProcessId;
1005 LPPALETTEENTRY lpColorTable;
1006 union {
1007 ULONG_PTR dwReserved1; /* for display driver use */
1008 HPALETTE hHELGDIPalette;
1009 } DUMMYUNIONNAME1;
1010 /* DirectX 5.0 */
1011 DWORD dwDriverReserved;
1012 DWORD dwContentsStamp;
1013 /* DirectX 6.0 */
1014 DWORD dwSaveStamp;
1015 /* DirectX 7.0 */
1016 DWORD dwHandle;
1017 } DDRAWI_DDRAWPALETTE_GBL;
1018
1019 #define DDRAWIPAL_256 0x00000001
1020 #define DDRAWIPAL_16 0x00000002
1021 #define DDRAWIPAL_GDI 0x00000004
1022 #define DDRAWIPAL_STORED_8 0x00000008
1023 #define DDRAWIPAL_STORED_16 0x00000010
1024 #define DDRAWIPAL_STORED_24 0x00000020
1025 #define DDRAWIPAL_EXCLUSIVE 0x00000040
1026 #define DDRAWIPAL_INHEL 0x00000080
1027 #define DDRAWIPAL_DIRTY 0x00000100
1028 #define DDRAWIPAL_ALLOW256 0x00000200
1029 #define DDRAWIPAL_4 0x00000400
1030 #define DDRAWIPAL_2 0x00000800
1031 #define DDRAWIPAL_STORED_8INDEX 0x00001000
1032 #define DDRAWIPAL_ALPHA 0x00002000
1033
1034 typedef struct _DDRAWI_DDRAWPALETTE_LCL {
1035 DWORD lpPalMore;
1036 LPDDRAWI_DDRAWPALETTE_GBL lpGbl;
1037 ULONG_PTR dwUnused0;
1038 DWORD dwLocalRefCnt;
1039 IUnknown * pUnkOuter;
1040 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
1041 ULONG_PTR dwReserved1;
1042 /* DirectX 6.0 */
1043 ULONG_PTR dwDDRAWReserved1;
1044 ULONG_PTR dwDDRAWReserved2;
1045 ULONG_PTR dwDDRAWReserved3;
1046 } DDRAWI_DDRAWPALETTE_LCL;
1047
1048 typedef struct _DDHAL_GETMOCOMPGUIDSDATA FAR *LPDDHAL_GETMOCOMPGUIDSDATA;
1049 typedef struct _DDHAL_GETMOCOMPFORMATSDATA FAR *LPDDHAL_GETMOCOMPFORMATSDATA;
1050 typedef struct _DDHAL_CREATEMOCOMPDATA FAR *LPDDHAL_CREATEMOCOMPDATA;
1051 typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA FAR *LPDDHAL_GETMOCOMPCOMPBUFFDATA;
1052 typedef struct _DDHAL_GETINTERNALMOCOMPDATA FAR *LPDDHAL_GETINTERNALMOCOMPDATA;
1053 typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA FAR *LPDDHAL_BEGINMOCOMPFRAMEDATA;
1054 typedef struct _DDHAL_ENDMOCOMPFRAMEDATA FAR *LPDDHAL_ENDMOCOMPFRAMEDATA;
1055 typedef struct _DDHAL_RENDERMOCOMPDATA FAR *LPDDHAL_RENDERMOCOMPDATA;
1056 typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA FAR *LPDDHAL_QUERYMOCOMPSTATUSDATA;
1057 typedef struct _DDHAL_DESTROYMOCOMPDATA FAR *LPDDHAL_DESTROYMOCOMPDATA;
1058 typedef struct _DDHAL_COLORCONTROLDATA FAR *LPDDHAL_COLORCONTROLDATA;
1059
1060 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETGUIDS)( LPDDHAL_GETMOCOMPGUIDSDATA);
1061 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETFORMATS)( LPDDHAL_GETMOCOMPFORMATSDATA);
1062 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_CREATE)( LPDDHAL_CREATEMOCOMPDATA);
1063 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETCOMPBUFFINFO)( LPDDHAL_GETMOCOMPCOMPBUFFDATA);
1064 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETINTERNALINFO)( LPDDHAL_GETINTERNALMOCOMPDATA);
1065 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_BEGINFRAME)( LPDDHAL_BEGINMOCOMPFRAMEDATA);
1066 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_ENDFRAME)( LPDDHAL_ENDMOCOMPFRAMEDATA);
1067 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_RENDER)( LPDDHAL_RENDERMOCOMPDATA);
1068 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_QUERYSTATUS)( LPDDHAL_QUERYMOCOMPSTATUSDATA);
1069 typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_DESTROY)( LPDDHAL_DESTROYMOCOMPDATA);
1070 typedef DWORD (FAR PASCAL *LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA);
1071
1072 typedef struct _DDMCCOMPBUFFERINFO
1073 {
1074 DWORD dwSize; // [in] size of the struct
1075 DWORD dwNumCompBuffers; // [out] number of buffers required for compressed data
1076 DWORD dwWidthToCreate; // [out] Width of surface to create
1077 DWORD dwHeightToCreate; // [out] Height of surface to create
1078 DWORD dwBytesToAllocate; // [out] Total number of bytes used by each surface
1079 DDSCAPS2 ddCompCaps; // [out] caps to create surfaces to store compressed data
1080 DDPIXELFORMAT ddPixelFormat; // [out] format to create surfaces to store compressed data
1081 } DDMCCOMPBUFFERINFO, *LPDDMCCOMPBUFFERINFO;
1082
1083 typedef struct _DDMCBUFFERINFO
1084 {
1085 DWORD dwSize; // [in] size of the struct
1086 LPDDRAWI_DDRAWSURFACE_LCL lpCompSurface; // [in] pointer to buffer containing compressed data
1087 DWORD dwDataOffset; // [in] offset of relevant data from the beginning of buffer
1088 DWORD dwDataSize; // [in] size of relevant data
1089 LPVOID lpPrivate; // Reserved for DirectDraw;
1090 } DDMCBUFFERINFO, *LPDDMCBUFFERINFO;
1091
1092 typedef struct _DDHAL_GETDRIVERSTATEDATA {
1093 DWORD dwFlags;
1094 union
1095 {
1096 ULONG_PTR dwhContext;
1097 };
1098 LPDWORD lpdwStates;
1099 DWORD dwLength;
1100 HRESULT ddRVal;
1101 } DDHAL_GETDRIVERSTATEDATA;
1102
1103 typedef struct _DDHAL_ADDATTACHEDSURFACEDATA
1104 {
1105 LPDDRAWI_DIRECTDRAW_GBL lpDD;
1106 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
1107 LPDDRAWI_DDRAWSURFACE_LCL lpSurfAttached;
1108 HRESULT ddRVal;
1109 LPDDHALSURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
1110 } DDHAL_ADDATTACHEDSURFACEDATA;
1111
1112 typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA
1113 {
1114 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1115 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1116 LPDDRAWI_DDRAWSURFACE_LCL lpDestSurface; // [in] destination buffer in which to decoding this frame
1117 DWORD dwInputDataSize; // [in] size of other misc input data to begin frame
1118 LPVOID lpInputData; // [in] pointer to misc input data
1119 DWORD dwOutputDataSize; // [in] size of other misc output data to begin frame
1120 LPVOID lpOutputData; // [in] pointer to output misc data (allocated by client)
1121 HRESULT ddRVal; // [out]
1122 LPDDHALMOCOMPCB_BEGINFRAME BeginMoCompFrame;
1123 } DDHAL_BEGINMOCOMPFRAMEDATA;
1124
1125 typedef struct _DDHAL_COLORCONTROLDATA
1126 {
1127 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1128 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface
1129 LPDDCOLORCONTROL lpColorData; // color control information
1130 DWORD dwFlags; // DDRAWI_GETCOLOR/DDRAWI_SETCOLOR
1131 HRESULT ddRVal; // return value
1132 LPDDHALCOLORCB_COLORCONTROL ColorControl; // PRIVATE: ptr to callback
1133 } DDHAL_COLORCONTROLDATA;
1134
1135 typedef struct _DDHAL_CREATEMOCOMPDATA
1136 {
1137 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1138 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1139 LPGUID lpGuid;
1140 DWORD dwUncompWidth;
1141 DWORD dwUncompHeight;
1142 DDPIXELFORMAT ddUncompPixelFormat;
1143 LPVOID lpData;
1144 DWORD dwDataSize;
1145 HRESULT ddRVal;
1146 LPDDHALMOCOMPCB_CREATE CreateMoComp;
1147 } DDHAL_CREATEMOCOMPDATA;
1148
1149 typedef struct _DDHAL_DESTROYMOCOMPDATA
1150 {
1151 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1152 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1153 HRESULT ddRVal;
1154 LPDDHALMOCOMPCB_DESTROY DestroyMoComp;
1155 } DDHAL_DESTROYMOCOMPDATA;
1156
1157 typedef struct _DDHAL_ENDMOCOMPFRAMEDATA
1158 {
1159 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1160 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1161 LPVOID lpInputData;
1162 DWORD dwInputDataSize;
1163 HRESULT ddRVal;
1164 LPDDHALMOCOMPCB_ENDFRAME EndMoCompFrame;
1165 } DDHAL_ENDMOCOMPFRAMEDATA;
1166
1167 typedef struct _DDHAL_FLIPTOGDISURFACEDATA
1168 {
1169 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1170 DWORD dwToGDI; // TRUE if flipping to the GDI surface, FALSE if flipping away
1171 DWORD dwReserved; // reserved for future use
1172 HRESULT ddRVal; // return value
1173 LPDDHAL_FLIPTOGDISURFACE FlipToGDISurface; // PRIVATE: ptr to callback
1174 } DDHAL_FLIPTOGDISURFACEDATA;
1175
1176 typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA
1177 {
1178 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1179 DDSCAPS DDSCaps; // caps for type of surface memory
1180 DWORD dwTotal; // total memory for this kind of surface
1181 DWORD dwFree; // free memory for this kind of surface
1182 HRESULT ddRVal; // return value
1183 LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory; // PRIVATE: ptr to callback
1184 DDSCAPSEX ddsCapsEx; // Added in V6. Driver should check DDVERSION info
1185 // to see if this field is present.
1186 } DDHAL_GETAVAILDRIVERMEMORYDATA;
1187
1188 typedef struct _DDHAL_GETBLTSTATUSDATA
1189 {
1190 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1191 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct
1192 DWORD dwFlags; // flags
1193 HRESULT ddRVal; // return value
1194 LPDDHALSURFCB_GETBLTSTATUS GetBltStatus; // PRIVATE: ptr to callback
1195 } DDHAL_GETBLTSTATUSDATA;
1196
1197 typedef struct _DDHAL_GETFLIPSTATUSDATA
1198 {
1199 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1200 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct
1201 DWORD dwFlags; // flags
1202 HRESULT ddRVal; // return value
1203 LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus; // PRIVATE: ptr to callback
1204 } DDHAL_GETFLIPSTATUSDATA;
1205
1206 typedef struct _DDHAL_GETINTERNALMOCOMPDATA
1207 {
1208 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1209 LPGUID lpGuid;
1210 DWORD dwWidth; // [in] width of uncompressed data
1211 DWORD dwHeight; // [in] height of uncompressed data
1212 DDPIXELFORMAT ddPixelFormat; // [in] pixel-format of uncompressed data
1213 DWORD dwScratchMemAlloc; // [out] amount of scratch memory will the hal allocate for its private use
1214 HRESULT ddRVal; // [out]
1215 LPDDHALMOCOMPCB_GETINTERNALINFO GetInternalMoCompInfo;
1216 } DDHAL_GETINTERNALMOCOMPDATA;
1217
1218 typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA
1219 {
1220 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1221 LPGUID lpGuid;
1222 DWORD dwWidth; // [in] width of uncompressed data
1223 DWORD dwHeight; // [in] height of uncompressed data
1224 DDPIXELFORMAT ddPixelFormat; // [in] pixel-format of uncompressed data
1225 DWORD dwNumTypesCompBuffs;// [in/out] number of memory types required for comp buffers
1226 LPDDMCCOMPBUFFERINFO lpCompBuffInfo; // [in] driver supplied info regarding comp buffers (allocated by client)
1227 HRESULT ddRVal; // [out]
1228 LPDDHALMOCOMPCB_GETCOMPBUFFINFO GetMoCompBuffInfo;
1229 } DDHAL_GETMOCOMPCOMPBUFFDATA;
1230
1231 typedef struct _DDHAL_GETMOCOMPGUIDSDATA
1232 {
1233 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1234 DWORD dwNumGuids;
1235 LPGUID lpGuids;
1236 HRESULT ddRVal;
1237 LPDDHALMOCOMPCB_GETGUIDS GetMoCompGuids;
1238 } DDHAL_GETMOCOMPGUIDSDATA;
1239
1240 typedef struct _DDHAL_GETMOCOMPFORMATSDATA
1241 {
1242 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1243 LPGUID lpGuid;
1244 DWORD dwNumFormats;
1245 LPDDPIXELFORMAT lpFormats;
1246 HRESULT ddRVal;
1247 LPDDHALMOCOMPCB_GETFORMATS GetMoCompFormats;
1248 } DDHAL_GETMOCOMPFORMATSDATA;
1249
1250 typedef struct _DDHAL_GETSCANLINEDATA
1251 {
1252 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1253 DWORD dwScanLine; // returned scan line
1254 HRESULT ddRVal; // return value
1255 LPDDHAL_GETSCANLINE GetScanLine; // PRIVATE: ptr to callback
1256 } DDHAL_GETSCANLINEDATA;
1257
1258 typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA
1259 {
1260 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1261 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1262 LPDDRAWI_DDRAWSURFACE_LCL lpSurface; // [in] Surface being queried
1263 DWORD dwFlags; // [in] DDMCQUERY_XXX falgs
1264 HRESULT ddRVal; // [out]
1265 LPDDHALMOCOMPCB_QUERYSTATUS QueryMoCompStatus;
1266 } DDHAL_QUERYMOCOMPSTATUSDATA;
1267
1268 typedef struct _DDHAL_RENDERMOCOMPDATA
1269 {
1270 LPDDRAWI_DIRECTDRAW_LCL lpDD;
1271 LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp;
1272 DWORD dwNumBuffers; // [in] Number of entries in the lpMacroBlockInfo array
1273 LPDDMCBUFFERINFO lpBufferInfo; // [in] Surfaces containing macro block info
1274 DWORD dwFunction; // [in] Function
1275 LPVOID lpInputData;
1276 DWORD dwInputDataSize;
1277 LPVOID lpOutputData;
1278 DWORD dwOutputDataSize;
1279 HRESULT ddRVal; // [out]
1280 LPDDHALMOCOMPCB_RENDER RenderMoComp;
1281 } DDHAL_RENDERMOCOMPDATA;
1282
1283 typedef struct _DDHAL_SETCOLORKEYDATA
1284 {
1285 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1286 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct
1287 DWORD dwFlags; // flags
1288 DDCOLORKEY ckNew; // new color key
1289 HRESULT ddRVal; // return value
1290 LPDDHALSURFCB_SETCOLORKEY SetColorKey; // PRIVATE: ptr to callback
1291 } DDHAL_SETCOLORKEYDATA;
1292
1293 typedef struct _DDHAL_SETOVERLAYPOSITIONDATA
1294 {
1295 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1296 LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface; // src surface
1297 LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;// dest surface
1298 LONG lXPos; // x position
1299 LONG lYPos; // y position
1300 HRESULT ddRVal; // return value
1301 LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition; // PRIVATE: ptr to callback
1302 } DDHAL_SETOVERLAYPOSITIONDATA;
1303
1304 typedef struct _DDHAL_UPDATEOVERLAYDATA
1305 {
1306 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1307 LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;// dest surface
1308 RECTL rDest; // dest rect
1309 LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface; // src surface
1310 RECTL rSrc; // src rect
1311 DWORD dwFlags; // flags
1312 DDOVERLAYFX overlayFX; // overlay FX
1313 HRESULT ddRVal; // return value
1314 LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay; // PRIVATE: ptr to callback
1315 } DDHAL_UPDATEOVERLAYDATA;
1316
1317 typedef struct _DDHAL_WAITFORVERTICALBLANKDATA
1318 {
1319 LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct
1320 DWORD dwFlags; // flags
1321 DWORD bIsInVB; // is in vertical blank
1322 ULONG_PTR hEvent; // event
1323 HRESULT ddRVal; // return value
1324 LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank; // PRIVATE: ptr to callback
1325 } DDHAL_WAITFORVERTICALBLANKDATA;
1326
1327 #ifdef __cplusplus
1328 } /* extern "C" */
1329 #endif
1330
1331 #endif /* __DDRAWI_INCLUDED__ */