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