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