Make winelauncher work better for source tree builds.
[wine/hacks.git] / include / ddraw.h
blobdac90fc19d0ec3455544211c4df04209a407e1b7
1 #ifndef __WINE_DDRAW_H
2 #define __WINE_DDRAW_H
4 #include "winnt.h" /* LARGE_INTEGER ... */
5 #include "wingdi.h" /* PALETTE stuff ... */
6 #include "wine/obj_base.h"
8 #ifdef __cplusplus
9 extern "C" {
10 #endif /* defined(__cplusplus) */
12 #ifndef DIRECTDRAW_VERSION
13 #define DIRECTDRAW_VERSION 0x0500
14 #endif /* DIRECTDRAW_VERSION */
16 /*****************************************************************************
17 * Predeclare the interfaces
19 DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
20 DEFINE_GUID( CLSID_DirectDraw7, 0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
21 DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
22 DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
23 DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
24 DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
25 DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
26 DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
27 DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
28 DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
29 DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
30 DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
31 DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
32 DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
33 DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
34 DEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
36 typedef struct IDirectDraw IDirectDraw,*LPDIRECTDRAW;
37 typedef struct IDirectDraw2 IDirectDraw2,*LPDIRECTDRAW2;
38 typedef struct IDirectDraw4 IDirectDraw4,*LPDIRECTDRAW4;
39 typedef struct IDirectDraw7 IDirectDraw7,*LPDIRECTDRAW7;
40 typedef struct IDirectDrawClipper IDirectDrawClipper,*LPDIRECTDRAWCLIPPER;
41 typedef struct IDirectDrawPalette IDirectDrawPalette,*LPDIRECTDRAWPALETTE;
42 typedef struct IDirectDrawSurface IDirectDrawSurface,*LPDIRECTDRAWSURFACE;
43 typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
44 typedef struct IDirectDrawSurface3 IDirectDrawSurface3,*LPDIRECTDRAWSURFACE3;
45 typedef struct IDirectDrawSurface4 IDirectDrawSurface4,*LPDIRECTDRAWSURFACE4;
46 typedef struct IDirectDrawSurface7 IDirectDrawSurface7,*LPDIRECTDRAWSURFACE7;
47 typedef struct IDirectDrawColorControl IDirectDrawColorControl,*LPDIRECTDRAWCOLORCONTROL;
48 typedef struct IDirectDrawGammaControl IDirectDrawGammaControl,*LPDIRECTDRAWGAMMACONTROL;
51 #define DDENUMRET_CANCEL 0
52 #define DDENUMRET_OK 1
54 #define DD_OK 0
57 #define _FACDD 0x876
58 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
60 #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
61 #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
62 #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
63 #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
64 #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
65 #define DDERR_GENERIC E_FAIL
66 #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
67 #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
68 #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
69 #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
70 #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
71 #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
72 #define DDERR_INVALIDPARAMS E_INVALIDARG
73 #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
74 #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
75 #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
76 #define DDERR_NO3D MAKE_DDHRESULT( 170 )
77 #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
78 #define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
79 #define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
80 #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
81 #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
82 #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
83 #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
84 #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
85 #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
86 #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
87 #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
88 #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
89 #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
90 #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
91 #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
92 #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
93 #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
94 #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
95 #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
96 #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
97 #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
98 #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
99 #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
100 #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
101 #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
102 #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
103 #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
104 #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
105 #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
106 #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
107 #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
108 #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
109 #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
110 #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
111 #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
112 #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
113 #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
114 #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
115 #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
116 #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
117 #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
118 #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
119 #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
120 #define DDERR_UNSUPPORTED E_NOTIMPL
121 #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
122 #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
123 #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
124 #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
125 #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
126 #define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
127 #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
128 #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
129 #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
130 #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
131 #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
132 #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
133 #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
134 #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
135 #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
136 #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
137 #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
138 #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
139 #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
140 #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
141 #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
142 #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
143 #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
144 #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
145 #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
146 #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
147 #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
148 #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
149 #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
150 #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
151 #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
152 #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
153 #define DDERR_NODC MAKE_DDHRESULT( 586 )
154 #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
155 #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
156 #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
157 #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
158 #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
159 #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
160 #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
161 #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
162 #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
163 #define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
164 #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
165 #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
166 #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
167 #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
168 #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
169 #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
170 #define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
171 #define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
172 #define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
173 #define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
174 #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
175 #define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
176 #define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
177 #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
178 #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
180 /* dwFlags for Blt* */
181 #define DDBLT_ALPHADEST 0x00000001
182 #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
183 #define DDBLT_ALPHADESTNEG 0x00000004
184 #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
185 #define DDBLT_ALPHAEDGEBLEND 0x00000010
186 #define DDBLT_ALPHASRC 0x00000020
187 #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
188 #define DDBLT_ALPHASRCNEG 0x00000080
189 #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
190 #define DDBLT_ASYNC 0x00000200
191 #define DDBLT_COLORFILL 0x00000400
192 #define DDBLT_DDFX 0x00000800
193 #define DDBLT_DDROPS 0x00001000
194 #define DDBLT_KEYDEST 0x00002000
195 #define DDBLT_KEYDESTOVERRIDE 0x00004000
196 #define DDBLT_KEYSRC 0x00008000
197 #define DDBLT_KEYSRCOVERRIDE 0x00010000
198 #define DDBLT_ROP 0x00020000
199 #define DDBLT_ROTATIONANGLE 0x00040000
200 #define DDBLT_ZBUFFER 0x00080000
201 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
202 #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
203 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
204 #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
205 #define DDBLT_WAIT 0x01000000
206 #define DDBLT_DEPTHFILL 0x02000000
207 #define DDBLT_DONOTWAIT 0x08000000
209 /* dwTrans for BltFast */
210 #define DDBLTFAST_NOCOLORKEY 0x00000000
211 #define DDBLTFAST_SRCCOLORKEY 0x00000001
212 #define DDBLTFAST_DESTCOLORKEY 0x00000002
213 #define DDBLTFAST_WAIT 0x00000010
214 #define DDBLTFAST_DONOTWAIT 0x00000020
216 /* dwFlags for Flip */
217 #define DDFLIP_WAIT 0x00000001
218 #define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
219 #define DDFLIP_ODD 0x00000004 /* only valid for overlay */
220 #define DDFLIP_NOVSYNC 0x00000008
221 #define DDFLIP_STEREO 0x00000010
222 #define DDFLIP_DONOTWAIT 0x00000020
224 /* dwFlags for GetBltStatus */
225 #define DDGBS_CANBLT 0x00000001
226 #define DDGBS_ISBLTDONE 0x00000002
228 /* DDSCAPS.dwCaps */
229 /* reserved1, was 3d capable */
230 #define DDSCAPS_RESERVED1 0x00000001
231 /* surface contains alpha information */
232 #define DDSCAPS_ALPHA 0x00000002
233 /* this surface is a backbuffer */
234 #define DDSCAPS_BACKBUFFER 0x00000004
235 /* complex surface structure */
236 #define DDSCAPS_COMPLEX 0x00000008
237 /* part of surface flipping structure */
238 #define DDSCAPS_FLIP 0x00000010
239 /* this surface is the frontbuffer surface */
240 #define DDSCAPS_FRONTBUFFER 0x00000020
241 /* this is a plain offscreen surface */
242 #define DDSCAPS_OFFSCREENPLAIN 0x00000040
243 /* overlay */
244 #define DDSCAPS_OVERLAY 0x00000080
245 /* palette objects can be created and attached to us */
246 #define DDSCAPS_PALETTE 0x00000100
247 /* primary surface (the one the user looks at currently)(right eye)*/
248 #define DDSCAPS_PRIMARYSURFACE 0x00000200
249 /* primary surface for left eye */
250 #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
251 /* surface exists in systemmemory */
252 #define DDSCAPS_SYSTEMMEMORY 0x00000800
253 /* surface can be used as a texture */
254 #define DDSCAPS_TEXTURE 0x00001000
255 /* surface may be destination for 3d rendering */
256 #define DDSCAPS_3DDEVICE 0x00002000
257 /* surface exists in videomemory */
258 #define DDSCAPS_VIDEOMEMORY 0x00004000
259 /* surface changes immediately visible */
260 #define DDSCAPS_VISIBLE 0x00008000
261 /* write only surface */
262 #define DDSCAPS_WRITEONLY 0x00010000
263 /* zbuffer surface */
264 #define DDSCAPS_ZBUFFER 0x00020000
265 /* has its own DC */
266 #define DDSCAPS_OWNDC 0x00040000
267 /* surface should be able to receive live video */
268 #define DDSCAPS_LIVEVIDEO 0x00080000
269 /* should be able to have a hw codec decompress stuff into it */
270 #define DDSCAPS_HWCODEC 0x00100000
271 /* mode X (320x200 or 320x240) surface */
272 #define DDSCAPS_MODEX 0x00200000
273 /* one mipmap surface (1 level) */
274 #define DDSCAPS_MIPMAP 0x00400000
275 #define DDSCAPS_RESERVED2 0x00800000
276 /* memory allocation delayed until Load() */
277 #define DDSCAPS_ALLOCONLOAD 0x04000000
278 /* Indicates that the surface will recieve data from a video port */
279 #define DDSCAPS_VIDEOPORT 0x08000000
280 /* surface is in local videomemory */
281 #define DDSCAPS_LOCALVIDMEM 0x10000000
282 /* surface is in nonlocal videomemory */
283 #define DDSCAPS_NONLOCALVIDMEM 0x20000000
284 /* surface is a standard VGA mode surface (NOT ModeX) */
285 #define DDSCAPS_STANDARDVGAMODE 0x40000000
286 /* optimized? surface */
287 #define DDSCAPS_OPTIMIZED 0x80000000
289 typedef struct _DDSCAPS {
290 DWORD dwCaps; /* capabilities of surface wanted */
291 } DDSCAPS,*LPDDSCAPS;
293 /* DDSCAPS2.dwCaps2 */
294 /* indicates the surface will receive data from a video port using
295 deinterlacing hardware. */
296 #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002
297 /* indicates the surface will be locked very frequently. */
298 #define DDSCAPS2_HINTDYNAMIC 0x00000004
299 /* indicates surface can be re-ordered or retiled on load() */
300 #define DDSCAPS2_HINTSTATIC 0x00000008
301 /* indicates surface to be managed by directdraw/direct3D */
302 #define DDSCAPS2_TEXTUREMANAGE 0x00000010
303 /* reserved bits */
304 #define DDSCAPS2_RESERVED1 0x00000020
305 #define DDSCAPS2_RESERVED2 0x00000040
306 /* indicates surface will never be locked again */
307 #define DDSCAPS2_OPAQUE 0x00000080
308 /* set at CreateSurface() time to indicate antialising will be used */
309 #define DDSCAPS2_HINTANTIALIASING 0x00000100
310 /* set at CreateSurface() time to indicate cubic environment map */
311 #define DDSCAPS2_CUBEMAP 0x00000200
312 /* face flags for cube maps */
313 #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
314 #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
315 #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
316 #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
317 #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
318 #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
319 /* specifies all faces of a cube for CreateSurface() */
320 #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
321 DDSCAPS2_CUBEMAP_NEGATIVEX |\
322 DDSCAPS2_CUBEMAP_POSITIVEY |\
323 DDSCAPS2_CUBEMAP_NEGATIVEY |\
324 DDSCAPS2_CUBEMAP_POSITIVEZ |\
325 DDSCAPS2_CUBEMAP_NEGATIVEZ )
326 /* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */
327 #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000
328 /* indicates texture surface to be managed by Direct3D *only* */
329 #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000
330 /* indicates managed surface that can safely be lost */
331 #define DDSCAPS2_DONOTPERSIST 0x00040000
332 /* indicates surface is part of a stereo flipping chain */
333 #define DDSCAPS2_STEREOSURFACELEFT 0x00080000
335 typedef struct _DDSCAPS2 {
336 DWORD dwCaps; /* capabilities of surface wanted */
337 DWORD dwCaps2; /* additional capabilities */
338 DWORD dwCaps3; /* reserved capabilities */
339 DWORD dwCaps4; /* more reserved capabilities */
340 } DDSCAPS2,*LPDDSCAPS2;
342 #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
344 typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */
346 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
347 DWORD dwCaps; /* driver specific capabilities */
348 DWORD dwCaps2; /* more driver specific capabilites */
349 DWORD dwCKeyCaps; /* color key capabilities of the surface */
350 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
351 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
352 DWORD dwPalCaps; /* palette capabilities */
353 DWORD dwSVCaps; /* stereo vision capabilities */
354 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
355 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
356 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
357 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
358 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
359 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
360 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
361 DWORD dwVidMemTotal; /* total amount of video memory */
362 DWORD dwVidMemFree; /* amount of free video memory */
363 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
364 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
365 DWORD dwNumFourCCCodes; /* number of four cc codes */
366 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
367 DWORD dwAlignSizeSrc; /* source rectangle byte size */
368 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
369 DWORD dwAlignSizeDest; /* dest rectangle byte size */
370 DWORD dwAlignStrideAlign; /* stride alignment */
371 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
372 DDSCAPS ddsOldCaps; /* old DDSCAPS - superceded for DirectX6+ */
373 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
374 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
375 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
376 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
377 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
378 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
379 DWORD dwReserved1;
380 DWORD dwReserved2;
381 DWORD dwReserved3;
382 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
383 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
384 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
385 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
386 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
387 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
388 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
389 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
390 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
391 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
392 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
393 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
394 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
395 DWORD dwCurrVideoPorts; /* current number of video ports used */
396 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
397 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
398 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
399 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
400 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
401 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
402 DDSCAPS2 ddsCaps; /* surface capabilities */
403 } DDCAPS_DX7,*LPDDCAPS_DX7;
405 typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */
407 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
408 DWORD dwCaps; /* driver specific capabilities */
409 DWORD dwCaps2; /* more driver specific capabilites */
410 DWORD dwCKeyCaps; /* color key capabilities of the surface */
411 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
412 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
413 DWORD dwPalCaps; /* palette capabilities */
414 DWORD dwSVCaps; /* stereo vision capabilities */
415 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
416 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
417 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
418 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
419 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
420 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
421 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
422 DWORD dwVidMemTotal; /* total amount of video memory */
423 DWORD dwVidMemFree; /* amount of free video memory */
424 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
425 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
426 DWORD dwNumFourCCCodes; /* number of four cc codes */
427 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
428 DWORD dwAlignSizeSrc; /* source rectangle byte size */
429 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
430 DWORD dwAlignSizeDest; /* dest rectangle byte size */
431 DWORD dwAlignStrideAlign; /* stride alignment */
432 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
433 DDSCAPS ddsOldCaps; /* old DDSCAPS - superceded for DirectX6+ */
434 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
435 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
436 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
437 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
438 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
439 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
440 DWORD dwReserved1;
441 DWORD dwReserved2;
442 DWORD dwReserved3;
443 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
444 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
445 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
446 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
447 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
448 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
449 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
450 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
451 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
452 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
453 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
454 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
455 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
456 DWORD dwCurrVideoPorts; /* current number of video ports used */
457 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
458 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
459 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
460 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
461 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
462 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
463 /* and one new member for DirectX 6 */
464 DDSCAPS2 ddsCaps; /* surface capabilities */
465 } DDCAPS_DX6,*LPDDCAPS_DX6;
467 typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */
469 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
470 DWORD dwCaps; /* driver specific capabilities */
471 DWORD dwCaps2; /* more driver specific capabilites */
472 DWORD dwCKeyCaps; /* color key capabilities of the surface */
473 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
474 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
475 DWORD dwPalCaps; /* palette capabilities */
476 DWORD dwSVCaps; /* stereo vision capabilities */
477 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
478 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
479 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
480 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
481 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
482 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
483 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
484 DWORD dwVidMemTotal; /* total amount of video memory */
485 DWORD dwVidMemFree; /* amount of free video memory */
486 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
487 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
488 DWORD dwNumFourCCCodes; /* number of four cc codes */
489 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
490 DWORD dwAlignSizeSrc; /* source rectangle byte size */
491 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
492 DWORD dwAlignSizeDest; /* dest rectangle byte size */
493 DWORD dwAlignStrideAlign; /* stride alignment */
494 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
495 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
496 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
497 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
498 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
499 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
500 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
501 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
502 DWORD dwReserved1;
503 DWORD dwReserved2;
504 DWORD dwReserved3;
505 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
506 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
507 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
508 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
509 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
510 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
511 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
512 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
513 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
514 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
515 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
516 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
517 /* the following are the new DirectX 5 members */
518 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
519 DWORD dwCurrVideoPorts; /* current number of video ports used */
520 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
521 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
522 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
523 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
524 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
525 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
526 } DDCAPS_DX5,*LPDDCAPS_DX5;
528 typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */
530 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
531 DWORD dwCaps; /* driver specific capabilities */
532 DWORD dwCaps2; /* more driver specific capabilites */
533 DWORD dwCKeyCaps; /* color key capabilities of the surface */
534 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
535 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
536 DWORD dwPalCaps; /* palette capabilities */
537 DWORD dwSVCaps; /* stereo vision capabilities */
538 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
539 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
540 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
541 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
542 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
543 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
544 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
545 DWORD dwVidMemTotal; /* total amount of video memory */
546 DWORD dwVidMemFree; /* amount of free video memory */
547 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
548 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
549 DWORD dwNumFourCCCodes; /* number of four cc codes */
550 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
551 DWORD dwAlignSizeSrc; /* source rectangle byte size */
552 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
553 DWORD dwAlignSizeDest; /* dest rectangle byte size */
554 DWORD dwAlignStrideAlign; /* stride alignment */
555 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
556 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
557 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
558 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
559 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
560 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
561 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
562 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
563 DWORD dwReserved1;
564 DWORD dwReserved2;
565 DWORD dwReserved3;
566 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
567 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
568 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
569 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
570 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
571 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
572 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
573 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
574 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
575 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
576 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
577 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
578 DWORD dwReserved4;
579 DWORD dwReserved5;
580 DWORD dwReserved6;
581 } DDCAPS_DX3,*LPDDCAPS_DX3;
583 /* set caps struct according to DIRECTDRAW_VERSION */
585 #if DIRECTDRAW_VERSION <= 0x300
586 typedef DDCAPS_DX3 DDCAPS;
587 #elif DIRECTDRAW_VERSION <= 0x500
588 typedef DDCAPS_DX5 DDCAPS;
589 #elif DIRECTDRAW_VERSION <= 0x600
590 typedef DDCAPS_DX6 DDCAPS;
591 #else
592 typedef DDCAPS_DX7 DDCAPS;
593 #endif
595 typedef DDCAPS *LPDDCAPS;
597 /* DDCAPS.dwCaps */
598 #define DDCAPS_3D 0x00000001
599 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
600 #define DDCAPS_ALIGNSIZEDEST 0x00000004
601 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
602 #define DDCAPS_ALIGNSIZESRC 0x00000010
603 #define DDCAPS_ALIGNSTRIDE 0x00000020
604 #define DDCAPS_BLT 0x00000040
605 #define DDCAPS_BLTQUEUE 0x00000080
606 #define DDCAPS_BLTFOURCC 0x00000100
607 #define DDCAPS_BLTSTRETCH 0x00000200
608 #define DDCAPS_GDI 0x00000400
609 #define DDCAPS_OVERLAY 0x00000800
610 #define DDCAPS_OVERLAYCANTCLIP 0x00001000
611 #define DDCAPS_OVERLAYFOURCC 0x00002000
612 #define DDCAPS_OVERLAYSTRETCH 0x00004000
613 #define DDCAPS_PALETTE 0x00008000
614 #define DDCAPS_PALETTEVSYNC 0x00010000
615 #define DDCAPS_READSCANLINE 0x00020000
616 #define DDCAPS_STEREOVIEW 0x00040000
617 #define DDCAPS_VBI 0x00080000
618 #define DDCAPS_ZBLTS 0x00100000
619 #define DDCAPS_ZOVERLAYS 0x00200000
620 #define DDCAPS_COLORKEY 0x00400000
621 #define DDCAPS_ALPHA 0x00800000
622 #define DDCAPS_COLORKEYHWASSIST 0x01000000
623 #define DDCAPS_NOHARDWARE 0x02000000
624 #define DDCAPS_BLTCOLORFILL 0x04000000
625 #define DDCAPS_BANKSWITCHED 0x08000000
626 #define DDCAPS_BLTDEPTHFILL 0x10000000
627 #define DDCAPS_CANCLIP 0x20000000
628 #define DDCAPS_CANCLIPSTRETCHED 0x40000000
629 #define DDCAPS_CANBLTSYSMEM 0x80000000
631 /* DDCAPS.dwCaps2 */
632 #define DDCAPS2_CERTIFIED 0x00000001
633 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
634 #define DDCAPS2_VIDEOPORT 0x00000004
635 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
636 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
637 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
638 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
639 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
640 #define DDCAPS2_CANDROPZ16BIT 0x00000100
641 #define DDCAPS2_NONLOCALVIDMEM 0x00000200
642 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
643 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
644 #define DDCAPS2_WIDESURFACES 0x00001000
645 #define DDCAPS2_CANFLIPODDEVEN 0x00002000
646 #define DDCAPS2_CANBOBHARDWARE 0x00004000
647 #define DDCAPS2_COPYFOURCC 0x00008000
648 #define DDCAPS2_PRIMARYGAMMA 0x00020000
649 #define DDCAPS2_CANRENDERWINDOWED 0x00080000
650 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
651 #define DDCAPS2_FLIPINTERVAL 0x00200000
652 #define DDCAPS2_FLIPNOVSYNC 0x00400000
653 #define DDCAPS2_CANMANAGETEXTURE 0x00800000
654 #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
655 #define DDCAPS2_STEREO 0x02000000
656 #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
659 /* Set/Get Colour Key Flags */
660 #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
661 #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
662 #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
663 #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
664 #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
666 typedef struct _DDCOLORKEY
668 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
669 * be treated as Color Key, inclusive
671 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
672 * to be treated as Color Key, inclusive
674 } DDCOLORKEY,*LPDDCOLORKEY;
676 /* ddCKEYCAPS bits */
677 #define DDCKEYCAPS_DESTBLT 0x00000001
678 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
679 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
680 #define DDCKEYCAPS_DESTBLTYUV 0x00000008
681 #define DDCKEYCAPS_DESTOVERLAY 0x00000010
682 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
683 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
684 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
685 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
686 #define DDCKEYCAPS_SRCBLT 0x00000200
687 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
688 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
689 #define DDCKEYCAPS_SRCBLTYUV 0x00001000
690 #define DDCKEYCAPS_SRCOVERLAY 0x00002000
691 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
692 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
693 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
694 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
695 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
697 typedef struct _DDPIXELFORMAT {
698 DWORD dwSize; /* 0: size of structure */
699 DWORD dwFlags; /* 4: pixel format flags */
700 DWORD dwFourCC; /* 8: (FOURCC code) */
701 union {
702 DWORD dwRGBBitCount; /* C: how many bits per pixel */
703 DWORD dwYUVBitCount; /* C: how many bits per pixel */
704 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
705 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
706 } DUMMYUNIONNAME;
707 union {
708 DWORD dwRBitMask; /* 10: mask for red bit*/
709 DWORD dwYBitMask; /* 10: mask for Y bits*/
710 } DUMMYUNIONNAME1;
711 union {
712 DWORD dwGBitMask; /* 14: mask for green bits*/
713 DWORD dwUBitMask; /* 14: mask for U bits*/
714 } DUMMYUNIONNAME2;
715 union {
716 DWORD dwBBitMask; /* 18: mask for blue bits*/
717 DWORD dwVBitMask; /* 18: mask for V bits*/
718 } DUMMYUNIONNAME3;
719 union {
720 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
721 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
722 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
723 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
724 } DUMMYUNIONNAME4;
725 /* 20: next structure */
726 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
728 /* DDCAPS.dwFXCaps */
729 #define DDFXCAPS_BLTALPHA 0x00000001
730 #define DDFXCAPS_OVERLAYALPHA 0x00000004
731 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
732 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
733 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
734 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
735 #define DDFXCAPS_BLTROTATION 0x00000100
736 #define DDFXCAPS_BLTROTATION90 0x00000200
737 #define DDFXCAPS_BLTSHRINKX 0x00000400
738 #define DDFXCAPS_BLTSHRINKXN 0x00000800
739 #define DDFXCAPS_BLTSHRINKY 0x00001000
740 #define DDFXCAPS_BLTSHRINKYN 0x00002000
741 #define DDFXCAPS_BLTSTRETCHX 0x00004000
742 #define DDFXCAPS_BLTSTRETCHXN 0x00008000
743 #define DDFXCAPS_BLTSTRETCHY 0x00010000
744 #define DDFXCAPS_BLTSTRETCHYN 0x00020000
745 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
746 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
747 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
748 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
749 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
750 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
751 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
752 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
753 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
754 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
755 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
756 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
758 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
760 /* DDCAPS.dwFXAlphaCaps */
761 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
762 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
763 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
764 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
765 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
766 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
767 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
768 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
769 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
770 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
772 /* DDCAPS.dwPalCaps */
773 #define DDPCAPS_4BIT 0x00000001
774 #define DDPCAPS_8BITENTRIES 0x00000002
775 #define DDPCAPS_8BIT 0x00000004
776 #define DDPCAPS_INITIALIZE 0x00000008
777 #define DDPCAPS_PRIMARYSURFACE 0x00000010
778 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
779 #define DDPCAPS_ALLOW256 0x00000040
780 #define DDPCAPS_VSYNC 0x00000080
781 #define DDPCAPS_1BIT 0x00000100
782 #define DDPCAPS_2BIT 0x00000200
783 #define DDPCAPS_ALPHA 0x00000400
785 /* DDCAPS.dwSVCaps */
786 /* the first 4 of these are now obsolete */
787 #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occured */
788 #define DDSVCAPS_RESERVED1 0x00000001
789 #define DDSVCAPS_RESERVED2 0x00000002
790 #define DDSVCAPS_RESERVED3 0x00000004
791 #define DDSVCAPS_RESERVED4 0x00000008
792 #else
793 #define DDSVCAPS_ENIGMA 0x00000001
794 #define DDSVCAPS_FLICKER 0x00000002
795 #define DDSVCAPS_REDBLUE 0x00000004
796 #define DDSVCAPS_SPLIT 0x00000008
797 #endif
798 #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
800 /* BitDepths */
801 #define DDBD_1 0x00004000
802 #define DDBD_2 0x00002000
803 #define DDBD_4 0x00001000
804 #define DDBD_8 0x00000800
805 #define DDBD_16 0x00000400
806 #define DDBD_24 0x00000200
807 #define DDBD_32 0x00000100
809 /* DDOVERLAYFX.dwDDFX */
810 #define DDOVERFX_ARITHSTRETCHY 0x00000001
811 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
812 #define DDOVERFX_MIRRORUPDOWN 0x00000004
814 /* UpdateOverlay flags */
815 #define DDOVER_ALPHADEST 0x00000001
816 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
817 #define DDOVER_ALPHADESTNEG 0x00000004
818 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
819 #define DDOVER_ALPHAEDGEBLEND 0x00000010
820 #define DDOVER_ALPHASRC 0x00000020
821 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
822 #define DDOVER_ALPHASRCNEG 0x00000080
823 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
824 #define DDOVER_HIDE 0x00000200
825 #define DDOVER_KEYDEST 0x00000400
826 #define DDOVER_KEYDESTOVERRIDE 0x00000800
827 #define DDOVER_KEYSRC 0x00001000
828 #define DDOVER_KEYSRCOVERRIDE 0x00002000
829 #define DDOVER_SHOW 0x00004000
830 #define DDOVER_ADDDIRTYRECT 0x00008000
831 #define DDOVER_REFRESHDIRTYRECTS 0x00010000
832 #define DDOVER_REFRESHALL 0x00020000
833 #define DDOVER_DDFX 0x00080000
834 #define DDOVER_AUTOFLIP 0x00100000
835 #define DDOVER_BOB 0x00200000
836 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000
837 #define DDOVER_INTERLEAVED 0x00800000
839 /* DDCOLORKEY.dwFlags */
840 #define DDPF_ALPHAPIXELS 0x00000001
841 #define DDPF_ALPHA 0x00000002
842 #define DDPF_FOURCC 0x00000004
843 #define DDPF_PALETTEINDEXED4 0x00000008
844 #define DDPF_PALETTEINDEXEDTO8 0x00000010
845 #define DDPF_PALETTEINDEXED8 0x00000020
846 #define DDPF_RGB 0x00000040
847 #define DDPF_COMPRESSED 0x00000080
848 #define DDPF_RGBTOYUV 0x00000100
849 #define DDPF_YUV 0x00000200
850 #define DDPF_ZBUFFER 0x00000400
851 #define DDPF_PALETTEINDEXED1 0x00000800
852 #define DDPF_PALETTEINDEXED2 0x00001000
853 #define DDPF_ZPIXELS 0x00002000
854 #define DDPF_STENCILBUFFER 0x00004000
855 #define DDPF_ALPHAPREMULT 0x00008000
856 #define DDPF_LUMINANCE 0x00020000
857 #define DDPF_BUMPLUMINANCE 0x00040000
858 #define DDPF_BUMPDUDV 0x00080000
860 /* SetCooperativeLevel dwFlags */
861 #define DDSCL_FULLSCREEN 0x00000001
862 #define DDSCL_ALLOWREBOOT 0x00000002
863 #define DDSCL_NOWINDOWCHANGES 0x00000004
864 #define DDSCL_NORMAL 0x00000008
865 #define DDSCL_EXCLUSIVE 0x00000010
866 #define DDSCL_ALLOWMODEX 0x00000040
867 #define DDSCL_SETFOCUSWINDOW 0x00000080
868 #define DDSCL_SETDEVICEWINDOW 0x00000100
869 #define DDSCL_CREATEDEVICEWINDOW 0x00000200
870 #define DDSCL_MULTITHREADED 0x00000400
871 #define DDSCL_FPUSETUP 0x00000800
872 #define DDSCL_FPUPRESERVE 0x00001000
875 /* DDSURFACEDESC.dwFlags */
876 #define DDSD_CAPS 0x00000001
877 #define DDSD_HEIGHT 0x00000002
878 #define DDSD_WIDTH 0x00000004
879 #define DDSD_PITCH 0x00000008
880 #define DDSD_BACKBUFFERCOUNT 0x00000020
881 #define DDSD_ZBUFFERBITDEPTH 0x00000040
882 #define DDSD_ALPHABITDEPTH 0x00000080
883 #define DDSD_LPSURFACE 0x00000800
884 #define DDSD_PIXELFORMAT 0x00001000
885 #define DDSD_CKDESTOVERLAY 0x00002000
886 #define DDSD_CKDESTBLT 0x00004000
887 #define DDSD_CKSRCOVERLAY 0x00008000
888 #define DDSD_CKSRCBLT 0x00010000
889 #define DDSD_MIPMAPCOUNT 0x00020000
890 #define DDSD_REFRESHRATE 0x00040000
891 #define DDSD_LINEARSIZE 0x00080000
892 #define DDSD_TEXTURESTAGE 0x00100000
893 #define DDSD_FVF 0x00200000
894 #define DDSD_SRCVBHANDLE 0x00400000
895 #define DDSD_ALL 0x007ff9ee
897 /* EnumSurfaces flags */
898 #define DDENUMSURFACES_ALL 0x00000001
899 #define DDENUMSURFACES_MATCH 0x00000002
900 #define DDENUMSURFACES_NOMATCH 0x00000004
901 #define DDENUMSURFACES_CANBECREATED 0x00000008
902 #define DDENUMSURFACES_DOESEXIST 0x00000010
904 /* SetDisplayMode flags */
905 #define DDSDM_STANDARDVGAMODE 0x00000001
907 /* EnumDisplayModes flags */
908 #define DDEDM_REFRESHRATES 0x00000001
909 #define DDEDM_STANDARDVGAMODES 0x00000002
911 /* WaitForVerticalDisplay flags */
913 #define DDWAITVB_BLOCKBEGIN 0x00000001
914 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002
915 #define DDWAITVB_BLOCKEND 0x00000004
917 typedef struct _DDSURFACEDESC
919 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
920 DWORD dwFlags; /* 4: determines what fields are valid*/
921 DWORD dwHeight; /* 8: height of surface to be created*/
922 DWORD dwWidth; /* C: width of input surface*/
923 LONG lPitch; /*10: distance to start of next line (return value only)*/
924 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
925 union {
926 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
927 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
928 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
929 } DUMMYUNIONNAME;
930 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
931 DWORD dwReserved; /* 20:reserved*/
932 union {
933 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
934 DWORD dwLinearSize; /* 24:Formless late-allocated optimized surface size*/
935 } DUMMYUNIONNAME1;
936 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
937 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
938 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
939 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
940 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
941 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
942 } DDSURFACEDESC,*LPDDSURFACEDESC;
944 typedef struct _DDSURFACEDESC2
946 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
947 DWORD dwFlags; /* 4: determines what fields are valid*/
948 DWORD dwHeight; /* 8: height of surface to be created*/
949 DWORD dwWidth; /* C: width of input surface*/
950 union {
951 LONG lPitch; /*10: distance to start of next line (return value only)*/
952 DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
953 } DUMMYUNIONNAME;
954 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
955 union {
956 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
957 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
958 DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
959 } DUMMYUNIONNAME2;
960 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
961 DWORD dwReserved; /* 20:reserved*/
962 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
963 union {
964 DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
965 DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
966 } DUMMYUNIONNAME3;
967 DDCOLORKEY ddckCKDestBlt; /* 2C: CK for destination blt use*/
968 DDCOLORKEY ddckCKSrcOverlay;/* 30: CK for source overlay use*/
969 DDCOLORKEY ddckCKSrcBlt; /* 34: CK for source blt use*/
971 union {
972 DDPIXELFORMAT ddpfPixelFormat;/* 38: pixel format description of the surface*/
973 DWORD dwFVF; /* 38: vertex format description of vertex buffers */
974 } DUMMYUNIONNAME4;
975 DDSCAPS2 ddsCaps; /* 3C: DDraw surface caps */
976 DWORD dwTextureStage; /* 40: stage in multitexture cascade */
977 } DDSURFACEDESC2,*LPDDSURFACEDESC2;
979 /* DDCOLORCONTROL.dwFlags */
980 #define DDCOLOR_BRIGHTNESS 0x00000001
981 #define DDCOLOR_CONTRAST 0x00000002
982 #define DDCOLOR_HUE 0x00000004
983 #define DDCOLOR_SATURATION 0x00000008
984 #define DDCOLOR_SHARPNESS 0x00000010
985 #define DDCOLOR_GAMMA 0x00000020
986 #define DDCOLOR_COLORENABLE 0x00000040
988 typedef struct {
989 DWORD dwSize;
990 DWORD dwFlags;
991 LONG lBrightness;
992 LONG lContrast;
993 LONG lHue;
994 LONG lSaturation;
995 LONG lSharpness;
996 LONG lGamma;
997 LONG lColorEnable;
998 DWORD dwReserved1;
999 } DDCOLORCONTROL,*LPDDCOLORCONTROL;
1001 typedef BOOL CALLBACK (*LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
1002 typedef BOOL CALLBACK (*LPDDENUMCALLBACKW)(GUID *, LPWSTR, LPWSTR, LPVOID);
1003 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
1005 typedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
1006 typedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK7)(LPDDSURFACEDESC2, LPVOID);
1007 typedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
1008 typedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
1010 typedef BOOL CALLBACK (*LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
1011 typedef BOOL CALLBACK (*LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
1012 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
1014 HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
1015 HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
1016 #define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
1018 /* flags for DirectDrawEnumerateEx */
1019 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
1020 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
1021 #define DDENUM_NONDISPLAYDEVICES 0x00000004
1023 typedef struct _DDBLTFX
1025 DWORD dwSize; /* size of structure */
1026 DWORD dwDDFX; /* FX operations */
1027 DWORD dwROP; /* Win32 raster operations */
1028 DWORD dwDDROP; /* Raster operations new for DirectDraw */
1029 DWORD dwRotationAngle; /* Rotation angle for blt */
1030 DWORD dwZBufferOpCode; /* ZBuffer compares */
1031 DWORD dwZBufferLow; /* Low limit of Z buffer */
1032 DWORD dwZBufferHigh; /* High limit of Z buffer */
1033 DWORD dwZBufferBaseDest; /* Destination base value */
1034 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
1035 union
1037 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
1038 LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
1039 } DUMMYUNIONNAME;
1040 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
1041 union
1043 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
1044 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
1045 } DUMMYUNIONNAME1;
1046 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1047 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
1048 DWORD dwReserved;
1049 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1050 union
1052 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
1053 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
1054 } DUMMYUNIONNAME2;
1055 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1056 union
1058 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
1059 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
1060 } DUMMYUNIONNAME3;
1061 union
1063 DWORD dwFillColor; /* color in RGB or Palettized */
1064 DWORD dwFillDepth; /* depth value for z-buffer */
1065 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
1066 LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
1067 } DUMMYUNIONNAME4;
1068 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
1069 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
1070 } DDBLTFX,*LPDDBLTFX;
1072 /* dwDDFX */
1073 /* arithmetic stretching along y axis */
1074 #define DDBLTFX_ARITHSTRETCHY 0x00000001
1075 /* mirror on y axis */
1076 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
1077 /* mirror on x axis */
1078 #define DDBLTFX_MIRRORUPDOWN 0x00000004
1079 /* do not tear */
1080 #define DDBLTFX_NOTEARING 0x00000008
1081 /* 180 degrees clockwise rotation */
1082 #define DDBLTFX_ROTATE180 0x00000010
1083 /* 270 degrees clockwise rotation */
1084 #define DDBLTFX_ROTATE270 0x00000020
1085 /* 90 degrees clockwise rotation */
1086 #define DDBLTFX_ROTATE90 0x00000040
1087 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1088 #define DDBLTFX_ZBUFFERRANGE 0x00000080
1089 /* add dwZBufferBaseDest to every source z value before compare */
1090 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
1092 typedef struct _DDOVERLAYFX
1094 DWORD dwSize; /* size of structure */
1095 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1096 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
1097 DWORD dwReserved;
1098 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1099 union
1101 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
1102 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
1103 } DUMMYUNIONNAME;
1104 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1105 union
1107 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
1108 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
1109 } DUMMYUNIONNAME1;
1110 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
1111 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
1112 DWORD dwDDFX; /* Overlay FX */
1113 DWORD dwFlags; /* flags */
1114 } DDOVERLAYFX,*LPDDOVERLAYFX;
1116 typedef struct _DDBLTBATCH
1118 LPRECT lprDest;
1119 LPDIRECTDRAWSURFACE lpDDSSrc;
1120 LPRECT lprSrc;
1121 DWORD dwFlags;
1122 LPDDBLTFX lpDDBltFx;
1123 } DDBLTBATCH,*LPDDBLTBATCH;
1125 #define MAX_DDDEVICEID_STRING 512
1127 typedef struct tagDDDEVICEIDENTIFIER {
1128 char szDriver[MAX_DDDEVICEID_STRING];
1129 char szDescription[MAX_DDDEVICEID_STRING];
1130 LARGE_INTEGER liDriverVersion;
1131 DWORD dwVendorId;
1132 DWORD dwDeviceId;
1133 DWORD dwSubSysId;
1134 DWORD dwRevision;
1135 GUID guidDeviceIdentifier;
1136 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
1138 typedef struct tagDDDEVICEIDENTIFIER2 {
1139 char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
1140 char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
1141 LARGE_INTEGER liDriverVersion; /* driver version */
1142 DWORD dwVendorId; /* vendor ID, zero if unknown */
1143 DWORD dwDeviceId; /* chipset ID, zero if unknown */
1144 DWORD dwSubSysId; /* board ID, zero if unknown */
1145 DWORD dwRevision; /* chipset version, zero if unknown */
1146 GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
1147 DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
1148 } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
1150 /*****************************************************************************
1151 * IDirectDrawPalette interface
1153 #define ICOM_INTERFACE IDirectDrawPalette
1154 #define IDirectDrawPalette_METHODS \
1155 ICOM_METHOD1(HRESULT,GetCaps, LPDWORD,lpdwCaps) \
1156 ICOM_METHOD4(HRESULT,GetEntries, DWORD,dwFlags, DWORD,dwBase, DWORD,dwNumEntries, LPPALETTEENTRY,lpEntries) \
1157 ICOM_METHOD3(HRESULT,Initialize, LPDIRECTDRAW,lpDD, DWORD,dwFlags, LPPALETTEENTRY,lpDDColorTable) \
1158 ICOM_METHOD4(HRESULT,SetEntries, DWORD,dwFlags, DWORD,dwStartingEntry, DWORD,dwCount, LPPALETTEENTRY,lpEntries)
1159 #define IDirectDrawPalette_IMETHODS \
1160 IUnknown_IMETHODS \
1161 IDirectDrawPalette_METHODS
1162 ICOM_DEFINE(IDirectDrawPalette,IUnknown)
1163 #undef ICOM_INTERFACE
1165 /*** IUnknown methods ***/
1166 #define IDirectDrawPalette_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1167 #define IDirectDrawPalette_AddRef(p) ICOM_CALL (AddRef,p)
1168 #define IDirectDrawPalette_Release(p) ICOM_CALL (Release,p)
1169 /*** IDirectDrawPalette methods ***/
1170 #define IDirectDrawPalette_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1171 #define IDirectDrawPalette_GetEntries(p,a,b,c,d) ICOM_CALL4(GetEntries,p,a,b,c,d)
1172 #define IDirectDrawPalette_Initialize(p,a,b,c) ICOM_CALL3(Initialize,p,a,b,c)
1173 #define IDirectDrawPalette_SetEntries(p,a,b,c,d) ICOM_CALL4(SetEntries,p,a,b,c,d)
1176 /*****************************************************************************
1177 * IDirectDrawClipper interface
1179 #define ICOM_INTERFACE IDirectDrawClipper
1180 #define IDirectDrawClipper_METHODS \
1181 ICOM_METHOD3(HRESULT,GetClipList, LPRECT,lpRect, LPRGNDATA,lpClipList, LPDWORD,lpdwSize) \
1182 ICOM_METHOD1(HRESULT,GetHWnd, HWND*,lphWnd) \
1183 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, DWORD,dwFlags) \
1184 ICOM_METHOD1(HRESULT,IsClipListChanged, BOOL*,lpbChanged) \
1185 ICOM_METHOD2(HRESULT,SetClipList, LPRGNDATA,lpClipList, DWORD,dwFlags) \
1186 ICOM_METHOD2(HRESULT,SetHWnd, DWORD,dwFlags, HWND,hWnd)
1187 #define IDirectDrawClipper_IMETHODS \
1188 IUnknown_IMETHODS \
1189 IDirectDrawClipper_METHODS
1190 ICOM_DEFINE(IDirectDrawClipper,IUnknown)
1191 #undef ICOM_INTERFACE
1193 /*** IUnknown methods ***/
1194 #define IDirectDrawClipper_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1195 #define IDirectDrawClipper_AddRef(p) ICOM_CALL (AddRef,p)
1196 #define IDirectDrawClipper_Release(p) ICOM_CALL (Release,p)
1197 /*** IDirectDrawClipper methods ***/
1198 #define IDirectDrawClipper_GetClipList(p,a,b,c) ICOM_CALL3(GetClipList,p,a,b,c)
1199 #define IDirectDrawClipper_GetHWnd(p,a) ICOM_CALL1(GetHWnd,p,a)
1200 #define IDirectDrawClipper_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1201 #define IDirectDrawClipper_IsClipListChanged(p,a) ICOM_CALL1(IsClipListChanged,p,a)
1202 #define IDirectDrawClipper_SetClipList(p,a,b) ICOM_CALL2(SetClipList,p,a,b)
1203 #define IDirectDrawClipper_SetHWnd(p,a,b) ICOM_CALL2(SetHWnd,p,a,b)
1206 /*****************************************************************************
1207 * IDirectDraw interface
1209 #define ICOM_INTERFACE IDirectDraw
1210 #define IDirectDraw_METHODS \
1211 ICOM_METHOD (HRESULT,Compact) \
1212 ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
1213 ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
1214 ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE*,lplpDDSurface, IUnknown*,pUnkOuter) \
1215 ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE,lpDDSurface, LPDIRECTDRAWSURFACE*,lplpDupDDSurface) \
1216 ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK,lpEnumModesCallback) \
1217 ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1218 ICOM_METHOD (HRESULT,FlipToGDISurface) \
1219 ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
1220 ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1221 ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
1222 ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE*,lplpGDIDDSurface) \
1223 ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
1224 ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
1225 ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
1226 ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
1227 ICOM_METHOD (HRESULT,RestoreDisplayMode) \
1228 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
1229 ICOM_METHOD3(HRESULT,SetDisplayMode, DWORD,, DWORD,, DWORD,) \
1230 ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent)
1231 #define IDirectDraw_IMETHODS \
1232 IUnknown_IMETHODS \
1233 IDirectDraw_METHODS
1234 ICOM_DEFINE(IDirectDraw,IUnknown)
1235 #undef ICOM_INTERFACE
1237 /*** IUnknown methods ***/
1238 #define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1239 #define IDirectDraw_AddRef(p) ICOM_CALL (AddRef,p)
1240 #define IDirectDraw_Release(p) ICOM_CALL (Release,p)
1241 /*** IDirectDraw methods ***/
1242 #define IDirectDraw_Compact(p) ICOM_CALL (Compact,p)
1243 #define IDirectDraw_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1244 #define IDirectDraw_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1245 #define IDirectDraw_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1246 #define IDirectDraw_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1247 #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1248 #define IDirectDraw_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1249 #define IDirectDraw_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1250 #define IDirectDraw_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1251 #define IDirectDraw_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1252 #define IDirectDraw_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1253 #define IDirectDraw_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1254 #define IDirectDraw_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1255 #define IDirectDraw_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1256 #define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1257 #define IDirectDraw_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1258 #define IDirectDraw_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1259 #define IDirectDraw_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1260 #define IDirectDraw_SetDisplayMode(p,a,b,c) ICOM_CALL3(SetDisplayMode,p,a,b,c)
1261 #define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1264 /* flags for Lock() */
1265 #define DDLOCK_SURFACEMEMORYPTR 0x00000000
1266 #define DDLOCK_WAIT 0x00000001
1267 #define DDLOCK_EVENT 0x00000002
1268 #define DDLOCK_READONLY 0x00000010
1269 #define DDLOCK_WRITEONLY 0x00000020
1270 #define DDLOCK_NOSYSLOCK 0x00000800
1273 /*****************************************************************************
1274 * IDirectDraw2 interface
1276 /* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
1277 * arguments of SetDisplayMode has changed !
1279 #define ICOM_INTERFACE IDirectDraw2
1280 #define IDirectDraw2_METHODS \
1281 /*0c*/ ICOM_METHOD (HRESULT,Compact) \
1282 /*10*/ ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
1283 /*14*/ ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
1284 /*18*/ ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE*,lplpDDSurface, IUnknown*,pUnkOuter) \
1285 /*1c*/ ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE,lpDDSurface, LPDIRECTDRAWSURFACE*,lplpDupDDSurface) \
1286 /*20*/ ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK,lpEnumModesCallback) \
1287 /*24*/ ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1288 /*28*/ ICOM_METHOD (HRESULT,FlipToGDISurface) \
1289 /*2c*/ ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
1290 /*30*/ ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1291 /*34*/ ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
1292 /*38*/ ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE*,lplpGDIDDSurface) \
1293 /*3c*/ ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
1294 /*40*/ ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
1295 /*44*/ ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
1296 /*48*/ ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
1297 /*4c*/ ICOM_METHOD (HRESULT,RestoreDisplayMode) \
1298 /*50*/ ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
1299 /*54*/ ICOM_METHOD5(HRESULT,SetDisplayMode, DWORD,dwWidth, DWORD,dwHeight, DWORD,dwBPP, DWORD,dwRefreshRate, DWORD,dwFlags) \
1300 /*58*/ ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent) \
1301 /* added in v2 */ \
1302 /*5c*/ ICOM_METHOD3(HRESULT,GetAvailableVidMem, LPDDSCAPS,lpDDCaps, LPDWORD,lpdwTotal, LPDWORD,lpdwFree)
1303 #define IDirectDraw2_IMETHODS \
1304 IUnknown_IMETHODS \
1305 IDirectDraw2_METHODS
1306 ICOM_DEFINE(IDirectDraw2,IUnknown)
1307 #undef ICOM_INTERFACE
1309 /*** IUnknown methods ***/
1310 #define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1311 #define IDirectDraw2_AddRef(p) ICOM_CALL (AddRef,p)
1312 #define IDirectDraw2_Release(p) ICOM_CALL (Release,p)
1313 /*** IDirectDraw methods ***/
1314 #define IDirectDraw2_Compact(p) ICOM_CALL (Compact,p)
1315 #define IDirectDraw2_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1316 #define IDirectDraw2_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1317 #define IDirectDraw2_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1318 #define IDirectDraw2_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1319 #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1320 #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1321 #define IDirectDraw2_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1322 #define IDirectDraw2_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1323 #define IDirectDraw2_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1324 #define IDirectDraw2_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1325 #define IDirectDraw2_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1326 #define IDirectDraw2_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1327 #define IDirectDraw2_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1328 #define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1329 #define IDirectDraw2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1330 #define IDirectDraw2_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1331 #define IDirectDraw2_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1332 #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e)
1333 #define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1334 /*** IDirectDraw2 methods ***/
1335 #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
1338 /*****************************************************************************
1339 * IDirectDraw4 interface
1341 #define ICOM_INTERFACE IDirectDraw4
1342 #define IDirectDraw4_METHODS \
1343 ICOM_METHOD2(HRESULT,GetSurfaceFromDC, HDC,, LPDIRECTDRAWSURFACE*,) \
1344 ICOM_METHOD (HRESULT,RestoreAllSurfaces) \
1345 ICOM_METHOD (HRESULT,TestCooperativeLevel) \
1346 ICOM_METHOD2(HRESULT,GetDeviceIdentifier, LPDDDEVICEIDENTIFIER,, DWORD,)
1347 #define IDirectDraw4_IMETHODS \
1348 IDirectDraw2_IMETHODS \
1349 IDirectDraw4_METHODS
1350 ICOM_DEFINE(IDirectDraw4,IDirectDraw2)
1351 #undef ICOM_INTERFACE
1353 /*** IUnknown methods ***/
1354 #define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1355 #define IDirectDraw4_AddRef(p) ICOM_CALL (AddRef,p)
1356 #define IDirectDraw4_Release(p) ICOM_CALL (Release,p)
1357 /*** IDirectDraw methods ***/
1358 #define IDirectDraw4_Compact(p) ICOM_CALL (Compact,p)
1359 #define IDirectDraw4_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1360 #define IDirectDraw4_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1361 #define IDirectDraw4_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1362 #define IDirectDraw4_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1363 #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1364 #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1365 #define IDirectDraw4_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1366 #define IDirectDraw4_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1367 #define IDirectDraw4_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1368 #define IDirectDraw4_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1369 #define IDirectDraw4_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1370 #define IDirectDraw4_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1371 #define IDirectDraw4_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1372 #define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1373 #define IDirectDraw4_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1374 #define IDirectDraw4_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1375 #define IDirectDraw4_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1376 #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e)
1377 #define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1378 /*** IDirectDraw2 methods ***/
1379 #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
1380 /*** IDirectDraw4 methods ***/
1381 #define IDirectDraw4_GetSurfaceFromDC(p,a,b) ICOM_CALL2(GetSurfaceFromDC,p,a,b,c)
1382 #define IDirectDraw4_RestoreAllSurfaces(pc) ICOM_CALL (RestoreAllSurfaces,p)
1383 #define IDirectDraw4_TestCooperativeLevel(p) ICOM_CALL (TestCooperativeLevel,p)
1384 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL2(GetDeviceIdentifier,p,a,b)
1387 /*****************************************************************************
1388 * IDirectDraw7 interface
1390 /* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
1391 * as not interchangeable with earlier DirectDraw interfaces.
1393 #define ICOM_INTERFACE IDirectDraw7
1394 #define IDirectDraw7_METHODS \
1395 /*0c*/ ICOM_METHOD (HRESULT,Compact) \
1396 /*10*/ ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
1397 /*14*/ ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
1398 /*18*/ ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC2,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE7*,lplpDDSurface, IUnknown*,pUnkOuter) \
1399 /*1c*/ ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE7,lpDDSurface, LPDIRECTDRAWSURFACE7*,lplpDupDDSurface) \
1400 /*20*/ ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC2,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK7,lpEnumModesCallback) \
1401 /*24*/ ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC2,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK7,lpEnumSurfacesCallback) \
1402 /*28*/ ICOM_METHOD (HRESULT,FlipToGDISurface) \
1403 /*2c*/ ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
1404 /*30*/ ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC2,lpDDSurfaceDesc) \
1405 /*34*/ ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
1406 /*38*/ ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE7*,lplpGDIDDSurface) \
1407 /*3c*/ ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
1408 /*40*/ ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
1409 /*44*/ ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
1410 /*48*/ ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
1411 /*4c*/ ICOM_METHOD (HRESULT,RestoreDisplayMode) \
1412 /*50*/ ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
1413 /*54*/ ICOM_METHOD5(HRESULT,SetDisplayMode, DWORD,dwWidth, DWORD,dwHeight, DWORD,dwBPP, DWORD,dwRefreshRate, DWORD,dwFlags) \
1414 /*58*/ ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent) \
1415 /* added in v2 */ \
1416 /*5c*/ ICOM_METHOD3(HRESULT,GetAvailableVidMem, LPDDSCAPS2,lpDDCaps, LPDWORD,lpdwTotal, LPDWORD,lpdwFree) \
1417 /* added in v4 */ \
1418 /*60*/ ICOM_METHOD2(HRESULT,GetSurfaceFromDC, HDC,, LPDIRECTDRAWSURFACE7*,) \
1419 /*64*/ ICOM_METHOD (HRESULT,RestoreAllSurfaces) \
1420 /*68*/ ICOM_METHOD (HRESULT,TestCooperativeLevel) \
1421 /*6c*/ ICOM_METHOD2(HRESULT,GetDeviceIdentifier, LPDDDEVICEIDENTIFIER,, DWORD,) \
1422 /* added in v7 */ \
1423 /*70*/ ICOM_METHOD3(HRESULT,StartModeTest, LPSIZE,, DWORD,, DWORD,) \
1424 /*74*/ ICOM_METHOD2(HRESULT,EvaluateMode, DWORD,, DWORD *,)
1425 #define IDirectDraw7_IMETHODS \
1426 IUnknown_IMETHODS \
1427 IDirectDraw7_METHODS
1428 ICOM_DEFINE(IDirectDraw7,IUnknown)
1429 #undef ICOM_INTERFACE
1431 /*** IUnknown methods ***/
1432 #define IDirectDraw7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1433 #define IDirectDraw7_AddRef(p) ICOM_CALL (AddRef,p)
1434 #define IDirectDraw7_Release(p) ICOM_CALL (Release,p)
1435 /*** IDirectDraw methods ***/
1436 #define IDirectDraw7_Compact(p) ICOM_CALL (Compact,p)
1437 #define IDirectDraw7_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1438 #define IDirectDraw7_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1439 #define IDirectDraw7_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1440 #define IDirectDraw7_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1441 #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1442 #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1443 #define IDirectDraw7_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1444 #define IDirectDraw7_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1445 #define IDirectDraw7_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1446 #define IDirectDraw7_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1447 #define IDirectDraw7_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1448 #define IDirectDraw7_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1449 #define IDirectDraw7_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1450 #define IDirectDraw7_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1451 #define IDirectDraw7_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1452 #define IDirectDraw7_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1453 #define IDirectDraw7_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1454 #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e)
1455 #define IDirectDraw7_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1456 /*** added in IDirectDraw2 ***/
1457 #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
1458 /*** added in IDirectDraw4 ***/
1459 #define IDirectDraw7_GetSurfaceFromDC(p,a,b) ICOM_CALL2(GetSurfaceFromDC,p,a,b,c)
1460 #define IDirectDraw7_RestoreAllSurfaces(pc) ICOM_CALL (RestoreAllSurfaces,p)
1461 #define IDirectDraw7_TestCooperativeLevel(p) ICOM_CALL (TestCooperativeLevel,p)
1462 #define IDirectDraw7_GetDeviceIdentifier(p,a,b) ICOM_CALL2(GetDeviceIdentifier,p,a,b)
1463 /*** added in IDirectDraw 7 ***/
1464 #define IDirectDraw7_StartModeTest(p,a,b,c) ICOM_CALL3(StartModeTest,p,a,b,c)
1465 #define IDirectDraw7_EvaluateMode(p,a,b) ICOM_CALL2(EvaluateMode,p,a,b)
1468 /*****************************************************************************
1469 * IDirectDrawSurface interface
1471 #define ICOM_INTERFACE IDirectDrawSurface
1472 #define IDirectDrawSurface_METHODS \
1473 /*0c*/ ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE,lpDDSAttachedSurface) \
1474 /*10*/ ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1475 /*14*/ ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1476 /*18*/ ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1477 /*1c*/ ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1478 /*20*/ ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE,lpDDSAttachedSurface) \
1479 /*24*/ ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1480 /*28*/ ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1481 /*2c*/ ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1482 /*30*/ ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE*,lplpDDAttachedSurface) \
1483 /*34*/ ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1484 /*38*/ ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1485 /*3c*/ ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1486 /*40*/ ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1487 /*44*/ ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1488 /*48*/ ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1489 /*4c*/ ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1490 /*50*/ ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1491 /*54*/ ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1492 /*58*/ ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1493 /*5c*/ ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1494 /*60*/ ICOM_METHOD (HRESULT,IsLost) \
1495 /*64*/ ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1496 /*68*/ ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1497 /*6c*/ ICOM_METHOD (HRESULT,Restore) \
1498 /*70*/ ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1499 /*74*/ ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1500 /*78*/ ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1501 /*7c*/ ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1502 /*80*/ ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1503 /*84*/ ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1504 /*88*/ ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1505 /*8c*/ ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE,lpDDSReference)
1506 #define IDirectDrawSurface_IMETHODS \
1507 IUnknown_IMETHODS \
1508 IDirectDrawSurface_METHODS
1509 ICOM_DEFINE(IDirectDrawSurface,IUnknown)
1510 #undef ICOM_INTERFACE
1512 /*** IUnknown methods ***/
1513 #define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1514 #define IDirectDrawSurface_AddRef(p) ICOM_CALL (AddRef,p)
1515 #define IDirectDrawSurface_Release(p) ICOM_CALL (Release,p)
1516 /*** IDirectDrawSurface methods ***/
1517 #define IDirectDrawSurface_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1518 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1519 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1520 #define IDirectDrawSurface_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1521 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1522 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1523 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1524 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1525 #define IDirectDrawSurface_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1526 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1527 #define IDirectDrawSurface_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1528 #define IDirectDrawSurface_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1529 #define IDirectDrawSurface_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1530 #define IDirectDrawSurface_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1531 #define IDirectDrawSurface_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1532 #define IDirectDrawSurface_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1533 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1534 #define IDirectDrawSurface_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1535 #define IDirectDrawSurface_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1536 #define IDirectDrawSurface_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1537 #define IDirectDrawSurface_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1538 #define IDirectDrawSurface_IsLost(p) ICOM_CALL (IsLost,p)
1539 #define IDirectDrawSurface_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1540 #define IDirectDrawSurface_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1541 #define IDirectDrawSurface_Restore(p) ICOM_CALL (Restore,p)
1542 #define IDirectDrawSurface_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1543 #define IDirectDrawSurface_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1544 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1545 #define IDirectDrawSurface_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1546 #define IDirectDrawSurface_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1547 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1548 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1549 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1552 /*****************************************************************************
1553 * IDirectDrawSurface2 interface
1555 /* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
1556 * have been converted to LPDIRECTDRAWSURFACE2.
1558 #define ICOM_INTERFACE IDirectDrawSurface2
1559 #define IDirectDrawSurface2_METHODS \
1560 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE2,lpDDSAttachedSurface) \
1561 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1562 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE2,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1563 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1564 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE2,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1565 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE2,lpDDSAttachedSurface) \
1566 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1567 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1568 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE2,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1569 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE2*,lplpDDAttachedSurface) \
1570 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1571 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1572 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1573 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1574 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1575 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1576 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1577 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1578 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1579 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1580 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1581 ICOM_METHOD (HRESULT,IsLost) \
1582 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1583 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1584 ICOM_METHOD (HRESULT,Restore) \
1585 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1586 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1587 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1588 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1589 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1590 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE2,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1591 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1592 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE2,lpDDSReference) \
1593 /* added in v2 */ \
1594 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1595 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1596 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags)
1597 #define IDirectDrawSurface2_IMETHODS \
1598 IUnknown_IMETHODS \
1599 IDirectDrawSurface2_METHODS
1600 ICOM_DEFINE(IDirectDrawSurface2,IUnknown)
1601 #undef ICOM_INTERFACE
1603 /*** IUnknown methods ***/
1604 #define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1605 #define IDirectDrawSurface2_AddRef(p) ICOM_CALL (AddRef,p)
1606 #define IDirectDrawSurface2_Release(p) ICOM_CALL (Release,p)
1607 /*** IDirectDrawSurface methods (almost) ***/
1608 #define IDirectDrawSurface2_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1609 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1610 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1611 #define IDirectDrawSurface2_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1612 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1613 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1614 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1615 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1616 #define IDirectDrawSurface2_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1617 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1618 #define IDirectDrawSurface2_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1619 #define IDirectDrawSurface2_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1620 #define IDirectDrawSurface2_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1621 #define IDirectDrawSurface2_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1622 #define IDirectDrawSurface2_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1623 #define IDirectDrawSurface2_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1624 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1625 #define IDirectDrawSurface2_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1626 #define IDirectDrawSurface2_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1627 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1628 #define IDirectDrawSurface2_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1629 #define IDirectDrawSurface2_IsLost(p) ICOM_CALL (IsLost,p)
1630 #define IDirectDrawSurface2_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1631 #define IDirectDrawSurface2_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1632 #define IDirectDrawSurface2_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1633 #define IDirectDrawSurface2_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1634 #define IDirectDrawSurface2_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1635 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1636 #define IDirectDrawSurface2_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1637 #define IDirectDrawSurface2_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1638 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1639 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1640 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1641 /*** IDirectDrawSurface2 methods ***/
1642 #define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1643 #define IDirectDrawSurface2_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1644 #define IDirectDrawSurface2_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1647 /*****************************************************************************
1648 * IDirectDrawSurface3 interface
1650 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
1651 * have been converted to LPDIRECTDRAWSURFACE3.
1653 #define ICOM_INTERFACE IDirectDrawSurface3
1654 #define IDirectDrawSurface3_METHODS \
1655 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE3,lpDDSAttachedSurface) \
1656 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1657 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE3,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1658 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1659 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE3,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1660 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE3,lpDDSAttachedSurface) \
1661 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1662 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1663 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE3,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1664 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE3*,lplpDDAttachedSurface) \
1665 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1666 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1667 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1668 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1669 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1670 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1671 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1672 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1673 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1674 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1675 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1676 ICOM_METHOD (HRESULT,IsLost) \
1677 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1678 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1679 ICOM_METHOD (HRESULT,Restore) \
1680 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1681 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1682 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1683 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1684 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1685 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE3,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1686 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1687 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE3,lpDDSReference) \
1688 /* added in v2 */ \
1689 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1690 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1691 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1692 /* added in v3 */ \
1693 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC,lpDDSD, DWORD,dwFlags)
1694 #define IDirectDrawSurface3_IMETHODS \
1695 IUnknown_IMETHODS \
1696 IDirectDrawSurface3_METHODS
1697 ICOM_DEFINE(IDirectDrawSurface3,IUnknown)
1698 #undef ICOM_INTERFACE
1700 /*** IUnknown methods ***/
1701 #define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1702 #define IDirectDrawSurface3_AddRef(p) ICOM_CALL (AddRef,p)
1703 #define IDirectDrawSurface3_Release(p) ICOM_CALL (Release,p)
1704 /*** IDirectDrawSurface methods (almost) ***/
1705 #define IDirectDrawSurface3_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1706 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1707 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1708 #define IDirectDrawSurface3_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1709 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1710 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1711 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1712 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1713 #define IDirectDrawSurface3_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1714 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1715 #define IDirectDrawSurface3_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1716 #define IDirectDrawSurface3_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1717 #define IDirectDrawSurface3_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1718 #define IDirectDrawSurface3_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1719 #define IDirectDrawSurface3_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1720 #define IDirectDrawSurface3_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1721 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1722 #define IDirectDrawSurface3_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1723 #define IDirectDrawSurface3_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1724 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1725 #define IDirectDrawSurface3_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1726 #define IDirectDrawSurface3_IsLost(p) ICOM_CALL (IsLost,p)
1727 #define IDirectDrawSurface3_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1728 #define IDirectDrawSurface3_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1729 #define IDirectDrawSurface3_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1730 #define IDirectDrawSurface3_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1731 #define IDirectDrawSurface3_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1732 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1733 #define IDirectDrawSurface3_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1734 #define IDirectDrawSurface3_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1735 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1736 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1737 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1738 /*** IDirectDrawSurface2 methods ***/
1739 #define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1740 #define IDirectDrawSurface3_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1741 #define IDirectDrawSurface3_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1742 /*** IDirectDrawSurface3 methods ***/
1743 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL2(SetSurfaceDesc,p,a,b)
1746 /*****************************************************************************
1747 * IDirectDrawSurface4 interface
1749 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
1750 * have been converted to LPDIRECTDRAWSURFACE3.
1752 /* FIXME: I assumed IDirectDrawSurface4 does not inherit from IDirectDrawSurface3 but I
1753 * have actually not proof of that. Can someone check and remove this comment or patch
1754 * accordingly ?
1756 #define ICOM_INTERFACE IDirectDrawSurface4
1757 #define IDirectDrawSurface4_METHODS \
1758 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
1759 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1760 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE4,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1761 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1762 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE4,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1763 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
1764 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1765 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1766 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE4,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1767 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE4*,lplpDDAttachedSurface) \
1768 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1769 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1770 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1771 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1772 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1773 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1774 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1775 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1776 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1777 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1778 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1779 ICOM_METHOD (HRESULT,IsLost) \
1780 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1781 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1782 ICOM_METHOD (HRESULT,Restore) \
1783 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1784 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1785 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1786 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1787 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1788 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE4,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1789 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1790 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE4,lpDDSReference) \
1791 /* added in v2 */ \
1792 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1793 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1794 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1795 /* added in v3 */ \
1796 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC,lpDDSD, DWORD,dwFlags) \
1797 /* added in v4 */ \
1798 ICOM_METHOD4(HRESULT,SetPrivateData, REFGUID,, LPVOID,, DWORD,, DWORD,) \
1799 ICOM_METHOD3(HRESULT,GetPrivateData, REFGUID,, LPVOID,, LPDWORD,) \
1800 ICOM_METHOD1(HRESULT,FreePrivateData, REFGUID,) \
1801 ICOM_METHOD1(HRESULT,GetUniquenessValue, LPDWORD,) \
1802 ICOM_METHOD (HRESULT,ChangeUniquenessValue)
1803 #define IDirectDrawSurface4_IMETHODS \
1804 IUnknown_IMETHODS \
1805 IDirectDrawSurface4_METHODS
1806 ICOM_DEFINE(IDirectDrawSurface4,IUnknown)
1807 #undef ICOM_INTERFACE
1809 /*** IUnknown methods ***/
1810 #define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1811 #define IDirectDrawSurface4_AddRef(p) ICOM_CALL (AddRef,p)
1812 #define IDirectDrawSurface4_Release(p) ICOM_CALL (Release,p)
1813 /*** IDirectDrawSurface (almost) methods ***/
1814 #define IDirectDrawSurface4_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1815 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1816 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1817 #define IDirectDrawSurface4_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1818 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1819 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1820 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1821 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1822 #define IDirectDrawSurface4_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1823 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1824 #define IDirectDrawSurface4_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1825 #define IDirectDrawSurface4_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1826 #define IDirectDrawSurface4_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1827 #define IDirectDrawSurface4_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1828 #define IDirectDrawSurface4_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1829 #define IDirectDrawSurface4_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1830 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1831 #define IDirectDrawSurface4_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1832 #define IDirectDrawSurface4_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1833 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1834 #define IDirectDrawSurface4_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1835 #define IDirectDrawSurface4_IsLost(p) ICOM_CALL (IsLost,p)
1836 #define IDirectDrawSurface4_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1837 #define IDirectDrawSurface4_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1838 #define IDirectDrawSurface4_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1839 #define IDirectDrawSurface4_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1840 #define IDirectDrawSurface4_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1841 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1842 #define IDirectDrawSurface4_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1843 #define IDirectDrawSurface4_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1844 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1845 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1846 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1847 /*** IDirectDrawSurface2 methods ***/
1848 #define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1849 #define IDirectDrawSurface4_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1850 #define IDirectDrawSurface4_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1851 /*** IDirectDrawSurface3 methods ***/
1852 #define IDirectDrawSurface4_SetSurfaceDesc(p,a) ICOM_CALL(SetSurfaceDesc,p,a)
1853 /*** IDirectDrawSurface4 methods ***/
1854 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL4(SetPrivateData,p,a,b,c,d)
1855 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) ICOM_CALL3(GetPrivateData,p,a,b,c)
1856 #define IDirectDrawSurface4_FreePrivateData(p,a) ICOM_CALL1(FreePrivateData,p,a)
1857 #define IDirectDrawSurface4_GetUniquenessValue(p,a) ICOM_CALL1(GetUniquenessValue,p,a)
1858 #define IDirectDrawSurface4_ChangeUniquenessValue(p) ICOM_CALL (ChangeUniquenessValue,p)
1861 /*****************************************************************************
1862 * IDirectDrawSurface7 interface
1864 #define ICOM_INTERFACE IDirectDrawSurface7
1865 #define IDirectDrawSurface7_METHODS \
1866 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE7,lpDDSAttachedSurface) \
1867 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1868 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE7,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1869 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1870 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE7,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1871 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE7,lpDDSAttachedSurface) \
1872 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1873 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1874 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE7,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1875 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS2,lpDDSCaps, LPDIRECTDRAWSURFACE7*,lplpDDAttachedSurface) \
1876 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1877 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS2,lpDDSCaps) \
1878 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1879 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1880 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1881 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1882 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1883 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1884 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1885 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC2,lpDDSurfaceDesc) \
1886 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC2,lpDDSurfaceDesc) \
1887 ICOM_METHOD (HRESULT,IsLost) \
1888 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC2,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1889 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1890 ICOM_METHOD (HRESULT,Restore) \
1891 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1892 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1893 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1894 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1895 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1896 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE7,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1897 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1898 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE7,lpDDSReference) \
1899 /* added in v2 */ \
1900 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1901 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1902 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1903 /* added in v3 */ \
1904 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC2,lpDDSD, DWORD,dwFlags) \
1905 /* added in v4 */ \
1906 ICOM_METHOD4(HRESULT,SetPrivateData, REFGUID,, LPVOID,, DWORD,, DWORD,) \
1907 ICOM_METHOD3(HRESULT,GetPrivateData, REFGUID,, LPVOID,, LPDWORD,) \
1908 ICOM_METHOD1(HRESULT,FreePrivateData, REFGUID,) \
1909 ICOM_METHOD1(HRESULT,GetUniquenessValue, LPDWORD,) \
1910 ICOM_METHOD (HRESULT,ChangeUniquenessValue) \
1911 /* added in v7 */ \
1912 ICOM_METHOD1(HRESULT,SetPriority, DWORD,prio) \
1913 ICOM_METHOD1(HRESULT,GetPriority, LPDWORD,prio) \
1914 ICOM_METHOD1(HRESULT,SetLOD, DWORD,lod) \
1915 ICOM_METHOD1(HRESULT,GetLOD, LPDWORD,lod)
1916 #define IDirectDrawSurface7_IMETHODS \
1917 IUnknown_IMETHODS \
1918 IDirectDrawSurface7_METHODS
1919 ICOM_DEFINE(IDirectDrawSurface7,IUnknown)
1920 #undef ICOM_INTERFACE
1923 /*****************************************************************************
1924 * IDirectDrawColorControl interface
1926 #define ICOM_INTERFACE IDirectDrawColorControl
1927 #define IDirectDrawColorControl_METHODS \
1928 ICOM_METHOD1(HRESULT,GetColorControls, LPDDCOLORCONTROL,lpColorControl) \
1929 ICOM_METHOD1(HRESULT,SetColorControls, LPDDCOLORCONTROL,lpColorControl)
1930 #define IDirectDrawColorControl_IMETHODS \
1931 IUnknown_IMETHODS \
1932 IDirectDrawColorControl_METHODS
1933 ICOM_DEFINE(IDirectDrawColorControl,IUnknown)
1934 #undef ICOM_INTERFACE
1936 /*** IUnknown methods ***/
1937 #define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1938 #define IDirectDrawColorControl_AddRef(p) ICOM_CALL (AddRef,p)
1939 #define IDirectDrawColorControl_Release(p) ICOM_CALL (Release,p)
1940 /*** IDirectDrawColorControl methods ***/
1941 #define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL(GetColorControls,p,a)
1942 #define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL(SetColorControls,p,a)
1945 HRESULT WINAPI DirectDrawCreate(LPGUID,LPDIRECTDRAW*,LPUNKNOWN);
1946 HRESULT WINAPI DirectDrawCreateEx(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
1947 HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA,LPVOID);
1948 HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW,LPVOID);
1949 #define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
1950 HRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,LPUNKNOWN);
1952 #ifdef __cplusplus
1953 } /* extern "C" */
1954 #endif /* defined(__cplusplus) */
1956 #endif /* __WINE_DDRAW_H */