Debian Codegraph @

win32/plugins/dfxvideo/winsrc/ddraw.h

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