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