mfreadwrite/reader: Use current stream type to set up sample allocator.
[wine/zf.git] / include / ddraw.h
blob0c14c4681210ce4b8ab7c7f1305315254fd454d2
1 /*
2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __DDRAW_INCLUDED__
20 #define __DDRAW_INCLUDED__
22 #define COM_NO_WINDOWS_H
23 #include <objbase.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* defined(__cplusplus) */
29 #ifndef DIRECTDRAW_VERSION
30 #define DIRECTDRAW_VERSION 0x0700
31 #endif /* DIRECTDRAW_VERSION */
33 /*****************************************************************************
34 * Predeclare the interfaces
36 #ifndef __DDRAW_GUID_DEFINED__
37 DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
38 DEFINE_GUID( CLSID_DirectDraw7, 0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
39 DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
40 DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
41 DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
42 DEFINE_GUID( IID_IDirectDraw3, 0x618f8ad4,0x8b7a,0x11d0,0x8f,0xcc,0x0,0xc0,0x4f,0xd9,0x18,0x9d );
43 DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
44 DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
45 DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
46 DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
47 DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
48 DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
49 DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
50 DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
51 DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
52 DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
53 DEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
54 #endif
56 typedef struct IDirectDraw *LPDIRECTDRAW;
57 typedef struct IDirectDraw2 *LPDIRECTDRAW2;
58 typedef struct IDirectDraw3 *LPDIRECTDRAW3;
59 typedef struct IDirectDraw4 *LPDIRECTDRAW4;
60 typedef struct IDirectDraw7 *LPDIRECTDRAW7;
61 typedef struct IDirectDrawClipper *LPDIRECTDRAWCLIPPER;
62 typedef struct IDirectDrawPalette *LPDIRECTDRAWPALETTE;
63 typedef struct IDirectDrawSurface *LPDIRECTDRAWSURFACE;
64 typedef struct IDirectDrawSurface2 *LPDIRECTDRAWSURFACE2;
65 typedef struct IDirectDrawSurface3 *LPDIRECTDRAWSURFACE3;
66 typedef struct IDirectDrawSurface4 *LPDIRECTDRAWSURFACE4;
67 typedef struct IDirectDrawSurface7 *LPDIRECTDRAWSURFACE7;
68 typedef struct IDirectDrawColorControl *LPDIRECTDRAWCOLORCONTROL;
69 typedef struct IDirectDrawGammaControl *LPDIRECTDRAWGAMMACONTROL;
72 #define DDENUMRET_CANCEL 0
73 #define DDENUMRET_OK 1
75 #define DD_OK S_OK
76 #define DD_FALSE S_FALSE
79 #define _FACDD 0x876
80 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
82 #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
83 #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
84 #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
85 #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
86 #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
87 #define DDERR_GENERIC E_FAIL
88 #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
89 #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
90 #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
91 #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
92 #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
93 #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
94 #define DDERR_INVALIDPARAMS E_INVALIDARG
95 #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
96 #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
97 #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
98 #define DDERR_NO3D MAKE_DDHRESULT( 170 )
99 #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
100 #define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
101 #define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
102 #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
103 #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
104 #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
105 #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
106 #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
107 #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
108 #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
109 #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
110 #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
111 #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
112 #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
113 #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
114 #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
115 #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
116 #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
117 #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
118 #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
119 #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
120 #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
121 #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
122 #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
123 #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
124 #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
125 #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
126 #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
127 #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
128 #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
129 #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
130 #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
131 #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
132 #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
133 #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
134 #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
135 #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
136 #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
137 #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
138 #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
139 #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
140 #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
141 #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
142 #define DDERR_UNSUPPORTED E_NOTIMPL
143 #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
144 #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
145 #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
146 #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
147 #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
148 #define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
149 #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
150 #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
151 #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
152 #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
153 #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
154 #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
155 #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
156 #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
157 #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
158 #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
159 #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
160 #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
161 #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
162 #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
163 #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
164 #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
165 #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
166 #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
167 #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
168 #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
169 #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
170 #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
171 #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
172 #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
173 #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
174 #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
175 #define DDERR_NODC MAKE_DDHRESULT( 586 )
176 #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
177 #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
178 #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
179 #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
180 #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
181 #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
182 #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
183 #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
184 #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
185 #define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
186 #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
187 #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
188 #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
189 #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
190 #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
191 #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
192 #define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
193 #define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
194 #define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
195 #define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
196 #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
197 #define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
198 #define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
199 #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
200 #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
202 /* dwFlags for Blt* */
203 #define DDBLT_ALPHADEST 0x00000001
204 #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
205 #define DDBLT_ALPHADESTNEG 0x00000004
206 #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
207 #define DDBLT_ALPHAEDGEBLEND 0x00000010
208 #define DDBLT_ALPHASRC 0x00000020
209 #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
210 #define DDBLT_ALPHASRCNEG 0x00000080
211 #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
212 #define DDBLT_ASYNC 0x00000200
213 #define DDBLT_COLORFILL 0x00000400
214 #define DDBLT_DDFX 0x00000800
215 #define DDBLT_DDROPS 0x00001000
216 #define DDBLT_KEYDEST 0x00002000
217 #define DDBLT_KEYDESTOVERRIDE 0x00004000
218 #define DDBLT_KEYSRC 0x00008000
219 #define DDBLT_KEYSRCOVERRIDE 0x00010000
220 #define DDBLT_ROP 0x00020000
221 #define DDBLT_ROTATIONANGLE 0x00040000
222 #define DDBLT_ZBUFFER 0x00080000
223 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
224 #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
225 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
226 #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
227 #define DDBLT_WAIT 0x01000000
228 #define DDBLT_DEPTHFILL 0x02000000
229 #define DDBLT_DONOTWAIT 0x08000000
230 #define DDBLT_PRESENTATION 0x10000000
231 #define DDBLT_LAST_PRESENTATION 0x20000000
232 #define DDBLT_EXTENDED_FLAGS 0x40000000
233 #define DDBLT_EXTENDED_LINEAR_CONTENT 0x00000004
235 /* dwTrans for BltFast */
236 #define DDBLTFAST_NOCOLORKEY 0x00000000
237 #define DDBLTFAST_SRCCOLORKEY 0x00000001
238 #define DDBLTFAST_DESTCOLORKEY 0x00000002
239 #define DDBLTFAST_WAIT 0x00000010
240 #define DDBLTFAST_DONOTWAIT 0x00000020
242 /* dwFlags for Flip */
243 #define DDFLIP_WAIT 0x00000001
244 #define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
245 #define DDFLIP_ODD 0x00000004 /* only valid for overlay */
246 #define DDFLIP_NOVSYNC 0x00000008
247 #define DDFLIP_STEREO 0x00000010
248 #define DDFLIP_DONOTWAIT 0x00000020
249 #define DDFLIP_INTERVAL2 0x02000000
250 #define DDFLIP_INTERVAL3 0x03000000
251 #define DDFLIP_INTERVAL4 0x04000000
254 /* dwFlags for GetBltStatus */
255 #define DDGBS_CANBLT 0x00000001
256 #define DDGBS_ISBLTDONE 0x00000002
258 /* dwFlags for IDirectDrawSurface7::GetFlipStatus */
259 #define DDGFS_CANFLIP __MSABI_LONG(1)
260 #define DDGFS_ISFLIPDONE __MSABI_LONG(2)
262 /* dwFlags for IDirectDrawSurface7::SetPrivateData */
263 #define DDSPD_IUNKNOWNPOINTER __MSABI_LONG(1)
264 #define DDSPD_VOLATILE __MSABI_LONG(2)
266 /* DDSCAPS.dwCaps */
267 /* reserved1, was 3d capable */
268 #define DDSCAPS_RESERVED1 0x00000001
269 /* surface contains alpha information */
270 #define DDSCAPS_ALPHA 0x00000002
271 /* this surface is a backbuffer */
272 #define DDSCAPS_BACKBUFFER 0x00000004
273 /* complex surface structure */
274 #define DDSCAPS_COMPLEX 0x00000008
275 /* part of surface flipping structure */
276 #define DDSCAPS_FLIP 0x00000010
277 /* this surface is the frontbuffer surface */
278 #define DDSCAPS_FRONTBUFFER 0x00000020
279 /* this is a plain offscreen surface */
280 #define DDSCAPS_OFFSCREENPLAIN 0x00000040
281 /* overlay */
282 #define DDSCAPS_OVERLAY 0x00000080
283 /* palette objects can be created and attached to us */
284 #define DDSCAPS_PALETTE 0x00000100
285 /* primary surface (the one the user looks at currently)(right eye)*/
286 #define DDSCAPS_PRIMARYSURFACE 0x00000200
287 /* primary surface for left eye */
288 #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
289 /* surface exists in systemmemory */
290 #define DDSCAPS_SYSTEMMEMORY 0x00000800
291 /* surface can be used as a texture */
292 #define DDSCAPS_TEXTURE 0x00001000
293 /* surface may be destination for 3d rendering */
294 #define DDSCAPS_3DDEVICE 0x00002000
295 /* surface exists in videomemory */
296 #define DDSCAPS_VIDEOMEMORY 0x00004000
297 /* surface changes immediately visible */
298 #define DDSCAPS_VISIBLE 0x00008000
299 /* write only surface */
300 #define DDSCAPS_WRITEONLY 0x00010000
301 /* zbuffer surface */
302 #define DDSCAPS_ZBUFFER 0x00020000
303 /* has its own DC */
304 #define DDSCAPS_OWNDC 0x00040000
305 /* surface should be able to receive live video */
306 #define DDSCAPS_LIVEVIDEO 0x00080000
307 /* should be able to have a hw codec decompress stuff into it */
308 #define DDSCAPS_HWCODEC 0x00100000
309 /* mode X (320x200 or 320x240) surface */
310 #define DDSCAPS_MODEX 0x00200000
311 /* one mipmap surface (1 level) */
312 #define DDSCAPS_MIPMAP 0x00400000
313 #define DDSCAPS_RESERVED2 0x00800000
314 /* memory allocation delayed until Load() */
315 #define DDSCAPS_ALLOCONLOAD 0x04000000
316 /* Indicates that the surface will receive data from a video port */
317 #define DDSCAPS_VIDEOPORT 0x08000000
318 /* surface is in local videomemory */
319 #define DDSCAPS_LOCALVIDMEM 0x10000000
320 /* surface is in nonlocal videomemory */
321 #define DDSCAPS_NONLOCALVIDMEM 0x20000000
322 /* surface is a standard VGA mode surface (NOT ModeX) */
323 #define DDSCAPS_STANDARDVGAMODE 0x40000000
324 /* optimized? surface */
325 #define DDSCAPS_OPTIMIZED 0x80000000
327 typedef struct _DDSCAPS {
328 DWORD dwCaps; /* capabilities of surface wanted */
329 } DDSCAPS,*LPDDSCAPS;
331 /* DDSCAPS2.dwCaps2 */
332 /* indicates the surface will receive data from a video port using
333 deinterlacing hardware. */
334 #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002
335 /* indicates the surface will be locked very frequently. */
336 #define DDSCAPS2_HINTDYNAMIC 0x00000004
337 /* indicates surface can be re-ordered or retiled on load() */
338 #define DDSCAPS2_HINTSTATIC 0x00000008
339 /* indicates surface to be managed by directdraw/direct3D */
340 #define DDSCAPS2_TEXTUREMANAGE 0x00000010
341 /* reserved bits */
342 #define DDSCAPS2_RESERVED1 0x00000020
343 #define DDSCAPS2_RESERVED2 0x00000040
344 /* indicates surface will never be locked again */
345 #define DDSCAPS2_OPAQUE 0x00000080
346 /* set at CreateSurface() time to indicate antialiasing will be used */
347 #define DDSCAPS2_HINTANTIALIASING 0x00000100
348 /* set at CreateSurface() time to indicate cubic environment map */
349 #define DDSCAPS2_CUBEMAP 0x00000200
350 /* face flags for cube maps */
351 #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
352 #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
353 #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
354 #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
355 #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
356 #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
357 /* specifies all faces of a cube for CreateSurface() */
358 #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
359 DDSCAPS2_CUBEMAP_NEGATIVEX |\
360 DDSCAPS2_CUBEMAP_POSITIVEY |\
361 DDSCAPS2_CUBEMAP_NEGATIVEY |\
362 DDSCAPS2_CUBEMAP_POSITIVEZ |\
363 DDSCAPS2_CUBEMAP_NEGATIVEZ )
364 /* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */
365 #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000
366 /* indicates texture surface to be managed by Direct3D *only* */
367 #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000
368 /* indicates managed surface that can safely be lost */
369 #define DDSCAPS2_DONOTPERSIST 0x00040000
370 /* indicates surface is part of a stereo flipping chain */
371 #define DDSCAPS2_STEREOSURFACELEFT 0x00080000
372 #define DDSCAPS2_VOLUME 0x00200000
373 #define DDSCAPS2_NOTUSERLOCKABLE 0x00400000
374 #define DDSCAPS2_POINTS 0x00800000
375 #define DDSCAPS2_RTPATCHES 0x01000000
376 #define DDSCAPS2_NPATCHES 0x02000000
377 #define DDSCAPS2_RESERVED3 0x04000000
378 #define DDSCAPS2_DISCARDBACKBUFFER 0x10000000
379 #define DDSCAPS2_ENABLEALPHACHANNEL 0x20000000
380 #define DDSCAPS2_EXTENDEDFORMATPRIMARY 0x40000000
381 #define DDSCAPS2_ADDITIONALPRIMARY 0x80000000
383 /* DDSCAPS2.dwCaps3 */
384 #define DDSCAPS3_MULTISAMPLE_MASK 0x0000001f
385 #define DDSCAPS3_MULTISAMPLE_QUALITY_MASK 0x000000e0
386 #define DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT 5
387 #define DDSCAPS3_RESERVED1 0x00000100
388 #define DDSCAPS3_RESERVED2 0x00000200
389 #define DDSCAPS3_LIGHTWEIGHTMIPMAP 0x00000400
390 #define DDSCAPS3_AUTOGENMIPMAP 0x00000800
391 #define DDSCAPS3_DMAP 0x00001000
392 #ifndef D3D_DISABLE_9EX
393 #define DDSCAPS3_CREATESHAREDRESOURCE 0x00002000
394 #define DDSCAPS3_READONLYRESOURCE 0x00004000
395 #define DDSCAPS3_OPENSHAREDRESOURCE 0x00008000
396 #endif /* !D3D_DISABLE_9EX */
398 typedef struct _DDSCAPS2 {
399 DWORD dwCaps; /* capabilities of surface wanted */
400 DWORD dwCaps2; /* additional capabilities */
401 DWORD dwCaps3; /* reserved capabilities */
402 union {
403 DWORD dwCaps4; /* more reserved capabilities */
404 DWORD dwVolumeDepth;
405 } DUMMYUNIONNAME1;
406 } DDSCAPS2,*LPDDSCAPS2;
408 #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
410 typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */
412 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
413 DWORD dwCaps; /* driver specific capabilities */
414 DWORD dwCaps2; /* more driver specific capabilities */
415 DWORD dwCKeyCaps; /* color key capabilities of the surface */
416 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
417 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
418 DWORD dwPalCaps; /* palette capabilities */
419 DWORD dwSVCaps; /* stereo vision capabilities */
420 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
421 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
422 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
423 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
424 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
425 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
426 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
427 DWORD dwVidMemTotal; /* total amount of video memory */
428 DWORD dwVidMemFree; /* amount of free video memory */
429 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
430 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
431 DWORD dwNumFourCCCodes; /* number of four cc codes */
432 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
433 DWORD dwAlignSizeSrc; /* source rectangle byte size */
434 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
435 DWORD dwAlignSizeDest; /* dest rectangle byte size */
436 DWORD dwAlignStrideAlign; /* stride alignment */
437 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
438 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
439 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
440 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
441 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
442 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
443 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
444 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
445 DWORD dwReserved1;
446 DWORD dwReserved2;
447 DWORD dwReserved3;
448 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
449 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
450 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
451 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
452 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
453 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
454 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
455 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
456 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
457 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
458 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
459 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
460 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
461 DWORD dwCurrVideoPorts; /* current number of video ports used */
462 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
463 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
464 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
465 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
466 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
467 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
468 DDSCAPS2 ddsCaps; /* surface capabilities */
469 } DDCAPS_DX7,*LPDDCAPS_DX7;
471 typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */
473 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
474 DWORD dwCaps; /* driver specific capabilities */
475 DWORD dwCaps2; /* more driver specific capabilities */
476 DWORD dwCKeyCaps; /* color key capabilities of the surface */
477 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
478 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
479 DWORD dwPalCaps; /* palette capabilities */
480 DWORD dwSVCaps; /* stereo vision capabilities */
481 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
482 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
483 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
484 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
485 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
486 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
487 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
488 DWORD dwVidMemTotal; /* total amount of video memory */
489 DWORD dwVidMemFree; /* amount of free video memory */
490 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
491 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
492 DWORD dwNumFourCCCodes; /* number of four cc codes */
493 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
494 DWORD dwAlignSizeSrc; /* source rectangle byte size */
495 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
496 DWORD dwAlignSizeDest; /* dest rectangle byte size */
497 DWORD dwAlignStrideAlign; /* stride alignment */
498 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
499 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
500 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
501 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
502 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
503 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
504 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
505 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
506 DWORD dwReserved1;
507 DWORD dwReserved2;
508 DWORD dwReserved3;
509 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
510 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
511 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
512 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
513 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
514 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
515 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
516 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
517 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
518 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
519 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
520 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
521 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
522 DWORD dwCurrVideoPorts; /* current number of video ports used */
523 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
524 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
525 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
526 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
527 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
528 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
529 /* and one new member for DirectX 6 */
530 DDSCAPS2 ddsCaps; /* surface capabilities */
531 } DDCAPS_DX6,*LPDDCAPS_DX6;
533 typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */
535 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
536 DWORD dwCaps; /* driver specific capabilities */
537 DWORD dwCaps2; /* more driver specific capabilities */
538 DWORD dwCKeyCaps; /* color key capabilities of the surface */
539 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
540 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
541 DWORD dwPalCaps; /* palette capabilities */
542 DWORD dwSVCaps; /* stereo vision capabilities */
543 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
544 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
545 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
546 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
547 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
548 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
549 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
550 DWORD dwVidMemTotal; /* total amount of video memory */
551 DWORD dwVidMemFree; /* amount of free video memory */
552 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
553 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
554 DWORD dwNumFourCCCodes; /* number of four cc codes */
555 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
556 DWORD dwAlignSizeSrc; /* source rectangle byte size */
557 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
558 DWORD dwAlignSizeDest; /* dest rectangle byte size */
559 DWORD dwAlignStrideAlign; /* stride alignment */
560 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
561 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
562 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
563 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
564 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
565 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
566 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
567 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
568 DWORD dwReserved1;
569 DWORD dwReserved2;
570 DWORD dwReserved3;
571 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
572 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
573 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
574 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
575 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
576 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
577 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
578 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
579 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
580 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
581 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
582 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
583 /* the following are the new DirectX 5 members */
584 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
585 DWORD dwCurrVideoPorts; /* current number of video ports used */
586 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
587 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
588 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
589 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
590 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
591 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
592 } DDCAPS_DX5,*LPDDCAPS_DX5;
594 typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */
596 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
597 DWORD dwCaps; /* driver specific capabilities */
598 DWORD dwCaps2; /* more driver specific capabilities */
599 DWORD dwCKeyCaps; /* color key capabilities of the surface */
600 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
601 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
602 DWORD dwPalCaps; /* palette capabilities */
603 DWORD dwSVCaps; /* stereo vision capabilities */
604 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
605 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
606 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
607 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
608 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
609 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
610 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
611 DWORD dwVidMemTotal; /* total amount of video memory */
612 DWORD dwVidMemFree; /* amount of free video memory */
613 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
614 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
615 DWORD dwNumFourCCCodes; /* number of four cc codes */
616 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
617 DWORD dwAlignSizeSrc; /* source rectangle byte size */
618 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
619 DWORD dwAlignSizeDest; /* dest rectangle byte size */
620 DWORD dwAlignStrideAlign; /* stride alignment */
621 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
622 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
623 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
624 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
625 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
626 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
627 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
628 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
629 DWORD dwReserved1;
630 DWORD dwReserved2;
631 DWORD dwReserved3;
632 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
633 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
634 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
635 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
636 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
637 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
638 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
639 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
640 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
641 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
642 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
643 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
644 DWORD dwReserved4;
645 DWORD dwReserved5;
646 DWORD dwReserved6;
647 } DDCAPS_DX3,*LPDDCAPS_DX3;
649 /* set caps struct according to DIRECTDRAW_VERSION */
651 #if DIRECTDRAW_VERSION <= 0x300
652 typedef DDCAPS_DX3 DDCAPS;
653 #elif DIRECTDRAW_VERSION <= 0x500
654 typedef DDCAPS_DX5 DDCAPS;
655 #elif DIRECTDRAW_VERSION <= 0x600
656 typedef DDCAPS_DX6 DDCAPS;
657 #else
658 typedef DDCAPS_DX7 DDCAPS;
659 #endif
661 typedef DDCAPS *LPDDCAPS;
663 /* DDCAPS.dwCaps */
664 #define DDCAPS_3D 0x00000001
665 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
666 #define DDCAPS_ALIGNSIZEDEST 0x00000004
667 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
668 #define DDCAPS_ALIGNSIZESRC 0x00000010
669 #define DDCAPS_ALIGNSTRIDE 0x00000020
670 #define DDCAPS_BLT 0x00000040
671 #define DDCAPS_BLTQUEUE 0x00000080
672 #define DDCAPS_BLTFOURCC 0x00000100
673 #define DDCAPS_BLTSTRETCH 0x00000200
674 #define DDCAPS_GDI 0x00000400
675 #define DDCAPS_OVERLAY 0x00000800
676 #define DDCAPS_OVERLAYCANTCLIP 0x00001000
677 #define DDCAPS_OVERLAYFOURCC 0x00002000
678 #define DDCAPS_OVERLAYSTRETCH 0x00004000
679 #define DDCAPS_PALETTE 0x00008000
680 #define DDCAPS_PALETTEVSYNC 0x00010000
681 #define DDCAPS_READSCANLINE 0x00020000
682 #define DDCAPS_STEREOVIEW 0x00040000
683 #define DDCAPS_VBI 0x00080000
684 #define DDCAPS_ZBLTS 0x00100000
685 #define DDCAPS_ZOVERLAYS 0x00200000
686 #define DDCAPS_COLORKEY 0x00400000
687 #define DDCAPS_ALPHA 0x00800000
688 #define DDCAPS_COLORKEYHWASSIST 0x01000000
689 #define DDCAPS_NOHARDWARE 0x02000000
690 #define DDCAPS_BLTCOLORFILL 0x04000000
691 #define DDCAPS_BANKSWITCHED 0x08000000
692 #define DDCAPS_BLTDEPTHFILL 0x10000000
693 #define DDCAPS_CANCLIP 0x20000000
694 #define DDCAPS_CANCLIPSTRETCHED 0x40000000
695 #define DDCAPS_CANBLTSYSMEM 0x80000000
697 /* DDCAPS.dwCaps2 */
698 #define DDCAPS2_CERTIFIED 0x00000001
699 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
700 #define DDCAPS2_VIDEOPORT 0x00000004
701 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
702 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
703 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
704 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
705 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
706 #define DDCAPS2_CANDROPZ16BIT 0x00000100
707 #define DDCAPS2_NONLOCALVIDMEM 0x00000200
708 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
709 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
710 #define DDCAPS2_WIDESURFACES 0x00001000
711 #define DDCAPS2_CANFLIPODDEVEN 0x00002000
712 #define DDCAPS2_CANBOBHARDWARE 0x00004000
713 #define DDCAPS2_COPYFOURCC 0x00008000
714 #define DDCAPS2_PRIMARYGAMMA 0x00020000
715 #define DDCAPS2_CANRENDERWINDOWED 0x00080000
716 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
717 #define DDCAPS2_FLIPINTERVAL 0x00200000
718 #define DDCAPS2_FLIPNOVSYNC 0x00400000
719 #define DDCAPS2_CANMANAGETEXTURE 0x00800000
720 #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
721 #define DDCAPS2_STEREO 0x02000000
722 #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
725 /* Set/Get Colour Key Flags */
726 #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
727 #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
728 #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
729 #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
730 #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
732 typedef struct _DDCOLORKEY
734 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
735 * be treated as Color Key, inclusive
737 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
738 * to be treated as Color Key, inclusive
740 } DDCOLORKEY,*LPDDCOLORKEY;
742 /* ddCKEYCAPS bits */
743 #define DDCKEYCAPS_DESTBLT 0x00000001
744 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
745 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
746 #define DDCKEYCAPS_DESTBLTYUV 0x00000008
747 #define DDCKEYCAPS_DESTOVERLAY 0x00000010
748 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
749 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
750 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
751 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
752 #define DDCKEYCAPS_SRCBLT 0x00000200
753 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
754 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
755 #define DDCKEYCAPS_SRCBLTYUV 0x00001000
756 #define DDCKEYCAPS_SRCOVERLAY 0x00002000
757 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
758 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
759 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
760 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
761 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
763 typedef struct _DDPIXELFORMAT {
764 DWORD dwSize; /* 0: size of structure */
765 DWORD dwFlags; /* 4: pixel format flags */
766 DWORD dwFourCC; /* 8: (FOURCC code) */
767 union {
768 DWORD dwRGBBitCount; /* C: how many bits per pixel */
769 DWORD dwYUVBitCount; /* C: how many bits per pixel */
770 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
771 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
772 DWORD dwLuminanceBitCount;
773 DWORD dwBumpBitCount;
774 DWORD dwPrivateFormatBitCount;
775 } DUMMYUNIONNAME1;
776 union {
777 DWORD dwRBitMask; /* 10: mask for red bit*/
778 DWORD dwYBitMask; /* 10: mask for Y bits*/
779 DWORD dwStencilBitDepth;
780 DWORD dwLuminanceBitMask;
781 DWORD dwBumpDuBitMask;
782 DWORD dwOperations;
783 } DUMMYUNIONNAME2;
784 union {
785 DWORD dwGBitMask; /* 14: mask for green bits*/
786 DWORD dwUBitMask; /* 14: mask for U bits*/
787 DWORD dwZBitMask;
788 DWORD dwBumpDvBitMask;
789 struct {
790 WORD wFlipMSTypes;
791 WORD wBltMSTypes;
792 } MultiSampleCaps;
793 } DUMMYUNIONNAME3;
794 union {
795 DWORD dwBBitMask; /* 18: mask for blue bits*/
796 DWORD dwVBitMask; /* 18: mask for V bits*/
797 DWORD dwStencilBitMask;
798 DWORD dwBumpLuminanceBitMask;
799 } DUMMYUNIONNAME4;
800 union {
801 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
802 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
803 DWORD dwLuminanceAlphaBitMask;
804 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
805 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
806 } DUMMYUNIONNAME5;
807 /* 20: next structure */
808 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
810 #ifndef MAKEFOURCC
811 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
812 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
813 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
814 #endif
816 /* DDCAPS.dwFXCaps */
817 #define DDFXCAPS_BLTALPHA 0x00000001
818 #define DDFXCAPS_OVERLAYALPHA 0x00000004
819 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
820 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
821 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
822 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
823 #define DDFXCAPS_BLTROTATION 0x00000100
824 #define DDFXCAPS_BLTROTATION90 0x00000200
825 #define DDFXCAPS_BLTSHRINKX 0x00000400
826 #define DDFXCAPS_BLTSHRINKXN 0x00000800
827 #define DDFXCAPS_BLTSHRINKY 0x00001000
828 #define DDFXCAPS_BLTSHRINKYN 0x00002000
829 #define DDFXCAPS_BLTSTRETCHX 0x00004000
830 #define DDFXCAPS_BLTSTRETCHXN 0x00008000
831 #define DDFXCAPS_BLTSTRETCHY 0x00010000
832 #define DDFXCAPS_BLTSTRETCHYN 0x00020000
833 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
834 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
835 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
836 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
837 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
838 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
839 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
840 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
841 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
842 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
843 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
844 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
846 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
848 /* DDCAPS.dwFXAlphaCaps */
849 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
850 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
851 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
852 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
853 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
854 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
855 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
856 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
857 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
858 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
860 /* DDCAPS.dwPalCaps */
861 #define DDPCAPS_4BIT 0x00000001
862 #define DDPCAPS_8BITENTRIES 0x00000002
863 #define DDPCAPS_8BIT 0x00000004
864 #define DDPCAPS_INITIALIZE 0x00000008
865 #define DDPCAPS_PRIMARYSURFACE 0x00000010
866 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
867 #define DDPCAPS_ALLOW256 0x00000040
868 #define DDPCAPS_VSYNC 0x00000080
869 #define DDPCAPS_1BIT 0x00000100
870 #define DDPCAPS_2BIT 0x00000200
871 #define DDPCAPS_ALPHA 0x00000400
873 /* DDCAPS.dwSVCaps */
874 /* the first 4 of these are now obsolete */
875 #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */
876 #define DDSVCAPS_RESERVED1 0x00000001
877 #define DDSVCAPS_RESERVED2 0x00000002
878 #define DDSVCAPS_RESERVED3 0x00000004
879 #define DDSVCAPS_RESERVED4 0x00000008
880 #else
881 #define DDSVCAPS_ENIGMA 0x00000001
882 #define DDSVCAPS_FLICKER 0x00000002
883 #define DDSVCAPS_REDBLUE 0x00000004
884 #define DDSVCAPS_SPLIT 0x00000008
885 #endif
886 #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
888 /* BitDepths */
889 #define DDBD_1 0x00004000
890 #define DDBD_2 0x00002000
891 #define DDBD_4 0x00001000
892 #define DDBD_8 0x00000800
893 #define DDBD_16 0x00000400
894 #define DDBD_24 0x00000200
895 #define DDBD_32 0x00000100
897 /* DDOVERLAYFX.dwDDFX */
898 #define DDOVERFX_ARITHSTRETCHY 0x00000001
899 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
900 #define DDOVERFX_MIRRORUPDOWN 0x00000004
902 /* UpdateOverlay flags */
903 #define DDOVER_ALPHADEST 0x00000001
904 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
905 #define DDOVER_ALPHADESTNEG 0x00000004
906 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
907 #define DDOVER_ALPHAEDGEBLEND 0x00000010
908 #define DDOVER_ALPHASRC 0x00000020
909 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
910 #define DDOVER_ALPHASRCNEG 0x00000080
911 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
912 #define DDOVER_HIDE 0x00000200
913 #define DDOVER_KEYDEST 0x00000400
914 #define DDOVER_KEYDESTOVERRIDE 0x00000800
915 #define DDOVER_KEYSRC 0x00001000
916 #define DDOVER_KEYSRCOVERRIDE 0x00002000
917 #define DDOVER_SHOW 0x00004000
918 #define DDOVER_ADDDIRTYRECT 0x00008000
919 #define DDOVER_REFRESHDIRTYRECTS 0x00010000
920 #define DDOVER_REFRESHALL 0x00020000
921 #define DDOVER_DDFX 0x00080000
922 #define DDOVER_AUTOFLIP 0x00100000
923 #define DDOVER_BOB 0x00200000
924 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000
925 #define DDOVER_INTERLEAVED 0x00800000
926 #define DDOVER_BOBHARDWARE 0x01000000
927 #define DDOVER_ARGBSCALEFACTORS 0x02000000
928 #define DDOVER_DEGRADEARGBSCALING 0x04000000
930 /* DDPIXELFORMAT.dwFlags */
931 #define DDPF_ALPHAPIXELS 0x00000001
932 #define DDPF_ALPHA 0x00000002
933 #define DDPF_FOURCC 0x00000004
934 #define DDPF_PALETTEINDEXED4 0x00000008
935 #define DDPF_PALETTEINDEXEDTO8 0x00000010
936 #define DDPF_PALETTEINDEXED8 0x00000020
937 #define DDPF_RGB 0x00000040
938 #define DDPF_COMPRESSED 0x00000080
939 #define DDPF_RGBTOYUV 0x00000100
940 #define DDPF_YUV 0x00000200
941 #define DDPF_ZBUFFER 0x00000400
942 #define DDPF_PALETTEINDEXED1 0x00000800
943 #define DDPF_PALETTEINDEXED2 0x00001000
944 #define DDPF_ZPIXELS 0x00002000
945 #define DDPF_STENCILBUFFER 0x00004000
946 #define DDPF_ALPHAPREMULT 0x00008000
947 #define DDPF_LUMINANCE 0x00020000
948 #define DDPF_BUMPLUMINANCE 0x00040000
949 #define DDPF_BUMPDUDV 0x00080000
951 /* SetCooperativeLevel dwFlags */
952 #define DDSCL_FULLSCREEN 0x00000001
953 #define DDSCL_ALLOWREBOOT 0x00000002
954 #define DDSCL_NOWINDOWCHANGES 0x00000004
955 #define DDSCL_NORMAL 0x00000008
956 #define DDSCL_EXCLUSIVE 0x00000010
957 #define DDSCL_ALLOWMODEX 0x00000040
958 #define DDSCL_SETFOCUSWINDOW 0x00000080
959 #define DDSCL_SETDEVICEWINDOW 0x00000100
960 #define DDSCL_CREATEDEVICEWINDOW 0x00000200
961 #define DDSCL_MULTITHREADED 0x00000400
962 #define DDSCL_FPUSETUP 0x00000800
963 #define DDSCL_FPUPRESERVE 0x00001000
966 /* DDSURFACEDESC.dwFlags */
967 #define DDSD_CAPS 0x00000001
968 #define DDSD_HEIGHT 0x00000002
969 #define DDSD_WIDTH 0x00000004
970 #define DDSD_PITCH 0x00000008
971 #define DDSD_BACKBUFFERCOUNT 0x00000020
972 #define DDSD_ZBUFFERBITDEPTH 0x00000040
973 #define DDSD_ALPHABITDEPTH 0x00000080
974 #define DDSD_LPSURFACE 0x00000800
975 #define DDSD_PIXELFORMAT 0x00001000
976 #define DDSD_CKDESTOVERLAY 0x00002000
977 #define DDSD_CKDESTBLT 0x00004000
978 #define DDSD_CKSRCOVERLAY 0x00008000
979 #define DDSD_CKSRCBLT 0x00010000
980 #define DDSD_MIPMAPCOUNT 0x00020000
981 #define DDSD_REFRESHRATE 0x00040000
982 #define DDSD_LINEARSIZE 0x00080000
983 #define DDSD_TEXTURESTAGE 0x00100000
984 #define DDSD_FVF 0x00200000
985 #define DDSD_SRCVBHANDLE 0x00400000
986 #define DDSD_DEPTH 0x00800000
987 #define DDSD_ALL 0x00fff9ee
989 /* EnumSurfaces flags */
990 #define DDENUMSURFACES_ALL 0x00000001
991 #define DDENUMSURFACES_MATCH 0x00000002
992 #define DDENUMSURFACES_NOMATCH 0x00000004
993 #define DDENUMSURFACES_CANBECREATED 0x00000008
994 #define DDENUMSURFACES_DOESEXIST 0x00000010
996 /* SetDisplayMode flags */
997 #define DDSDM_STANDARDVGAMODE 0x00000001
999 /* EnumDisplayModes flags */
1000 #define DDEDM_REFRESHRATES 0x00000001
1001 #define DDEDM_STANDARDVGAMODES 0x00000002
1003 /* WaitForVerticalDisplay flags */
1005 #define DDWAITVB_BLOCKBEGIN 0x00000001
1006 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002
1007 #define DDWAITVB_BLOCKEND 0x00000004
1009 typedef struct _DDSURFACEDESC
1011 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
1012 DWORD dwFlags; /* 4: determines what fields are valid*/
1013 DWORD dwHeight; /* 8: height of surface to be created*/
1014 DWORD dwWidth; /* C: width of input surface*/
1015 union {
1016 LONG lPitch; /* 10: distance to start of next line (return value only)*/
1017 DWORD dwLinearSize;
1018 } DUMMYUNIONNAME1;
1019 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
1020 union {
1021 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
1022 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
1023 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
1024 } DUMMYUNIONNAME2;
1025 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
1026 DWORD dwReserved; /* 20:reserved*/
1027 void *lpSurface; /* 24:pointer to the associated surface memory*/
1028 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
1029 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
1030 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
1031 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
1032 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
1033 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
1034 } DDSURFACEDESC,*LPDDSURFACEDESC;
1036 typedef struct _DDSURFACEDESC2
1038 DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
1039 DWORD dwFlags; /* 4: determines what fields are valid*/
1040 DWORD dwHeight; /* 8: height of surface to be created*/
1041 DWORD dwWidth; /* C: width of input surface*/
1042 union {
1043 LONG lPitch; /*10: distance to start of next line (return value only)*/
1044 DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
1045 } DUMMYUNIONNAME1;
1046 union {
1047 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
1048 DWORD dwDepth;
1049 } DUMMYUNIONNAME5;
1050 union {
1051 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
1052 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
1053 DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
1054 } DUMMYUNIONNAME2;
1055 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
1056 DWORD dwReserved; /* 20:reserved*/
1057 void *lpSurface; /* 24:pointer to the associated surface memory*/
1058 union {
1059 DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
1060 DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
1061 } DUMMYUNIONNAME3;
1062 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
1063 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
1064 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
1066 union {
1067 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
1068 DWORD dwFVF; /* 48: vertex format description of vertex buffers */
1069 } DUMMYUNIONNAME4;
1070 DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
1071 DWORD dwTextureStage; /* 78: stage in multitexture cascade */
1072 } DDSURFACEDESC2,*LPDDSURFACEDESC2;
1074 /* DDCOLORCONTROL.dwFlags */
1075 #define DDCOLOR_BRIGHTNESS 0x00000001
1076 #define DDCOLOR_CONTRAST 0x00000002
1077 #define DDCOLOR_HUE 0x00000004
1078 #define DDCOLOR_SATURATION 0x00000008
1079 #define DDCOLOR_SHARPNESS 0x00000010
1080 #define DDCOLOR_GAMMA 0x00000020
1081 #define DDCOLOR_COLORENABLE 0x00000040
1083 typedef struct {
1084 DWORD dwSize;
1085 DWORD dwFlags;
1086 LONG lBrightness;
1087 LONG lContrast;
1088 LONG lHue;
1089 LONG lSaturation;
1090 LONG lSharpness;
1091 LONG lGamma;
1092 LONG lColorEnable;
1093 DWORD dwReserved1;
1094 } DDCOLORCONTROL,*LPDDCOLORCONTROL;
1096 typedef struct {
1097 WORD red[256];
1098 WORD green[256];
1099 WORD blue[256];
1100 } DDGAMMARAMP,*LPDDGAMMARAMP;
1102 typedef BOOL (CALLBACK *LPDDENUMCALLBACKA)(GUID *guid, char *driver_description, char *driver_name, void *ctx);
1103 typedef BOOL (CALLBACK *LPDDENUMCALLBACKW)(GUID *guid, WCHAR *driver_description, WCHAR *driver_name, void *ctx);
1104 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
1106 typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK)(DDSURFACEDESC *desc, void *ctx);
1107 typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK2)(DDSURFACEDESC2 *desc, void *ctx);
1108 typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK)(struct IDirectDrawSurface *surface,
1109 DDSURFACEDESC *surface_desc, void *ctx);
1110 typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK2)(struct IDirectDrawSurface4 *surface,
1111 DDSURFACEDESC2 *surface_desc, void *ctx);
1112 typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK7)(struct IDirectDrawSurface7 *surface,
1113 DDSURFACEDESC2 *surface_desc, void *ctx);
1115 typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXA)(GUID *guid, char *driver_description,
1116 char *driver_name, void *ctx, HMONITOR monitor);
1117 typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXW)(GUID *guid, WCHAR *driver_description,
1118 WCHAR *driver_name, void *ctx, HMONITOR monitor);
1119 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
1121 HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA cb, void *ctx);
1122 HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW cb, void *ctx);
1123 #define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
1125 HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA cb, void *ctx, DWORD flags);
1126 HRESULT WINAPI DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW cb, void *ctx, DWORD flags);
1127 #define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
1129 typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)(LPDDENUMCALLBACKEXA cb, void *ctx, DWORD flags);
1130 typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)(LPDDENUMCALLBACKEXW cb, void *ctx, DWORD flags);
1131 DECL_WINELIB_TYPE_AW(LPDIRECTDRAWENUMERATEEX)
1133 /* flags for DirectDrawEnumerateEx */
1134 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
1135 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
1136 #define DDENUM_NONDISPLAYDEVICES 0x00000004
1138 /* flags for DirectDrawCreate or IDirectDraw::Initialize */
1139 #define DDCREATE_HARDWAREONLY __MSABI_LONG(1)
1140 #define DDCREATE_EMULATIONONLY __MSABI_LONG(2)
1142 typedef struct _DDBLTFX
1144 DWORD dwSize; /* size of structure */
1145 DWORD dwDDFX; /* FX operations */
1146 DWORD dwROP; /* Win32 raster operations */
1147 DWORD dwDDROP; /* Raster operations new for DirectDraw */
1148 DWORD dwRotationAngle; /* Rotation angle for blt */
1149 DWORD dwZBufferOpCode; /* ZBuffer compares */
1150 DWORD dwZBufferLow; /* Low limit of Z buffer */
1151 DWORD dwZBufferHigh; /* High limit of Z buffer */
1152 DWORD dwZBufferBaseDest; /* Destination base value */
1153 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
1154 union
1156 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
1157 struct IDirectDrawSurface *lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
1158 } DUMMYUNIONNAME1;
1159 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
1160 union
1162 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
1163 struct IDirectDrawSurface *lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
1164 } DUMMYUNIONNAME2;
1165 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1166 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
1167 DWORD dwReserved;
1168 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1169 union
1171 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
1172 struct IDirectDrawSurface *lpDDSAlphaDest; /* Surface to use as Alpha Channel */
1173 } DUMMYUNIONNAME3;
1174 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1175 union
1177 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
1178 struct IDirectDrawSurface *lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
1179 } DUMMYUNIONNAME4;
1180 union
1182 DWORD dwFillColor; /* color in RGB or Palettized */
1183 DWORD dwFillDepth; /* depth value for z-buffer */
1184 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
1185 struct IDirectDrawSurface *lpDDSPattern; /* Surface to use as pattern */
1186 } DUMMYUNIONNAME5;
1187 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
1188 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
1189 } DDBLTFX,*LPDDBLTFX;
1191 /* dwDDFX */
1192 /* arithmetic stretching along y axis */
1193 #define DDBLTFX_ARITHSTRETCHY 0x00000001
1194 /* mirror on y axis */
1195 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
1196 /* mirror on x axis */
1197 #define DDBLTFX_MIRRORUPDOWN 0x00000004
1198 /* do not tear */
1199 #define DDBLTFX_NOTEARING 0x00000008
1200 /* 180 degrees clockwise rotation */
1201 #define DDBLTFX_ROTATE180 0x00000010
1202 /* 270 degrees clockwise rotation */
1203 #define DDBLTFX_ROTATE270 0x00000020
1204 /* 90 degrees clockwise rotation */
1205 #define DDBLTFX_ROTATE90 0x00000040
1206 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1207 #define DDBLTFX_ZBUFFERRANGE 0x00000080
1208 /* add dwZBufferBaseDest to every source z value before compare */
1209 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
1211 typedef struct _DDOVERLAYFX
1213 DWORD dwSize; /* size of structure */
1214 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1215 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
1216 DWORD dwReserved;
1217 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1218 union
1220 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
1221 struct IDirectDrawSurface *lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
1222 } DUMMYUNIONNAME1;
1223 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1224 union
1226 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
1227 struct IDirectDrawSurface *lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
1228 } DUMMYUNIONNAME2;
1229 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
1230 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
1231 DWORD dwDDFX; /* Overlay FX */
1232 DWORD dwFlags; /* flags */
1233 } DDOVERLAYFX,*LPDDOVERLAYFX;
1235 typedef struct _DDBLTBATCH
1237 RECT *lprDest;
1238 struct IDirectDrawSurface *lpDDSSrc;
1239 RECT *lprSrc;
1240 DWORD dwFlags;
1241 DDBLTFX *lpDDBltFx;
1242 } DDBLTBATCH,*LPDDBLTBATCH;
1244 #define MAX_DDDEVICEID_STRING 512
1246 #define DDGDI_GETHOSTIDENTIFIER 1
1248 typedef struct tagDDDEVICEIDENTIFIER {
1249 char szDriver[MAX_DDDEVICEID_STRING];
1250 char szDescription[MAX_DDDEVICEID_STRING];
1251 LARGE_INTEGER liDriverVersion;
1252 DWORD dwVendorId;
1253 DWORD dwDeviceId;
1254 DWORD dwSubSysId;
1255 DWORD dwRevision;
1256 GUID guidDeviceIdentifier;
1257 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
1259 typedef struct tagDDDEVICEIDENTIFIER2 {
1260 char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
1261 char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
1262 LARGE_INTEGER liDriverVersion; /* driver version */
1263 DWORD dwVendorId; /* vendor ID, zero if unknown */
1264 DWORD dwDeviceId; /* chipset ID, zero if unknown */
1265 DWORD dwSubSysId; /* board ID, zero if unknown */
1266 DWORD dwRevision; /* chipset version, zero if unknown */
1267 GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
1268 DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
1269 } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
1271 /*****************************************************************************
1272 * IDirectDrawPalette interface
1274 #undef INTERFACE
1275 #define INTERFACE IDirectDrawPalette
1276 DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
1278 /*** IUnknown methods ***/
1279 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1280 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1281 STDMETHOD_(ULONG,Release)(THIS) PURE;
1282 /*** IDirectDrawPalette methods ***/
1283 STDMETHOD(GetCaps)(THIS_ LPDWORD lpdwCaps) PURE;
1284 STDMETHOD(GetEntries)(THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE;
1285 STDMETHOD(Initialize)(THIS_ struct IDirectDraw *ddraw, DWORD flags, PALETTEENTRY *color_table) PURE;
1286 STDMETHOD(SetEntries)(THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE;
1288 #undef INTERFACE
1290 #if !defined(__cplusplus) || defined(CINTERFACE)
1291 /*** IUnknown methods ***/
1292 #define IDirectDrawPalette_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1293 #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
1294 #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
1295 /*** IDirectDrawPalette methods ***/
1296 #define IDirectDrawPalette_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
1297 #define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->lpVtbl->GetEntries(p,a,b,c,d)
1298 #define IDirectDrawPalette_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1299 #define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->lpVtbl->SetEntries(p,a,b,c,d)
1300 #else
1301 /*** IUnknown methods ***/
1302 #define IDirectDrawPalette_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1303 #define IDirectDrawPalette_AddRef(p) (p)->AddRef()
1304 #define IDirectDrawPalette_Release(p) (p)->Release()
1305 /*** IDirectDrawPalette methods ***/
1306 #define IDirectDrawPalette_GetCaps(p,a) (p)->GetCaps(a)
1307 #define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->GetEntries(a,b,c,d)
1308 #define IDirectDrawPalette_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1309 #define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->SetEntries(a,b,c,d)
1310 #endif
1313 /*****************************************************************************
1314 * IDirectDrawClipper interface
1316 #define INTERFACE IDirectDrawClipper
1317 DECLARE_INTERFACE_(IDirectDrawClipper,IUnknown)
1319 /*** IUnknown methods ***/
1320 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1321 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1322 STDMETHOD_(ULONG,Release)(THIS) PURE;
1323 /*** IDirectDrawClipper methods ***/
1324 STDMETHOD(GetClipList)(THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE;
1325 STDMETHOD(GetHWnd)(THIS_ HWND *lphWnd) PURE;
1326 STDMETHOD(Initialize)(THIS_ struct IDirectDraw *ddraw, DWORD flags) PURE;
1327 STDMETHOD(IsClipListChanged)(THIS_ BOOL *lpbChanged) PURE;
1328 STDMETHOD(SetClipList)(THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE;
1329 STDMETHOD(SetHWnd)(THIS_ DWORD dwFlags, HWND hWnd) PURE;
1331 #undef INTERFACE
1333 #if !defined(__cplusplus) || defined(CINTERFACE)
1334 /*** IUnknown methods ***/
1335 #define IDirectDrawClipper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1336 #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
1337 #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
1338 /*** IDirectDrawClipper methods ***/
1339 #define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->lpVtbl->GetClipList(p,a,b,c)
1340 #define IDirectDrawClipper_GetHWnd(p,a) (p)->lpVtbl->GetHWnd(p,a)
1341 #define IDirectDrawClipper_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1342 #define IDirectDrawClipper_IsClipListChanged(p,a) (p)->lpVtbl->IsClipListChanged(p,a)
1343 #define IDirectDrawClipper_SetClipList(p,a,b) (p)->lpVtbl->SetClipList(p,a,b)
1344 #define IDirectDrawClipper_SetHWnd(p,a,b) (p)->lpVtbl->SetHWnd(p,a,b)
1345 #else
1346 /*** IUnknown methods ***/
1347 #define IDirectDrawClipper_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1348 #define IDirectDrawClipper_AddRef(p) (p)->AddRef()
1349 #define IDirectDrawClipper_Release(p) (p)->Release()
1350 /*** IDirectDrawClipper methods ***/
1351 #define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->GetClipList(a,b,c)
1352 #define IDirectDrawClipper_GetHWnd(p,a) (p)->GetHWnd(a)
1353 #define IDirectDrawClipper_Initialize(p,a,b) (p)->Initialize(a,b)
1354 #define IDirectDrawClipper_IsClipListChanged(p,a) (p)->IsClipListChanged(a)
1355 #define IDirectDrawClipper_SetClipList(p,a,b) (p)->SetClipList(a,b)
1356 #define IDirectDrawClipper_SetHWnd(p,a,b) (p)->SetHWnd(a,b)
1357 #endif
1360 /*****************************************************************************
1361 * IDirectDraw interface
1363 #define INTERFACE IDirectDraw
1364 DECLARE_INTERFACE_(IDirectDraw,IUnknown)
1366 /*** IUnknown methods ***/
1367 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1368 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1369 STDMETHOD_(ULONG,Release)(THIS) PURE;
1370 /*** IDirectDraw methods ***/
1371 STDMETHOD(Compact)(THIS) PURE;
1372 STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1373 STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1374 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1375 STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1376 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1377 STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1378 struct IDirectDrawSurface **dst_surface) PURE;
1379 STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1380 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1381 STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1382 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1383 STDMETHOD(FlipToGDISurface)(THIS) PURE;
1384 STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1385 STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1386 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1387 STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1388 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1389 STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1390 STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1391 STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1392 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1393 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1394 STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP) PURE;
1395 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1397 #undef INTERFACE
1399 #if !defined(__cplusplus) || defined(CINTERFACE)
1400 /*** IUnknown methods ***/
1401 #define IDirectDraw_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1402 #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
1403 #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
1404 /*** IDirectDraw methods ***/
1405 #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
1406 #define IDirectDraw_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1407 #define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1408 #define IDirectDraw_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1409 #define IDirectDraw_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1410 #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1411 #define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1412 #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1413 #define IDirectDraw_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1414 #define IDirectDraw_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1415 #define IDirectDraw_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1416 #define IDirectDraw_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1417 #define IDirectDraw_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1418 #define IDirectDraw_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1419 #define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1420 #define IDirectDraw_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1421 #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1422 #define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1423 #define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->lpVtbl->SetDisplayMode(p,a,b,c)
1424 #define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1425 #else
1426 /*** IUnknown methods ***/
1427 #define IDirectDraw_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1428 #define IDirectDraw_AddRef(p) (p)->AddRef()
1429 #define IDirectDraw_Release(p) (p)->Release()
1430 /*** IDirectDraw methods ***/
1431 #define IDirectDraw_Compact(p) (p)->Compact()
1432 #define IDirectDraw_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1433 #define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1434 #define IDirectDraw_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1435 #define IDirectDraw_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1436 #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1437 #define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1438 #define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
1439 #define IDirectDraw_GetCaps(p,a,b) (p)->GetCaps(a,b)
1440 #define IDirectDraw_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1441 #define IDirectDraw_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1442 #define IDirectDraw_GetGDISurface(p,a) (p)->GetGDISurface(a)
1443 #define IDirectDraw_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1444 #define IDirectDraw_GetScanLine(p,a) (p)->GetScanLine(a)
1445 #define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1446 #define IDirectDraw_Initialize(p,a) (p)->Initialize(a)
1447 #define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1448 #define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1449 #define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->SetDisplayMode(a,b,c)
1450 #define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1451 #endif
1454 /* flags for Lock() */
1455 #define DDLOCK_SURFACEMEMORYPTR __MSABI_LONG(0x00000000)
1456 #define DDLOCK_WAIT __MSABI_LONG(0x00000001)
1457 #define DDLOCK_EVENT __MSABI_LONG(0x00000002)
1458 #define DDLOCK_READONLY __MSABI_LONG(0x00000010)
1459 #define DDLOCK_WRITEONLY __MSABI_LONG(0x00000020)
1460 #define DDLOCK_NOSYSLOCK __MSABI_LONG(0x00000800)
1461 #define DDLOCK_NOOVERWRITE __MSABI_LONG(0x00001000)
1462 #define DDLOCK_DISCARDCONTENTS __MSABI_LONG(0x00002000)
1463 #define DDLOCK_OKTOSWAP __MSABI_LONG(0x00002000)
1464 #define DDLOCK_DONOTWAIT __MSABI_LONG(0x00004000)
1465 #define DDLOCK_HASVOLUMETEXTUREBOXRECT __MSABI_LONG(0x00008000)
1466 #define DDLOCK_NODIRTYUPDATE __MSABI_LONG(0x00010000)
1469 /*****************************************************************************
1470 * IDirectDraw2 interface
1472 /* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
1473 * arguments of SetDisplayMode has changed !
1475 #define INTERFACE IDirectDraw2
1476 DECLARE_INTERFACE_(IDirectDraw2,IUnknown)
1478 /*** IUnknown methods ***/
1479 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1480 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1481 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1482 /*** IDirectDraw2 methods ***/
1483 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1484 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1485 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1486 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1487 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1488 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1489 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1490 struct IDirectDrawSurface **dst_surface) PURE;
1491 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1492 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1493 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1494 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1495 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1496 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1497 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1498 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1499 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1500 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1501 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1502 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1503 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1504 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1505 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1506 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1507 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1508 /* added in v2 */
1509 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS *caps, DWORD *total, DWORD *free) PURE;
1511 #undef INTERFACE
1513 #if !defined(__cplusplus) || defined(CINTERFACE)
1514 /*** IUnknown methods ***/
1515 #define IDirectDraw2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1516 #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
1517 #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
1518 /*** IDirectDraw methods ***/
1519 #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
1520 #define IDirectDraw2_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1521 #define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1522 #define IDirectDraw2_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1523 #define IDirectDraw2_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1524 #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1525 #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1526 #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1527 #define IDirectDraw2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1528 #define IDirectDraw2_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1529 #define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1530 #define IDirectDraw2_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1531 #define IDirectDraw2_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1532 #define IDirectDraw2_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1533 #define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1534 #define IDirectDraw2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1535 #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1536 #define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1537 #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1538 #define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1539 /*** IDirectDraw2 methods ***/
1540 #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1541 #else
1542 /*** IUnknown methods ***/
1543 #define IDirectDraw2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1544 #define IDirectDraw2_AddRef(p) (p)->AddRef()
1545 #define IDirectDraw2_Release(p) (p)->Release()
1546 /*** IDirectDraw methods ***/
1547 #define IDirectDraw2_Compact(p) (p)->Compact()
1548 #define IDirectDraw2_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1549 #define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1550 #define IDirectDraw2_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1551 #define IDirectDraw2_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1552 #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1553 #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1554 #define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
1555 #define IDirectDraw2_GetCaps(p,a,b) (p)->GetCaps(a,b)
1556 #define IDirectDraw2_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1557 #define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1558 #define IDirectDraw2_GetGDISurface(p,a) (p)->GetGDISurface(a)
1559 #define IDirectDraw2_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1560 #define IDirectDraw2_GetScanLine(p,a) (p)->GetScanLine(a)
1561 #define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1562 #define IDirectDraw2_Initialize(p,a) (p)->Initialize(a)
1563 #define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1564 #define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1565 #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1566 #define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1567 /*** IDirectDraw2 methods ***/
1568 #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1569 #endif
1572 /*****************************************************************************
1573 * IDirectDraw3 interface
1575 #define INTERFACE IDirectDraw3
1576 DECLARE_INTERFACE_(IDirectDraw3,IUnknown)
1578 /*** IUnknown methods ***/
1579 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1580 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1581 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1582 /*** IDirectDraw2 methods ***/
1583 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1584 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1585 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1586 IDirectDrawPalette **lplpDDPalette, IUnknown *outer) PURE;
1587 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1588 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1589 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1590 struct IDirectDrawSurface **dst_surface) PURE;
1591 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1592 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1593 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1594 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1595 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1596 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1597 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1598 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1599 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1600 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1601 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1602 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1603 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1604 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1605 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1606 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1607 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1608 /* added in v2 */
1609 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS *caps, DWORD *total, DWORD *free) PURE;
1610 /* added in v3 */
1611 /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface **surface) PURE;
1613 #undef INTERFACE
1615 #if !defined(__cplusplus) || defined(CINTERFACE)
1616 /*** IUnknown methods ***/
1617 #define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1618 #define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p)
1619 #define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p)
1620 /*** IDirectDraw methods ***/
1621 #define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p)
1622 #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1623 #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1624 #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1625 #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1626 #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1627 #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1628 #define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1629 #define IDirectDraw3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1630 #define IDirectDraw3_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1631 #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1632 #define IDirectDraw3_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1633 #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1634 #define IDirectDraw3_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1635 #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1636 #define IDirectDraw3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1637 #define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1638 #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1639 #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1640 #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1641 /*** IDirectDraw2 methods ***/
1642 #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1643 /*** IDirectDraw3 methods ***/
1644 #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1645 #else
1646 /*** IUnknown methods ***/
1647 #define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1648 #define IDirectDraw3_AddRef(p) (p)->AddRef()
1649 #define IDirectDraw3_Release(p) (p)->Release()
1650 /*** IDirectDraw methods ***/
1651 #define IDirectDraw3_Compact(p) (p)->Compact()
1652 #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1653 #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1654 #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1655 #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1656 #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1657 #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1658 #define IDirectDraw3_FlipToGDISurface(p) (p)->FlipToGDISurface()
1659 #define IDirectDraw3_GetCaps(p,a,b) (p)->GetCaps(a,b)
1660 #define IDirectDraw3_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1661 #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1662 #define IDirectDraw3_GetGDISurface(p,a) (p)->GetGDISurface(a)
1663 #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1664 #define IDirectDraw3_GetScanLine(p,a) (p)->GetScanLine(a)
1665 #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1666 #define IDirectDraw3_Initialize(p,a) (p)->Initialize(a)
1667 #define IDirectDraw3_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1668 #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1669 #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1670 #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1671 /*** IDirectDraw2 methods ***/
1672 #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1673 /*** IDirectDraw3 methods ***/
1674 #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1675 #endif
1678 /*****************************************************************************
1679 * IDirectDraw4 interface
1681 #define INTERFACE IDirectDraw4
1682 DECLARE_INTERFACE_(IDirectDraw4,IUnknown)
1684 /*** IUnknown methods ***/
1685 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1686 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1687 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1688 /*** IDirectDraw4 methods ***/
1689 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1690 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1691 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1692 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1693 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC2 *surface_desc,
1694 struct IDirectDrawSurface4 **surface, IUnknown *outer) PURE;
1695 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface4 *src_surface,
1696 struct IDirectDrawSurface4 **dst_surface) PURE;
1697 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1698 void *ctx, LPDDENUMMODESCALLBACK2 cb) PURE;
1699 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1700 void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
1701 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1702 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1703 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
1704 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1705 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface4 **surface) PURE;
1706 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1707 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1708 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1709 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1710 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1711 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1712 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1713 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1714 /* added in v2 */
1715 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS2 *caps, DWORD *total, DWORD *free) PURE;
1716 /* added in v4 */
1717 /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface4 **surface) PURE;
1718 /*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1719 /*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1720 /*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ DDDEVICEIDENTIFIER *identifier, DWORD flags) PURE;
1722 #undef INTERFACE
1724 #if !defined(__cplusplus) || defined(CINTERFACE)
1725 /*** IUnknown methods ***/
1726 #define IDirectDraw4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1727 #define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
1728 #define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
1729 /*** IDirectDraw methods ***/
1730 #define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
1731 #define IDirectDraw4_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1732 #define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1733 #define IDirectDraw4_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1734 #define IDirectDraw4_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1735 #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1736 #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1737 #define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1738 #define IDirectDraw4_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1739 #define IDirectDraw4_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1740 #define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1741 #define IDirectDraw4_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1742 #define IDirectDraw4_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1743 #define IDirectDraw4_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1744 #define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1745 #define IDirectDraw4_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1746 #define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1747 #define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1748 #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1749 #define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1750 /*** IDirectDraw2 methods ***/
1751 #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1752 /*** IDirectDraw4 methods ***/
1753 #define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1754 #define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
1755 #define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
1756 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
1757 #else
1758 /*** IUnknown methods ***/
1759 #define IDirectDraw4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1760 #define IDirectDraw4_AddRef(p) (p)->AddRef()
1761 #define IDirectDraw4_Release(p) (p)->Release()
1762 /*** IDirectDraw methods ***/
1763 #define IDirectDraw4_Compact(p) (p)->Compact()
1764 #define IDirectDraw4_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1765 #define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1766 #define IDirectDraw4_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1767 #define IDirectDraw4_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1768 #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1769 #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1770 #define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
1771 #define IDirectDraw4_GetCaps(p,a,b) (p)->GetCaps(a,b)
1772 #define IDirectDraw4_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1773 #define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1774 #define IDirectDraw4_GetGDISurface(p,a) (p)->GetGDISurface(a)
1775 #define IDirectDraw4_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1776 #define IDirectDraw4_GetScanLine(p,a) (p)->GetScanLine(a)
1777 #define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1778 #define IDirectDraw4_Initialize(p,a) (p)->Initialize(a)
1779 #define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1780 #define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1781 #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1782 #define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1783 /*** IDirectDraw2 methods ***/
1784 #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1785 /*** IDirectDraw4 methods ***/
1786 #define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1787 #define IDirectDraw4_RestoreAllSurfaces(pc) (p)->RestoreAllSurfaces()
1788 #define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
1789 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
1790 #endif
1793 /*****************************************************************************
1794 * IDirectDraw7 interface
1796 /* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
1797 * as not interchangeable with earlier DirectDraw interfaces.
1799 #define INTERFACE IDirectDraw7
1800 DECLARE_INTERFACE_(IDirectDraw7,IUnknown)
1802 /*** IUnknown methods ***/
1803 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1804 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1805 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1806 /*** IDirectDraw7 methods ***/
1807 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1808 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1809 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1810 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1811 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC2 *surface_desc,
1812 struct IDirectDrawSurface7 **surface, IUnknown *outer) PURE;
1813 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface7 *src_surface,
1814 struct IDirectDrawSurface7 **dst_surface) PURE;
1815 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1816 void *ctx, LPDDENUMMODESCALLBACK2 cb) PURE;
1817 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1818 void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
1819 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1820 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1821 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
1822 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1823 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface7 **surface) PURE;
1824 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1825 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1826 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1827 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1828 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1829 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1830 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1831 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1832 /* added in v2 */
1833 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS2 *caps, DWORD *total, DWORD *free) PURE;
1834 /* added in v4 */
1835 /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface7 **surface) PURE;
1836 /*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1837 /*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1838 /*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ DDDEVICEIDENTIFIER2 *identifier, DWORD flags) PURE;
1839 /* added in v7 */
1840 /*70*/ STDMETHOD(StartModeTest)(THIS_ LPSIZE pModes, DWORD dwNumModes, DWORD dwFlags) PURE;
1841 /*74*/ STDMETHOD(EvaluateMode)(THIS_ DWORD dwFlags, DWORD *pTimeout) PURE;
1843 #undef INTERFACE
1845 #if !defined(__cplusplus) || defined(CINTERFACE)
1846 /*** IUnknown methods ***/
1847 #define IDirectDraw7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1848 #define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p)
1849 #define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p)
1850 /*** IDirectDraw methods ***/
1851 #define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p)
1852 #define IDirectDraw7_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1853 #define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1854 #define IDirectDraw7_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1855 #define IDirectDraw7_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1856 #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1857 #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1858 #define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1859 #define IDirectDraw7_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1860 #define IDirectDraw7_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1861 #define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1862 #define IDirectDraw7_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1863 #define IDirectDraw7_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1864 #define IDirectDraw7_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1865 #define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1866 #define IDirectDraw7_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1867 #define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1868 #define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1869 #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1870 #define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1871 /*** added in IDirectDraw2 ***/
1872 #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1873 /*** added in IDirectDraw4 ***/
1874 #define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1875 #define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
1876 #define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
1877 #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
1878 /*** added in IDirectDraw 7 ***/
1879 #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c)
1880 #define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b)
1881 #else
1882 /*** IUnknown methods ***/
1883 #define IDirectDraw7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1884 #define IDirectDraw7_AddRef(p) (p)->AddRef()
1885 #define IDirectDraw7_Release(p) (p)->Release()
1886 /*** IDirectDraw methods ***/
1887 #define IDirectDraw7_Compact(p) (p)->Compact()
1888 #define IDirectDraw7_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1889 #define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1890 #define IDirectDraw7_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1891 #define IDirectDraw7_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1892 #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1893 #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1894 #define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface()
1895 #define IDirectDraw7_GetCaps(p,a,b) (p)->GetCaps(a,b)
1896 #define IDirectDraw7_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1897 #define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1898 #define IDirectDraw7_GetGDISurface(p,a) (p)->GetGDISurface(a)
1899 #define IDirectDraw7_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1900 #define IDirectDraw7_GetScanLine(p,a) (p)->GetScanLine(a)
1901 #define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1902 #define IDirectDraw7_Initialize(p,a) (p)->Initialize(a)
1903 #define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1904 #define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1905 #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1906 #define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1907 /*** added in IDirectDraw2 ***/
1908 #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1909 /*** added in IDirectDraw4 ***/
1910 #define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1911 #define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
1912 #define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
1913 #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
1914 /*** added in IDirectDraw 7 ***/
1915 #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->StartModeTest(a,b,c)
1916 #define IDirectDraw7_EvaluateMode(p,a,b) (p)->EvaluateMode(a,b)
1917 #endif
1920 /*****************************************************************************
1921 * IDirectDrawSurface interface
1923 #define INTERFACE IDirectDrawSurface
1924 DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
1926 /*** IUnknown methods ***/
1927 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1928 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1929 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1930 /*** IDirectDrawSurface methods ***/
1931 /*0c*/ STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface *attachment) PURE;
1932 /*10*/ STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1933 /*14*/ STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface *src_surface, RECT *src_rect,
1934 DWORD flags, DDBLTFX *fx) PURE;
1935 /*18*/ STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
1936 /*1c*/ STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface *src_surface,
1937 RECT *src_rect, DWORD flags) PURE;
1938 /*20*/ STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface *attachment) PURE;
1939 /*24*/ STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1940 /*28*/ STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1941 /*2c*/ STDMETHOD(Flip)(THIS_ IDirectDrawSurface *dst_surface, DWORD flags) PURE;
1942 /*30*/ STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface **attachment) PURE;
1943 /*34*/ STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1944 /*38*/ STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
1945 /*3c*/ STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
1946 /*40*/ STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
1947 /*44*/ STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
1948 /*48*/ STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1949 /*4c*/ STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1950 /*50*/ STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
1951 /*54*/ STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
1952 /*58*/ STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1953 /*5c*/ STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
1954 /*60*/ STDMETHOD(IsLost)(THIS) PURE;
1955 /*64*/ STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
1956 /*68*/ STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1957 /*6c*/ STDMETHOD(Restore)(THIS) PURE;
1958 /*70*/ STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
1959 /*74*/ STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
1960 /*78*/ STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1961 /*7c*/ STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
1962 /*80*/ STDMETHOD(Unlock)(THIS_ void *data) PURE;
1963 /*84*/ STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface *dst_surface,
1964 RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx) PURE;
1965 /*88*/ STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1966 /*8c*/ STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface *reference_surface) PURE;
1968 #undef INTERFACE
1970 #if !defined(__cplusplus) || defined(CINTERFACE)
1971 /*** IUnknown methods ***/
1972 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1973 #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
1974 #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
1975 /*** IDirectDrawSurface methods ***/
1976 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1977 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1978 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1979 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1980 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1981 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1982 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1983 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1984 #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1985 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1986 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1987 #define IDirectDrawSurface_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
1988 #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1989 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1990 #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1991 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1992 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1993 #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1994 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1995 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1996 #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1997 #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
1998 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1999 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2000 #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
2001 #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2002 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2003 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2004 #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2005 #define IDirectDrawSurface_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2006 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2007 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2008 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2009 #else
2010 /*** IUnknown methods ***/
2011 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2012 #define IDirectDrawSurface_AddRef(p) (p)->AddRef()
2013 #define IDirectDrawSurface_Release(p) (p)->Release()
2014 /*** IDirectDrawSurface methods ***/
2015 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2016 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2017 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2018 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2019 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2020 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2021 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2022 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2023 #define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
2024 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2025 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
2026 #define IDirectDrawSurface_GetCaps(p,a) (p)->GetCaps(a)
2027 #define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
2028 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2029 #define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
2030 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2031 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2032 #define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
2033 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2034 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2035 #define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
2036 #define IDirectDrawSurface_IsLost(p) (p)->IsLost()
2037 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2038 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
2039 #define IDirectDrawSurface_Restore(p) (p)->Restore()
2040 #define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
2041 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2042 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2043 #define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
2044 #define IDirectDrawSurface_Unlock(p,a) (p)->Unlock(a)
2045 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2046 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2047 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2048 #endif
2051 /*****************************************************************************
2052 * IDirectDrawSurface2 interface
2054 /* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
2055 * have been converted to LPDIRECTDRAWSURFACE2.
2057 #define INTERFACE IDirectDrawSurface2
2058 DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
2060 /*** IUnknown methods ***/
2061 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2062 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2063 STDMETHOD_(ULONG,Release)(THIS) PURE;
2064 /*** IDirectDrawSurface2 methods ***/
2065 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface2 *attachment) PURE;
2066 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2067 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface2 *src_surface, RECT *src_rect,
2068 DWORD flags, DDBLTFX *fx) PURE;
2069 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2070 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface2 *src_surface,
2071 RECT *src_rect, DWORD flags) PURE;
2072 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface2 *attachment) PURE;
2073 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2074 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2075 STDMETHOD(Flip)(THIS_ IDirectDrawSurface2 *dst_surface, DWORD flags) PURE;
2076 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface2 **attachment) PURE;
2077 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2078 STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
2079 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2080 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2081 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2082 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2083 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2084 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2085 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2086 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
2087 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
2088 STDMETHOD(IsLost)(THIS) PURE;
2089 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
2090 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2091 STDMETHOD(Restore)(THIS) PURE;
2092 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2093 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2094 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2095 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2096 STDMETHOD(Unlock)(THIS_ void *data) PURE;
2097 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface2 *dst_surface, RECT *dst_rect,
2098 DWORD flags, DDOVERLAYFX *fx) PURE;
2099 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2100 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface2 *reference_surface) PURE;
2101 /* added in v2 */
2102 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2103 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2104 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2106 #undef INTERFACE
2108 #if !defined(__cplusplus) || defined(CINTERFACE)
2109 /*** IUnknown methods ***/
2110 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2111 #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
2112 #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
2113 /*** IDirectDrawSurface methods (almost) ***/
2114 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2115 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2116 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2117 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2118 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2119 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2120 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2121 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2122 #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2123 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2124 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2125 #define IDirectDrawSurface2_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2126 #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2127 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2128 #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2129 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2130 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2131 #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2132 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2133 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2134 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2135 #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
2136 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2137 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2138 #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
2139 #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2140 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2141 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2142 #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2143 #define IDirectDrawSurface2_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2144 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2145 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2146 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2147 /*** IDirectDrawSurface2 methods ***/
2148 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2149 #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2150 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2151 #else
2152 /*** IUnknown methods ***/
2153 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2154 #define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
2155 #define IDirectDrawSurface2_Release(p) (p)->Release()
2156 /*** IDirectDrawSurface methods (almost) ***/
2157 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2158 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2159 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2160 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2161 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2162 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2163 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2164 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2165 #define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
2166 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2167 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
2168 #define IDirectDrawSurface2_GetCaps(p,a) (p)->GetCaps(a)
2169 #define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
2170 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2171 #define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
2172 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2173 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2174 #define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
2175 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2176 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2177 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
2178 #define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
2179 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2180 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
2181 #define IDirectDrawSurface2_Restore(p) (p)->Restore()
2182 #define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
2183 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2184 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2185 #define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
2186 #define IDirectDrawSurface2_Unlock(p,a) (p)->Unlock(a)
2187 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2188 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2189 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2190 /*** IDirectDrawSurface2 methods ***/
2191 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
2192 #define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
2193 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
2194 #endif
2197 /*****************************************************************************
2198 * IDirectDrawSurface3 interface
2200 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
2201 * have been converted to LPDIRECTDRAWSURFACE3.
2203 #define INTERFACE IDirectDrawSurface3
2204 DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
2206 /*** IUnknown methods ***/
2207 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2208 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2209 STDMETHOD_(ULONG,Release)(THIS) PURE;
2210 /*** IDirectDrawSurface3 methods ***/
2211 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface3 *attachment) PURE;
2212 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2213 STDMETHOD(Blt)(THIS_ RECT *dst_rest, IDirectDrawSurface3 *src_surface, RECT *src_rect,
2214 DWORD flags, DDBLTFX *fx) PURE;
2215 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2216 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface3 *src_surface,
2217 RECT *src_rect, DWORD flags) PURE;
2218 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface3 *attachment) PURE;
2219 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2220 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2221 STDMETHOD(Flip)(THIS_ IDirectDrawSurface3 *dst_surface, DWORD flags) PURE;
2222 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface3 **attachment) PURE;
2223 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2224 STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
2225 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2226 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2227 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2228 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2229 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2230 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2231 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2232 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
2233 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
2234 STDMETHOD(IsLost)(THIS) PURE;
2235 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
2236 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2237 STDMETHOD(Restore)(THIS) PURE;
2238 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2239 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2240 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2241 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2242 STDMETHOD(Unlock)(THIS_ void *data) PURE;
2243 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface3 *dst_surface, RECT *dst_rect,
2244 DWORD flags, DDOVERLAYFX *fx) PURE;
2245 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2246 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface3 *reference_surface) PURE;
2247 /* added in v2 */
2248 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2249 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2250 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2251 /* added in v3 */
2252 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc, DWORD flags) PURE;
2254 #undef INTERFACE
2256 #if !defined(__cplusplus) || defined(CINTERFACE)
2257 /*** IUnknown methods ***/
2258 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2259 #define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
2260 #define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
2261 /*** IDirectDrawSurface methods (almost) ***/
2262 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2263 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2264 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2265 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2266 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2267 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2268 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2269 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2270 #define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2271 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2272 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2273 #define IDirectDrawSurface3_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2274 #define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2275 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2276 #define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2277 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2278 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2279 #define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2280 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2281 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2282 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2283 #define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
2284 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2285 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2286 #define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
2287 #define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2288 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2289 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2290 #define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2291 #define IDirectDrawSurface3_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2292 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2293 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2294 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2295 /*** IDirectDrawSurface2 methods ***/
2296 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2297 #define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2298 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2299 /*** IDirectDrawSurface3 methods ***/
2300 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2301 #else
2302 /*** IUnknown methods ***/
2303 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2304 #define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
2305 #define IDirectDrawSurface3_Release(p) (p)->Release()
2306 /*** IDirectDrawSurface methods (almost) ***/
2307 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2308 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2309 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2310 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2311 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2312 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2313 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2314 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2315 #define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
2316 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2317 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
2318 #define IDirectDrawSurface3_GetCaps(p,a) (p)->GetCaps(a)
2319 #define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
2320 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2321 #define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
2322 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2323 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2324 #define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
2325 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2326 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2327 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
2328 #define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
2329 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2330 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
2331 #define IDirectDrawSurface3_Restore(p) (p)->Restore()
2332 #define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
2333 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2334 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2335 #define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
2336 #define IDirectDrawSurface3_Unlock(p,a) (p)->Unlock(a)
2337 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2338 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2339 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2340 /*** IDirectDrawSurface2 methods ***/
2341 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
2342 #define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
2343 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
2344 /*** IDirectDrawSurface3 methods ***/
2345 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2346 #endif
2349 /*****************************************************************************
2350 * IDirectDrawSurface4 interface
2352 /* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2.
2354 #define INTERFACE IDirectDrawSurface4
2355 DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown)
2357 /*** IUnknown methods ***/
2358 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2359 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2360 STDMETHOD_(ULONG,Release)(THIS) PURE;
2361 /*** IDirectDrawSurface4 methods ***/
2362 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface4 *attachment) PURE;
2363 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2364 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect,
2365 DWORD flags, DDBLTFX *fx) PURE;
2366 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2367 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface4 *src_surface,
2368 RECT *src_rect, DWORD flags) PURE;
2369 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface4 *attachment) PURE;
2370 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
2371 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
2372 STDMETHOD(Flip)(THIS_ IDirectDrawSurface4 *dst_surface, DWORD flags) PURE;
2373 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS2 *caps, IDirectDrawSurface4 **attachment) PURE;
2374 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2375 STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE;
2376 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2377 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2378 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2379 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2380 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2381 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2382 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2383 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
2384 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc) PURE;
2385 STDMETHOD(IsLost)(THIS) PURE;
2386 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE event) PURE;
2387 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2388 STDMETHOD(Restore)(THIS) PURE;
2389 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2390 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2391 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2392 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2393 STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
2394 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect,
2395 DWORD flags, DDOVERLAYFX *fx) PURE;
2396 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2397 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface4 *reference_surface) PURE;
2398 /* added in v2 */
2399 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2400 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2401 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2402 /* added in v3 */
2403 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc, DWORD flags) PURE;
2404 /* added in v4 */
2405 STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, void *data, DWORD size, DWORD flags) PURE;
2406 STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, void *data, DWORD *size) PURE;
2407 STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
2408 STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
2409 STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
2411 #undef INTERFACE
2413 #if !defined(__cplusplus) || defined(CINTERFACE)
2414 /*** IUnknown methods ***/
2415 #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2416 #define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
2417 #define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
2418 /*** IDirectDrawSurface (almost) methods ***/
2419 #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2420 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2421 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2422 #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2423 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2424 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2425 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2426 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2427 #define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2428 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2429 #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2430 #define IDirectDrawSurface4_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2431 #define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2432 #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2433 #define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2434 #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2435 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2436 #define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2437 #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2438 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2439 #define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2440 #define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
2441 #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2442 #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2443 #define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
2444 #define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2445 #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2446 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2447 #define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2448 #define IDirectDrawSurface4_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2449 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2450 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2451 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2452 /*** IDirectDrawSurface2 methods ***/
2453 #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2454 #define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2455 #define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2456 /*** IDirectDrawSurface3 methods ***/
2457 #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2458 /*** IDirectDrawSurface4 methods ***/
2459 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
2460 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
2461 #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
2462 #define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
2463 #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
2464 #else
2465 /*** IUnknown methods ***/
2466 #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2467 #define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
2468 #define IDirectDrawSurface4_Release(p) (p)->Release()
2469 /*** IDirectDrawSurface (almost) methods ***/
2470 #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2471 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2472 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2473 #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2474 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2475 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2476 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2477 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2478 #define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
2479 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2480 #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
2481 #define IDirectDrawSurface4_GetCaps(p,a) (p)->GetCaps(a)
2482 #define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
2483 #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2484 #define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
2485 #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2486 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2487 #define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
2488 #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2489 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2490 #define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
2491 #define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
2492 #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2493 #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
2494 #define IDirectDrawSurface4_Restore(p) (p)->Restore()
2495 #define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
2496 #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2497 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2498 #define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
2499 #define IDirectDrawSurface4_Unlock(p,a) (p)->Unlock(a)
2500 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2501 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2502 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2503 /*** IDirectDrawSurface2 methods ***/
2504 #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
2505 #define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
2506 #define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
2507 /*** IDirectDrawSurface3 methods ***/
2508 #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2509 /*** IDirectDrawSurface4 methods ***/
2510 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
2511 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
2512 #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
2513 #define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
2514 #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
2515 #endif
2518 /*****************************************************************************
2519 * IDirectDrawSurface7 interface
2521 #define INTERFACE IDirectDrawSurface7
2522 DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown)
2524 /*** IUnknown methods ***/
2525 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2526 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2527 STDMETHOD_(ULONG,Release)(THIS) PURE;
2528 /*** IDirectDrawSurface7 methods ***/
2529 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface7 *attachment) PURE;
2530 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2531 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect,
2532 DWORD flags, DDBLTFX *fx) PURE;
2533 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2534 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface7 *src_surface,
2535 RECT *src_rect, DWORD flags) PURE;
2536 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface7 *attachment) PURE;
2537 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
2538 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
2539 STDMETHOD(Flip)(THIS_ IDirectDrawSurface7 *dst_surface, DWORD flags) PURE;
2540 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS2 *caps, IDirectDrawSurface7 **attachment) PURE;
2541 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2542 STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE;
2543 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2544 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2545 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2546 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2547 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2548 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2549 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2550 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
2551 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc) PURE;
2552 STDMETHOD(IsLost)(THIS) PURE;
2553 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE event) PURE;
2554 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2555 STDMETHOD(Restore)(THIS) PURE;
2556 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2557 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2558 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2559 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2560 STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
2561 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect,
2562 DWORD flags, DDOVERLAYFX *fx) PURE;
2563 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2564 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface7 *reference_surface) PURE;
2565 /* added in v2 */
2566 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2567 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2568 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2569 /* added in v3 */
2570 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc, DWORD flags) PURE;
2571 /* added in v4 */
2572 STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, void *data, DWORD size, DWORD flags) PURE;
2573 STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, void *data, DWORD *size) PURE;
2574 STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
2575 STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
2576 STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
2577 /* added in v7 */
2578 STDMETHOD(SetPriority)(THIS_ DWORD prio) PURE;
2579 STDMETHOD(GetPriority)(THIS_ LPDWORD prio) PURE;
2580 STDMETHOD(SetLOD)(THIS_ DWORD lod) PURE;
2581 STDMETHOD(GetLOD)(THIS_ LPDWORD lod) PURE;
2583 #undef INTERFACE
2585 #if !defined(__cplusplus) || defined(CINTERFACE)
2586 /*** IUnknown methods ***/
2587 #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2588 #define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p)
2589 #define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p)
2590 /*** IDirectDrawSurface (almost) methods ***/
2591 #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2592 #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2593 #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2594 #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2595 #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2596 #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2597 #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2598 #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2599 #define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2600 #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2601 #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2602 #define IDirectDrawSurface7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2603 #define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2604 #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2605 #define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2606 #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2607 #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2608 #define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2609 #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2610 #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2611 #define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2612 #define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p)
2613 #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2614 #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2615 #define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p)
2616 #define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2617 #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2618 #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2619 #define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2620 #define IDirectDrawSurface7_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2621 #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2622 #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2623 #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2624 /*** IDirectDrawSurface2 methods ***/
2625 #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2626 #define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2627 #define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2628 /*** IDirectDrawSurface3 methods ***/
2629 #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2630 /*** IDirectDrawSurface4 methods ***/
2631 #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
2632 #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
2633 #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
2634 #define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
2635 #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
2636 /*** IDirectDrawSurface7 methods ***/
2637 #define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
2638 #define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
2639 #define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
2640 #define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a)
2641 #else
2642 /*** IUnknown methods ***/
2643 #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2644 #define IDirectDrawSurface7_AddRef(p) (p)->AddRef()
2645 #define IDirectDrawSurface7_Release(p) (p)->Release()
2646 /*** IDirectDrawSurface (almost) methods ***/
2647 #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2648 #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2649 #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2650 #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2651 #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2652 #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2653 #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2654 #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2655 #define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b)
2656 #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2657 #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a)
2658 #define IDirectDrawSurface7_GetCaps(p,a) (p)->GetCaps(a)
2659 #define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a)
2660 #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2661 #define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a)
2662 #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2663 #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2664 #define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a)
2665 #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2666 #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2667 #define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b)
2668 #define IDirectDrawSurface7_IsLost(p) (p)->IsLost()
2669 #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2670 #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a)
2671 #define IDirectDrawSurface7_Restore(p) (p)->Restore()
2672 #define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a)
2673 #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2674 #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2675 #define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a)
2676 #define IDirectDrawSurface7_Unlock(p,a) (p)->Unlock(a)
2677 #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2678 #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2679 #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2680 /*** IDirectDrawSurface2 methods ***/
2681 #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a)
2682 #define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a)
2683 #define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a)
2684 /*** IDirectDrawSurface3 methods ***/
2685 #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2686 /*** IDirectDrawSurface4 methods ***/
2687 #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
2688 #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
2689 #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a)
2690 #define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
2691 #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
2692 /*** IDirectDrawSurface7 methods ***/
2693 #define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a)
2694 #define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a)
2695 #define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a)
2696 #define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a)
2697 #endif
2699 /*****************************************************************************
2700 * IDirectDrawColorControl interface
2702 #define INTERFACE IDirectDrawColorControl
2703 DECLARE_INTERFACE_(IDirectDrawColorControl,IUnknown)
2705 /*** IUnknown methods ***/
2706 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2707 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2708 STDMETHOD_(ULONG,Release)(THIS) PURE;
2709 /*** IDirectDrawColorControl methods ***/
2710 STDMETHOD(GetColorControls)(THIS_ DDCOLORCONTROL *color_control) PURE;
2711 STDMETHOD(SetColorControls)(THIS_ DDCOLORCONTROL *color_control) PURE;
2713 #undef INTERFACE
2715 #if !defined(__cplusplus) || defined(CINTERFACE)
2716 /*** IUnknown methods ***/
2717 #define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2718 #define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
2719 #define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
2720 /*** IDirectDrawColorControl methods ***/
2721 #define IDirectDrawColorControl_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
2722 #define IDirectDrawColorControl_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
2723 #else
2724 /*** IUnknown methods ***/
2725 #define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2726 #define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
2727 #define IDirectDrawColorControl_Release(p) (p)->Release()
2728 /*** IDirectDrawColorControl methods ***/
2729 #define IDirectDrawColorControl_GetColorControls(p,a) (p)->GetColorControls(a)
2730 #define IDirectDrawColorControl_SetColorControls(p,a) (p)->SetColorControls(a)
2731 #endif
2733 /*****************************************************************************
2734 * IDirectDrawGammaControl interface
2736 #define INTERFACE IDirectDrawGammaControl
2737 DECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown)
2739 /*** IUnknown methods ***/
2740 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2741 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2742 STDMETHOD_(ULONG,Release)(THIS) PURE;
2743 /*** IDirectDrawGammaControl methods ***/
2744 STDMETHOD(GetGammaRamp)(THIS_ DWORD flags, DDGAMMARAMP *gamma_ramp) PURE;
2745 STDMETHOD(SetGammaRamp)(THIS_ DWORD flags, DDGAMMARAMP *gamma_ramp) PURE;
2747 #undef INTERFACE
2749 #if !defined(__cplusplus) || defined(CINTERFACE)
2750 /*** IUnknown methods ***/
2751 #define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2752 #define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
2753 #define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
2754 /*** IDirectDrawGammaControl methods ***/
2755 #define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
2756 #define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b)
2757 #else
2758 /*** IUnknown methods ***/
2759 #define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2760 #define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
2761 #define IDirectDrawGammaControl_Release(p) (p)->Release()
2762 /*** IDirectDrawGammaControl methods ***/
2763 #define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->GetGammaRamp(a,b)
2764 #define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->SetGammaRamp(a,b)
2765 #endif
2768 HRESULT WINAPI DirectDrawCreate(GUID *driver_guid, IDirectDraw **ddraw, IUnknown *outer);
2769 HRESULT WINAPI DirectDrawCreateEx(GUID *driver_guid, void **ddraw, REFIID interface_iid, IUnknown *outer);
2770 HRESULT WINAPI DirectDrawCreateClipper(DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer);
2772 #ifdef __cplusplus
2773 } /* extern "C" */
2774 #endif /* defined(__cplusplus) */
2776 #endif /* __DDRAW_INCLUDED__ */