1859702a9cf3a0cd385796b16f269abe9c3c08c3
[reactos.git] / reactos / include / ddraw.h
1 /*
2 * Copyright (C) the Wine project
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 #ifndef __WINE_DDRAW_H
20 #define __WINE_DDRAW_H
21
22 #include <windows.h> /* LARGE_INTEGER ... */
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27
28 #define DDENUMRET_CANCEL 0
29 #define DDENUMRET_OK 1
30
31 #define DD_OK 0
32
33 #define _FACDD 0x876
34 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
35
36 #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
37 #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
38 #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
39 #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
40 #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
41 #define DDERR_GENERIC E_FAIL
42 #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
43 #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
44 #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
45 #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
46 #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
47 #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
48 #define DDERR_INVALIDPARAMS E_INVALIDARG
49 #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
50 #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
51 #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
52 #define DDERR_NO3D MAKE_DDHRESULT( 170 )
53 #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
54 #define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
55 #define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
56 #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
57 #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
58 #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
59 #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
60 #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
61 #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
62 #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
63 #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
64 #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
65 #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
66 #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
67 #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
68 #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
69 #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
70 #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
71 #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
72 #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
73 #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
74 #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
75 #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
76 #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
77 #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
78 #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
79 #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
80 #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
81 #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
82 #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
83 #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
84 #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
85 #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
86 #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
87 #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
88 #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
89 #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
90 #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
91 #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
92 #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
93 #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
94 #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
95 #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
96 #define DDERR_UNSUPPORTED E_NOTIMPL
97 #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
98 #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
99 #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
100 #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
101 #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
102 #define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
103 #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
104 #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
105 #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
106 #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
107 #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
108 #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
109 #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
110 #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
111 #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
112 #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
113 #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
114 #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
115 #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
116 #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
117 #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
118 #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
119 #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
120 #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
121 #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
122 #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
123 #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
124 #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
125 #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
126 #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
127 #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
128 #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
129 #define DDERR_NODC MAKE_DDHRESULT( 586 )
130 #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
131 #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
132 #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
133 #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
134 #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
135 #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
136 #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
137 #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
138 #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
139 #define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
140 #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
141 #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
142 #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
143 #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
144 #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
145 #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
146 #define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
147 #define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
148 #define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
149 #define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
150 #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
151 #define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
152 #define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
153 #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
154 #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
155
156 /* dwFlags for Blt* */
157 #define DDBLT_ALPHADEST 0x00000001
158 #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
159 #define DDBLT_ALPHADESTNEG 0x00000004
160 #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
161 #define DDBLT_ALPHAEDGEBLEND 0x00000010
162 #define DDBLT_ALPHASRC 0x00000020
163 #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
164 #define DDBLT_ALPHASRCNEG 0x00000080
165 #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
166 #define DDBLT_ASYNC 0x00000200
167 #define DDBLT_COLORFILL 0x00000400
168 #define DDBLT_DDFX 0x00000800
169 #define DDBLT_DDROPS 0x00001000
170 #define DDBLT_KEYDEST 0x00002000
171 #define DDBLT_KEYDESTOVERRIDE 0x00004000
172 #define DDBLT_KEYSRC 0x00008000
173 #define DDBLT_KEYSRCOVERRIDE 0x00010000
174 #define DDBLT_ROP 0x00020000
175 #define DDBLT_ROTATIONANGLE 0x00040000
176 #define DDBLT_ZBUFFER 0x00080000
177 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
178 #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
179 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
180 #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
181 #define DDBLT_WAIT 0x01000000
182 #define DDBLT_DEPTHFILL 0x02000000
183 #define DDBLT_DONOTWAIT 0x08000000
184
185 /* dwTrans for BltFast */
186 #define DDBLTFAST_NOCOLORKEY 0x00000000
187 #define DDBLTFAST_SRCCOLORKEY 0x00000001
188 #define DDBLTFAST_DESTCOLORKEY 0x00000002
189 #define DDBLTFAST_WAIT 0x00000010
190 #define DDBLTFAST_DONOTWAIT 0x00000020
191
192 /* dwFlags for Flip */
193 #define DDFLIP_WAIT 0x00000001
194 #define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
195 #define DDFLIP_ODD 0x00000004 /* only valid for overlay */
196 #define DDFLIP_NOVSYNC 0x00000008
197 #define DDFLIP_STEREO 0x00000010
198 #define DDFLIP_DONOTWAIT 0x00000020
199
200 /* dwFlags for GetBltStatus */
201 #define DDGBS_CANBLT 0x00000001
202 #define DDGBS_ISBLTDONE 0x00000002
203
204 /* dwFlags for IDirectDrawSurface7::GetFlipStatus */
205 #define DDGFS_CANFLIP 1L
206 #define DDGFS_ISFLIPDONE 2L
207
208 /* dwFlags for IDirectDrawSurface7::SetPrivateData */
209 #define DDSPD_IUNKNOWNPTR 1L
210 #define DDSPD_VOLATILE 2L
211
212 /* DDSCAPS.dwCaps */
213 /* reserved1, was 3d capable */
214 #define DDSCAPS_RESERVED1 0x00000001
215 /* surface contains alpha information */
216 #define DDSCAPS_ALPHA 0x00000002
217 /* this surface is a backbuffer */
218 #define DDSCAPS_BACKBUFFER 0x00000004
219 /* complex surface structure */
220 #define DDSCAPS_COMPLEX 0x00000008
221 /* part of surface flipping structure */
222 #define DDSCAPS_FLIP 0x00000010
223 /* this surface is the frontbuffer surface */
224 #define DDSCAPS_FRONTBUFFER 0x00000020
225 /* this is a plain offscreen surface */
226 #define DDSCAPS_OFFSCREENPLAIN 0x00000040
227 /* overlay */
228 #define DDSCAPS_OVERLAY 0x00000080
229 /* palette objects can be created and attached to us */
230 #define DDSCAPS_PALETTE 0x00000100
231 /* primary surface (the one the user looks at currently)(right eye)*/
232 #define DDSCAPS_PRIMARYSURFACE 0x00000200
233 /* primary surface for left eye */
234 #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
235 /* surface exists in systemmemory */
236 #define DDSCAPS_SYSTEMMEMORY 0x00000800
237 /* surface can be used as a texture */
238 #define DDSCAPS_TEXTURE 0x00001000
239 /* surface may be destination for 3d rendering */
240 #define DDSCAPS_3DDEVICE 0x00002000
241 /* surface exists in videomemory */
242 #define DDSCAPS_VIDEOMEMORY 0x00004000
243 /* surface changes immediately visible */
244 #define DDSCAPS_VISIBLE 0x00008000
245 /* write only surface */
246 #define DDSCAPS_WRITEONLY 0x00010000
247 /* zbuffer surface */
248 #define DDSCAPS_ZBUFFER 0x00020000
249 /* has its own DC */
250 #define DDSCAPS_OWNDC 0x00040000
251 /* surface should be able to receive live video */
252 #define DDSCAPS_LIVEVIDEO 0x00080000
253 /* should be able to have a hw codec decompress stuff into it */
254 #define DDSCAPS_HWCODEC 0x00100000
255 /* mode X (320x200 or 320x240) surface */
256 #define DDSCAPS_MODEX 0x00200000
257 /* one mipmap surface (1 level) */
258 #define DDSCAPS_MIPMAP 0x00400000
259 #define DDSCAPS_RESERVED2 0x00800000
260 /* memory allocation delayed until Load() */
261 #define DDSCAPS_ALLOCONLOAD 0x04000000
262 /* Indicates that the surface will receive data from a video port */
263 #define DDSCAPS_VIDEOPORT 0x08000000
264 /* surface is in local videomemory */
265 #define DDSCAPS_LOCALVIDMEM 0x10000000
266 /* surface is in nonlocal videomemory */
267 #define DDSCAPS_NONLOCALVIDMEM 0x20000000
268 /* surface is a standard VGA mode surface (NOT ModeX) */
269 #define DDSCAPS_STANDARDVGAMODE 0x40000000
270 /* optimized? surface */
271 #define DDSCAPS_OPTIMIZED 0x80000000
272
273 typedef struct _DDSCAPS {
274 DWORD dwCaps; /* capabilities of surface wanted */
275 } DDSCAPS,*LPDDSCAPS;
276
277 /* DDSCAPS2.dwCaps2 */
278 /* indicates the surface will receive data from a video port using
279 deinterlacing hardware. */
280 #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002
281 /* indicates the surface will be locked very frequently. */
282 #define DDSCAPS2_HINTDYNAMIC 0x00000004
283 /* indicates surface can be re-ordered or retiled on load() */
284 #define DDSCAPS2_HINTSTATIC 0x00000008
285 /* indicates surface to be managed by directdraw/direct3D */
286 #define DDSCAPS2_TEXTUREMANAGE 0x00000010
287 /* reserved bits */
288 #define DDSCAPS2_RESERVED1 0x00000020
289 #define DDSCAPS2_RESERVED2 0x00000040
290 /* indicates surface will never be locked again */
291 #define DDSCAPS2_OPAQUE 0x00000080
292 /* set at CreateSurface() time to indicate antialising will be used */
293 #define DDSCAPS2_HINTANTIALIASING 0x00000100
294 /* set at CreateSurface() time to indicate cubic environment map */
295 #define DDSCAPS2_CUBEMAP 0x00000200
296 /* face flags for cube maps */
297 #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
298 #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
299 #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
300 #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
301 #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
302 #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
303 /* specifies all faces of a cube for CreateSurface() */
304 #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
305 DDSCAPS2_CUBEMAP_NEGATIVEX |\
306 DDSCAPS2_CUBEMAP_POSITIVEY |\
307 DDSCAPS2_CUBEMAP_NEGATIVEY |\
308 DDSCAPS2_CUBEMAP_POSITIVEZ |\
309 DDSCAPS2_CUBEMAP_NEGATIVEZ )
310 /* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */
311 #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000
312 /* indicates texture surface to be managed by Direct3D *only* */
313 #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000
314 /* indicates managed surface that can safely be lost */
315 #define DDSCAPS2_DONOTPERSIST 0x00040000
316 /* indicates surface is part of a stereo flipping chain */
317 #define DDSCAPS2_STEREOSURFACELEFT 0x00080000
318
319 typedef struct _DDSCAPS2 {
320 DWORD dwCaps; /* capabilities of surface wanted */
321 DWORD dwCaps2; /* additional capabilities */
322 DWORD dwCaps3; /* reserved capabilities */
323 DWORD dwCaps4; /* more reserved capabilities */
324 } DDSCAPS2,*LPDDSCAPS2;
325
326 #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
327
328 typedef struct DDCAPS_DX7 /* DirectX 7 version of caps struct */
329 {
330 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
331 DWORD dwCaps; /* driver specific capabilities */
332 DWORD dwCaps2; /* more driver specific capabilites */
333 DWORD dwCKeyCaps; /* color key capabilities of the surface */
334 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
335 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
336 DWORD dwPalCaps; /* palette capabilities */
337 DWORD dwSVCaps; /* stereo vision capabilities */
338 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
339 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
340 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
341 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
342 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
343 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
344 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
345 DWORD dwVidMemTotal; /* total amount of video memory */
346 DWORD dwVidMemFree; /* amount of free video memory */
347 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
348 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
349 DWORD dwNumFourCCCodes; /* number of four cc codes */
350 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
351 DWORD dwAlignSizeSrc; /* source rectangle byte size */
352 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
353 DWORD dwAlignSizeDest; /* dest rectangle byte size */
354 DWORD dwAlignStrideAlign; /* stride alignment */
355 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
356 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
357 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
358 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
359 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
360 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
361 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
362 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
363 DWORD dwReserved1;
364 DWORD dwReserved2;
365 DWORD dwReserved3;
366 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
367 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
368 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
369 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
370 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
371 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
372 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
373 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
374 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
375 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
376 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
377 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
378 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
379 DWORD dwCurrVideoPorts; /* current number of video ports used */
380 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
381 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
382 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
383 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
384 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
385 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
386 DDSCAPS2 ddsCaps; /* surface capabilities */
387 } DDCAPS_DX7,*LPDDCAPS_DX7;
388
389 typedef DDCAPS_DX7 DDCAPS;
390 typedef DDCAPS *LPDDCAPS;
391
392 /* DDCAPS.dwCaps */
393 #define DDCAPS_3D 0x00000001
394 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
395 #define DDCAPS_ALIGNSIZEDEST 0x00000004
396 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
397 #define DDCAPS_ALIGNSIZESRC 0x00000010
398 #define DDCAPS_ALIGNSTRIDE 0x00000020
399 #define DDCAPS_BLT 0x00000040
400 #define DDCAPS_BLTQUEUE 0x00000080
401 #define DDCAPS_BLTFOURCC 0x00000100
402 #define DDCAPS_BLTSTRETCH 0x00000200
403 #define DDCAPS_GDI 0x00000400
404 #define DDCAPS_OVERLAY 0x00000800
405 #define DDCAPS_OVERLAYCANTCLIP 0x00001000
406 #define DDCAPS_OVERLAYFOURCC 0x00002000
407 #define DDCAPS_OVERLAYSTRETCH 0x00004000
408 #define DDCAPS_PALETTE 0x00008000
409 #define DDCAPS_PALETTEVSYNC 0x00010000
410 #define DDCAPS_READSCANLINE 0x00020000
411 #define DDCAPS_STEREOVIEW 0x00040000
412 #define DDCAPS_VBI 0x00080000
413 #define DDCAPS_ZBLTS 0x00100000
414 #define DDCAPS_ZOVERLAYS 0x00200000
415 #define DDCAPS_COLORKEY 0x00400000
416 #define DDCAPS_ALPHA 0x00800000
417 #define DDCAPS_COLORKEYHWASSIST 0x01000000
418 #define DDCAPS_NOHARDWARE 0x02000000
419 #define DDCAPS_BLTCOLORFILL 0x04000000
420 #define DDCAPS_BANKSWITCHED 0x08000000
421 #define DDCAPS_BLTDEPTHFILL 0x10000000
422 #define DDCAPS_CANCLIP 0x20000000
423 #define DDCAPS_CANCLIPSTRETCHED 0x40000000
424 #define DDCAPS_CANBLTSYSMEM 0x80000000
425
426 /* DDCAPS.dwCaps2 */
427 #define DDCAPS2_CERTIFIED 0x00000001
428 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
429 #define DDCAPS2_VIDEOPORT 0x00000004
430 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
431 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
432 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
433 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
434 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
435 #define DDCAPS2_CANDROPZ16BIT 0x00000100
436 #define DDCAPS2_NONLOCALVIDMEM 0x00000200
437 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
438 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
439 #define DDCAPS2_WIDESURFACES 0x00001000
440 #define DDCAPS2_CANFLIPODDEVEN 0x00002000
441 #define DDCAPS2_CANBOBHARDWARE 0x00004000
442 #define DDCAPS2_COPYFOURCC 0x00008000
443 #define DDCAPS2_PRIMARYGAMMA 0x00020000
444 #define DDCAPS2_CANRENDERWINDOWED 0x00080000
445 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
446 #define DDCAPS2_FLIPINTERVAL 0x00200000
447 #define DDCAPS2_FLIPNOVSYNC 0x00400000
448 #define DDCAPS2_CANMANAGETEXTURE 0x00800000
449 #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
450 #define DDCAPS2_STEREO 0x02000000
451 #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
452
453
454 /* Set/Get Colour Key Flags */
455 #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
456 #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
457 #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
458 #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
459 #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
460
461 typedef struct _DDCOLORKEY
462 {
463 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
464 * be treated as Color Key, inclusive
465 */
466 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
467 * to be treated as Color Key, inclusive
468 */
469 } DDCOLORKEY,*LPDDCOLORKEY;
470
471 /* ddCKEYCAPS bits */
472 #define DDCKEYCAPS_DESTBLT 0x00000001
473 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
474 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
475 #define DDCKEYCAPS_DESTBLTYUV 0x00000008
476 #define DDCKEYCAPS_DESTOVERLAY 0x00000010
477 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
478 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
479 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
480 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
481 #define DDCKEYCAPS_SRCBLT 0x00000200
482 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
483 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
484 #define DDCKEYCAPS_SRCBLTYUV 0x00001000
485 #define DDCKEYCAPS_SRCOVERLAY 0x00002000
486 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
487 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
488 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
489 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
490 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
491
492 typedef struct _DDPIXELFORMAT {
493 DWORD dwSize; /* 0: size of structure */
494 DWORD dwFlags; /* 4: pixel format flags */
495 DWORD dwFourCC; /* 8: (FOURCC code) */
496 union {
497 DWORD dwRGBBitCount; /* C: how many bits per pixel */
498 DWORD dwYUVBitCount; /* C: how many bits per pixel */
499 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
500 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
501 DWORD dwLuminanceBitCount;
502 DWORD dwBumpBitCount;
503 } DUMMYUNIONNAME1;
504 union {
505 DWORD dwRBitMask; /* 10: mask for red bit*/
506 DWORD dwYBitMask; /* 10: mask for Y bits*/
507 DWORD dwStencilBitDepth;
508 DWORD dwLuminanceBitMask;
509 DWORD dwBumpDuBitMask;
510 } DUMMYUNIONNAME2;
511 union {
512 DWORD dwGBitMask; /* 14: mask for green bits*/
513 DWORD dwUBitMask; /* 14: mask for U bits*/
514 DWORD dwZBitMask;
515 DWORD dwBumpDvBitMask;
516 } DUMMYUNIONNAME3;
517 union {
518 DWORD dwBBitMask; /* 18: mask for blue bits*/
519 DWORD dwVBitMask; /* 18: mask for V bits*/
520 DWORD dwStencilBitMask;
521 DWORD dwBumpLuminanceBitMask;
522 } DUMMYUNIONNAME4;
523 union {
524 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
525 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
526 DWORD dwLuminanceAlphaBitMask;
527 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
528 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
529 } DUMMYUNIONNAME5;
530 /* 20: next structure */
531 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
532
533 /* DDCAPS.dwFXCaps */
534 #define DDFXCAPS_BLTALPHA 0x00000001
535 #define DDFXCAPS_OVERLAYALPHA 0x00000004
536 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
537 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
538 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
539 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
540 #define DDFXCAPS_BLTROTATION 0x00000100
541 #define DDFXCAPS_BLTROTATION90 0x00000200
542 #define DDFXCAPS_BLTSHRINKX 0x00000400
543 #define DDFXCAPS_BLTSHRINKXN 0x00000800
544 #define DDFXCAPS_BLTSHRINKY 0x00001000
545 #define DDFXCAPS_BLTSHRINKYN 0x00002000
546 #define DDFXCAPS_BLTSTRETCHX 0x00004000
547 #define DDFXCAPS_BLTSTRETCHXN 0x00008000
548 #define DDFXCAPS_BLTSTRETCHY 0x00010000
549 #define DDFXCAPS_BLTSTRETCHYN 0x00020000
550 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
551 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
552 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
553 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
554 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
555 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
556 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
557 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
558 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
559 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
560 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
561 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
562
563 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
564
565 /* DDCAPS.dwFXAlphaCaps */
566 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
567 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
568 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
569 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
570 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
571 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
572 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
573 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
574 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
575 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
576
577 /* DDCAPS.dwPalCaps */
578 #define DDPCAPS_4BIT 0x00000001
579 #define DDPCAPS_8BITENTRIES 0x00000002
580 #define DDPCAPS_8BIT 0x00000004
581 #define DDPCAPS_INITIALIZE 0x00000008
582 #define DDPCAPS_PRIMARYSURFACE 0x00000010
583 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
584 #define DDPCAPS_ALLOW256 0x00000040
585 #define DDPCAPS_VSYNC 0x00000080
586 #define DDPCAPS_1BIT 0x00000100
587 #define DDPCAPS_2BIT 0x00000200
588 #define DDPCAPS_ALPHA 0x00000400
589
590 /* DDCAPS.dwSVCaps */
591 /* the first 4 of these are now obsolete */
592 #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */
593 #define DDSVCAPS_RESERVED1 0x00000001
594 #define DDSVCAPS_RESERVED2 0x00000002
595 #define DDSVCAPS_RESERVED3 0x00000004
596 #define DDSVCAPS_RESERVED4 0x00000008
597 #else
598 #define DDSVCAPS_ENIGMA 0x00000001
599 #define DDSVCAPS_FLICKER 0x00000002
600 #define DDSVCAPS_REDBLUE 0x00000004
601 #define DDSVCAPS_SPLIT 0x00000008
602 #endif
603 #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
604
605 /* BitDepths */
606 #define DDBD_1 0x00004000
607 #define DDBD_2 0x00002000
608 #define DDBD_4 0x00001000
609 #define DDBD_8 0x00000800
610 #define DDBD_16 0x00000400
611 #define DDBD_24 0x00000200
612 #define DDBD_32 0x00000100
613
614 /* DDOVERLAYFX.dwDDFX */
615 #define DDOVERFX_ARITHSTRETCHY 0x00000001
616 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
617 #define DDOVERFX_MIRRORUPDOWN 0x00000004
618
619 /* UpdateOverlay flags */
620 #define DDOVER_ALPHADEST 0x00000001
621 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
622 #define DDOVER_ALPHADESTNEG 0x00000004
623 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
624 #define DDOVER_ALPHAEDGEBLEND 0x00000010
625 #define DDOVER_ALPHASRC 0x00000020
626 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
627 #define DDOVER_ALPHASRCNEG 0x00000080
628 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
629 #define DDOVER_HIDE 0x00000200
630 #define DDOVER_KEYDEST 0x00000400
631 #define DDOVER_KEYDESTOVERRIDE 0x00000800
632 #define DDOVER_KEYSRC 0x00001000
633 #define DDOVER_KEYSRCOVERRIDE 0x00002000
634 #define DDOVER_SHOW 0x00004000
635 #define DDOVER_ADDDIRTYRECT 0x00008000
636 #define DDOVER_REFRESHDIRTYRECTS 0x00010000
637 #define DDOVER_REFRESHALL 0x00020000
638 #define DDOVER_DDFX 0x00080000
639 #define DDOVER_AUTOFLIP 0x00100000
640 #define DDOVER_BOB 0x00200000
641 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000
642 #define DDOVER_INTERLEAVED 0x00800000
643
644 /* DDCOLORKEY.dwFlags */
645 #define DDPF_ALPHAPIXELS 0x00000001
646 #define DDPF_ALPHA 0x00000002
647 #define DDPF_FOURCC 0x00000004
648 #define DDPF_PALETTEINDEXED4 0x00000008
649 #define DDPF_PALETTEINDEXEDTO8 0x00000010
650 #define DDPF_PALETTEINDEXED8 0x00000020
651 #define DDPF_RGB 0x00000040
652 #define DDPF_COMPRESSED 0x00000080
653 #define DDPF_RGBTOYUV 0x00000100
654 #define DDPF_YUV 0x00000200
655 #define DDPF_ZBUFFER 0x00000400
656 #define DDPF_PALETTEINDEXED1 0x00000800
657 #define DDPF_PALETTEINDEXED2 0x00001000
658 #define DDPF_ZPIXELS 0x00002000
659 #define DDPF_STENCILBUFFER 0x00004000
660 #define DDPF_ALPHAPREMULT 0x00008000
661 #define DDPF_LUMINANCE 0x00020000
662 #define DDPF_BUMPLUMINANCE 0x00040000
663 #define DDPF_BUMPDUDV 0x00080000
664
665 /* SetCooperativeLevel dwFlags */
666 #define DDSCL_FULLSCREEN 0x00000001
667 #define DDSCL_ALLOWREBOOT 0x00000002
668 #define DDSCL_NOWINDOWCHANGES 0x00000004
669 #define DDSCL_NORMAL 0x00000008
670 #define DDSCL_EXCLUSIVE 0x00000010
671 #define DDSCL_ALLOWMODEX 0x00000040
672 #define DDSCL_SETFOCUSWINDOW 0x00000080
673 #define DDSCL_SETDEVICEWINDOW 0x00000100
674 #define DDSCL_CREATEDEVICEWINDOW 0x00000200
675 #define DDSCL_MULTITHREADED 0x00000400
676 #define DDSCL_FPUSETUP 0x00000800
677 #define DDSCL_FPUPRESERVE 0x00001000
678
679
680 /* DDSURFACEDESC.dwFlags */
681 #define DDSD_CAPS 0x00000001
682 #define DDSD_HEIGHT 0x00000002
683 #define DDSD_WIDTH 0x00000004
684 #define DDSD_PITCH 0x00000008
685 #define DDSD_BACKBUFFERCOUNT 0x00000020
686 #define DDSD_ZBUFFERBITDEPTH 0x00000040
687 #define DDSD_ALPHABITDEPTH 0x00000080
688 #define DDSD_LPSURFACE 0x00000800
689 #define DDSD_PIXELFORMAT 0x00001000
690 #define DDSD_CKDESTOVERLAY 0x00002000
691 #define DDSD_CKDESTBLT 0x00004000
692 #define DDSD_CKSRCOVERLAY 0x00008000
693 #define DDSD_CKSRCBLT 0x00010000
694 #define DDSD_MIPMAPCOUNT 0x00020000
695 #define DDSD_REFRESHRATE 0x00040000
696 #define DDSD_LINEARSIZE 0x00080000
697 #define DDSD_TEXTURESTAGE 0x00100000
698 #define DDSD_FVF 0x00200000
699 #define DDSD_SRCVBHANDLE 0x00400000
700 #define DDSD_ALL 0x007ff9ee
701
702 /* EnumSurfaces flags */
703 #define DDENUMSURFACES_ALL 0x00000001
704 #define DDENUMSURFACES_MATCH 0x00000002
705 #define DDENUMSURFACES_NOMATCH 0x00000004
706 #define DDENUMSURFACES_CANBECREATED 0x00000008
707 #define DDENUMSURFACES_DOESEXIST 0x00000010
708
709 /* SetDisplayMode flags */
710 #define DDSDM_STANDARDVGAMODE 0x00000001
711
712 /* EnumDisplayModes flags */
713 #define DDEDM_REFRESHRATES 0x00000001
714 #define DDEDM_STANDARDVGAMODES 0x00000002
715
716 /* WaitForVerticalDisplay flags */
717
718 #define DDWAITVB_BLOCKBEGIN 0x00000001
719 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002
720 #define DDWAITVB_BLOCKEND 0x00000004
721
722 typedef struct _DDSURFACEDESC
723 {
724 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
725 DWORD dwFlags; /* 4: determines what fields are valid*/
726 DWORD dwHeight; /* 8: height of surface to be created*/
727 DWORD dwWidth; /* C: width of input surface*/
728 union {
729 LONG lPitch; /* 10: distance to start of next line (return value only)*/
730 DWORD dwLinearSize;
731 } DUMMYUNIONNAME1;
732 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
733 union {
734 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
735 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
736 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
737 } DUMMYUNIONNAME2;
738 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
739 DWORD dwReserved; /* 20:reserved*/
740 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
741 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
742 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
743 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
744 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
745 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
746 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
747 } DDSURFACEDESC,*LPDDSURFACEDESC;
748
749 typedef struct _DDSURFACEDESC2
750 {
751 DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
752 DWORD dwFlags; /* 4: determines what fields are valid*/
753 DWORD dwHeight; /* 8: height of surface to be created*/
754 DWORD dwWidth; /* C: width of input surface*/
755 union {
756 LONG lPitch; /*10: distance to start of next line (return value only)*/
757 DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
758 } DUMMYUNIONNAME1;
759 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
760 union {
761 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
762 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
763 DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
764 } DUMMYUNIONNAME2;
765 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
766 DWORD dwReserved; /* 20:reserved*/
767 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
768 union {
769 DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
770 DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
771 } DUMMYUNIONNAME3;
772 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
773 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
774 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
775
776 union {
777 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
778 DWORD dwFVF; /* 48: vertex format description of vertex buffers */
779 } DUMMYUNIONNAME4;
780 DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
781 DWORD dwTextureStage; /* 78: stage in multitexture cascade */
782 } DDSURFACEDESC2,*LPDDSURFACEDESC2;
783
784 /* DDCOLORCONTROL.dwFlags */
785 #define DDCOLOR_BRIGHTNESS 0x00000001
786 #define DDCOLOR_CONTRAST 0x00000002
787 #define DDCOLOR_HUE 0x00000004
788 #define DDCOLOR_SATURATION 0x00000008
789 #define DDCOLOR_SHARPNESS 0x00000010
790 #define DDCOLOR_GAMMA 0x00000020
791 #define DDCOLOR_COLORENABLE 0x00000040
792
793 typedef struct {
794 DWORD dwSize;
795 DWORD dwFlags;
796 LONG lBrightness;
797 LONG lContrast;
798 LONG lHue;
799 LONG lSaturation;
800 LONG lSharpness;
801 LONG lGamma;
802 LONG lColorEnable;
803 DWORD dwReserved1;
804 } DDCOLORCONTROL,*LPDDCOLORCONTROL;
805
806 typedef struct {
807 WORD red[256];
808 WORD green[256];
809 WORD blue[256];
810 } DDGAMMARAMP,*LPDDGAMMARAMP;
811
812 /* flags for DirectDrawEnumerateEx */
813 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
814 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
815 #define DDENUM_NONDISPLAYDEVICES 0x00000004
816
817 /* flags for DirectDrawCreate or IDirectDraw::Initialize */
818 #define DDCREATE_HARDWAREONLY 1L
819 #define DDCREATE_EMULATIONONLY 2L
820
821 /* dwDDFX */
822 /* arithmetic stretching along y axis */
823 #define DDBLTFX_ARITHSTRETCHY 0x00000001
824 /* mirror on y axis */
825 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
826 /* mirror on x axis */
827 #define DDBLTFX_MIRRORUPDOWN 0x00000004
828 /* do not tear */
829 #define DDBLTFX_NOTEARING 0x00000008
830 /* 180 degrees clockwise rotation */
831 #define DDBLTFX_ROTATE180 0x00000010
832 /* 270 degrees clockwise rotation */
833 #define DDBLTFX_ROTATE270 0x00000020
834 /* 90 degrees clockwise rotation */
835 #define DDBLTFX_ROTATE90 0x00000040
836 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
837 #define DDBLTFX_ZBUFFERRANGE 0x00000080
838 /* add dwZBufferBaseDest to every source z value before compare */
839 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
840
841 typedef DWORD IDirectDrawSurface; /* FIXME: implement proper definition */
842 typedef IDirectDrawSurface *LPDIRECTDRAWSURFACE;
843 typedef struct _DDBLTFX
844 {
845 DWORD dwSize; /* size of structure */
846 DWORD dwDDFX; /* FX operations */
847 DWORD dwROP; /* Win32 raster operations */
848 DWORD dwDDROP; /* Raster operations new for DirectDraw */
849 DWORD dwRotationAngle; /* Rotation angle for blt */
850 DWORD dwZBufferOpCode; /* ZBuffer compares */
851 DWORD dwZBufferLow; /* Low limit of Z buffer */
852 DWORD dwZBufferHigh; /* High limit of Z buffer */
853 DWORD dwZBufferBaseDest; /* Destination base value */
854 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
855 union
856 {
857 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
858 LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
859 } DUMMYUNIONNAME1;
860 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
861 union
862 {
863 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
864 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
865 } DUMMYUNIONNAME2;
866 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
867 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
868 DWORD dwReserved;
869 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
870 union
871 {
872 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
873 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
874 } DUMMYUNIONNAME3;
875 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
876 union
877 {
878 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
879 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
880 } DUMMYUNIONNAME4;
881 union
882 {
883 DWORD dwFillColor; /* color in RGB or Palettized */
884 DWORD dwFillDepth; /* depth value for z-buffer */
885 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
886 LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
887 } DUMMYUNIONNAME5;
888 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
889 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
890 } DDBLTFX,*LPDDBLTFX;
891 typedef struct _DDOVERLAYFX
892 {
893 DWORD dwSize; /* size of structure */
894 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
895 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
896 DWORD dwReserved;
897 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
898 union
899 {
900 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
901 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
902 } DUMMYUNIONNAME1;
903 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
904 union
905 {
906 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
907 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
908 } DUMMYUNIONNAME2;
909 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
910 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
911 DWORD dwDDFX; /* Overlay FX */
912 DWORD dwFlags; /* flags */
913 } DDOVERLAYFX,*LPDDOVERLAYFX;
914
915 typedef struct _DDBLTBATCH
916 {
917 LPRECT lprDest;
918 LPDIRECTDRAWSURFACE lpDDSSrc;
919 LPRECT lprSrc;
920 DWORD dwFlags;
921 LPDDBLTFX lpDDBltFx;
922 } DDBLTBATCH,*LPDDBLTBATCH;
923
924 #define MAX_DDDEVICEID_STRING 512
925
926 typedef struct tagDDDEVICEIDENTIFIER {
927 char szDriver[MAX_DDDEVICEID_STRING];
928 char szDescription[MAX_DDDEVICEID_STRING];
929 LARGE_INTEGER liDriverVersion;
930 DWORD dwVendorId;
931 DWORD dwDeviceId;
932 DWORD dwSubSysId;
933 DWORD dwRevision;
934 GUID guidDeviceIdentifier;
935 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
936
937 typedef struct tagDDDEVICEIDENTIFIER2 {
938 char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
939 char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
940 LARGE_INTEGER liDriverVersion; /* driver version */
941 DWORD dwVendorId; /* vendor ID, zero if unknown */
942 DWORD dwDeviceId; /* chipset ID, zero if unknown */
943 DWORD dwSubSysId; /* board ID, zero if unknown */
944 DWORD dwRevision; /* chipset version, zero if unknown */
945 GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
946 DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
947 } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
948
949 #ifdef __cplusplus
950 } /* extern "C" */
951 #endif /* defined(__cplusplus) */
952
953 #endif /* __WINE_DDRAW_H */