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