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