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