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