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