Normalize the display name used to build the cached metric filename so
[wine/wine64.git] / include / ddrawi.h
blob76fea03859020e21a68e47fadfe1a5aba2df163c
1 /* DirectDraw driver interface */
2 /* (DirectX 7 version) */
4 #ifndef __WINE_DDRAWI_H
5 #define __WINE_DDRAWI_H
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 #include "ddraw.h"
12 #include "dciddi.h" /* the DD HAL is layered onto DCI escapes */
14 typedef struct _DDVIDEOPORTCAPS *LPDDVIDEOPORTCAPS; /* should be in dvp.h */
15 typedef struct _DDKERNELCAPS *LPDDKERNELCAPS; /* should be in ddkernel.h */
16 typedef struct _VMEMHEAP *LPVMEMHEAP; /* should be in dmemmgr.h */
18 #define DDAPI WINAPI
20 /* the DirectDraw versions */
21 #define DD_VERSION 0x0200 /* compatibility version */
22 #define DD_RUNTIME_VERSION 0x0700 /* actual version */
24 /* the HAL version returned from QUERYESCSUPPORT - DCICOMMAND */
25 #define DD_HAL_VERSION 0x0100
27 /* more DCICOMMAND escapes */
28 #define DDCREATEDRIVEROBJECT 10
29 #define DDGET32BITDRIVERNAME 11
30 #define DDNEWCALLBACKFNS 12
31 #define DDVERSIONINFO 13
33 #define MAX_DRIVER_NAME CCHDEVICENAME
35 /*****************************************************************************
36 * Initialization stuff
38 typedef struct {
39 char szName[260];
40 char szEntryPoint[64];
41 DWORD dwContext;
42 } DD32BITDRIVERDATA,*LPDD32BITDRIVERDATA;
44 typedef struct {
45 DWORD dwHALVersion;
46 ULONG_PTR dwReserved1;
47 ULONG_PTR dwReserved2;
48 } DDVERSIONDATA,*LPDDVERSIONDATA;
50 typedef DWORD PASCAL (*LPDD32BITDRIVERINIT)(DWORD dwContext);
52 /* pointer to video memory */
53 typedef ULONG_PTR FLATPTR;
55 /* predeclare some structures */
56 typedef struct _DDHALINFO *LPDDHALINFO;
57 typedef struct _DDRAWI_DIRECTDRAW_INT *LPDDRAWI_DIRECTDRAW_INT;
58 typedef struct _DDRAWI_DIRECTDRAW_LCL *LPDDRAWI_DIRECTDRAW_LCL;
59 typedef struct _DDRAWI_DIRECTDRAW_GBL *LPDDRAWI_DIRECTDRAW_GBL;
60 typedef struct _DDRAWI_DDRAWSURFACE_INT *LPDDRAWI_DDRAWSURFACE_INT;
61 typedef struct _DDRAWI_DDRAWSURFACE_LCL *LPDDRAWI_DDRAWSURFACE_LCL;
62 typedef struct _DDRAWI_DDRAWSURFACE_GBL *LPDDRAWI_DDRAWSURFACE_GBL;
63 typedef struct _DDRAWI_DDRAWSURFACE_MORE *LPDDRAWI_DDRAWSURFACE_MORE;
64 typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE *LPDDRAWI_DDRAWSURFACE_GBL_MORE;
65 typedef struct _DDRAWI_DDRAWPALETTE_INT *LPDDRAWI_DDRAWPALETTE_INT;
66 typedef struct _DDRAWI_DDRAWPALETTE_LCL *LPDDRAWI_DDRAWPALETTE_LCL;
67 typedef struct _DDRAWI_DDRAWPALETTE_GBL *LPDDRAWI_DDRAWPALETTE_GBL;
68 typedef struct _DDRAWI_DDRAWCLIPPER_INT *LPDDRAWI_DDRAWCLIPPER_INT;
69 typedef struct _DDRAWI_DDRAWCLIPPER_LCL *LPDDRAWI_DDRAWCLIPPER_LCL;
70 typedef struct _DDRAWI_DDRAWCLIPPER_GBL *LPDDRAWI_DDRAWCLIPPER_GBL;
71 typedef struct _DDRAWI_DDVIDEOPORT_INT *LPDDRAWI_DDVIDEOPORT_INT;
72 typedef struct _DDRAWI_DDVIDEOPORT_LCL *LPDDRAWI_DDVIDEOPORT_LCL;
73 typedef struct _DDRAWI_DDMOTIONCOMP_INT *LPDDRAWI_DDMOTIONCOMP_INT;
74 typedef struct _DDRAWI_DDMOTIONCOMP_LCL *LPDDRAWI_DDMOTIONCOMP_LCL;
76 /* structure GUIDs for GetDriverInfo */
77 DEFINE_GUID( GUID_MiscellaneousCallbacks, 0xEFD60CC0,0x49E7,0x11D0,0x88,0x9D,0x00,0xAA,0x00,0xBB,0xB7,0x6A );
78 /* ...videport stuff here... */
79 DEFINE_GUID( GUID_D3DCallbacks2, 0x0BA584E1,0x70B6,0x11D0,0x88,0x9D,0x00,0xAA,0x00,0xBB,0xB7,0x6A );
80 DEFINE_GUID( GUID_D3DCallbacks3, 0xDDF41230,0xEC0A,0x11D0,0xA9,0xB6,0x00,0xAA,0x00,0xC0,0x99,0x3E );
81 DEFINE_GUID( GUID_NonLocalVidMemCaps, 0x86C4FA80,0x8D84,0x11D0,0x94,0xE8,0x00,0xC0,0x4F,0xC3,0x41,0x37 );
82 /* ...kernel stuff here... */
83 DEFINE_GUID( GUID_D3DExtendedCaps, 0x7DE41F80,0x9D93,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29 );
84 DEFINE_GUID( GUID_ZPixelFormats, 0x93869880,0x36CF,0x11D1,0x9B,0x1B,0x00,0xAA,0x00,0xBB,0xB8,0xAE );
85 DEFINE_GUID( GUID_DDMoreSurfaceCaps, 0x3B8A0466,0xF269,0x11D1,0x88,0x0B,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
86 DEFINE_GUID( GUID_DDStereoMode, 0xF828169C,0xA8E8,0x11D2,0xA1,0xF2,0x00,0xA0,0xC9,0x83,0xEA,0xF6 );
87 /* ...more stuff here... */
88 DEFINE_GUID(GUID_D3DParseUnknownCommandCallback,0x2E04FFA0,0x98E4,0x11D1,0x8C,0xE1,0x00,0xA0,0xC9,0x06,0x29,0xA8 );
89 /* ...motioncomp stuff here... */
90 DEFINE_GUID( GUID_Miscellaneous2Callbacks, 0x406B2F00,0x3E5A,0x11D1,0xB6,0x40,0x00,0xAA,0x00,0xA1,0xF9,0x6A );
92 /*****************************************************************************
93 * driver->ddraw callbacks
95 typedef BOOL DDAPI (*LPDDHAL_SETINFO)(LPDDHALINFO lpDDHalInfo, BOOL reset);
96 typedef FLATPTR DDAPI (*LPDDHAL_VIDMEMALLOC)(LPDDRAWI_DIRECTDRAW_GBL lpDD, int heap, DWORD dwWidth, DWORD dwHeight);
97 typedef void DDAPI (*LPDDHAL_VIDMEMFREE)(LPDDRAWI_DIRECTDRAW_GBL lpDD, int heap, FLATPTR fpMem);
99 typedef struct {
100 DWORD dwSize;
101 LPDDHAL_SETINFO lpSetInfo;
102 LPDDHAL_VIDMEMALLOC lpVidMemAlloc;
103 LPDDHAL_VIDMEMFREE lpVidMemFree;
104 } DDHALDDRAWFNS,*LPDDHALDDRAWFNS;
106 /*****************************************************************************
107 * mode info structure
109 typedef struct _DDHALMODEINFO {
110 DWORD dwWidth;
111 DWORD dwHeight;
112 LONG lPitch;
113 DWORD dwBPP;
114 WORD wFlags;
115 WORD wRefreshRate;
116 DWORD dwRBitMask;
117 DWORD dwGBitMask;
118 DWORD dwBBitMask;
119 DWORD dwAlphaBitMask;
120 } DDHALMODEINFO,*LPDDHALMODEINFO;
122 #define DDMODEINFO_PALETTIZED 0x0001
123 #define DDMODEINFO_MODEX 0x0002
124 #define DDMODEINFO_UNSUPPORTED 0x0004
125 #define DDMODEINFO_STANDARDVGA 0x0008
126 #define DDMODEINFO_MAXREFRESH 0x0010
127 #define DDMODEINFO_STEREO 0x0020
129 /*****************************************************************************
130 * video memory info structure
132 typedef struct _VIDMEM {
133 DWORD dwFlags;
134 FLATPTR fpStart;
135 union {
136 FLATPTR fpEnd;
137 DWORD dwWidth;
138 } DUMMYUNIONNAME1;
139 DDSCAPS ddsCaps;
140 DDSCAPS ddsCapsAlt;
141 union {
142 LPVMEMHEAP lpHeap;
143 DWORD dwHeight;
144 } DUMMYUNIONNAME2;
145 } VIDMEM,*LPVIDMEM;
147 #define VIDMEM_ISLINEAR 0x00000001
148 #define VIDMEM_ISRECTANGULAR 0x00000002
149 #define VIDMEM_ISHEAP 0x00000004
150 #define VIDMEM_ISNONLOCAL 0x00000008
151 #define VIDMEM_ISWC 0x00000010
152 #define VIDMEM_ISDISABLED 0x00000020
154 typedef struct _VIDMEMINFO {
155 FLATPTR fpPrimary;
156 DWORD dwFlags;
157 DWORD dwDisplayWidth;
158 DWORD dwDisplayHeight;
159 LONG lDisplayPitch;
160 DDPIXELFORMAT ddpfDisplay;
161 DWORD dwOffscreenAlign;
162 DWORD dwOverlayAlign;
163 DWORD dwTextureAlign;
164 DWORD dwZBufferAlign;
165 DWORD dwAlphaAlign;
166 DWORD dwNumHeaps;
167 LPVIDMEM pvmList;
168 } VIDMEMINFO,*LPVIDMEMINFO;
170 typedef struct _HEAPALIAS {
171 FLATPTR fpVidMem;
172 LPVOID lpAlias;
173 DWORD dwAliasSize;
174 } HEAPALIAS,*LPHEAPALIAS;
176 typedef struct _HEAPALIASINFO {
177 DWORD dwRefCnt;
178 DWORD dwFlags;
179 DWORD dwNumHeaps;
180 LPHEAPALIAS lpAliases;
181 } HEAPALIASINFO,*LPHEAPALIASINFO;
183 #define HEAPALIASINFO_MAPPEDREAL 0x00000001
184 #define HEAPALIASINFO_MAPPEDDUMMY 0x00000002
186 /*****************************************************************************
187 * capabilities structures
189 typedef struct _DDCORECAPS {
190 DWORD dwSize;
191 DWORD dwCaps;
192 DWORD dwCaps2;
193 DWORD dwCKeyCaps;
194 DWORD dwFXCaps;
195 DWORD dwFXAlphaCaps;
196 DWORD dwPalCaps;
197 DWORD dwSVCaps;
198 DWORD dwAlphaBltConstBitDepths;
199 DWORD dwAlphaBltPixelBitDepths;
200 DWORD dwAlphaBltSurfaceBitDepths;
201 DWORD dwAlphaOverlayConstBitDepths;
202 DWORD dwAlphaOverlayPixelBitDepths;
203 DWORD dwAlphaOverlaySurfaceBitDepths;
204 DWORD dwZBufferBitDepths;
205 DWORD dwVidMemTotal;
206 DWORD dwVidMemFree;
207 DWORD dwMaxVisibleOverlays;
208 DWORD dwCurrVisibleOverlays;
209 DWORD dwNumFourCCCodes;
210 DWORD dwAlignBoundarySrc;
211 DWORD dwAlignSizeSrc;
212 DWORD dwAlignBoundaryDest;
213 DWORD dwAlignSizeDest;
214 DWORD dwAlignStrideAlign;
215 DWORD dwRops[DD_ROP_SPACE];
216 DDSCAPS ddsCaps;
217 DWORD dwMinOverlayStretch;
218 DWORD dwMaxOverlayStretch;
219 DWORD dwMinLiveVideoStretch;
220 DWORD dwMaxLiveVideoStretch;
221 DWORD dwMinHwCodecStretch;
222 DWORD dwMaxHwCodecStretch;
223 DWORD dwReserved1;
224 DWORD dwReserved2;
225 DWORD dwReserved3;
226 DWORD dwSVBCaps;
227 DWORD dwSVBCKeyCaps;
228 DWORD dwSVBFXCaps;
229 DWORD dwSVBRops[DD_ROP_SPACE];
230 DWORD dwVSBCaps;
231 DWORD dwVSBCKeyCaps;
232 DWORD dwVSBFXCaps;
233 DWORD dwVSBRops[DD_ROP_SPACE];
234 DWORD dwSSBCaps;
235 DWORD dwSSBCKeyCaps;
236 DWORD dwSSBFXCaps;
237 DWORD dwSSBRops[DD_ROP_SPACE];
238 DWORD dwMaxVideoPorts;
239 DWORD dwCurrVideoPorts;
240 DWORD dwSVBCaps2;
241 } DDCORECAPS,*LPDDCORECAPS;
243 typedef struct _DDNONLOCALVIDMEMCAPS {
244 DWORD dwSize;
245 DWORD dwNLVBCaps;
246 DWORD dwNLVBCaps2;
247 DWORD dwNLVBCKeyCaps;
248 DWORD dwNLVBFXCaps;
249 DWORD dwNLVBRops[DD_ROP_SPACE];
250 } DDNONLOCALVIDMEMCAPS,*LPDDNONLOCALVIDMEMCAPS;
252 typedef struct _DDSCAPSEX {
253 DWORD dwCaps2;
254 DWORD dwCaps3;
255 DWORD dwCaps4;
256 } DDSCAPSEX,*LPDDSCAPSEX;
258 #define DDSCAPS_EXECUTEBUFFER DDSCAPS_RESERVED2
259 #define DDSCAPS2_VERTEXBUFFER DDSCAPS2_RESERVED1
260 #define DDSCAPS2_COMMANDBUFFER DDSCAPS2_RESERVED2
262 /*****************************************************************************
263 * ddraw->driver callbacks
265 #define DDHAL_DRIVER_NOTHANDLED 0
266 #define DDHAL_DRIVER_HANDLED 1
267 #define DDHAL_DRIVER_NOCKEYHW 2
269 typedef struct _DDHAL_DESTROYDRIVERDATA *LPDDHAL_DESTROYDRIVERDATA;
270 typedef struct _DDHAL_CREATESURFACEDATA *LPDDHAL_CREATESURFACEDATA;
271 typedef struct _DDHAL_DRVSETCOLORKEYDATA *LPDDHAL_DRVSETCOLORKEYDATA;
272 typedef struct _DDHAL_SETMODEDATA *LPDDHAL_SETMODEDATA;
273 typedef struct _DDHAL_WAITFORVERTICALBLANKDATA *LPDDHAL_WAITFORVERTICALBLANKDATA;
274 typedef struct _DDHAL_CANCREATESURFACEDATA *LPDDHAL_CANCREATESURFACEDATA;
275 typedef struct _DDHAL_CREATEPALETTEDATA *LPDDHAL_CREATEPALETTEDATA;
276 typedef struct _DDHAL_GETSCANLINEDATA *LPDDHAL_GETSCANLINEDATA;
277 typedef struct _DDHAL_SETEXCLUSIVEMODEDATA *LPDDHAL_SETEXCLUSIVEMODEDATA;
278 typedef struct _DDHAL_FLIPTOGDISURFACEDATA *LPDDHAL_FLIPTOGDISURFACEDATA;
280 typedef DWORD PASCAL (*LPDDHAL_DESTROYDRIVER) (LPDDHAL_DESTROYDRIVERDATA);
281 typedef DWORD PASCAL (*LPDDHAL_CREATESURFACE) (LPDDHAL_CREATESURFACEDATA);
282 typedef DWORD PASCAL (*LPDDHAL_SETCOLORKEY) (LPDDHAL_DRVSETCOLORKEYDATA);
283 typedef DWORD PASCAL (*LPDDHAL_SETMODE) (LPDDHAL_SETMODEDATA);
284 typedef DWORD PASCAL (*LPDDHAL_WAITFORVERTICALBLANK)(LPDDHAL_WAITFORVERTICALBLANKDATA);
285 typedef DWORD PASCAL (*LPDDHAL_CANCREATESURFACE) (LPDDHAL_CANCREATESURFACEDATA );
286 typedef DWORD PASCAL (*LPDDHAL_CREATEPALETTE) (LPDDHAL_CREATEPALETTEDATA);
287 typedef DWORD PASCAL (*LPDDHAL_GETSCANLINE) (LPDDHAL_GETSCANLINEDATA);
288 typedef DWORD PASCAL (*LPDDHAL_SETEXCLUSIVEMODE) (LPDDHAL_SETEXCLUSIVEMODEDATA);
289 typedef DWORD PASCAL (*LPDDHAL_FLIPTOGDISURFACE) (LPDDHAL_FLIPTOGDISURFACEDATA);
291 typedef struct _DDHAL_DDCALLBACKS {
292 DWORD dwSize;
293 DWORD dwFlags;
294 LPDDHAL_DESTROYDRIVER DestroyDriver;
295 LPDDHAL_CREATESURFACE CreateSurface;
296 LPDDHAL_SETCOLORKEY SetColorKey;
297 LPDDHAL_SETMODE SetMode;
298 LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank;
299 LPDDHAL_CANCREATESURFACE CanCreateSurface;
300 LPDDHAL_CREATEPALETTE CreatePalette;
301 LPDDHAL_GETSCANLINE GetScanLine;
302 /* DirectX 2 */
303 LPDDHAL_SETEXCLUSIVEMODE SetExclusiveMode;
304 LPDDHAL_FLIPTOGDISURFACE FlipToGDISurface;
305 } DDHAL_DDCALLBACKS,*LPDDHAL_DDCALLBACKS;
307 typedef struct _DDHAL_DESTROYSURFACEDATA *LPDDHAL_DESTROYSURFACEDATA;
308 typedef struct _DDHAL_FLIPDATA *LPDDHAL_FLIPDATA;
309 typedef struct _DDHAL_SETCLIPLISTDATA *LPDDHAL_SETCLIPLISTDATA;
310 typedef struct _DDHAL_LOCKDATA *LPDDHAL_LOCKDATA;
311 typedef struct _DDHAL_UNLOCKDATA *LPDDHAL_UNLOCKDATA;
312 typedef struct _DDHAL_BLTDATA *LPDDHAL_BLTDATA;
313 typedef struct _DDHAL_SETCOLORKEYDATA *LPDDHAL_SETCOLORKEYDATA;
314 typedef struct _DDHAL_ADDATTACHEDSURFACEDATA *LPDDHAL_ADDATTACHEDSURFACEDATA;
315 typedef struct _DDHAL_GETBLTSTATUSDATA *LPDDHAL_GETBLTSTATUSDATA;
316 typedef struct _DDHAL_GETFLIPSTATUSDATA *LPDDHAL_GETFLIPSTATUSDATA;
317 typedef struct _DDHAL_UPDATEOVERLAYDATA *LPDDHAL_UPDATEOVERLAYDATA;
318 typedef struct _DDHAL_SETOVERLAYPOSITIONDATA *LPDDHAL_SETOVERLAYPOSITIONDATA;
319 typedef struct _DDHAL_SETPALETTEDATA *LPDDHAL_SETPALETTEDATA;
321 typedef DWORD PASCAL (*LPDDHALSURFCB_DESTROYSURFACE) (LPDDHAL_DESTROYSURFACEDATA);
322 typedef DWORD PASCAL (*LPDDHALSURFCB_FLIP) (LPDDHAL_FLIPDATA);
323 typedef DWORD PASCAL (*LPDDHALSURFCB_SETCLIPLIST) (LPDDHAL_SETCLIPLISTDATA);
324 typedef DWORD PASCAL (*LPDDHALSURFCB_LOCK) (LPDDHAL_LOCKDATA);
325 typedef DWORD PASCAL (*LPDDHALSURFCB_UNLOCK) (LPDDHAL_UNLOCKDATA);
326 typedef DWORD PASCAL (*LPDDHALSURFCB_BLT) (LPDDHAL_BLTDATA);
327 typedef DWORD PASCAL (*LPDDHALSURFCB_SETCOLORKEY) (LPDDHAL_SETCOLORKEYDATA);
328 typedef DWORD PASCAL (*LPDDHALSURFCB_ADDATTACHEDSURFACE)(LPDDHAL_ADDATTACHEDSURFACEDATA);
329 typedef DWORD PASCAL (*LPDDHALSURFCB_GETBLTSTATUS) (LPDDHAL_GETBLTSTATUSDATA);
330 typedef DWORD PASCAL (*LPDDHALSURFCB_GETFLIPSTATUS) (LPDDHAL_GETFLIPSTATUSDATA);
331 typedef DWORD PASCAL (*LPDDHALSURFCB_UPDATEOVERLAY) (LPDDHAL_UPDATEOVERLAYDATA);
332 typedef DWORD PASCAL (*LPDDHALSURFCB_SETOVERLAYPOSITION)(LPDDHAL_SETOVERLAYPOSITIONDATA);
333 typedef DWORD PASCAL (*LPDDHALSURFCB_SETPALETTE) (LPDDHAL_SETPALETTEDATA);
335 typedef struct _DDHAL_DDSURFACECALLBACKS {
336 DWORD dwSize;
337 DWORD dwFlags;
338 LPDDHALSURFCB_DESTROYSURFACE DestroySurface;
339 LPDDHALSURFCB_FLIP Flip;
340 LPDDHALSURFCB_SETCLIPLIST SetClipList;
341 LPDDHALSURFCB_LOCK Lock;
342 LPDDHALSURFCB_UNLOCK Unlock;
343 LPDDHALSURFCB_BLT Blt;
344 LPDDHALSURFCB_SETCOLORKEY SetColorKey;
345 LPDDHALSURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
346 LPDDHALSURFCB_GETBLTSTATUS GetBltStatus;
347 LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus;
348 LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay;
349 LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition;
350 LPVOID reserved4;
351 LPDDHALSURFCB_SETPALETTE SetPalette;
352 } DDHAL_DDSURFACECALLBACKS,*LPDDHAL_DDSURFACECALLBACKS;
354 typedef struct _DDHAL_DESTROYPALETTEDATA *LPDDHAL_DESTROYPALETTEDATA;
355 typedef struct _DDHAL_SETENTRIESDATA *LPDDHAL_SETENTRIESDATA;
357 typedef DWORD PASCAL (*LPDDHALPALCB_DESTROYPALETTE)(LPDDHAL_DESTROYPALETTEDATA);
358 typedef DWORD PASCAL (*LPDDHALPALCB_SETENTRIES) (LPDDHAL_SETENTRIESDATA);
360 typedef struct _DDHAL_DDPALETTECALLBACKS {
361 DWORD dwSize;
362 DWORD dwFlags;
363 LPDDHALPALCB_DESTROYPALETTE DestroyPalette;
364 LPDDHALPALCB_SETENTRIES SetEntries;
365 } DDHAL_DDPALETTECALLBACKS,*LPDDHAL_DDPALETTECALLBACKS;
367 typedef DWORD PASCAL (*LPDDHALEXEBUFCB_CANCREATEEXEBUF)(LPDDHAL_CANCREATESURFACEDATA);
368 typedef DWORD PASCAL (*LPDDHALEXEBUFCB_CREATEEXEBUF) (LPDDHAL_CREATESURFACEDATA);
369 typedef DWORD PASCAL (*LPDDHALEXEBUFCB_DESTROYEXEBUF) (LPDDHAL_DESTROYSURFACEDATA);
370 typedef DWORD PASCAL (*LPDDHALEXEBUFCB_LOCKEXEBUF) (LPDDHAL_LOCKDATA);
371 typedef DWORD PASCAL (*LPDDHALEXEBUFCB_UNLOCKEXEBUF) (LPDDHAL_UNLOCKDATA);
373 typedef struct _DDHAL_DDEXEBUFCALLBACKS {
374 DWORD dwSize;
375 DWORD dwFlags;
376 LPDDHALEXEBUFCB_CANCREATEEXEBUF CanCreateExecuteBuffer;
377 LPDDHALEXEBUFCB_CREATEEXEBUF CreateExecuteBuffer;
378 LPDDHALEXEBUFCB_DESTROYEXEBUF DestroyExecuteBuffer;
379 LPDDHALEXEBUFCB_LOCKEXEBUF LockExecuteBuffer;
380 LPDDHALEXEBUFCB_UNLOCKEXEBUF UnlockExecuteBuffer;
381 } DDHAL_DDEXEBUFCALLBACKS,*LPDDHAL_DDEXEBUFCALLBACKS;
383 typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA *LPDDHAL_GETAVAILDRIVERMEMORYDATA;
384 typedef struct _DDHAL_UPDATENONLOCALHEAPDATA *LPDDHAL_UPDATENONLOCALHEAPDATA;
385 typedef struct _DDHAL_GETHEAPALIGNMENTDATA *LPDDHAL_GETHEAPALIGNMENTDATA;
387 typedef DWORD PASCAL (*LPDDHAL_GETAVAILDRIVERMEMORY)(LPDDHAL_GETAVAILDRIVERMEMORYDATA);
388 typedef DWORD PASCAL (*LPDDHAL_UPDATENONLOCALHEAP) (LPDDHAL_UPDATENONLOCALHEAPDATA);
389 typedef DWORD PASCAL (*LPDDHAL_GETHEAPALIGNMENT) (LPDDHAL_GETHEAPALIGNMENTDATA);
391 typedef struct _DDHAL_DDMISCELLANEOUSCALLBACKS {
392 DWORD dwSize;
393 DWORD dwFlags;
394 LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory;
395 LPDDHAL_UPDATENONLOCALHEAP UpdateNonLocalHeap;
396 LPDDHAL_GETHEAPALIGNMENT GetHeapAlignment;
397 LPDDHALSURFCB_GETBLTSTATUS GetSysmemBltStatus;
398 } DDHAL_DDMISCELLANEOUSCALLBACKS,*LPDDHAL_DDMISCELLANEOUSCALLBACKS;
400 typedef struct _DDHAL_CREATESURFACEEXDATA *LPDDHAL_CREATESURFACEEXDATA;
401 typedef struct _DDHAL_GETDRIVERSTATEDATA *LPDDHAL_GETDRIVERSTATEDATA;
402 typedef struct _DDHAL_DESTROYDDLOCALDATA *LPDDHAL_DESTROYDDLOCALDATA;
404 typedef DWORD PASCAL (*LPDDHAL_CREATESURFACEEX)(LPDDHAL_CREATESURFACEEXDATA);
405 typedef DWORD PASCAL (*LPDDHAL_GETDRIVERSTATE) (LPDDHAL_GETDRIVERSTATEDATA);
406 typedef DWORD PASCAL (*LPDDHAL_DESTROYDDLOCAL) (LPDDHAL_DESTROYDDLOCALDATA);
408 typedef struct _DDHAL_DDMISCELLANEOUS2CALLBACKS {
409 DWORD dwSize;
410 DWORD dwFlags;
411 LPVOID Reserved;
412 LPDDHAL_CREATESURFACEEX CreateSurfaceEx;
413 LPDDHAL_GETDRIVERSTATE GetDriverState;
414 LPDDHAL_DESTROYDDLOCAL DestroyDDLocal;
415 } DDHAL_DDMISCELLANEOUS2CALLBACKS,*LPDDHAL_DDMISCELLANEOUS2CALLBACKS;
417 typedef HRESULT WINAPI (*LPDDGAMMACALIBRATORPROC)(LPDDGAMMARAMP, LPBYTE);
419 /*****************************************************************************
420 * driver info structure
422 * The HAL is queried for additional callbacks via the GetDriverInfo callback.
424 typedef struct _DDHAL_GETDRIVERINFODATA *LPDDHAL_GETDRIVERINFODATA;
425 typedef DWORD PASCAL (*LPDDHAL_GETDRIVERINFO)(LPDDHAL_GETDRIVERINFODATA);
427 typedef struct _DDHALINFO {
428 DWORD dwSize;
429 LPDDHAL_DDCALLBACKS lpDDCallbacks;
430 LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks;
431 LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks;
432 VIDMEMINFO vmiData;
433 DDCORECAPS ddCaps;
434 DWORD dwMonitorFrequency;
435 LPDDHAL_GETDRIVERINFO GetDriverInfo;
436 DWORD dwModeIndex;
437 LPDWORD lpdwFourCC;
438 DWORD dwNumModes;
439 LPDDHALMODEINFO lpModeInfo;
440 DWORD dwFlags;
441 LPVOID lpPDevice;
442 DWORD hInstance;
443 /* DirectX 2 */
444 ULONG_PTR lpD3DGlobalDriverData;
445 ULONG_PTR lpD3DHALCallbacks;
446 LPDDHAL_DDEXEBUFCALLBACKS lpDDExeBufCallbacks;
447 } DDHALINFO;
449 #define DDHALINFO_ISPRIMARYDISPLAY 0x00000001
450 #define DDHALINFO_MODEXILLEGAL 0x00000002
451 #define DDHALINFO_GETDRIVERINFOSET 0x00000004
453 /* where the high-level ddraw implementation stores the callbacks */
454 typedef struct _DDHAL_CALLBACKS {
455 DDHAL_DDCALLBACKS cbDDCallbacks;
456 DDHAL_DDSURFACECALLBACKS cbDDSurfaceCallbacks;
457 DDHAL_DDPALETTECALLBACKS cbDDPaletteCallbacks;
458 DDHAL_DDCALLBACKS HALDD;
459 DDHAL_DDSURFACECALLBACKS HALDDSurface;
460 DDHAL_DDPALETTECALLBACKS HALDDPalette;
461 DDHAL_DDCALLBACKS HELDD;
462 DDHAL_DDSURFACECALLBACKS HELDDSurface;
463 DDHAL_DDPALETTECALLBACKS HELDDPalette;
464 DDHAL_DDEXEBUFCALLBACKS cbDDExeBufCallbacks;
465 DDHAL_DDEXEBUFCALLBACKS HALDDExeBuf;
466 DDHAL_DDEXEBUFCALLBACKS HELDDExeBuf;
467 /* there's more... videoport, colorcontrol, misc, and motion compensation callbacks... */
468 } DDHAL_CALLBACKS,*LPDDHAL_CALLBACKS;
470 /*****************************************************************************
471 * parameter structures
473 typedef struct _DDHAL_DESTROYDRIVERDATA {
474 LPDDRAWI_DIRECTDRAW_GBL lpDD;
475 HRESULT ddRVal;
476 LPDDHAL_DESTROYDRIVER DestroyDriver;
477 } DDHAL_DESTROYDRIVERDATA;
479 typedef struct _DDHAL_SETMODEDATA {
480 LPDDRAWI_DIRECTDRAW_GBL lpDD;
481 DWORD dwModeIndex;
482 HRESULT ddRVal;
483 LPDDHAL_SETMODE SetMode;
484 BOOL inexcl;
485 BOOL useRefreshRate;
486 } DDHAL_SETMODEDATA;
488 typedef struct _DDHAL_CREATESURFACEDATA {
489 LPDDRAWI_DIRECTDRAW_GBL lpDD;
490 LPDDSURFACEDESC lpDDSurfaceDesc;
491 LPDDRAWI_DDRAWSURFACE_LCL * lplpSList;
492 DWORD dwSCnt;
493 HRESULT ddRVal;
494 LPDDHAL_CREATESURFACE CreateSurface;
495 } DDHAL_CREATESURFACEDATA;
497 typedef struct _DDHAL_CANCREATESURFACEDATA {
498 LPDDRAWI_DIRECTDRAW_GBL lpDD;
499 LPDDSURFACEDESC lpDDSurfaceDesc;
500 DWORD bIsDifferentPixelFormat;
501 HRESULT ddRVal;
502 LPDDHAL_CANCREATESURFACE CanCreateSurface;
503 } DDHAL_CANCREATESURFACEDATA;
505 typedef struct _DDHAL_CREATEPALETTEDATA {
506 LPDDRAWI_DIRECTDRAW_GBL lpDD;
507 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
508 LPPALETTEENTRY lpColorTable;
509 HRESULT ddRVal;
510 LPDDHAL_CREATEPALETTE CreatePalette;
511 BOOL is_excl;
512 } DDHAL_CREATEPALETTEDATA;
514 typedef struct _DDHAL_SETEXCLUSIVEMODEDATA {
515 LPDDRAWI_DIRECTDRAW_GBL lpDD;
516 DWORD dwEnterExcl;
517 DWORD dwReserved;
518 HRESULT ddRVal;
519 LPDDHAL_SETEXCLUSIVEMODE SetExclusiveMode;
520 } DDHAL_SETEXCLUSIVEMODEDATA;
522 /* surfaces */
523 typedef struct _DDHAL_DESTROYSURFACEDATA {
524 LPDDRAWI_DIRECTDRAW_GBL lpDD;
525 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
526 HRESULT ddRVal;
527 LPDDHALSURFCB_DESTROYSURFACE DestroySurface;
528 } DDHAL_DESTROYSURFACEDATA;
530 typedef struct _DDHAL_FLIPDATA {
531 LPDDRAWI_DIRECTDRAW_GBL lpDD;
532 LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr;
533 LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg;
534 DWORD dwFlags;
535 HRESULT ddRVal;
536 LPDDHALSURFCB_FLIP Flip;
537 LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurrLeft;
538 LPDDRAWI_DDRAWSURFACE_LCL lpSurfTargLeft;
539 } DDHAL_FLIPDATA;
541 typedef struct _DDHAL_BLTDATA {
542 LPDDRAWI_DIRECTDRAW_GBL lpDD;
543 LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;
544 RECTL rDest;
545 LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface;
546 RECTL rSrc;
547 DWORD dwFlags;
548 DWORD dwROPFlags;
549 DDBLTFX bltFX;
550 HRESULT ddRVal;
551 LPDDHALSURFCB_BLT Blt;
552 BOOL IsClipped;
553 RECTL rOrigDest;
554 RECTL rOrigSrc;
555 DWORD dwRectCnt;
556 LPRECT prDestRects;
557 } DDHAL_BLTDATA;
559 typedef struct _DDHAL_SETPALETTEDATA {
560 LPDDRAWI_DIRECTDRAW_GBL lpDD;
561 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface;
562 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
563 HRESULT ddRVal;
564 LPDDHALSURFCB_SETPALETTE SetPalette;
565 BOOL Attach;
566 } DDHAL_SETPALETTEDATA;
568 /* palettes */
569 typedef struct _DDHAL_DESTROYPALETTEDATA {
570 LPDDRAWI_DIRECTDRAW_GBL lpDD;
571 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
572 HRESULT ddRVal;
573 LPDDHALPALCB_DESTROYPALETTE DestroyPalette;
574 } DDHAL_DESTROYPALETTEDATA;
576 typedef struct _DDHAL_SETENTRIESDATA {
577 LPDDRAWI_DIRECTDRAW_GBL lpDD;
578 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette;
579 DWORD dwBase;
580 DWORD dwNumEntries;
581 LPPALETTEENTRY lpEntries;
582 HRESULT ddRVal;
583 LPDDHALPALCB_SETENTRIES SetEntries;
584 } DDHAL_SETENTRIESDATA;
586 typedef struct _DDHAL_GETDRIVERINFODATA {
587 DWORD dwSize;
588 DWORD dwFlags;
589 GUID guidInfo;
590 DWORD dwExpectedSize;
591 LPVOID lpvData;
592 DWORD dwActualSize;
593 HRESULT ddRVal;
594 ULONG_PTR dwContext;
595 } DDHAL_GETDRIVERINFODATA;
597 /*****************************************************************************
598 * high-level ddraw implementation structures
600 typedef struct _IUNKNOWN_LIST {
601 struct _IUNKNOWN_LIST * lpLink;
602 LPGUID lpGuid;
603 IUnknown * lpIUnknown;
604 } IUNKNOWN_LIST,*LPIUNKNOWN_LIST;
606 typedef struct _PROCESS_LIST {
607 struct _PROCESS_LIST * lpLink;
608 DWORD dwProcessId;
609 DWORD dwRefCnt;
610 DWORD dwAlphaDepth;
611 DWORD dwZDepth;
612 } PROCESS_LIST,*LPPROCESS_LIST;
614 typedef struct _ATTACHLIST {
615 DWORD dwFlags;
616 struct _ATTACHLIST * lpLink;
617 LPDDRAWI_DDRAWSURFACE_LCL lpAttached;
618 LPDDRAWI_DDRAWSURFACE_INT lpIAttached;
619 } ATTACHLIST,*LPATTACHLIST;
621 #define DDAL_IMPLICIT 0x00000001
623 typedef struct _ACCESSRECTLIST {
624 struct _ACCESSRECTLIST * lpLink;
625 RECT rDest;
626 LPDDRAWI_DIRECTDRAW_LCL lpOwner;
627 LPVOID lpSurfaceData;
628 DWORD dwFlags;
629 LPHEAPALIASINFO lpHeapAliasInfo;
630 } ACCESSRECTLIST,*LPACCESSRECTLIST;
632 #define ACCESSRECT_VRAMSTYLE 0x00000001
633 #define ACCESSRECT_NOTHOLDINGWIN16LOCK 0x00000002
634 #define ACCESSRECT_BROKEN 0x00000004
636 typedef struct _DBLNODE {
637 struct _DBLNODE * next;
638 struct _DBLNODE * prev;
639 LPDDRAWI_DDRAWSURFACE_LCL object;
640 LPDDRAWI_DDRAWSURFACE_INT object_int;
641 } DBLNODE,*LPDBLNODE;
643 typedef struct _DDRAWI_DIRECTDRAW_INT {
644 LPVOID lpVtbl;
645 LPDDRAWI_DIRECTDRAW_LCL lpLcl;
646 LPDDRAWI_DIRECTDRAW_INT lpLink;
647 DWORD dwIntRefCnt;
648 } DDRAWI_DIRECTDRAW_INT;
650 typedef struct _DDRAWI_DIRECTDRAW_LCL {
651 DWORD lpDDMore;
652 LPDDRAWI_DIRECTDRAW_GBL lpGbl;
653 DWORD dwUnused0;
654 DWORD dwLocalFlags;
655 DWORD dwLocalRefCnt;
656 DWORD dwProcessId;
657 IUnknown * pUnkOuter;
658 DWORD dwObsolete1;
659 ULONG_PTR hWnd;
660 ULONG_PTR hDC;
661 DWORD dwErrorMode;
662 LPDDRAWI_DDRAWSURFACE_INT lpPrimary;
663 LPDDRAWI_DDRAWSURFACE_INT lpCB;
664 DWORD dwPreferredMode;
665 /* DirectX 2 */
666 HINSTANCE hD3DInstance;
667 IUnknown * pD3DIUnknown;
668 LPDDHAL_CALLBACKS lpDDCB;
669 ULONG_PTR hDDVxd;
670 /* DirectX 5.0 */
671 DWORD dwAppHackFlags;
672 /* DirectX 5.0A */
673 ULONG_PTR hFocusWnd;
674 DWORD dwHotTracking;
675 DWORD dwIMEState;
676 /* DirectX 6.0 */
677 ULONG_PTR hWndPopup;
678 ULONG_PTR hDD;
679 ULONG_PTR hGammaCalibrator;
680 LPDDGAMMACALIBRATORPROC lpGammaCalibrator;
681 } DDRAWI_DIRECTDRAW_LCL;
683 #define DDRAWILCL_HASEXCLUSIVEMODE 0x00000001
684 #define DDRAWILCL_ISFULLSCREEN 0x00000002
685 #define DDRAWILCL_SETCOOPCALLED 0x00000004
686 #define DDRAWILCL_ACTIVEYES 0x00000008
687 #define DDRAWILCL_ACTIVENO 0x00000010
688 #define DDRAWILCL_HOOKEDHWND 0x00000020
689 #define DDRAWILCL_ALLOWMODEX 0x00000040
690 #define DDRAWILCL_V1SCLBEHAVIOUR 0x00000080
691 #define DDRAWILCL_MODEHASBEENCHANGED 0x00000100
692 #define DDRAWILCL_CREATEDWINDOW 0x00000200
693 #define DDRAWILCL_DIRTYDC 0x00000400
694 #define DDRAWILCL_DISABLEINACTIVATE 0x00000800
695 #define DDRAWILCL_CURSORCLIPPED 0x00001000
696 #define DDRAWILCL_EXPLICITMONITOR 0x00002000
697 #define DDRAWILCL_MULTITHREADED 0x00004000
698 #define DDRAWILCL_FPUSETUP 0x00008000
699 #define DDRAWILCL_POWEREDDOWN 0x00010000
700 #define DDRAWILCL_DIRECTDRAW7 0x00020000
701 #define DDRAWILCL_ATTEMPTEDD3DCONTEXT 0x00040000
702 #define DDRAWILCL_FPUPRESERVE 0x00080000
704 typedef struct _DDRAWI_DIRECTDRAW_GBL {
705 DWORD dwRefCnt;
706 DWORD dwFlags;
707 FLATPTR fpPrimaryOrig;
708 DDCORECAPS ddCaps;
709 DWORD dwInternal1;
710 DWORD dwUnused1[9];
711 LPDDHAL_CALLBACKS lpDDCBtmp;
712 LPDDRAWI_DDRAWSURFACE_INT dsList;
713 LPDDRAWI_DDRAWPALETTE_INT palList;
714 LPDDRAWI_DDRAWCLIPPER_INT clipperList;
715 LPDDRAWI_DIRECTDRAW_GBL lp16DD;
716 DWORD dwMaxOverlays;
717 DWORD dwCurrOverlays;
718 DWORD dwMonitorFrequency;
719 DDCORECAPS ddHELCaps;
720 DWORD dwUnused2[50];
721 DDCOLORKEY ddckCKDestOverlay;
722 DDCOLORKEY ddckCKSrcOverlay;
723 VIDMEMINFO vmiData;
724 LPVOID lpDriverHandle;
725 LPDDRAWI_DIRECTDRAW_LCL lpExclusiveOwner;
726 DWORD dwModeIndex;
727 DWORD dwModeIndexOrig;
728 DWORD dwNumFourCC;
729 LPDWORD lpdwFourCC;
730 DWORD dwNumModes;
731 LPDDHALMODEINFO lpModeInfo;
732 PROCESS_LIST plProcessList;
733 DWORD dwSurfaceLockCount;
734 DWORD dwAliasedLockCnt;
735 ULONG_PTR dwReserved3;
736 ULONG_PTR hDD;
737 char cObsolete[12];
738 DWORD dwReserved1;
739 DWORD dwReserved2;
740 DBLNODE dbnOverlayRoot;
741 volatile LPWORD lpwPDeviceFlags;
742 DWORD dwPDevice;
743 DWORD dwWin16LockCnt;
744 DWORD dwUnused3;
745 DWORD hInstance;
746 DWORD dwEvent16;
747 DWORD dwSaveNumModes;
748 /* DirectX 2 */
749 ULONG_PTR lpD3DGlobalDriverData;
750 ULONG_PTR lpD3DHALCallbacks;
751 DDCORECAPS ddBothCaps;
752 /* DirectX 5.0 */
753 LPDDVIDEOPORTCAPS lpDDVideoPortCaps;
754 LPDDRAWI_DDVIDEOPORT_INT dvpList;
755 ULONG_PTR lpD3DHALCallbacks2;
756 RECT rectDevice;
757 DWORD cMonitors;
758 LPVOID gpbmiSrc;
759 LPVOID gpbmiDest;
760 LPHEAPALIASINFO phaiHeapAliases;
761 ULONG_PTR hKernelHandle;
762 ULONG_PTR pfnNotifyProc;
763 LPDDKERNELCAPS lpDDKernelCaps;
764 LPDDNONLOCALVIDMEMCAPS lpddNLVCaps;
765 LPDDNONLOCALVIDMEMCAPS lpddNLVHELCaps;
766 LPDDNONLOCALVIDMEMCAPS lpddNLVBothCaps;
767 ULONG_PTR lpD3DExtendedCaps;
768 /* DirectX 5.0A */
769 DWORD dwDOSBoxEvent;
770 RECT rectDesktop;
771 char cDriverName[MAX_DRIVER_NAME];
772 /* DirectX 6.0 */
773 ULONG_PTR lpD3DHALCallbacks3;
774 DWORD dwNumZPixelFormats;
775 LPDDPIXELFORMAT lpZPixelFormats;
776 LPDDRAWI_DDMOTIONCOMP_INT mcList;
777 DWORD hDDVxd;
778 DDSCAPSEX ddsCapsMore;
779 } DDRAWI_DIRECTDRAW_GBL;
781 #define DDRAWI_VIRTUALDESKTOP 0x00000008
782 #define DDRAWI_MODEX 0x00000010
783 #define DDRAWI_DISPLAYDRV 0x00000020
784 #define DDRAWI_FULLSCREEN 0x00000040
785 #define DDRAWI_MODECHANGED 0x00000080
786 #define DDRAWI_NOHARDWARE 0x00000100
787 #define DDRAWI_PALETTEINIT 0x00000200
788 #define DDRAWI_NOEMULATION 0x00000400
789 /* more... */
791 /* surfaces */
792 typedef struct _DDRAWI_DDRAWSURFACE_INT {
793 LPVOID lpVtbl;
794 LPDDRAWI_DDRAWSURFACE_LCL lpLcl;
795 LPDDRAWI_DDRAWSURFACE_INT lpLink;
796 DWORD dwIntRefCnt;
797 } DDRAWI_DDRAWSURFACE_INT;
799 typedef struct _DDRAWI_DDRAWSURFACE_GBL {
800 DWORD dwRefCnt;
801 DWORD dwGlobalFlags;
802 union {
803 LPACCESSRECTLIST lpRectList;
804 DWORD dwBlockSizeY;
805 } DUMMYUNIONNAME1;
806 union {
807 LPVMEMHEAP lpVidMemHeap;
808 DWORD dwBlockSizeX;
809 } DUMMYUNIONNAME2;
810 union {
811 LPDDRAWI_DIRECTDRAW_GBL lpDD;
812 LPVOID lpDDHandle;
813 } DUMMYUNIONNAME3;
814 FLATPTR fpVidMem;
815 union {
816 LONG lPitch;
817 DWORD dwLinearSize;
818 } DUMMYUNIONNAME4;
819 WORD wHeight;
820 WORD wWidth;
821 DWORD dwUsageCount;
822 ULONG_PTR dwReserved1; /* for display driver use */
823 /* optional (defaults to primary surface pixelformat) */
824 DDPIXELFORMAT ddpfSurface;
825 } DDRAWI_DDRAWSURFACE_GBL;
827 #define DDRAWISURFGBL_MEMFREE 0x00000001
828 #define DDRAWISURFGBL_SYSMEMREQUESTED 0x00000002
829 #define DDRAWISURFGBL_ISGDISURFACE 0x00000004
830 #define DDRAWISURFGBL_SOFTWAREAUTOFLIP 0x00000008
831 #define DDRAWISURFGBL_LOCKNOTHOLDINGWIN16LOCK 0x00000010
832 #define DDRAWISURFGBL_LOCKVRAMSTYLE 0x00000020
833 #define DDRAWISURFGBL_LOCKBROKEN 0x00000040
834 #define DDRAWISURFGBL_IMPLICITHANDLE 0x00000080
835 #define DDRAWISURFGBL_ISCLIENTMEM 0x00000100
836 #define DDRAWISURFGBL_HARDWAREOPSOURCE 0x00000200
837 #define DDRAWISURFGBL_HARDWAREOPDEST 0x00000400
838 #define DDRAWISURFGBL_HARDWAREOPSTARTED 0x00000600
839 #define DDRAWISURFGBL_VPORTINTERLEAVED 0x00000800
840 #define DDRAWISURFGBL_VPORTDATA 0x00001000
841 #define DDRAWISURFGBL_LATEALLOCATELINEAR 0x00002000
842 #define DDRAWISURFGBL_SYSMEMEXECUTEBUFFER 0x00004000
843 #define DDRAWISURFGBL_FASTLOCKHELD 0x00008000
844 #define DDRAWISURFGBL_READONLYLOCKHELD 0x00010000
846 typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE {
847 DWORD dwSize;
848 union {
849 DWORD dwPhysicalPageTable;
850 FLATPTR fpPhysicalVidMem;
851 } DUMMYUNIONNAME1;
852 LPDWORD pPageTable;
853 DWORD cPages;
854 ULONG_PTR dwSavedDCContext;
855 FLATPTR fpAliasedVidMem;
856 ULONG_PTR dwDriverReserved;
857 ULONG_PTR dwHELReserved;
858 DWORD cPageUnlocks;
859 ULONG_PTR hKernelSurface;
860 DWORD dwKernelRefCnt;
861 LPDDCOLORCONTROL lpColorInfo;
862 FLATPTR fpNTAlias;
863 DWORD dwContentsStamp;
864 LPVOID lpvUnswappedDriverReserved;
865 LPVOID lpDDRAWReserved2;
866 DWORD dwDDRAWReserved1;
867 DWORD dwDDRAWReserved2;
868 FLATPTR fpAliasOfVidMem;
869 } DDRAWI_DDRAWSURFACE_GBL_MORE;
871 /* the MS version of this macro was somewhat obfuscated and unreadable
872 * (possibly because of mediocre MS coders)... so I simplified it...
873 * (and so I commit no copyright violations either, hah) */
874 #define GET_LPDDRAWSURFACE_GBL_MORE(psurf_gbl) \
875 (*(((LPDDRAWI_DDRAWSURFACE_GBL_MORE *)(psurf_gbl)) - 1))
877 typedef struct _DDRAWI_DDRAWSURFACE_MORE {
878 DWORD dwSize;
879 IUNKNOWN_LIST * lpIUnknowns;
880 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
881 DWORD dwPageLockCount;
882 DWORD dwBytesAllocated;
883 LPDDRAWI_DIRECTDRAW_INT lpDD_int;
884 DWORD dwMipMapCount;
885 LPDDRAWI_DDRAWCLIPPER_INT lpDDIClipper;
886 /* DirectX 5.0 */
887 LPHEAPALIASINFO lpHeapAliasInfo;
888 DWORD dwOverlayFlags;
889 VOID *rgjunc;
890 LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort;
891 LPDDOVERLAYFX lpddOverlayFX;
892 DDSCAPSEX ddsCapsEx;
893 DWORD dwTextureStage;
894 LPVOID lpDDRAWReserved;
895 LPVOID lpDDRAWReserved2;
896 LPVOID lpDDrawReserved3;
897 DWORD dwDDrawReserved4;
898 LPVOID lpDDrawReserved5;
899 LPDWORD lpGammaRamp;
900 LPDWORD lpOriginalGammaRamp;
901 LPVOID lpDDrawReserved6;
902 DWORD dwSurfaceHandle;
903 DWORD qwDDrawReserved8[2];
904 LPVOID lpDDrawReserved9;
905 DWORD cSurfaces;
906 LPDDSURFACEDESC2 pCreatedDDSurfaceDesc2;
907 LPDDRAWI_DDRAWSURFACE_LCL *slist;
908 DWORD dwFVF;
909 LPVOID lpVB;
910 } DDRAWI_DDRAWSURFACE_MORE;
912 typedef struct _DDRAWI_DDRAWSURFACE_LCL {
913 LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore;
914 LPDDRAWI_DDRAWSURFACE_GBL lpGbl;
915 ULONG_PTR hDDSurface;
916 LPATTACHLIST lpAttachList;
917 LPATTACHLIST lpAttachListFrom;
918 DWORD dwLocalRefCnt;
919 DWORD dwProcessId;
920 DWORD dwFlags;
921 DDSCAPS ddsCaps;
922 LPDDRAWI_DDRAWPALETTE_INT lpDDPalette;
923 LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper;
924 DWORD dwModeCreatedIn;
925 DWORD dwBackBufferCount;
926 DDCOLORKEY ddckCKDestBlt;
927 DDCOLORKEY ddckCKSrcBlt;
928 ULONG_PTR hDC;
929 ULONG_PTR dwReserved1; /* for display driver use */
930 /* overlays only */
931 DDCOLORKEY ddckCKSrcOverlay;
932 DDCOLORKEY ddckCKDestOverlay;
933 LPDDRAWI_DDRAWSURFACE_INT lpSurfaceOverlaying;
934 DBLNODE dbnOverlayNode;
935 RECT rcOverlaySrc;
936 RECT rcOverlayDest;
937 DWORD dwClrXparent;
938 DWORD dwAlpha;
939 LONG lOverlayX;
940 LONG lOverlayY;
941 } DDRAWI_DDRAWSURFACE_LCL;
943 #define DDRAWISURF_ATTACHED 0x00000001
944 #define DDRAWISURF_IMPLICITCREATE 0x00000002
945 #define DDRAWISURF_ISFREE 0x00000004
946 #define DDRAWISURF_ATTACHED_FROM 0x00000008
947 #define DDRAWISURF_IMPLICITROOT 0x00000010
948 #define DDRAWISURF_PARTOFPRIMARYCHAIN 0x00000020
949 #define DDRAWISURF_DATAISALIASED 0x00000040
950 #define DDRAWISURF_HASDC 0x00000080
951 #define DDRAWISURF_HASCKEYDESTOVERLAY 0x00000100
952 #define DDRAWISURF_HASCKEYDESTBLT 0x00000200
953 #define DDRAWISURF_HASCKEYSRCOVERLAY 0x00000400
954 #define DDRAWISURF_HASCKEYSRCBLT 0x00000800
955 #define DDRAWISURF_LOCKEXCLUDEDCURSOR 0x00001000
956 #define DDRAWISURF_HASPIXELFORMAT 0x00002000
957 #define DDRAWISURF_HASOVERLAYDATA 0x00004000
958 #define DDRAWISURF_SETGAMMA 0x00008000
959 /* more... */
960 #define DDRAWISURF_INVALID 0x10000000
962 /* palettes */
963 typedef struct _DDRAWI_DDRAWPALETTE_INT {
964 LPVOID lpVtbl;
965 LPDDRAWI_DDRAWPALETTE_LCL lpLcl;
966 LPDDRAWI_DDRAWPALETTE_INT lpLink;
967 DWORD dwIntRefCnt;
968 } DDRAWI_DDRAWPALETTE_INT;
970 typedef struct _DDRAWI_DDRAWPALETTE_GBL {
971 DWORD dwRefCnt;
972 DWORD dwFlags;
973 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
974 DWORD dwProcessId;
975 LPPALETTEENTRY lpColorTable;
976 union {
977 ULONG_PTR dwReserved1; /* for display driver use */
978 HPALETTE hHELGDIPalette;
979 } DUMMYUNIONNAME1;
980 /* DirectX 5.0 */
981 DWORD dwDriverReserved;
982 DWORD dwContentsStamp;
983 /* DirectX 6.0 */
984 DWORD dwSaveStamp;
985 /* DirectX 7.0 */
986 DWORD dwHandle;
987 } DDRAWI_DDRAWPALETTE_GBL;
989 #define DDRAWIPAL_256 0x00000001
990 #define DDRAWIPAL_16 0x00000002
991 #define DDRAWIPAL_GDI 0x00000004
992 #define DDRAWIPAL_STORED_8 0x00000008
993 #define DDRAWIPAL_STORED_16 0x00000010
994 #define DDRAWIPAL_STORED_24 0x00000020
995 #define DDRAWIPAL_EXCLUSIVE 0x00000040
996 #define DDRAWIPAL_INHEL 0x00000080
997 #define DDRAWIPAL_DIRTY 0x00000100
998 #define DDRAWIPAL_ALLOW256 0x00000200
999 #define DDRAWIPAL_4 0x00000400
1000 #define DDRAWIPAL_2 0x00000800
1001 #define DDRAWIPAL_STORED_8INDEX 0x00001000
1002 #define DDRAWIPAL_ALPHA 0x00002000
1004 typedef struct _DDRAWI_DDRAWPALETTE_LCL {
1005 DWORD lpPalMore;
1006 LPDDRAWI_DDRAWPALETTE_GBL lpGbl;
1007 ULONG_PTR dwUnused0;
1008 DWORD dwLocalRefCnt;
1009 IUnknown * pUnkOuter;
1010 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
1011 ULONG_PTR dwReserved1;
1012 /* DirectX 6.0 */
1013 ULONG_PTR dwDDRAWReserved1;
1014 ULONG_PTR dwDDRAWReserved2;
1015 ULONG_PTR dwDDRAWReserved3;
1016 } DDRAWI_DDRAWPALETTE_LCL;
1018 #ifdef __cplusplus
1019 } /* extern "C" */
1020 #endif
1022 #endif /* __WINE_DDRAWI_H */