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