joy.cpl: Fix pulsing buttons in joystick button state display.
[wine/zf.git] / include / ddraw.h
blobcb77df19f0c52c1c6d893f3696c3259035f4387e
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 union {
375 DWORD dwCaps4; /* more reserved capabilities */
376 DWORD dwVolumeDepth;
377 } DUMMYUNIONNAME1;
378 } DDSCAPS2,*LPDDSCAPS2;
380 #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
382 typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */
384 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
385 DWORD dwCaps; /* driver specific capabilities */
386 DWORD dwCaps2; /* more driver specific capabilities */
387 DWORD dwCKeyCaps; /* color key capabilities of the surface */
388 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
389 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
390 DWORD dwPalCaps; /* palette capabilities */
391 DWORD dwSVCaps; /* stereo vision capabilities */
392 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
393 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
394 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
395 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
396 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
397 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
398 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
399 DWORD dwVidMemTotal; /* total amount of video memory */
400 DWORD dwVidMemFree; /* amount of free video memory */
401 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
402 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
403 DWORD dwNumFourCCCodes; /* number of four cc codes */
404 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
405 DWORD dwAlignSizeSrc; /* source rectangle byte size */
406 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
407 DWORD dwAlignSizeDest; /* dest rectangle byte size */
408 DWORD dwAlignStrideAlign; /* stride alignment */
409 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
410 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
411 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
412 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
413 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
414 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
415 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
416 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
417 DWORD dwReserved1;
418 DWORD dwReserved2;
419 DWORD dwReserved3;
420 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
421 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
422 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
423 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
424 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
425 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
426 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
427 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
428 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
429 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
430 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
431 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
432 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
433 DWORD dwCurrVideoPorts; /* current number of video ports used */
434 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
435 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
436 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
437 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
438 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
439 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
440 DDSCAPS2 ddsCaps; /* surface capabilities */
441 } DDCAPS_DX7,*LPDDCAPS_DX7;
443 typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */
445 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
446 DWORD dwCaps; /* driver specific capabilities */
447 DWORD dwCaps2; /* more driver specific capabilities */
448 DWORD dwCKeyCaps; /* color key capabilities of the surface */
449 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
450 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
451 DWORD dwPalCaps; /* palette capabilities */
452 DWORD dwSVCaps; /* stereo vision capabilities */
453 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
454 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
455 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
456 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
457 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
458 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
459 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
460 DWORD dwVidMemTotal; /* total amount of video memory */
461 DWORD dwVidMemFree; /* amount of free video memory */
462 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
463 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
464 DWORD dwNumFourCCCodes; /* number of four cc codes */
465 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
466 DWORD dwAlignSizeSrc; /* source rectangle byte size */
467 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
468 DWORD dwAlignSizeDest; /* dest rectangle byte size */
469 DWORD dwAlignStrideAlign; /* stride alignment */
470 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
471 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
472 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
473 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
474 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
475 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
476 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
477 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
478 DWORD dwReserved1;
479 DWORD dwReserved2;
480 DWORD dwReserved3;
481 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
482 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
483 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
484 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
485 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
486 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
487 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
488 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
489 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
490 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
491 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
492 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
493 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
494 DWORD dwCurrVideoPorts; /* current number of video ports used */
495 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
496 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
497 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
498 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
499 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
500 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
501 /* and one new member for DirectX 6 */
502 DDSCAPS2 ddsCaps; /* surface capabilities */
503 } DDCAPS_DX6,*LPDDCAPS_DX6;
505 typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */
507 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
508 DWORD dwCaps; /* driver specific capabilities */
509 DWORD dwCaps2; /* more driver specific capabilities */
510 DWORD dwCKeyCaps; /* color key capabilities of the surface */
511 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
512 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
513 DWORD dwPalCaps; /* palette capabilities */
514 DWORD dwSVCaps; /* stereo vision capabilities */
515 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
516 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
517 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
518 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
519 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
520 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
521 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
522 DWORD dwVidMemTotal; /* total amount of video memory */
523 DWORD dwVidMemFree; /* amount of free video memory */
524 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
525 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
526 DWORD dwNumFourCCCodes; /* number of four cc codes */
527 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
528 DWORD dwAlignSizeSrc; /* source rectangle byte size */
529 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
530 DWORD dwAlignSizeDest; /* dest rectangle byte size */
531 DWORD dwAlignStrideAlign; /* stride alignment */
532 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
533 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
534 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
535 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
536 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
537 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
538 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
539 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
540 DWORD dwReserved1;
541 DWORD dwReserved2;
542 DWORD dwReserved3;
543 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
544 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
545 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
546 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
547 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
548 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
549 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
550 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
551 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
552 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
553 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
554 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
555 /* the following are the new DirectX 5 members */
556 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
557 DWORD dwCurrVideoPorts; /* current number of video ports used */
558 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
559 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
560 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
561 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
562 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
563 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
564 } DDCAPS_DX5,*LPDDCAPS_DX5;
566 typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */
568 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
569 DWORD dwCaps; /* driver specific capabilities */
570 DWORD dwCaps2; /* more driver specific capabilities */
571 DWORD dwCKeyCaps; /* color key capabilities of the surface */
572 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
573 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
574 DWORD dwPalCaps; /* palette capabilities */
575 DWORD dwSVCaps; /* stereo vision capabilities */
576 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
577 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
578 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
579 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
580 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
581 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
582 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
583 DWORD dwVidMemTotal; /* total amount of video memory */
584 DWORD dwVidMemFree; /* amount of free video memory */
585 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
586 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
587 DWORD dwNumFourCCCodes; /* number of four cc codes */
588 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
589 DWORD dwAlignSizeSrc; /* source rectangle byte size */
590 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
591 DWORD dwAlignSizeDest; /* dest rectangle byte size */
592 DWORD dwAlignStrideAlign; /* stride alignment */
593 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
594 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
595 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
596 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
597 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
598 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
599 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
600 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
601 DWORD dwReserved1;
602 DWORD dwReserved2;
603 DWORD dwReserved3;
604 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
605 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
606 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
607 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
608 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
609 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
610 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
611 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
612 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
613 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
614 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
615 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
616 DWORD dwReserved4;
617 DWORD dwReserved5;
618 DWORD dwReserved6;
619 } DDCAPS_DX3,*LPDDCAPS_DX3;
621 /* set caps struct according to DIRECTDRAW_VERSION */
623 #if DIRECTDRAW_VERSION <= 0x300
624 typedef DDCAPS_DX3 DDCAPS;
625 #elif DIRECTDRAW_VERSION <= 0x500
626 typedef DDCAPS_DX5 DDCAPS;
627 #elif DIRECTDRAW_VERSION <= 0x600
628 typedef DDCAPS_DX6 DDCAPS;
629 #else
630 typedef DDCAPS_DX7 DDCAPS;
631 #endif
633 typedef DDCAPS *LPDDCAPS;
635 /* DDCAPS.dwCaps */
636 #define DDCAPS_3D 0x00000001
637 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
638 #define DDCAPS_ALIGNSIZEDEST 0x00000004
639 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
640 #define DDCAPS_ALIGNSIZESRC 0x00000010
641 #define DDCAPS_ALIGNSTRIDE 0x00000020
642 #define DDCAPS_BLT 0x00000040
643 #define DDCAPS_BLTQUEUE 0x00000080
644 #define DDCAPS_BLTFOURCC 0x00000100
645 #define DDCAPS_BLTSTRETCH 0x00000200
646 #define DDCAPS_GDI 0x00000400
647 #define DDCAPS_OVERLAY 0x00000800
648 #define DDCAPS_OVERLAYCANTCLIP 0x00001000
649 #define DDCAPS_OVERLAYFOURCC 0x00002000
650 #define DDCAPS_OVERLAYSTRETCH 0x00004000
651 #define DDCAPS_PALETTE 0x00008000
652 #define DDCAPS_PALETTEVSYNC 0x00010000
653 #define DDCAPS_READSCANLINE 0x00020000
654 #define DDCAPS_STEREOVIEW 0x00040000
655 #define DDCAPS_VBI 0x00080000
656 #define DDCAPS_ZBLTS 0x00100000
657 #define DDCAPS_ZOVERLAYS 0x00200000
658 #define DDCAPS_COLORKEY 0x00400000
659 #define DDCAPS_ALPHA 0x00800000
660 #define DDCAPS_COLORKEYHWASSIST 0x01000000
661 #define DDCAPS_NOHARDWARE 0x02000000
662 #define DDCAPS_BLTCOLORFILL 0x04000000
663 #define DDCAPS_BANKSWITCHED 0x08000000
664 #define DDCAPS_BLTDEPTHFILL 0x10000000
665 #define DDCAPS_CANCLIP 0x20000000
666 #define DDCAPS_CANCLIPSTRETCHED 0x40000000
667 #define DDCAPS_CANBLTSYSMEM 0x80000000
669 /* DDCAPS.dwCaps2 */
670 #define DDCAPS2_CERTIFIED 0x00000001
671 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
672 #define DDCAPS2_VIDEOPORT 0x00000004
673 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
674 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
675 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
676 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
677 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
678 #define DDCAPS2_CANDROPZ16BIT 0x00000100
679 #define DDCAPS2_NONLOCALVIDMEM 0x00000200
680 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
681 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
682 #define DDCAPS2_WIDESURFACES 0x00001000
683 #define DDCAPS2_CANFLIPODDEVEN 0x00002000
684 #define DDCAPS2_CANBOBHARDWARE 0x00004000
685 #define DDCAPS2_COPYFOURCC 0x00008000
686 #define DDCAPS2_PRIMARYGAMMA 0x00020000
687 #define DDCAPS2_CANRENDERWINDOWED 0x00080000
688 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
689 #define DDCAPS2_FLIPINTERVAL 0x00200000
690 #define DDCAPS2_FLIPNOVSYNC 0x00400000
691 #define DDCAPS2_CANMANAGETEXTURE 0x00800000
692 #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
693 #define DDCAPS2_STEREO 0x02000000
694 #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
697 /* Set/Get Colour Key Flags */
698 #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
699 #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
700 #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
701 #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
702 #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
704 typedef struct _DDCOLORKEY
706 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
707 * be treated as Color Key, inclusive
709 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
710 * to be treated as Color Key, inclusive
712 } DDCOLORKEY,*LPDDCOLORKEY;
714 /* ddCKEYCAPS bits */
715 #define DDCKEYCAPS_DESTBLT 0x00000001
716 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
717 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
718 #define DDCKEYCAPS_DESTBLTYUV 0x00000008
719 #define DDCKEYCAPS_DESTOVERLAY 0x00000010
720 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
721 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
722 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
723 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
724 #define DDCKEYCAPS_SRCBLT 0x00000200
725 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
726 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
727 #define DDCKEYCAPS_SRCBLTYUV 0x00001000
728 #define DDCKEYCAPS_SRCOVERLAY 0x00002000
729 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
730 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
731 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
732 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
733 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
735 typedef struct _DDPIXELFORMAT {
736 DWORD dwSize; /* 0: size of structure */
737 DWORD dwFlags; /* 4: pixel format flags */
738 DWORD dwFourCC; /* 8: (FOURCC code) */
739 union {
740 DWORD dwRGBBitCount; /* C: how many bits per pixel */
741 DWORD dwYUVBitCount; /* C: how many bits per pixel */
742 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
743 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
744 DWORD dwLuminanceBitCount;
745 DWORD dwBumpBitCount;
746 } DUMMYUNIONNAME1;
747 union {
748 DWORD dwRBitMask; /* 10: mask for red bit*/
749 DWORD dwYBitMask; /* 10: mask for Y bits*/
750 DWORD dwStencilBitDepth;
751 DWORD dwLuminanceBitMask;
752 DWORD dwBumpDuBitMask;
753 } DUMMYUNIONNAME2;
754 union {
755 DWORD dwGBitMask; /* 14: mask for green bits*/
756 DWORD dwUBitMask; /* 14: mask for U bits*/
757 DWORD dwZBitMask;
758 DWORD dwBumpDvBitMask;
759 } DUMMYUNIONNAME3;
760 union {
761 DWORD dwBBitMask; /* 18: mask for blue bits*/
762 DWORD dwVBitMask; /* 18: mask for V bits*/
763 DWORD dwStencilBitMask;
764 DWORD dwBumpLuminanceBitMask;
765 } DUMMYUNIONNAME4;
766 union {
767 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
768 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
769 DWORD dwLuminanceAlphaBitMask;
770 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
771 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
772 } DUMMYUNIONNAME5;
773 /* 20: next structure */
774 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
776 #ifndef MAKEFOURCC
777 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
778 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
779 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
780 #endif
782 /* DDCAPS.dwFXCaps */
783 #define DDFXCAPS_BLTALPHA 0x00000001
784 #define DDFXCAPS_OVERLAYALPHA 0x00000004
785 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
786 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
787 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
788 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
789 #define DDFXCAPS_BLTROTATION 0x00000100
790 #define DDFXCAPS_BLTROTATION90 0x00000200
791 #define DDFXCAPS_BLTSHRINKX 0x00000400
792 #define DDFXCAPS_BLTSHRINKXN 0x00000800
793 #define DDFXCAPS_BLTSHRINKY 0x00001000
794 #define DDFXCAPS_BLTSHRINKYN 0x00002000
795 #define DDFXCAPS_BLTSTRETCHX 0x00004000
796 #define DDFXCAPS_BLTSTRETCHXN 0x00008000
797 #define DDFXCAPS_BLTSTRETCHY 0x00010000
798 #define DDFXCAPS_BLTSTRETCHYN 0x00020000
799 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
800 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
801 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
802 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
803 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
804 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
805 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
806 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
807 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
808 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
809 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
810 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
812 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
814 /* DDCAPS.dwFXAlphaCaps */
815 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
816 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
817 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
818 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
819 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
820 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
821 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
822 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
823 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
824 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
826 /* DDCAPS.dwPalCaps */
827 #define DDPCAPS_4BIT 0x00000001
828 #define DDPCAPS_8BITENTRIES 0x00000002
829 #define DDPCAPS_8BIT 0x00000004
830 #define DDPCAPS_INITIALIZE 0x00000008
831 #define DDPCAPS_PRIMARYSURFACE 0x00000010
832 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
833 #define DDPCAPS_ALLOW256 0x00000040
834 #define DDPCAPS_VSYNC 0x00000080
835 #define DDPCAPS_1BIT 0x00000100
836 #define DDPCAPS_2BIT 0x00000200
837 #define DDPCAPS_ALPHA 0x00000400
839 /* DDCAPS.dwSVCaps */
840 /* the first 4 of these are now obsolete */
841 #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */
842 #define DDSVCAPS_RESERVED1 0x00000001
843 #define DDSVCAPS_RESERVED2 0x00000002
844 #define DDSVCAPS_RESERVED3 0x00000004
845 #define DDSVCAPS_RESERVED4 0x00000008
846 #else
847 #define DDSVCAPS_ENIGMA 0x00000001
848 #define DDSVCAPS_FLICKER 0x00000002
849 #define DDSVCAPS_REDBLUE 0x00000004
850 #define DDSVCAPS_SPLIT 0x00000008
851 #endif
852 #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
854 /* BitDepths */
855 #define DDBD_1 0x00004000
856 #define DDBD_2 0x00002000
857 #define DDBD_4 0x00001000
858 #define DDBD_8 0x00000800
859 #define DDBD_16 0x00000400
860 #define DDBD_24 0x00000200
861 #define DDBD_32 0x00000100
863 /* DDOVERLAYFX.dwDDFX */
864 #define DDOVERFX_ARITHSTRETCHY 0x00000001
865 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
866 #define DDOVERFX_MIRRORUPDOWN 0x00000004
868 /* UpdateOverlay flags */
869 #define DDOVER_ALPHADEST 0x00000001
870 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
871 #define DDOVER_ALPHADESTNEG 0x00000004
872 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
873 #define DDOVER_ALPHAEDGEBLEND 0x00000010
874 #define DDOVER_ALPHASRC 0x00000020
875 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
876 #define DDOVER_ALPHASRCNEG 0x00000080
877 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
878 #define DDOVER_HIDE 0x00000200
879 #define DDOVER_KEYDEST 0x00000400
880 #define DDOVER_KEYDESTOVERRIDE 0x00000800
881 #define DDOVER_KEYSRC 0x00001000
882 #define DDOVER_KEYSRCOVERRIDE 0x00002000
883 #define DDOVER_SHOW 0x00004000
884 #define DDOVER_ADDDIRTYRECT 0x00008000
885 #define DDOVER_REFRESHDIRTYRECTS 0x00010000
886 #define DDOVER_REFRESHALL 0x00020000
887 #define DDOVER_DDFX 0x00080000
888 #define DDOVER_AUTOFLIP 0x00100000
889 #define DDOVER_BOB 0x00200000
890 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000
891 #define DDOVER_INTERLEAVED 0x00800000
893 /* DDPIXELFORMAT.dwFlags */
894 #define DDPF_ALPHAPIXELS 0x00000001
895 #define DDPF_ALPHA 0x00000002
896 #define DDPF_FOURCC 0x00000004
897 #define DDPF_PALETTEINDEXED4 0x00000008
898 #define DDPF_PALETTEINDEXEDTO8 0x00000010
899 #define DDPF_PALETTEINDEXED8 0x00000020
900 #define DDPF_RGB 0x00000040
901 #define DDPF_COMPRESSED 0x00000080
902 #define DDPF_RGBTOYUV 0x00000100
903 #define DDPF_YUV 0x00000200
904 #define DDPF_ZBUFFER 0x00000400
905 #define DDPF_PALETTEINDEXED1 0x00000800
906 #define DDPF_PALETTEINDEXED2 0x00001000
907 #define DDPF_ZPIXELS 0x00002000
908 #define DDPF_STENCILBUFFER 0x00004000
909 #define DDPF_ALPHAPREMULT 0x00008000
910 #define DDPF_LUMINANCE 0x00020000
911 #define DDPF_BUMPLUMINANCE 0x00040000
912 #define DDPF_BUMPDUDV 0x00080000
914 /* SetCooperativeLevel dwFlags */
915 #define DDSCL_FULLSCREEN 0x00000001
916 #define DDSCL_ALLOWREBOOT 0x00000002
917 #define DDSCL_NOWINDOWCHANGES 0x00000004
918 #define DDSCL_NORMAL 0x00000008
919 #define DDSCL_EXCLUSIVE 0x00000010
920 #define DDSCL_ALLOWMODEX 0x00000040
921 #define DDSCL_SETFOCUSWINDOW 0x00000080
922 #define DDSCL_SETDEVICEWINDOW 0x00000100
923 #define DDSCL_CREATEDEVICEWINDOW 0x00000200
924 #define DDSCL_MULTITHREADED 0x00000400
925 #define DDSCL_FPUSETUP 0x00000800
926 #define DDSCL_FPUPRESERVE 0x00001000
929 /* DDSURFACEDESC.dwFlags */
930 #define DDSD_CAPS 0x00000001
931 #define DDSD_HEIGHT 0x00000002
932 #define DDSD_WIDTH 0x00000004
933 #define DDSD_PITCH 0x00000008
934 #define DDSD_BACKBUFFERCOUNT 0x00000020
935 #define DDSD_ZBUFFERBITDEPTH 0x00000040
936 #define DDSD_ALPHABITDEPTH 0x00000080
937 #define DDSD_LPSURFACE 0x00000800
938 #define DDSD_PIXELFORMAT 0x00001000
939 #define DDSD_CKDESTOVERLAY 0x00002000
940 #define DDSD_CKDESTBLT 0x00004000
941 #define DDSD_CKSRCOVERLAY 0x00008000
942 #define DDSD_CKSRCBLT 0x00010000
943 #define DDSD_MIPMAPCOUNT 0x00020000
944 #define DDSD_REFRESHRATE 0x00040000
945 #define DDSD_LINEARSIZE 0x00080000
946 #define DDSD_TEXTURESTAGE 0x00100000
947 #define DDSD_FVF 0x00200000
948 #define DDSD_SRCVBHANDLE 0x00400000
949 #define DDSD_DEPTH 0x00800000
950 #define DDSD_ALL 0x00fff9ee
952 /* EnumSurfaces flags */
953 #define DDENUMSURFACES_ALL 0x00000001
954 #define DDENUMSURFACES_MATCH 0x00000002
955 #define DDENUMSURFACES_NOMATCH 0x00000004
956 #define DDENUMSURFACES_CANBECREATED 0x00000008
957 #define DDENUMSURFACES_DOESEXIST 0x00000010
959 /* SetDisplayMode flags */
960 #define DDSDM_STANDARDVGAMODE 0x00000001
962 /* EnumDisplayModes flags */
963 #define DDEDM_REFRESHRATES 0x00000001
964 #define DDEDM_STANDARDVGAMODES 0x00000002
966 /* WaitForVerticalDisplay flags */
968 #define DDWAITVB_BLOCKBEGIN 0x00000001
969 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002
970 #define DDWAITVB_BLOCKEND 0x00000004
972 typedef struct _DDSURFACEDESC
974 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
975 DWORD dwFlags; /* 4: determines what fields are valid*/
976 DWORD dwHeight; /* 8: height of surface to be created*/
977 DWORD dwWidth; /* C: width of input surface*/
978 union {
979 LONG lPitch; /* 10: distance to start of next line (return value only)*/
980 DWORD dwLinearSize;
981 } DUMMYUNIONNAME1;
982 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
983 union {
984 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
985 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
986 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
987 } DUMMYUNIONNAME2;
988 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
989 DWORD dwReserved; /* 20:reserved*/
990 void *lpSurface; /* 24:pointer to the associated surface memory*/
991 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
992 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
993 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
994 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
995 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
996 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
997 } DDSURFACEDESC,*LPDDSURFACEDESC;
999 typedef struct _DDSURFACEDESC2
1001 DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
1002 DWORD dwFlags; /* 4: determines what fields are valid*/
1003 DWORD dwHeight; /* 8: height of surface to be created*/
1004 DWORD dwWidth; /* C: width of input surface*/
1005 union {
1006 LONG lPitch; /*10: distance to start of next line (return value only)*/
1007 DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
1008 } DUMMYUNIONNAME1;
1009 union {
1010 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
1011 DWORD dwDepth;
1012 } DUMMYUNIONNAME5;
1013 union {
1014 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
1015 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
1016 DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
1017 } DUMMYUNIONNAME2;
1018 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
1019 DWORD dwReserved; /* 20:reserved*/
1020 void *lpSurface; /* 24:pointer to the associated surface memory*/
1021 union {
1022 DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
1023 DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
1024 } DUMMYUNIONNAME3;
1025 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
1026 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
1027 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
1029 union {
1030 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
1031 DWORD dwFVF; /* 48: vertex format description of vertex buffers */
1032 } DUMMYUNIONNAME4;
1033 DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
1034 DWORD dwTextureStage; /* 78: stage in multitexture cascade */
1035 } DDSURFACEDESC2,*LPDDSURFACEDESC2;
1037 /* DDCOLORCONTROL.dwFlags */
1038 #define DDCOLOR_BRIGHTNESS 0x00000001
1039 #define DDCOLOR_CONTRAST 0x00000002
1040 #define DDCOLOR_HUE 0x00000004
1041 #define DDCOLOR_SATURATION 0x00000008
1042 #define DDCOLOR_SHARPNESS 0x00000010
1043 #define DDCOLOR_GAMMA 0x00000020
1044 #define DDCOLOR_COLORENABLE 0x00000040
1046 typedef struct {
1047 DWORD dwSize;
1048 DWORD dwFlags;
1049 LONG lBrightness;
1050 LONG lContrast;
1051 LONG lHue;
1052 LONG lSaturation;
1053 LONG lSharpness;
1054 LONG lGamma;
1055 LONG lColorEnable;
1056 DWORD dwReserved1;
1057 } DDCOLORCONTROL,*LPDDCOLORCONTROL;
1059 typedef struct {
1060 WORD red[256];
1061 WORD green[256];
1062 WORD blue[256];
1063 } DDGAMMARAMP,*LPDDGAMMARAMP;
1065 typedef BOOL (CALLBACK *LPDDENUMCALLBACKA)(GUID *guid, char *driver_description, char *driver_name, void *ctx);
1066 typedef BOOL (CALLBACK *LPDDENUMCALLBACKW)(GUID *guid, WCHAR *driver_description, WCHAR *driver_name, void *ctx);
1067 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
1069 typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK)(DDSURFACEDESC *desc, void *ctx);
1070 typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK2)(DDSURFACEDESC2 *desc, void *ctx);
1071 typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK)(struct IDirectDrawSurface *surface,
1072 DDSURFACEDESC *surface_desc, void *ctx);
1073 typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK2)(struct IDirectDrawSurface4 *surface,
1074 DDSURFACEDESC2 *surface_desc, void *ctx);
1075 typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK7)(struct IDirectDrawSurface7 *surface,
1076 DDSURFACEDESC2 *surface_desc, void *ctx);
1078 typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXA)(GUID *guid, char *driver_description,
1079 char *driver_name, void *ctx, HMONITOR monitor);
1080 typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXW)(GUID *guid, WCHAR *driver_description,
1081 WCHAR *driver_name, void *ctx, HMONITOR monitor);
1082 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
1084 HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA cb, void *ctx);
1085 HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW cb, void *ctx);
1086 #define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
1088 HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA cb, void *ctx, DWORD flags);
1089 HRESULT WINAPI DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW cb, void *ctx, DWORD flags);
1090 #define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
1092 typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)(LPDDENUMCALLBACKEXA cb, void *ctx, DWORD flags);
1093 typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)(LPDDENUMCALLBACKEXW cb, void *ctx, DWORD flags);
1094 DECL_WINELIB_TYPE_AW(LPDIRECTDRAWENUMERATEEX)
1096 /* flags for DirectDrawEnumerateEx */
1097 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
1098 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
1099 #define DDENUM_NONDISPLAYDEVICES 0x00000004
1101 /* flags for DirectDrawCreate or IDirectDraw::Initialize */
1102 #define DDCREATE_HARDWAREONLY __MSABI_LONG(1)
1103 #define DDCREATE_EMULATIONONLY __MSABI_LONG(2)
1105 typedef struct _DDBLTFX
1107 DWORD dwSize; /* size of structure */
1108 DWORD dwDDFX; /* FX operations */
1109 DWORD dwROP; /* Win32 raster operations */
1110 DWORD dwDDROP; /* Raster operations new for DirectDraw */
1111 DWORD dwRotationAngle; /* Rotation angle for blt */
1112 DWORD dwZBufferOpCode; /* ZBuffer compares */
1113 DWORD dwZBufferLow; /* Low limit of Z buffer */
1114 DWORD dwZBufferHigh; /* High limit of Z buffer */
1115 DWORD dwZBufferBaseDest; /* Destination base value */
1116 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
1117 union
1119 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
1120 struct IDirectDrawSurface *lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
1121 } DUMMYUNIONNAME1;
1122 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
1123 union
1125 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
1126 struct IDirectDrawSurface *lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
1127 } DUMMYUNIONNAME2;
1128 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1129 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
1130 DWORD dwReserved;
1131 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1132 union
1134 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
1135 struct IDirectDrawSurface *lpDDSAlphaDest; /* Surface to use as Alpha Channel */
1136 } DUMMYUNIONNAME3;
1137 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1138 union
1140 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
1141 struct IDirectDrawSurface *lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
1142 } DUMMYUNIONNAME4;
1143 union
1145 DWORD dwFillColor; /* color in RGB or Palettized */
1146 DWORD dwFillDepth; /* depth value for z-buffer */
1147 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
1148 struct IDirectDrawSurface *lpDDSPattern; /* Surface to use as pattern */
1149 } DUMMYUNIONNAME5;
1150 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
1151 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
1152 } DDBLTFX,*LPDDBLTFX;
1154 /* dwDDFX */
1155 /* arithmetic stretching along y axis */
1156 #define DDBLTFX_ARITHSTRETCHY 0x00000001
1157 /* mirror on y axis */
1158 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
1159 /* mirror on x axis */
1160 #define DDBLTFX_MIRRORUPDOWN 0x00000004
1161 /* do not tear */
1162 #define DDBLTFX_NOTEARING 0x00000008
1163 /* 180 degrees clockwise rotation */
1164 #define DDBLTFX_ROTATE180 0x00000010
1165 /* 270 degrees clockwise rotation */
1166 #define DDBLTFX_ROTATE270 0x00000020
1167 /* 90 degrees clockwise rotation */
1168 #define DDBLTFX_ROTATE90 0x00000040
1169 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1170 #define DDBLTFX_ZBUFFERRANGE 0x00000080
1171 /* add dwZBufferBaseDest to every source z value before compare */
1172 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
1174 typedef struct _DDOVERLAYFX
1176 DWORD dwSize; /* size of structure */
1177 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1178 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
1179 DWORD dwReserved;
1180 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1181 union
1183 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
1184 struct IDirectDrawSurface *lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
1185 } DUMMYUNIONNAME1;
1186 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1187 union
1189 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
1190 struct IDirectDrawSurface *lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
1191 } DUMMYUNIONNAME2;
1192 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
1193 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
1194 DWORD dwDDFX; /* Overlay FX */
1195 DWORD dwFlags; /* flags */
1196 } DDOVERLAYFX,*LPDDOVERLAYFX;
1198 typedef struct _DDBLTBATCH
1200 RECT *lprDest;
1201 struct IDirectDrawSurface *lpDDSSrc;
1202 RECT *lprSrc;
1203 DWORD dwFlags;
1204 DDBLTFX *lpDDBltFx;
1205 } DDBLTBATCH,*LPDDBLTBATCH;
1207 #define MAX_DDDEVICEID_STRING 512
1209 #define DDGDI_GETHOSTIDENTIFIER 1
1211 typedef struct tagDDDEVICEIDENTIFIER {
1212 char szDriver[MAX_DDDEVICEID_STRING];
1213 char szDescription[MAX_DDDEVICEID_STRING];
1214 LARGE_INTEGER liDriverVersion;
1215 DWORD dwVendorId;
1216 DWORD dwDeviceId;
1217 DWORD dwSubSysId;
1218 DWORD dwRevision;
1219 GUID guidDeviceIdentifier;
1220 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
1222 typedef struct tagDDDEVICEIDENTIFIER2 {
1223 char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
1224 char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
1225 LARGE_INTEGER liDriverVersion; /* driver version */
1226 DWORD dwVendorId; /* vendor ID, zero if unknown */
1227 DWORD dwDeviceId; /* chipset ID, zero if unknown */
1228 DWORD dwSubSysId; /* board ID, zero if unknown */
1229 DWORD dwRevision; /* chipset version, zero if unknown */
1230 GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
1231 DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
1232 } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
1234 /*****************************************************************************
1235 * IDirectDrawPalette interface
1237 #undef INTERFACE
1238 #define INTERFACE IDirectDrawPalette
1239 DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
1241 /*** IUnknown methods ***/
1242 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1243 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1244 STDMETHOD_(ULONG,Release)(THIS) PURE;
1245 /*** IDirectDrawPalette methods ***/
1246 STDMETHOD(GetCaps)(THIS_ LPDWORD lpdwCaps) PURE;
1247 STDMETHOD(GetEntries)(THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE;
1248 STDMETHOD(Initialize)(THIS_ struct IDirectDraw *ddraw, DWORD flags, PALETTEENTRY *color_table) PURE;
1249 STDMETHOD(SetEntries)(THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE;
1251 #undef INTERFACE
1253 #if !defined(__cplusplus) || defined(CINTERFACE)
1254 /*** IUnknown methods ***/
1255 #define IDirectDrawPalette_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1256 #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
1257 #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
1258 /*** IDirectDrawPalette methods ***/
1259 #define IDirectDrawPalette_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
1260 #define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->lpVtbl->GetEntries(p,a,b,c,d)
1261 #define IDirectDrawPalette_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1262 #define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->lpVtbl->SetEntries(p,a,b,c,d)
1263 #else
1264 /*** IUnknown methods ***/
1265 #define IDirectDrawPalette_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1266 #define IDirectDrawPalette_AddRef(p) (p)->AddRef()
1267 #define IDirectDrawPalette_Release(p) (p)->Release()
1268 /*** IDirectDrawPalette methods ***/
1269 #define IDirectDrawPalette_GetCaps(p,a) (p)->GetCaps(a)
1270 #define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->GetEntries(a,b,c,d)
1271 #define IDirectDrawPalette_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1272 #define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->SetEntries(a,b,c,d)
1273 #endif
1276 /*****************************************************************************
1277 * IDirectDrawClipper interface
1279 #define INTERFACE IDirectDrawClipper
1280 DECLARE_INTERFACE_(IDirectDrawClipper,IUnknown)
1282 /*** IUnknown methods ***/
1283 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1284 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1285 STDMETHOD_(ULONG,Release)(THIS) PURE;
1286 /*** IDirectDrawClipper methods ***/
1287 STDMETHOD(GetClipList)(THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE;
1288 STDMETHOD(GetHWnd)(THIS_ HWND *lphWnd) PURE;
1289 STDMETHOD(Initialize)(THIS_ struct IDirectDraw *ddraw, DWORD flags) PURE;
1290 STDMETHOD(IsClipListChanged)(THIS_ BOOL *lpbChanged) PURE;
1291 STDMETHOD(SetClipList)(THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE;
1292 STDMETHOD(SetHWnd)(THIS_ DWORD dwFlags, HWND hWnd) PURE;
1294 #undef INTERFACE
1296 #if !defined(__cplusplus) || defined(CINTERFACE)
1297 /*** IUnknown methods ***/
1298 #define IDirectDrawClipper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1299 #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
1300 #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
1301 /*** IDirectDrawClipper methods ***/
1302 #define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->lpVtbl->GetClipList(p,a,b,c)
1303 #define IDirectDrawClipper_GetHWnd(p,a) (p)->lpVtbl->GetHWnd(p,a)
1304 #define IDirectDrawClipper_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1305 #define IDirectDrawClipper_IsClipListChanged(p,a) (p)->lpVtbl->IsClipListChanged(p,a)
1306 #define IDirectDrawClipper_SetClipList(p,a,b) (p)->lpVtbl->SetClipList(p,a,b)
1307 #define IDirectDrawClipper_SetHWnd(p,a,b) (p)->lpVtbl->SetHWnd(p,a,b)
1308 #else
1309 /*** IUnknown methods ***/
1310 #define IDirectDrawClipper_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1311 #define IDirectDrawClipper_AddRef(p) (p)->AddRef()
1312 #define IDirectDrawClipper_Release(p) (p)->Release()
1313 /*** IDirectDrawClipper methods ***/
1314 #define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->GetClipList(a,b,c)
1315 #define IDirectDrawClipper_GetHWnd(p,a) (p)->GetHWnd(a)
1316 #define IDirectDrawClipper_Initialize(p,a,b) (p)->Initialize(a,b)
1317 #define IDirectDrawClipper_IsClipListChanged(p,a) (p)->IsClipListChanged(a)
1318 #define IDirectDrawClipper_SetClipList(p,a,b) (p)->SetClipList(a,b)
1319 #define IDirectDrawClipper_SetHWnd(p,a,b) (p)->SetHWnd(a,b)
1320 #endif
1323 /*****************************************************************************
1324 * IDirectDraw interface
1326 #define INTERFACE IDirectDraw
1327 DECLARE_INTERFACE_(IDirectDraw,IUnknown)
1329 /*** IUnknown methods ***/
1330 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1331 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1332 STDMETHOD_(ULONG,Release)(THIS) PURE;
1333 /*** IDirectDraw methods ***/
1334 STDMETHOD(Compact)(THIS) PURE;
1335 STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1336 STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1337 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1338 STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1339 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1340 STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1341 struct IDirectDrawSurface **dst_surface) PURE;
1342 STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1343 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1344 STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1345 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1346 STDMETHOD(FlipToGDISurface)(THIS) PURE;
1347 STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1348 STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1349 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1350 STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1351 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1352 STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1353 STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1354 STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1355 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1356 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1357 STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP) PURE;
1358 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1360 #undef INTERFACE
1362 #if !defined(__cplusplus) || defined(CINTERFACE)
1363 /*** IUnknown methods ***/
1364 #define IDirectDraw_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1365 #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
1366 #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
1367 /*** IDirectDraw methods ***/
1368 #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
1369 #define IDirectDraw_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1370 #define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1371 #define IDirectDraw_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1372 #define IDirectDraw_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1373 #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1374 #define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1375 #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1376 #define IDirectDraw_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1377 #define IDirectDraw_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1378 #define IDirectDraw_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1379 #define IDirectDraw_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1380 #define IDirectDraw_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1381 #define IDirectDraw_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1382 #define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1383 #define IDirectDraw_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1384 #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1385 #define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1386 #define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->lpVtbl->SetDisplayMode(p,a,b,c)
1387 #define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1388 #else
1389 /*** IUnknown methods ***/
1390 #define IDirectDraw_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1391 #define IDirectDraw_AddRef(p) (p)->AddRef()
1392 #define IDirectDraw_Release(p) (p)->Release()
1393 /*** IDirectDraw methods ***/
1394 #define IDirectDraw_Compact(p) (p)->Compact()
1395 #define IDirectDraw_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1396 #define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1397 #define IDirectDraw_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1398 #define IDirectDraw_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1399 #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1400 #define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1401 #define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
1402 #define IDirectDraw_GetCaps(p,a,b) (p)->GetCaps(a,b)
1403 #define IDirectDraw_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1404 #define IDirectDraw_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1405 #define IDirectDraw_GetGDISurface(p,a) (p)->GetGDISurface(a)
1406 #define IDirectDraw_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1407 #define IDirectDraw_GetScanLine(p,a) (p)->GetScanLine(a)
1408 #define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1409 #define IDirectDraw_Initialize(p,a) (p)->Initialize(a)
1410 #define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1411 #define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1412 #define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->SetDisplayMode(a,b,c)
1413 #define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1414 #endif
1417 /* flags for Lock() */
1418 #define DDLOCK_SURFACEMEMORYPTR __MSABI_LONG(0x00000000)
1419 #define DDLOCK_WAIT __MSABI_LONG(0x00000001)
1420 #define DDLOCK_EVENT __MSABI_LONG(0x00000002)
1421 #define DDLOCK_READONLY __MSABI_LONG(0x00000010)
1422 #define DDLOCK_WRITEONLY __MSABI_LONG(0x00000020)
1423 #define DDLOCK_NOSYSLOCK __MSABI_LONG(0x00000800)
1424 #define DDLOCK_NOOVERWRITE __MSABI_LONG(0x00001000)
1425 #define DDLOCK_DISCARDCONTENTS __MSABI_LONG(0x00002000)
1426 #define DDLOCK_OKTOSWAP __MSABI_LONG(0x00002000)
1427 #define DDLOCK_DONOTWAIT __MSABI_LONG(0x00004000)
1428 #define DDLOCK_HASVOLUMETEXTUREBOXRECT __MSABI_LONG(0x00008000)
1429 #define DDLOCK_NODIRTYUPDATE __MSABI_LONG(0x00010000)
1432 /*****************************************************************************
1433 * IDirectDraw2 interface
1435 /* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
1436 * arguments of SetDisplayMode has changed !
1438 #define INTERFACE IDirectDraw2
1439 DECLARE_INTERFACE_(IDirectDraw2,IUnknown)
1441 /*** IUnknown methods ***/
1442 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1443 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1444 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1445 /*** IDirectDraw2 methods ***/
1446 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1447 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1448 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1449 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1450 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1451 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1452 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1453 struct IDirectDrawSurface **dst_surface) PURE;
1454 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1455 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1456 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1457 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1458 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1459 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1460 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1461 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1462 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1463 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1464 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1465 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1466 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1467 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1468 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1469 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1470 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1471 /* added in v2 */
1472 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS *caps, DWORD *total, DWORD *free) PURE;
1474 #undef INTERFACE
1476 #if !defined(__cplusplus) || defined(CINTERFACE)
1477 /*** IUnknown methods ***/
1478 #define IDirectDraw2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1479 #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
1480 #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
1481 /*** IDirectDraw methods ***/
1482 #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
1483 #define IDirectDraw2_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1484 #define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1485 #define IDirectDraw2_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1486 #define IDirectDraw2_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1487 #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1488 #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1489 #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1490 #define IDirectDraw2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1491 #define IDirectDraw2_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1492 #define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1493 #define IDirectDraw2_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1494 #define IDirectDraw2_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1495 #define IDirectDraw2_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1496 #define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1497 #define IDirectDraw2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1498 #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1499 #define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1500 #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1501 #define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1502 /*** IDirectDraw2 methods ***/
1503 #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1504 #else
1505 /*** IUnknown methods ***/
1506 #define IDirectDraw2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1507 #define IDirectDraw2_AddRef(p) (p)->AddRef()
1508 #define IDirectDraw2_Release(p) (p)->Release()
1509 /*** IDirectDraw methods ***/
1510 #define IDirectDraw2_Compact(p) (p)->Compact()
1511 #define IDirectDraw2_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1512 #define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1513 #define IDirectDraw2_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1514 #define IDirectDraw2_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1515 #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1516 #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1517 #define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
1518 #define IDirectDraw2_GetCaps(p,a,b) (p)->GetCaps(a,b)
1519 #define IDirectDraw2_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1520 #define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1521 #define IDirectDraw2_GetGDISurface(p,a) (p)->GetGDISurface(a)
1522 #define IDirectDraw2_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1523 #define IDirectDraw2_GetScanLine(p,a) (p)->GetScanLine(a)
1524 #define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1525 #define IDirectDraw2_Initialize(p,a) (p)->Initialize(a)
1526 #define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1527 #define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1528 #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1529 #define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1530 /*** IDirectDraw2 methods ***/
1531 #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1532 #endif
1535 /*****************************************************************************
1536 * IDirectDraw3 interface
1538 #define INTERFACE IDirectDraw3
1539 DECLARE_INTERFACE_(IDirectDraw3,IUnknown)
1541 /*** IUnknown methods ***/
1542 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1543 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1544 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1545 /*** IDirectDraw2 methods ***/
1546 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1547 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1548 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1549 IDirectDrawPalette **lplpDDPalette, IUnknown *outer) PURE;
1550 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1551 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1552 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1553 struct IDirectDrawSurface **dst_surface) PURE;
1554 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1555 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1556 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1557 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1558 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1559 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1560 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1561 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1562 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1563 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1564 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1565 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1566 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1567 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1568 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1569 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1570 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1571 /* added in v2 */
1572 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS *caps, DWORD *total, DWORD *free) PURE;
1573 /* added in v3 */
1574 /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface **surface) PURE;
1576 #undef INTERFACE
1578 #if !defined(__cplusplus) || defined(CINTERFACE)
1579 /*** IUnknown methods ***/
1580 #define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1581 #define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p)
1582 #define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p)
1583 /*** IDirectDraw methods ***/
1584 #define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p)
1585 #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1586 #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1587 #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1588 #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1589 #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1590 #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1591 #define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1592 #define IDirectDraw3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1593 #define IDirectDraw3_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1594 #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1595 #define IDirectDraw3_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1596 #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1597 #define IDirectDraw3_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1598 #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1599 #define IDirectDraw3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1600 #define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1601 #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1602 #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1603 #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1604 /*** IDirectDraw2 methods ***/
1605 #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1606 /*** IDirectDraw3 methods ***/
1607 #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1608 #else
1609 /*** IUnknown methods ***/
1610 #define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1611 #define IDirectDraw3_AddRef(p) (p)->AddRef()
1612 #define IDirectDraw3_Release(p) (p)->Release()
1613 /*** IDirectDraw methods ***/
1614 #define IDirectDraw3_Compact(p) (p)->Compact()
1615 #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1616 #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1617 #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1618 #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1619 #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1620 #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1621 #define IDirectDraw3_FlipToGDISurface(p) (p)->FlipToGDISurface()
1622 #define IDirectDraw3_GetCaps(p,a,b) (p)->GetCaps(a,b)
1623 #define IDirectDraw3_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1624 #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1625 #define IDirectDraw3_GetGDISurface(p,a) (p)->GetGDISurface(a)
1626 #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1627 #define IDirectDraw3_GetScanLine(p,a) (p)->GetScanLine(a)
1628 #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1629 #define IDirectDraw3_Initialize(p,a) (p)->Initialize(a)
1630 #define IDirectDraw3_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1631 #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1632 #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1633 #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1634 /*** IDirectDraw2 methods ***/
1635 #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1636 /*** IDirectDraw3 methods ***/
1637 #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1638 #endif
1641 /*****************************************************************************
1642 * IDirectDraw4 interface
1644 #define INTERFACE IDirectDraw4
1645 DECLARE_INTERFACE_(IDirectDraw4,IUnknown)
1647 /*** IUnknown methods ***/
1648 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1649 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1650 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1651 /*** IDirectDraw4 methods ***/
1652 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1653 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1654 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1655 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1656 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC2 *surface_desc,
1657 struct IDirectDrawSurface4 **surface, IUnknown *outer) PURE;
1658 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface4 *src_surface,
1659 struct IDirectDrawSurface4 **dst_surface) PURE;
1660 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1661 void *ctx, LPDDENUMMODESCALLBACK2 cb) PURE;
1662 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1663 void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
1664 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1665 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1666 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
1667 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1668 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface4 **surface) PURE;
1669 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1670 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1671 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1672 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1673 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1674 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1675 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1676 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1677 /* added in v2 */
1678 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS2 *caps, DWORD *total, DWORD *free) PURE;
1679 /* added in v4 */
1680 /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface4 **surface) PURE;
1681 /*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1682 /*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1683 /*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ DDDEVICEIDENTIFIER *identifier, DWORD flags) PURE;
1685 #undef INTERFACE
1687 #if !defined(__cplusplus) || defined(CINTERFACE)
1688 /*** IUnknown methods ***/
1689 #define IDirectDraw4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1690 #define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
1691 #define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
1692 /*** IDirectDraw methods ***/
1693 #define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
1694 #define IDirectDraw4_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1695 #define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1696 #define IDirectDraw4_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1697 #define IDirectDraw4_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1698 #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1699 #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1700 #define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1701 #define IDirectDraw4_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1702 #define IDirectDraw4_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1703 #define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1704 #define IDirectDraw4_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1705 #define IDirectDraw4_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1706 #define IDirectDraw4_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1707 #define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1708 #define IDirectDraw4_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1709 #define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1710 #define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1711 #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1712 #define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1713 /*** IDirectDraw2 methods ***/
1714 #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1715 /*** IDirectDraw4 methods ***/
1716 #define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1717 #define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
1718 #define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
1719 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
1720 #else
1721 /*** IUnknown methods ***/
1722 #define IDirectDraw4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1723 #define IDirectDraw4_AddRef(p) (p)->AddRef()
1724 #define IDirectDraw4_Release(p) (p)->Release()
1725 /*** IDirectDraw methods ***/
1726 #define IDirectDraw4_Compact(p) (p)->Compact()
1727 #define IDirectDraw4_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1728 #define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1729 #define IDirectDraw4_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1730 #define IDirectDraw4_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1731 #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1732 #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1733 #define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
1734 #define IDirectDraw4_GetCaps(p,a,b) (p)->GetCaps(a,b)
1735 #define IDirectDraw4_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1736 #define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1737 #define IDirectDraw4_GetGDISurface(p,a) (p)->GetGDISurface(a)
1738 #define IDirectDraw4_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1739 #define IDirectDraw4_GetScanLine(p,a) (p)->GetScanLine(a)
1740 #define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1741 #define IDirectDraw4_Initialize(p,a) (p)->Initialize(a)
1742 #define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1743 #define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1744 #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1745 #define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1746 /*** IDirectDraw2 methods ***/
1747 #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1748 /*** IDirectDraw4 methods ***/
1749 #define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1750 #define IDirectDraw4_RestoreAllSurfaces(pc) (p)->RestoreAllSurfaces()
1751 #define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
1752 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
1753 #endif
1756 /*****************************************************************************
1757 * IDirectDraw7 interface
1759 /* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
1760 * as not interchangeable with earlier DirectDraw interfaces.
1762 #define INTERFACE IDirectDraw7
1763 DECLARE_INTERFACE_(IDirectDraw7,IUnknown)
1765 /*** IUnknown methods ***/
1766 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1767 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1768 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1769 /*** IDirectDraw7 methods ***/
1770 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
1771 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1772 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1773 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1774 /*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC2 *surface_desc,
1775 struct IDirectDrawSurface7 **surface, IUnknown *outer) PURE;
1776 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface7 *src_surface,
1777 struct IDirectDrawSurface7 **dst_surface) PURE;
1778 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1779 void *ctx, LPDDENUMMODESCALLBACK2 cb) PURE;
1780 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1781 void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
1782 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1783 /*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1784 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
1785 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1786 /*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface7 **surface) PURE;
1787 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1788 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1789 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1790 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1791 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1792 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1793 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1794 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1795 /* added in v2 */
1796 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS2 *caps, DWORD *total, DWORD *free) PURE;
1797 /* added in v4 */
1798 /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface7 **surface) PURE;
1799 /*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1800 /*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1801 /*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ DDDEVICEIDENTIFIER2 *identifier, DWORD flags) PURE;
1802 /* added in v7 */
1803 /*70*/ STDMETHOD(StartModeTest)(THIS_ LPSIZE pModes, DWORD dwNumModes, DWORD dwFlags) PURE;
1804 /*74*/ STDMETHOD(EvaluateMode)(THIS_ DWORD dwFlags, DWORD *pTimeout) PURE;
1806 #undef INTERFACE
1808 #if !defined(__cplusplus) || defined(CINTERFACE)
1809 /*** IUnknown methods ***/
1810 #define IDirectDraw7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1811 #define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p)
1812 #define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p)
1813 /*** IDirectDraw methods ***/
1814 #define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p)
1815 #define IDirectDraw7_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1816 #define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1817 #define IDirectDraw7_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1818 #define IDirectDraw7_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1819 #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1820 #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1821 #define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1822 #define IDirectDraw7_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1823 #define IDirectDraw7_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1824 #define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1825 #define IDirectDraw7_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1826 #define IDirectDraw7_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1827 #define IDirectDraw7_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1828 #define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1829 #define IDirectDraw7_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1830 #define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1831 #define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1832 #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1833 #define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1834 /*** added in IDirectDraw2 ***/
1835 #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1836 /*** added in IDirectDraw4 ***/
1837 #define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1838 #define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
1839 #define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
1840 #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
1841 /*** added in IDirectDraw 7 ***/
1842 #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c)
1843 #define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b)
1844 #else
1845 /*** IUnknown methods ***/
1846 #define IDirectDraw7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1847 #define IDirectDraw7_AddRef(p) (p)->AddRef()
1848 #define IDirectDraw7_Release(p) (p)->Release()
1849 /*** IDirectDraw methods ***/
1850 #define IDirectDraw7_Compact(p) (p)->Compact()
1851 #define IDirectDraw7_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1852 #define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1853 #define IDirectDraw7_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1854 #define IDirectDraw7_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1855 #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1856 #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1857 #define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface()
1858 #define IDirectDraw7_GetCaps(p,a,b) (p)->GetCaps(a,b)
1859 #define IDirectDraw7_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1860 #define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1861 #define IDirectDraw7_GetGDISurface(p,a) (p)->GetGDISurface(a)
1862 #define IDirectDraw7_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1863 #define IDirectDraw7_GetScanLine(p,a) (p)->GetScanLine(a)
1864 #define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1865 #define IDirectDraw7_Initialize(p,a) (p)->Initialize(a)
1866 #define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1867 #define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1868 #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1869 #define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1870 /*** added in IDirectDraw2 ***/
1871 #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1872 /*** added in IDirectDraw4 ***/
1873 #define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1874 #define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
1875 #define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
1876 #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
1877 /*** added in IDirectDraw 7 ***/
1878 #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->StartModeTest(a,b,c)
1879 #define IDirectDraw7_EvaluateMode(p,a,b) (p)->EvaluateMode(a,b)
1880 #endif
1883 /*****************************************************************************
1884 * IDirectDrawSurface interface
1886 #define INTERFACE IDirectDrawSurface
1887 DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
1889 /*** IUnknown methods ***/
1890 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1891 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1892 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1893 /*** IDirectDrawSurface methods ***/
1894 /*0c*/ STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface *attachment) PURE;
1895 /*10*/ STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1896 /*14*/ STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface *src_surface, RECT *src_rect,
1897 DWORD flags, DDBLTFX *fx) PURE;
1898 /*18*/ STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
1899 /*1c*/ STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface *src_surface,
1900 RECT *src_rect, DWORD flags) PURE;
1901 /*20*/ STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface *attachment) PURE;
1902 /*24*/ STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1903 /*28*/ STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1904 /*2c*/ STDMETHOD(Flip)(THIS_ IDirectDrawSurface *dst_surface, DWORD flags) PURE;
1905 /*30*/ STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface **attachment) PURE;
1906 /*34*/ STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1907 /*38*/ STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
1908 /*3c*/ STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
1909 /*40*/ STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
1910 /*44*/ STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
1911 /*48*/ STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1912 /*4c*/ STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1913 /*50*/ STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
1914 /*54*/ STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
1915 /*58*/ STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1916 /*5c*/ STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
1917 /*60*/ STDMETHOD(IsLost)(THIS) PURE;
1918 /*64*/ STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
1919 /*68*/ STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1920 /*6c*/ STDMETHOD(Restore)(THIS) PURE;
1921 /*70*/ STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
1922 /*74*/ STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
1923 /*78*/ STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1924 /*7c*/ STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
1925 /*80*/ STDMETHOD(Unlock)(THIS_ void *data) PURE;
1926 /*84*/ STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface *dst_surface,
1927 RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx) PURE;
1928 /*88*/ STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1929 /*8c*/ STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface *reference_surface) PURE;
1931 #undef INTERFACE
1933 #if !defined(__cplusplus) || defined(CINTERFACE)
1934 /*** IUnknown methods ***/
1935 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1936 #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
1937 #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
1938 /*** IDirectDrawSurface methods ***/
1939 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1940 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1941 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1942 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1943 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1944 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1945 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1946 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1947 #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1948 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1949 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1950 #define IDirectDrawSurface_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
1951 #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1952 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1953 #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1954 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1955 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1956 #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1957 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1958 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1959 #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1960 #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
1961 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1962 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
1963 #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
1964 #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
1965 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
1966 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
1967 #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
1968 #define IDirectDrawSurface_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
1969 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
1970 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
1971 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
1972 #else
1973 /*** IUnknown methods ***/
1974 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1975 #define IDirectDrawSurface_AddRef(p) (p)->AddRef()
1976 #define IDirectDrawSurface_Release(p) (p)->Release()
1977 /*** IDirectDrawSurface methods ***/
1978 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
1979 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
1980 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
1981 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
1982 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
1983 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
1984 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
1985 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
1986 #define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
1987 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
1988 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
1989 #define IDirectDrawSurface_GetCaps(p,a) (p)->GetCaps(a)
1990 #define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
1991 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
1992 #define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
1993 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
1994 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
1995 #define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
1996 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
1997 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
1998 #define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
1999 #define IDirectDrawSurface_IsLost(p) (p)->IsLost()
2000 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2001 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
2002 #define IDirectDrawSurface_Restore(p) (p)->Restore()
2003 #define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
2004 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2005 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2006 #define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
2007 #define IDirectDrawSurface_Unlock(p,a) (p)->Unlock(a)
2008 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2009 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2010 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2011 #endif
2014 /*****************************************************************************
2015 * IDirectDrawSurface2 interface
2017 /* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
2018 * have been converted to LPDIRECTDRAWSURFACE2.
2020 #define INTERFACE IDirectDrawSurface2
2021 DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
2023 /*** IUnknown methods ***/
2024 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2025 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2026 STDMETHOD_(ULONG,Release)(THIS) PURE;
2027 /*** IDirectDrawSurface2 methods ***/
2028 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface2 *attachment) PURE;
2029 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2030 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface2 *src_surface, RECT *src_rect,
2031 DWORD flags, DDBLTFX *fx) PURE;
2032 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2033 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface2 *src_surface,
2034 RECT *src_rect, DWORD flags) PURE;
2035 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface2 *attachment) PURE;
2036 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2037 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2038 STDMETHOD(Flip)(THIS_ IDirectDrawSurface2 *dst_surface, DWORD flags) PURE;
2039 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface2 **attachment) PURE;
2040 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2041 STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
2042 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2043 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2044 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2045 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2046 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2047 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2048 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2049 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
2050 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
2051 STDMETHOD(IsLost)(THIS) PURE;
2052 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
2053 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2054 STDMETHOD(Restore)(THIS) PURE;
2055 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2056 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2057 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2058 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2059 STDMETHOD(Unlock)(THIS_ void *data) PURE;
2060 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface2 *dst_surface, RECT *dst_rect,
2061 DWORD flags, DDOVERLAYFX *fx) PURE;
2062 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2063 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface2 *reference_surface) PURE;
2064 /* added in v2 */
2065 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2066 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2067 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2069 #undef INTERFACE
2071 #if !defined(__cplusplus) || defined(CINTERFACE)
2072 /*** IUnknown methods ***/
2073 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2074 #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
2075 #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
2076 /*** IDirectDrawSurface methods (almost) ***/
2077 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2078 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2079 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2080 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2081 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2082 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2083 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2084 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2085 #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2086 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2087 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2088 #define IDirectDrawSurface2_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2089 #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2090 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2091 #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2092 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2093 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2094 #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2095 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2096 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2097 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2098 #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
2099 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2100 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2101 #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
2102 #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2103 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2104 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2105 #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2106 #define IDirectDrawSurface2_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2107 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2108 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2109 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2110 /*** IDirectDrawSurface2 methods ***/
2111 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2112 #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2113 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2114 #else
2115 /*** IUnknown methods ***/
2116 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2117 #define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
2118 #define IDirectDrawSurface2_Release(p) (p)->Release()
2119 /*** IDirectDrawSurface methods (almost) ***/
2120 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2121 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2122 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2123 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2124 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2125 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2126 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2127 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2128 #define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
2129 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2130 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
2131 #define IDirectDrawSurface2_GetCaps(p,a) (p)->GetCaps(a)
2132 #define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
2133 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2134 #define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
2135 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2136 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2137 #define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
2138 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2139 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2140 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
2141 #define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
2142 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2143 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
2144 #define IDirectDrawSurface2_Restore(p) (p)->Restore()
2145 #define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
2146 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2147 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2148 #define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
2149 #define IDirectDrawSurface2_Unlock(p,a) (p)->Unlock(a)
2150 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2151 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2152 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2153 /*** IDirectDrawSurface2 methods ***/
2154 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
2155 #define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
2156 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
2157 #endif
2160 /*****************************************************************************
2161 * IDirectDrawSurface3 interface
2163 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
2164 * have been converted to LPDIRECTDRAWSURFACE3.
2166 #define INTERFACE IDirectDrawSurface3
2167 DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
2169 /*** IUnknown methods ***/
2170 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2171 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2172 STDMETHOD_(ULONG,Release)(THIS) PURE;
2173 /*** IDirectDrawSurface3 methods ***/
2174 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface3 *attachment) PURE;
2175 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2176 STDMETHOD(Blt)(THIS_ RECT *dst_rest, IDirectDrawSurface3 *src_surface, RECT *src_rect,
2177 DWORD flags, DDBLTFX *fx) PURE;
2178 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2179 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface3 *src_surface,
2180 RECT *src_rect, DWORD flags) PURE;
2181 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface3 *attachment) PURE;
2182 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2183 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2184 STDMETHOD(Flip)(THIS_ IDirectDrawSurface3 *dst_surface, DWORD flags) PURE;
2185 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface3 **attachment) PURE;
2186 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2187 STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
2188 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2189 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2190 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2191 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2192 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2193 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2194 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2195 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
2196 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
2197 STDMETHOD(IsLost)(THIS) PURE;
2198 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
2199 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2200 STDMETHOD(Restore)(THIS) PURE;
2201 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2202 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2203 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2204 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2205 STDMETHOD(Unlock)(THIS_ void *data) PURE;
2206 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface3 *dst_surface, RECT *dst_rect,
2207 DWORD flags, DDOVERLAYFX *fx) PURE;
2208 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2209 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface3 *reference_surface) PURE;
2210 /* added in v2 */
2211 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2212 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2213 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2214 /* added in v3 */
2215 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc, DWORD flags) PURE;
2217 #undef INTERFACE
2219 #if !defined(__cplusplus) || defined(CINTERFACE)
2220 /*** IUnknown methods ***/
2221 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2222 #define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
2223 #define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
2224 /*** IDirectDrawSurface methods (almost) ***/
2225 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2226 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2227 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2228 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2229 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2230 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2231 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2232 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2233 #define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2234 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2235 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2236 #define IDirectDrawSurface3_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2237 #define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2238 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2239 #define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2240 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2241 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2242 #define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2243 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2244 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2245 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2246 #define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
2247 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2248 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2249 #define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
2250 #define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2251 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2252 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2253 #define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2254 #define IDirectDrawSurface3_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2255 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2256 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2257 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2258 /*** IDirectDrawSurface2 methods ***/
2259 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2260 #define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2261 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2262 /*** IDirectDrawSurface3 methods ***/
2263 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2264 #else
2265 /*** IUnknown methods ***/
2266 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2267 #define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
2268 #define IDirectDrawSurface3_Release(p) (p)->Release()
2269 /*** IDirectDrawSurface methods (almost) ***/
2270 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2271 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2272 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2273 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2274 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2275 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2276 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2277 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2278 #define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
2279 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2280 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
2281 #define IDirectDrawSurface3_GetCaps(p,a) (p)->GetCaps(a)
2282 #define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
2283 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2284 #define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
2285 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2286 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2287 #define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
2288 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2289 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2290 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
2291 #define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
2292 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2293 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
2294 #define IDirectDrawSurface3_Restore(p) (p)->Restore()
2295 #define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
2296 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2297 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2298 #define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
2299 #define IDirectDrawSurface3_Unlock(p,a) (p)->Unlock(a)
2300 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2301 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2302 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2303 /*** IDirectDrawSurface2 methods ***/
2304 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
2305 #define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
2306 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
2307 /*** IDirectDrawSurface3 methods ***/
2308 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2309 #endif
2312 /*****************************************************************************
2313 * IDirectDrawSurface4 interface
2315 /* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2.
2317 #define INTERFACE IDirectDrawSurface4
2318 DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown)
2320 /*** IUnknown methods ***/
2321 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2322 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2323 STDMETHOD_(ULONG,Release)(THIS) PURE;
2324 /*** IDirectDrawSurface4 methods ***/
2325 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface4 *attachment) PURE;
2326 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2327 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect,
2328 DWORD flags, DDBLTFX *fx) PURE;
2329 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2330 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface4 *src_surface,
2331 RECT *src_rect, DWORD flags) PURE;
2332 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface4 *attachment) PURE;
2333 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
2334 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
2335 STDMETHOD(Flip)(THIS_ IDirectDrawSurface4 *dst_surface, DWORD flags) PURE;
2336 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS2 *caps, IDirectDrawSurface4 **attachment) PURE;
2337 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2338 STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE;
2339 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2340 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2341 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2342 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2343 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2344 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2345 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2346 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
2347 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc) PURE;
2348 STDMETHOD(IsLost)(THIS) PURE;
2349 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE event) PURE;
2350 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2351 STDMETHOD(Restore)(THIS) PURE;
2352 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2353 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2354 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2355 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2356 STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
2357 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect,
2358 DWORD flags, DDOVERLAYFX *fx) PURE;
2359 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2360 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface4 *reference_surface) PURE;
2361 /* added in v2 */
2362 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2363 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2364 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2365 /* added in v3 */
2366 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc, DWORD flags) PURE;
2367 /* added in v4 */
2368 STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, void *data, DWORD size, DWORD flags) PURE;
2369 STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, void *data, DWORD *size) PURE;
2370 STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
2371 STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
2372 STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
2374 #undef INTERFACE
2376 #if !defined(__cplusplus) || defined(CINTERFACE)
2377 /*** IUnknown methods ***/
2378 #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2379 #define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
2380 #define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
2381 /*** IDirectDrawSurface (almost) methods ***/
2382 #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2383 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2384 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2385 #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2386 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2387 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2388 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2389 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2390 #define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2391 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2392 #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2393 #define IDirectDrawSurface4_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2394 #define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2395 #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2396 #define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2397 #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2398 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2399 #define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2400 #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2401 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2402 #define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2403 #define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
2404 #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2405 #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2406 #define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
2407 #define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2408 #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2409 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2410 #define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2411 #define IDirectDrawSurface4_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2412 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2413 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2414 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2415 /*** IDirectDrawSurface2 methods ***/
2416 #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2417 #define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2418 #define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2419 /*** IDirectDrawSurface3 methods ***/
2420 #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2421 /*** IDirectDrawSurface4 methods ***/
2422 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
2423 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
2424 #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
2425 #define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
2426 #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
2427 #else
2428 /*** IUnknown methods ***/
2429 #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2430 #define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
2431 #define IDirectDrawSurface4_Release(p) (p)->Release()
2432 /*** IDirectDrawSurface (almost) methods ***/
2433 #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2434 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2435 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2436 #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2437 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2438 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2439 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2440 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2441 #define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
2442 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2443 #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
2444 #define IDirectDrawSurface4_GetCaps(p,a) (p)->GetCaps(a)
2445 #define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
2446 #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2447 #define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
2448 #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2449 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2450 #define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
2451 #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2452 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2453 #define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
2454 #define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
2455 #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2456 #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
2457 #define IDirectDrawSurface4_Restore(p) (p)->Restore()
2458 #define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
2459 #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2460 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2461 #define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
2462 #define IDirectDrawSurface4_Unlock(p,a) (p)->Unlock(a)
2463 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2464 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2465 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2466 /*** IDirectDrawSurface2 methods ***/
2467 #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
2468 #define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
2469 #define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
2470 /*** IDirectDrawSurface3 methods ***/
2471 #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2472 /*** IDirectDrawSurface4 methods ***/
2473 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
2474 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
2475 #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
2476 #define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
2477 #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
2478 #endif
2481 /*****************************************************************************
2482 * IDirectDrawSurface7 interface
2484 #define INTERFACE IDirectDrawSurface7
2485 DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown)
2487 /*** IUnknown methods ***/
2488 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2489 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2490 STDMETHOD_(ULONG,Release)(THIS) PURE;
2491 /*** IDirectDrawSurface7 methods ***/
2492 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface7 *attachment) PURE;
2493 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2494 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect,
2495 DWORD flags, DDBLTFX *fx) PURE;
2496 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2497 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface7 *src_surface,
2498 RECT *src_rect, DWORD flags) PURE;
2499 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface7 *attachment) PURE;
2500 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
2501 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
2502 STDMETHOD(Flip)(THIS_ IDirectDrawSurface7 *dst_surface, DWORD flags) PURE;
2503 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS2 *caps, IDirectDrawSurface7 **attachment) PURE;
2504 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2505 STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE;
2506 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2507 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2508 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2509 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2510 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2511 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2512 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2513 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
2514 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc) PURE;
2515 STDMETHOD(IsLost)(THIS) PURE;
2516 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE event) PURE;
2517 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2518 STDMETHOD(Restore)(THIS) PURE;
2519 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2520 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2521 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2522 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2523 STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
2524 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect,
2525 DWORD flags, DDOVERLAYFX *fx) PURE;
2526 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2527 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface7 *reference_surface) PURE;
2528 /* added in v2 */
2529 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2530 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2531 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2532 /* added in v3 */
2533 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc, DWORD flags) PURE;
2534 /* added in v4 */
2535 STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, void *data, DWORD size, DWORD flags) PURE;
2536 STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, void *data, DWORD *size) PURE;
2537 STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
2538 STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
2539 STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
2540 /* added in v7 */
2541 STDMETHOD(SetPriority)(THIS_ DWORD prio) PURE;
2542 STDMETHOD(GetPriority)(THIS_ LPDWORD prio) PURE;
2543 STDMETHOD(SetLOD)(THIS_ DWORD lod) PURE;
2544 STDMETHOD(GetLOD)(THIS_ LPDWORD lod) PURE;
2546 #undef INTERFACE
2548 #if !defined(__cplusplus) || defined(CINTERFACE)
2549 /*** IUnknown methods ***/
2550 #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2551 #define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p)
2552 #define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p)
2553 /*** IDirectDrawSurface (almost) methods ***/
2554 #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2555 #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2556 #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2557 #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2558 #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2559 #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2560 #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2561 #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2562 #define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2563 #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2564 #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2565 #define IDirectDrawSurface7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2566 #define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2567 #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2568 #define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2569 #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2570 #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2571 #define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2572 #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2573 #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2574 #define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2575 #define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p)
2576 #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2577 #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2578 #define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p)
2579 #define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2580 #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2581 #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2582 #define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2583 #define IDirectDrawSurface7_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2584 #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2585 #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2586 #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2587 /*** IDirectDrawSurface2 methods ***/
2588 #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2589 #define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2590 #define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2591 /*** IDirectDrawSurface3 methods ***/
2592 #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2593 /*** IDirectDrawSurface4 methods ***/
2594 #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
2595 #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
2596 #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
2597 #define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
2598 #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
2599 /*** IDirectDrawSurface7 methods ***/
2600 #define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
2601 #define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
2602 #define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
2603 #define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a)
2604 #else
2605 /*** IUnknown methods ***/
2606 #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2607 #define IDirectDrawSurface7_AddRef(p) (p)->AddRef()
2608 #define IDirectDrawSurface7_Release(p) (p)->Release()
2609 /*** IDirectDrawSurface (almost) methods ***/
2610 #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2611 #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2612 #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2613 #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2614 #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2615 #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2616 #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2617 #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2618 #define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b)
2619 #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2620 #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a)
2621 #define IDirectDrawSurface7_GetCaps(p,a) (p)->GetCaps(a)
2622 #define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a)
2623 #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2624 #define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a)
2625 #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2626 #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2627 #define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a)
2628 #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2629 #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2630 #define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b)
2631 #define IDirectDrawSurface7_IsLost(p) (p)->IsLost()
2632 #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2633 #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a)
2634 #define IDirectDrawSurface7_Restore(p) (p)->Restore()
2635 #define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a)
2636 #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2637 #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2638 #define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a)
2639 #define IDirectDrawSurface7_Unlock(p,a) (p)->Unlock(a)
2640 #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2641 #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2642 #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2643 /*** IDirectDrawSurface2 methods ***/
2644 #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a)
2645 #define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a)
2646 #define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a)
2647 /*** IDirectDrawSurface3 methods ***/
2648 #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2649 /*** IDirectDrawSurface4 methods ***/
2650 #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
2651 #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
2652 #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a)
2653 #define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
2654 #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
2655 /*** IDirectDrawSurface7 methods ***/
2656 #define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a)
2657 #define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a)
2658 #define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a)
2659 #define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a)
2660 #endif
2662 /*****************************************************************************
2663 * IDirectDrawColorControl interface
2665 #define INTERFACE IDirectDrawColorControl
2666 DECLARE_INTERFACE_(IDirectDrawColorControl,IUnknown)
2668 /*** IUnknown methods ***/
2669 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2670 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2671 STDMETHOD_(ULONG,Release)(THIS) PURE;
2672 /*** IDirectDrawColorControl methods ***/
2673 STDMETHOD(GetColorControls)(THIS_ DDCOLORCONTROL *color_control) PURE;
2674 STDMETHOD(SetColorControls)(THIS_ DDCOLORCONTROL *color_control) PURE;
2676 #undef INTERFACE
2678 #if !defined(__cplusplus) || defined(CINTERFACE)
2679 /*** IUnknown methods ***/
2680 #define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2681 #define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
2682 #define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
2683 /*** IDirectDrawColorControl methods ***/
2684 #define IDirectDrawColorControl_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
2685 #define IDirectDrawColorControl_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
2686 #else
2687 /*** IUnknown methods ***/
2688 #define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2689 #define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
2690 #define IDirectDrawColorControl_Release(p) (p)->Release()
2691 /*** IDirectDrawColorControl methods ***/
2692 #define IDirectDrawColorControl_GetColorControls(p,a) (p)->GetColorControls(a)
2693 #define IDirectDrawColorControl_SetColorControls(p,a) (p)->SetColorControls(a)
2694 #endif
2696 /*****************************************************************************
2697 * IDirectDrawGammaControl interface
2699 #define INTERFACE IDirectDrawGammaControl
2700 DECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown)
2702 /*** IUnknown methods ***/
2703 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2704 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2705 STDMETHOD_(ULONG,Release)(THIS) PURE;
2706 /*** IDirectDrawGammaControl methods ***/
2707 STDMETHOD(GetGammaRamp)(THIS_ DWORD flags, DDGAMMARAMP *gamma_ramp) PURE;
2708 STDMETHOD(SetGammaRamp)(THIS_ DWORD flags, DDGAMMARAMP *gamma_ramp) PURE;
2710 #undef INTERFACE
2712 #if !defined(__cplusplus) || defined(CINTERFACE)
2713 /*** IUnknown methods ***/
2714 #define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2715 #define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
2716 #define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
2717 /*** IDirectDrawGammaControl methods ***/
2718 #define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
2719 #define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b)
2720 #else
2721 /*** IUnknown methods ***/
2722 #define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2723 #define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
2724 #define IDirectDrawGammaControl_Release(p) (p)->Release()
2725 /*** IDirectDrawGammaControl methods ***/
2726 #define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->GetGammaRamp(a,b)
2727 #define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->SetGammaRamp(a,b)
2728 #endif
2731 HRESULT WINAPI DirectDrawCreate(GUID *driver_guid, IDirectDraw **ddraw, IUnknown *outer);
2732 HRESULT WINAPI DirectDrawCreateEx(GUID *driver_guid, void **ddraw, REFIID interface_iid, IUnknown *outer);
2733 HRESULT WINAPI DirectDrawCreateClipper(DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer);
2735 #ifdef __cplusplus
2736 } /* extern "C" */
2737 #endif /* defined(__cplusplus) */
2739 #endif /* __DDRAW_INCLUDED__ */