SM & SMDLL definitions
[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 typedef struct _DDSCAPSEX {
327 DWORD dwCaps2; /* additional capabilities */
328 DWORD dwCaps3; /* reserved capabilities */
329 DWORD dwCaps4; /* more reserved capabilities */
330 } DDSCAPSEX,*LPDDSCAPSEX;
331
332 #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
333
334 typedef struct DDCAPS_DX7 /* DirectX 7 version of caps struct */
335 {
336 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
337 DWORD dwCaps; /* driver specific capabilities */
338 DWORD dwCaps2; /* more driver specific capabilites */
339 DWORD dwCKeyCaps; /* color key capabilities of the surface */
340 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
341 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
342 DWORD dwPalCaps; /* palette capabilities */
343 DWORD dwSVCaps; /* stereo vision capabilities */
344 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
345 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
346 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
347 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
348 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
349 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
350 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
351 DWORD dwVidMemTotal; /* total amount of video memory */
352 DWORD dwVidMemFree; /* amount of free video memory */
353 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
354 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
355 DWORD dwNumFourCCCodes; /* number of four cc codes */
356 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
357 DWORD dwAlignSizeSrc; /* source rectangle byte size */
358 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
359 DWORD dwAlignSizeDest; /* dest rectangle byte size */
360 DWORD dwAlignStrideAlign; /* stride alignment */
361 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
362 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
363 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
364 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
365 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
366 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
367 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
368 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
369 DWORD dwReserved1;
370 DWORD dwReserved2;
371 DWORD dwReserved3;
372 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
373 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
374 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
375 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
376 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
377 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
378 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
379 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
380 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
381 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
382 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
383 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
384 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
385 DWORD dwCurrVideoPorts; /* current number of video ports used */
386 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
387 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
388 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
389 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
390 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
391 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
392 DDSCAPS2 ddsCaps; /* surface capabilities */
393 } DDCAPS_DX7,*LPDDCAPS_DX7;
394
395 typedef DDCAPS_DX7 DDCAPS;
396 typedef DDCAPS *LPDDCAPS;
397
398 /* DDCAPS.dwCaps */
399 #define DDCAPS_3D 0x00000001
400 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
401 #define DDCAPS_ALIGNSIZEDEST 0x00000004
402 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
403 #define DDCAPS_ALIGNSIZESRC 0x00000010
404 #define DDCAPS_ALIGNSTRIDE 0x00000020
405 #define DDCAPS_BLT 0x00000040
406 #define DDCAPS_BLTQUEUE 0x00000080
407 #define DDCAPS_BLTFOURCC 0x00000100
408 #define DDCAPS_BLTSTRETCH 0x00000200
409 #define DDCAPS_GDI 0x00000400
410 #define DDCAPS_OVERLAY 0x00000800
411 #define DDCAPS_OVERLAYCANTCLIP 0x00001000
412 #define DDCAPS_OVERLAYFOURCC 0x00002000
413 #define DDCAPS_OVERLAYSTRETCH 0x00004000
414 #define DDCAPS_PALETTE 0x00008000
415 #define DDCAPS_PALETTEVSYNC 0x00010000
416 #define DDCAPS_READSCANLINE 0x00020000
417 #define DDCAPS_STEREOVIEW 0x00040000
418 #define DDCAPS_VBI 0x00080000
419 #define DDCAPS_ZBLTS 0x00100000
420 #define DDCAPS_ZOVERLAYS 0x00200000
421 #define DDCAPS_COLORKEY 0x00400000
422 #define DDCAPS_ALPHA 0x00800000
423 #define DDCAPS_COLORKEYHWASSIST 0x01000000
424 #define DDCAPS_NOHARDWARE 0x02000000
425 #define DDCAPS_BLTCOLORFILL 0x04000000
426 #define DDCAPS_BANKSWITCHED 0x08000000
427 #define DDCAPS_BLTDEPTHFILL 0x10000000
428 #define DDCAPS_CANCLIP 0x20000000
429 #define DDCAPS_CANCLIPSTRETCHED 0x40000000
430 #define DDCAPS_CANBLTSYSMEM 0x80000000
431
432 /* DDCAPS.dwCaps2 */
433 #define DDCAPS2_CERTIFIED 0x00000001
434 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
435 #define DDCAPS2_VIDEOPORT 0x00000004
436 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
437 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
438 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
439 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
440 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
441 #define DDCAPS2_CANDROPZ16BIT 0x00000100
442 #define DDCAPS2_NONLOCALVIDMEM 0x00000200
443 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
444 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
445 #define DDCAPS2_WIDESURFACES 0x00001000
446 #define DDCAPS2_CANFLIPODDEVEN 0x00002000
447 #define DDCAPS2_CANBOBHARDWARE 0x00004000
448 #define DDCAPS2_COPYFOURCC 0x00008000
449 #define DDCAPS2_PRIMARYGAMMA 0x00020000
450 #define DDCAPS2_CANRENDERWINDOWED 0x00080000
451 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
452 #define DDCAPS2_FLIPINTERVAL 0x00200000
453 #define DDCAPS2_FLIPNOVSYNC 0x00400000
454 #define DDCAPS2_CANMANAGETEXTURE 0x00800000
455 #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
456 #define DDCAPS2_STEREO 0x02000000
457 #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
458
459
460 /* Set/Get Colour Key Flags */
461 #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
462 #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
463 #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
464 #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
465 #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
466
467 typedef struct _DDCOLORKEY
468 {
469 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
470 * be treated as Color Key, inclusive
471 */
472 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
473 * to be treated as Color Key, inclusive
474 */
475 } DDCOLORKEY,*LPDDCOLORKEY;
476
477 /* ddCKEYCAPS bits */
478 #define DDCKEYCAPS_DESTBLT 0x00000001
479 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
480 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
481 #define DDCKEYCAPS_DESTBLTYUV 0x00000008
482 #define DDCKEYCAPS_DESTOVERLAY 0x00000010
483 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
484 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
485 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
486 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
487 #define DDCKEYCAPS_SRCBLT 0x00000200
488 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
489 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
490 #define DDCKEYCAPS_SRCBLTYUV 0x00001000
491 #define DDCKEYCAPS_SRCOVERLAY 0x00002000
492 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
493 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
494 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
495 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
496 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
497
498 typedef struct _DDPIXELFORMAT {
499 DWORD dwSize; /* 0: size of structure */
500 DWORD dwFlags; /* 4: pixel format flags */
501 DWORD dwFourCC; /* 8: (FOURCC code) */
502 union {
503 DWORD dwRGBBitCount; /* C: how many bits per pixel */
504 DWORD dwYUVBitCount; /* C: how many bits per pixel */
505 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
506 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
507 DWORD dwLuminanceBitCount;
508 DWORD dwBumpBitCount;
509 } DUMMYUNIONNAME1;
510 union {
511 DWORD dwRBitMask; /* 10: mask for red bit*/
512 DWORD dwYBitMask; /* 10: mask for Y bits*/
513 DWORD dwStencilBitDepth;
514 DWORD dwLuminanceBitMask;
515 DWORD dwBumpDuBitMask;
516 } DUMMYUNIONNAME2;
517 union {
518 DWORD dwGBitMask; /* 14: mask for green bits*/
519 DWORD dwUBitMask; /* 14: mask for U bits*/
520 DWORD dwZBitMask;
521 DWORD dwBumpDvBitMask;
522 } DUMMYUNIONNAME3;
523 union {
524 DWORD dwBBitMask; /* 18: mask for blue bits*/
525 DWORD dwVBitMask; /* 18: mask for V bits*/
526 DWORD dwStencilBitMask;
527 DWORD dwBumpLuminanceBitMask;
528 } DUMMYUNIONNAME4;
529 union {
530 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
531 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
532 DWORD dwLuminanceAlphaBitMask;
533 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
534 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
535 } DUMMYUNIONNAME5;
536 /* 20: next structure */
537 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
538
539 /* DDCAPS.dwFXCaps */
540 #define DDFXCAPS_BLTALPHA 0x00000001
541 #define DDFXCAPS_OVERLAYALPHA 0x00000004
542 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
543 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
544 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
545 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
546 #define DDFXCAPS_BLTROTATION 0x00000100
547 #define DDFXCAPS_BLTROTATION90 0x00000200
548 #define DDFXCAPS_BLTSHRINKX 0x00000400
549 #define DDFXCAPS_BLTSHRINKXN 0x00000800
550 #define DDFXCAPS_BLTSHRINKY 0x00001000
551 #define DDFXCAPS_BLTSHRINKYN 0x00002000
552 #define DDFXCAPS_BLTSTRETCHX 0x00004000
553 #define DDFXCAPS_BLTSTRETCHXN 0x00008000
554 #define DDFXCAPS_BLTSTRETCHY 0x00010000
555 #define DDFXCAPS_BLTSTRETCHYN 0x00020000
556 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
557 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
558 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
559 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
560 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
561 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
562 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
563 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
564 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
565 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
566 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
567 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
568
569 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
570
571 /* DDCAPS.dwFXAlphaCaps */
572 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
573 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
574 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
575 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
576 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
577 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
578 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
579 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
580 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
581 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
582
583 /* DDCAPS.dwPalCaps */
584 #define DDPCAPS_4BIT 0x00000001
585 #define DDPCAPS_8BITENTRIES 0x00000002
586 #define DDPCAPS_8BIT 0x00000004
587 #define DDPCAPS_INITIALIZE 0x00000008
588 #define DDPCAPS_PRIMARYSURFACE 0x00000010
589 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
590 #define DDPCAPS_ALLOW256 0x00000040
591 #define DDPCAPS_VSYNC 0x00000080
592 #define DDPCAPS_1BIT 0x00000100
593 #define DDPCAPS_2BIT 0x00000200
594 #define DDPCAPS_ALPHA 0x00000400
595
596 /* DDCAPS.dwSVCaps */
597 /* the first 4 of these are now obsolete */
598 #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */
599 #define DDSVCAPS_RESERVED1 0x00000001
600 #define DDSVCAPS_RESERVED2 0x00000002
601 #define DDSVCAPS_RESERVED3 0x00000004
602 #define DDSVCAPS_RESERVED4 0x00000008
603 #else
604 #define DDSVCAPS_ENIGMA 0x00000001
605 #define DDSVCAPS_FLICKER 0x00000002
606 #define DDSVCAPS_REDBLUE 0x00000004
607 #define DDSVCAPS_SPLIT 0x00000008
608 #endif
609 #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
610
611 /* BitDepths */
612 #define DDBD_1 0x00004000
613 #define DDBD_2 0x00002000
614 #define DDBD_4 0x00001000
615 #define DDBD_8 0x00000800
616 #define DDBD_16 0x00000400
617 #define DDBD_24 0x00000200
618 #define DDBD_32 0x00000100
619
620 /* DDOVERLAYFX.dwDDFX */
621 #define DDOVERFX_ARITHSTRETCHY 0x00000001
622 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
623 #define DDOVERFX_MIRRORUPDOWN 0x00000004
624
625 /* UpdateOverlay flags */
626 #define DDOVER_ALPHADEST 0x00000001
627 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
628 #define DDOVER_ALPHADESTNEG 0x00000004
629 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
630 #define DDOVER_ALPHAEDGEBLEND 0x00000010
631 #define DDOVER_ALPHASRC 0x00000020
632 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
633 #define DDOVER_ALPHASRCNEG 0x00000080
634 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
635 #define DDOVER_HIDE 0x00000200
636 #define DDOVER_KEYDEST 0x00000400
637 #define DDOVER_KEYDESTOVERRIDE 0x00000800
638 #define DDOVER_KEYSRC 0x00001000
639 #define DDOVER_KEYSRCOVERRIDE 0x00002000
640 #define DDOVER_SHOW 0x00004000
641 #define DDOVER_ADDDIRTYRECT 0x00008000
642 #define DDOVER_REFRESHDIRTYRECTS 0x00010000
643 #define DDOVER_REFRESHALL 0x00020000
644 #define DDOVER_DDFX 0x00080000
645 #define DDOVER_AUTOFLIP 0x00100000
646 #define DDOVER_BOB 0x00200000
647 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000
648 #define DDOVER_INTERLEAVED 0x00800000
649
650 /* DDCOLORKEY.dwFlags */
651 #define DDPF_ALPHAPIXELS 0x00000001
652 #define DDPF_ALPHA 0x00000002
653 #define DDPF_FOURCC 0x00000004
654 #define DDPF_PALETTEINDEXED4 0x00000008
655 #define DDPF_PALETTEINDEXEDTO8 0x00000010
656 #define DDPF_PALETTEINDEXED8 0x00000020
657 #define DDPF_RGB 0x00000040
658 #define DDPF_COMPRESSED 0x00000080
659 #define DDPF_RGBTOYUV 0x00000100
660 #define DDPF_YUV 0x00000200
661 #define DDPF_ZBUFFER 0x00000400
662 #define DDPF_PALETTEINDEXED1 0x00000800
663 #define DDPF_PALETTEINDEXED2 0x00001000
664 #define DDPF_ZPIXELS 0x00002000
665 #define DDPF_STENCILBUFFER 0x00004000
666 #define DDPF_ALPHAPREMULT 0x00008000
667 #define DDPF_LUMINANCE 0x00020000
668 #define DDPF_BUMPLUMINANCE 0x00040000
669 #define DDPF_BUMPDUDV 0x00080000
670
671 /* SetCooperativeLevel dwFlags */
672 #define DDSCL_FULLSCREEN 0x00000001
673 #define DDSCL_ALLOWREBOOT 0x00000002
674 #define DDSCL_NOWINDOWCHANGES 0x00000004
675 #define DDSCL_NORMAL 0x00000008
676 #define DDSCL_EXCLUSIVE 0x00000010
677 #define DDSCL_ALLOWMODEX 0x00000040
678 #define DDSCL_SETFOCUSWINDOW 0x00000080
679 #define DDSCL_SETDEVICEWINDOW 0x00000100
680 #define DDSCL_CREATEDEVICEWINDOW 0x00000200
681 #define DDSCL_MULTITHREADED 0x00000400
682 #define DDSCL_FPUSETUP 0x00000800
683 #define DDSCL_FPUPRESERVE 0x00001000
684
685
686 /* DDSURFACEDESC.dwFlags */
687 #define DDSD_CAPS 0x00000001
688 #define DDSD_HEIGHT 0x00000002
689 #define DDSD_WIDTH 0x00000004
690 #define DDSD_PITCH 0x00000008
691 #define DDSD_BACKBUFFERCOUNT 0x00000020
692 #define DDSD_ZBUFFERBITDEPTH 0x00000040
693 #define DDSD_ALPHABITDEPTH 0x00000080
694 #define DDSD_LPSURFACE 0x00000800
695 #define DDSD_PIXELFORMAT 0x00001000
696 #define DDSD_CKDESTOVERLAY 0x00002000
697 #define DDSD_CKDESTBLT 0x00004000
698 #define DDSD_CKSRCOVERLAY 0x00008000
699 #define DDSD_CKSRCBLT 0x00010000
700 #define DDSD_MIPMAPCOUNT 0x00020000
701 #define DDSD_REFRESHRATE 0x00040000
702 #define DDSD_LINEARSIZE 0x00080000
703 #define DDSD_TEXTURESTAGE 0x00100000
704 #define DDSD_FVF 0x00200000
705 #define DDSD_SRCVBHANDLE 0x00400000
706 #define DDSD_ALL 0x007ff9ee
707
708 /* EnumSurfaces flags */
709 #define DDENUMSURFACES_ALL 0x00000001
710 #define DDENUMSURFACES_MATCH 0x00000002
711 #define DDENUMSURFACES_NOMATCH 0x00000004
712 #define DDENUMSURFACES_CANBECREATED 0x00000008
713 #define DDENUMSURFACES_DOESEXIST 0x00000010
714
715 /* SetDisplayMode flags */
716 #define DDSDM_STANDARDVGAMODE 0x00000001
717
718 /* EnumDisplayModes flags */
719 #define DDEDM_REFRESHRATES 0x00000001
720 #define DDEDM_STANDARDVGAMODES 0x00000002
721
722 /* WaitForVerticalDisplay flags */
723
724 #define DDWAITVB_BLOCKBEGIN 0x00000001
725 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002
726 #define DDWAITVB_BLOCKEND 0x00000004
727
728 typedef struct _DDSURFACEDESC
729 {
730 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
731 DWORD dwFlags; /* 4: determines what fields are valid*/
732 DWORD dwHeight; /* 8: height of surface to be created*/
733 DWORD dwWidth; /* C: width of input surface*/
734 union {
735 LONG lPitch; /* 10: distance to start of next line (return value only)*/
736 DWORD dwLinearSize;
737 } DUMMYUNIONNAME1;
738 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
739 union {
740 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
741 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
742 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
743 } DUMMYUNIONNAME2;
744 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
745 DWORD dwReserved; /* 20:reserved*/
746 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
747 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
748 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
749 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
750 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
751 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
752 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
753 } DDSURFACEDESC,*LPDDSURFACEDESC;
754
755 typedef struct _DDSURFACEDESC2
756 {
757 DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
758 DWORD dwFlags; /* 4: determines what fields are valid*/
759 DWORD dwHeight; /* 8: height of surface to be created*/
760 DWORD dwWidth; /* C: width of input surface*/
761 union {
762 LONG lPitch; /*10: distance to start of next line (return value only)*/
763 DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
764 } DUMMYUNIONNAME1;
765 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
766 union {
767 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
768 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
769 DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
770 } DUMMYUNIONNAME2;
771 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
772 DWORD dwReserved; /* 20:reserved*/
773 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
774 union {
775 DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
776 DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
777 } DUMMYUNIONNAME3;
778 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
779 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
780 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
781
782 union {
783 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
784 DWORD dwFVF; /* 48: vertex format description of vertex buffers */
785 } DUMMYUNIONNAME4;
786 DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
787 DWORD dwTextureStage; /* 78: stage in multitexture cascade */
788 } DDSURFACEDESC2,*LPDDSURFACEDESC2;
789
790 /* DDCOLORCONTROL.dwFlags */
791 #define DDCOLOR_BRIGHTNESS 0x00000001
792 #define DDCOLOR_CONTRAST 0x00000002
793 #define DDCOLOR_HUE 0x00000004
794 #define DDCOLOR_SATURATION 0x00000008
795 #define DDCOLOR_SHARPNESS 0x00000010
796 #define DDCOLOR_GAMMA 0x00000020
797 #define DDCOLOR_COLORENABLE 0x00000040
798
799 typedef struct {
800 DWORD dwSize;
801 DWORD dwFlags;
802 LONG lBrightness;
803 LONG lContrast;
804 LONG lHue;
805 LONG lSaturation;
806 LONG lSharpness;
807 LONG lGamma;
808 LONG lColorEnable;
809 DWORD dwReserved1;
810 } DDCOLORCONTROL,*LPDDCOLORCONTROL;
811
812 typedef struct {
813 WORD red[256];
814 WORD green[256];
815 WORD blue[256];
816 } DDGAMMARAMP,*LPDDGAMMARAMP;
817
818 /* flags for DirectDrawEnumerateEx */
819 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
820 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
821 #define DDENUM_NONDISPLAYDEVICES 0x00000004
822
823 /* flags for DirectDrawCreate or IDirectDraw::Initialize */
824 #define DDCREATE_HARDWAREONLY 1L
825 #define DDCREATE_EMULATIONONLY 2L
826
827 /* dwDDFX */
828 /* arithmetic stretching along y axis */
829 #define DDBLTFX_ARITHSTRETCHY 0x00000001
830 /* mirror on y axis */
831 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
832 /* mirror on x axis */
833 #define DDBLTFX_MIRRORUPDOWN 0x00000004
834 /* do not tear */
835 #define DDBLTFX_NOTEARING 0x00000008
836 /* 180 degrees clockwise rotation */
837 #define DDBLTFX_ROTATE180 0x00000010
838 /* 270 degrees clockwise rotation */
839 #define DDBLTFX_ROTATE270 0x00000020
840 /* 90 degrees clockwise rotation */
841 #define DDBLTFX_ROTATE90 0x00000040
842 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
843 #define DDBLTFX_ZBUFFERRANGE 0x00000080
844 /* add dwZBufferBaseDest to every source z value before compare */
845 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
846
847 typedef DWORD IDirectDrawSurface; /* FIXME: implement proper definition */
848 typedef IDirectDrawSurface *LPDIRECTDRAWSURFACE;
849 typedef struct _DDBLTFX
850 {
851 DWORD dwSize; /* size of structure */
852 DWORD dwDDFX; /* FX operations */
853 DWORD dwROP; /* Win32 raster operations */
854 DWORD dwDDROP; /* Raster operations new for DirectDraw */
855 DWORD dwRotationAngle; /* Rotation angle for blt */
856 DWORD dwZBufferOpCode; /* ZBuffer compares */
857 DWORD dwZBufferLow; /* Low limit of Z buffer */
858 DWORD dwZBufferHigh; /* High limit of Z buffer */
859 DWORD dwZBufferBaseDest; /* Destination base value */
860 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
861 union
862 {
863 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
864 LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
865 } DUMMYUNIONNAME1;
866 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
867 union
868 {
869 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
870 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
871 } DUMMYUNIONNAME2;
872 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
873 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
874 DWORD dwReserved;
875 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
876 union
877 {
878 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
879 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
880 } DUMMYUNIONNAME3;
881 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
882 union
883 {
884 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
885 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
886 } DUMMYUNIONNAME4;
887 union
888 {
889 DWORD dwFillColor; /* color in RGB or Palettized */
890 DWORD dwFillDepth; /* depth value for z-buffer */
891 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
892 LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
893 } DUMMYUNIONNAME5;
894 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
895 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
896 } DDBLTFX,*LPDDBLTFX;
897 typedef struct _DDOVERLAYFX
898 {
899 DWORD dwSize; /* size of structure */
900 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
901 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
902 DWORD dwReserved;
903 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
904 union
905 {
906 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
907 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
908 } DUMMYUNIONNAME1;
909 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
910 union
911 {
912 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
913 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
914 } DUMMYUNIONNAME2;
915 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
916 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
917 DWORD dwDDFX; /* Overlay FX */
918 DWORD dwFlags; /* flags */
919 } DDOVERLAYFX,*LPDDOVERLAYFX;
920
921 typedef struct _DDBLTBATCH
922 {
923 LPRECT lprDest;
924 LPDIRECTDRAWSURFACE lpDDSSrc;
925 LPRECT lprSrc;
926 DWORD dwFlags;
927 LPDDBLTFX lpDDBltFx;
928 } DDBLTBATCH,*LPDDBLTBATCH;
929
930 #define MAX_DDDEVICEID_STRING 512
931
932 typedef struct tagDDDEVICEIDENTIFIER {
933 char szDriver[MAX_DDDEVICEID_STRING];
934 char szDescription[MAX_DDDEVICEID_STRING];
935 LARGE_INTEGER liDriverVersion;
936 DWORD dwVendorId;
937 DWORD dwDeviceId;
938 DWORD dwSubSysId;
939 DWORD dwRevision;
940 GUID guidDeviceIdentifier;
941 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
942
943 typedef struct tagDDDEVICEIDENTIFIER2 {
944 char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
945 char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
946 LARGE_INTEGER liDriverVersion; /* driver version */
947 DWORD dwVendorId; /* vendor ID, zero if unknown */
948 DWORD dwDeviceId; /* chipset ID, zero if unknown */
949 DWORD dwSubSysId; /* board ID, zero if unknown */
950 DWORD dwRevision; /* chipset version, zero if unknown */
951 GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
952 DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
953 } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
954
955 #ifdef __cplusplus
956 } /* extern "C" */
957 #endif /* defined(__cplusplus) */
958
959 #endif /* __WINE_DDRAW_H */