fixed a number of long standing bugs:
[wine/dcerpc.git] / include / ddraw.h
blobcffe3332702e3b61f9935f89299361893f2a404a
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 IDirectDraw7 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
226 #define DDFLIP_STEREO 0x00000010
227 #define DDFLIP_DONOTWAIT 0x00000020
229 /* dwFlags for GetBltStatus */
230 #define DDGBS_CANBLT 0x00000001
231 #define DDGBS_ISBLTDONE 0x00000002
233 /* DDSCAPS.dwCaps */
234 /* reserved1, was 3d capable */
235 #define DDSCAPS_RESERVED1 0x00000001
236 /* surface contains alpha information */
237 #define DDSCAPS_ALPHA 0x00000002
238 /* this surface is a backbuffer */
239 #define DDSCAPS_BACKBUFFER 0x00000004
240 /* complex surface structure */
241 #define DDSCAPS_COMPLEX 0x00000008
242 /* part of surface flipping structure */
243 #define DDSCAPS_FLIP 0x00000010
244 /* this surface is the frontbuffer surface */
245 #define DDSCAPS_FRONTBUFFER 0x00000020
246 /* this is a plain offscreen surface */
247 #define DDSCAPS_OFFSCREENPLAIN 0x00000040
248 /* overlay */
249 #define DDSCAPS_OVERLAY 0x00000080
250 /* palette objects can be created and attached to us */
251 #define DDSCAPS_PALETTE 0x00000100
252 /* primary surface (the one the user looks at currently)(right eye)*/
253 #define DDSCAPS_PRIMARYSURFACE 0x00000200
254 /* primary surface for left eye */
255 #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
256 /* surface exists in systemmemory */
257 #define DDSCAPS_SYSTEMMEMORY 0x00000800
258 /* surface can be used as a texture */
259 #define DDSCAPS_TEXTURE 0x00001000
260 /* surface may be destination for 3d rendering */
261 #define DDSCAPS_3DDEVICE 0x00002000
262 /* surface exists in videomemory */
263 #define DDSCAPS_VIDEOMEMORY 0x00004000
264 /* surface changes immediately visible */
265 #define DDSCAPS_VISIBLE 0x00008000
266 /* write only surface */
267 #define DDSCAPS_WRITEONLY 0x00010000
268 /* zbuffer surface */
269 #define DDSCAPS_ZBUFFER 0x00020000
270 /* has its own DC */
271 #define DDSCAPS_OWNDC 0x00040000
272 /* surface should be able to receive live video */
273 #define DDSCAPS_LIVEVIDEO 0x00080000
274 /* should be able to have a hw codec decompress stuff into it */
275 #define DDSCAPS_HWCODEC 0x00100000
276 /* mode X (320x200 or 320x240) surface */
277 #define DDSCAPS_MODEX 0x00200000
278 /* one mipmap surface (1 level) */
279 #define DDSCAPS_MIPMAP 0x00400000
280 #define DDSCAPS_RESERVED2 0x00800000
281 /* memory allocation delayed until Load() */
282 #define DDSCAPS_ALLOCONLOAD 0x04000000
283 /* Indicates that the surface will recieve data from a video port */
284 #define DDSCAPS_VIDEOPORT 0x08000000
285 /* surface is in local videomemory */
286 #define DDSCAPS_LOCALVIDMEM 0x10000000
287 /* surface is in nonlocal videomemory */
288 #define DDSCAPS_NONLOCALVIDMEM 0x20000000
289 /* surface is a standard VGA mode surface (NOT ModeX) */
290 #define DDSCAPS_STANDARDVGAMODE 0x40000000
291 /* optimized? surface */
292 #define DDSCAPS_OPTIMIZED 0x80000000
294 typedef struct _DDSCAPS {
295 DWORD dwCaps; /* capabilities of surface wanted */
296 } DDSCAPS,*LPDDSCAPS;
298 /* DDSCAPS2.dwCaps2 */
299 /* indicates the surface will receive data from a video port using
300 deinterlacing hardware. */
301 #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002
302 /* indicates the surface will be locked very frequently. */
303 #define DDSCAPS2_HINTDYNAMIC 0x00000004
304 /* indicates surface can be re-ordered or retiled on load() */
305 #define DDSCAPS2_HINTSTATIC 0x00000008
306 /* indicates surface to be managed by directdraw/direct3D */
307 #define DDSCAPS2_TEXTUREMANAGE 0x00000010
308 /* reserved bits */
309 #define DDSCAPS2_RESERVED1 0x00000020
310 #define DDSCAPS2_RESERVED2 0x00000040
311 /* indicates surface will never be locked again */
312 #define DDSCAPS2_OPAQUE 0x00000080
313 /* set at CreateSurface() time to indicate antialising will be used */
314 #define DDSCAPS2_HINTANTIALIASING 0x00000100
315 /* set at CreateSurface() time to indicate cubic environment map */
316 #define DDSCAPS2_CUBEMAP 0x00000200
317 /* face flags for cube maps */
318 #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
319 #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
320 #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
321 #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
322 #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
323 #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
324 /* specifies all faces of a cube for CreateSurface() */
325 #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
326 DDSCAPS2_CUBEMAP_NEGATIVEX |\
327 DDSCAPS2_CUBEMAP_POSITIVEY |\
328 DDSCAPS2_CUBEMAP_NEGATIVEY |\
329 DDSCAPS2_CUBEMAP_POSITIVEZ |\
330 DDSCAPS2_CUBEMAP_NEGATIVEZ )
331 /* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */
332 #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000
333 /* indicates texture surface to be managed by Direct3D *only* */
334 #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000
335 /* indicates managed surface that can safely be lost */
336 #define DDSCAPS2_DONOTPERSIST 0x00040000
337 /* indicates surface is part of a stereo flipping chain */
338 #define DDSCAPS2_STEREOSURFACELEFT 0x00080000
340 typedef struct _DDSCAPS2 {
341 DWORD dwCaps; /* capabilities of surface wanted */
342 DWORD dwCaps2; /* additional capabilities */
343 DWORD dwCaps3; /* reserved capabilities */
344 DWORD dwCaps4; /* more reserved capabilities */
345 } DDSCAPS2,*LPDDSCAPS2;
347 #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
349 typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */
351 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
352 DWORD dwCaps; /* driver specific capabilities */
353 DWORD dwCaps2; /* more driver specific capabilites */
354 DWORD dwCKeyCaps; /* color key capabilities of the surface */
355 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
356 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
357 DWORD dwPalCaps; /* palette capabilities */
358 DWORD dwSVCaps; /* stereo vision capabilities */
359 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
360 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
361 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
362 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
363 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
364 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
365 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
366 DWORD dwVidMemTotal; /* total amount of video memory */
367 DWORD dwVidMemFree; /* amount of free video memory */
368 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
369 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
370 DWORD dwNumFourCCCodes; /* number of four cc codes */
371 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
372 DWORD dwAlignSizeSrc; /* source rectangle byte size */
373 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
374 DWORD dwAlignSizeDest; /* dest rectangle byte size */
375 DWORD dwAlignStrideAlign; /* stride alignment */
376 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
377 DDSCAPS ddsOldCaps; /* old DDSCAPS - superceded for DirectX6+ */
378 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
379 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
380 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
381 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
382 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
383 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
384 DWORD dwReserved1;
385 DWORD dwReserved2;
386 DWORD dwReserved3;
387 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
388 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
389 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
390 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
391 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
392 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
393 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
394 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
395 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
396 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
397 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
398 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
399 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
400 DWORD dwCurrVideoPorts; /* current number of video ports used */
401 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
402 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
403 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
404 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
405 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
406 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
407 DDSCAPS2 ddsCaps; /* surface capabilities */
408 } DDCAPS_DX7,*LPDDCAPS_DX7;
410 typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */
412 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
413 DWORD dwCaps; /* driver specific capabilities */
414 DWORD dwCaps2; /* more driver specific capabilites */
415 DWORD dwCKeyCaps; /* color key capabilities of the surface */
416 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
417 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
418 DWORD dwPalCaps; /* palette capabilities */
419 DWORD dwSVCaps; /* stereo vision capabilities */
420 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
421 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
422 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
423 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
424 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
425 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
426 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
427 DWORD dwVidMemTotal; /* total amount of video memory */
428 DWORD dwVidMemFree; /* amount of free video memory */
429 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
430 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
431 DWORD dwNumFourCCCodes; /* number of four cc codes */
432 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
433 DWORD dwAlignSizeSrc; /* source rectangle byte size */
434 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
435 DWORD dwAlignSizeDest; /* dest rectangle byte size */
436 DWORD dwAlignStrideAlign; /* stride alignment */
437 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
438 DDSCAPS ddsOldCaps; /* old DDSCAPS - superceded for DirectX6+ */
439 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
440 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
441 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
442 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
443 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
444 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
445 DWORD dwReserved1;
446 DWORD dwReserved2;
447 DWORD dwReserved3;
448 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
449 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
450 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
451 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
452 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
453 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
454 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
455 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
456 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
457 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
458 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
459 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
460 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
461 DWORD dwCurrVideoPorts; /* current number of video ports used */
462 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
463 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
464 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
465 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
466 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
467 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
468 /* and one new member for DirectX 6 */
469 DDSCAPS2 ddsCaps; /* surface capabilities */
470 } DDCAPS_DX6,*LPDDCAPS_DX6;
472 typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */
474 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
475 DWORD dwCaps; /* driver specific capabilities */
476 DWORD dwCaps2; /* more driver specific capabilites */
477 DWORD dwCKeyCaps; /* color key capabilities of the surface */
478 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
479 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
480 DWORD dwPalCaps; /* palette capabilities */
481 DWORD dwSVCaps; /* stereo vision capabilities */
482 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
483 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
484 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
485 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
486 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
487 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
488 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
489 DWORD dwVidMemTotal; /* total amount of video memory */
490 DWORD dwVidMemFree; /* amount of free video memory */
491 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
492 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
493 DWORD dwNumFourCCCodes; /* number of four cc codes */
494 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
495 DWORD dwAlignSizeSrc; /* source rectangle byte size */
496 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
497 DWORD dwAlignSizeDest; /* dest rectangle byte size */
498 DWORD dwAlignStrideAlign; /* stride alignment */
499 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
500 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
501 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
502 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
503 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
504 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
505 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
506 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
507 DWORD dwReserved1;
508 DWORD dwReserved2;
509 DWORD dwReserved3;
510 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
511 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
512 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
513 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
514 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
515 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
516 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
517 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
518 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
519 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
520 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
521 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
522 /* the following are the new DirectX 5 members */
523 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
524 DWORD dwCurrVideoPorts; /* current number of video ports used */
525 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
526 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
527 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
528 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
529 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
530 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
531 } DDCAPS_DX5,*LPDDCAPS_DX5;
533 typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */
535 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
536 DWORD dwCaps; /* driver specific capabilities */
537 DWORD dwCaps2; /* more driver specific capabilites */
538 DWORD dwCKeyCaps; /* color key capabilities of the surface */
539 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
540 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
541 DWORD dwPalCaps; /* palette capabilities */
542 DWORD dwSVCaps; /* stereo vision capabilities */
543 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
544 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
545 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
546 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
547 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
548 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
549 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
550 DWORD dwVidMemTotal; /* total amount of video memory */
551 DWORD dwVidMemFree; /* amount of free video memory */
552 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
553 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
554 DWORD dwNumFourCCCodes; /* number of four cc codes */
555 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
556 DWORD dwAlignSizeSrc; /* source rectangle byte size */
557 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
558 DWORD dwAlignSizeDest; /* dest rectangle byte size */
559 DWORD dwAlignStrideAlign; /* stride alignment */
560 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
561 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
562 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
563 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
564 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
565 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
566 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
567 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
568 DWORD dwReserved1;
569 DWORD dwReserved2;
570 DWORD dwReserved3;
571 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
572 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
573 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
574 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
575 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
576 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
577 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
578 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
579 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
580 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
581 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
582 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
583 DWORD dwReserved4;
584 DWORD dwReserved5;
585 DWORD dwReserved6;
586 } DDCAPS_DX3,*LPDDCAPS_DX3;
588 /* set caps struct according to DIRECTDRAW_VERSION */
590 #if DIRECTDRAW_VERSION <= 0x300
591 typedef DDCAPS_DX3 DDCAPS;
592 #elif DIRECTDRAW_VERSION <= 0x500
593 typedef DDCAPS_DX5 DDCAPS;
594 #elif DIRECTDRAW_VERSION <= 0x600
595 typedef DDCAPS_DX6 DDCAPS;
596 #else
597 typedef DDCAPS_DX7 DDCAPS;
598 #endif
600 typedef DDCAPS *LPDDCAPS;
602 /* DDCAPS.dwCaps */
603 #define DDCAPS_3D 0x00000001
604 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
605 #define DDCAPS_ALIGNSIZEDEST 0x00000004
606 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
607 #define DDCAPS_ALIGNSIZESRC 0x00000010
608 #define DDCAPS_ALIGNSTRIDE 0x00000020
609 #define DDCAPS_BLT 0x00000040
610 #define DDCAPS_BLTQUEUE 0x00000080
611 #define DDCAPS_BLTFOURCC 0x00000100
612 #define DDCAPS_BLTSTRETCH 0x00000200
613 #define DDCAPS_GDI 0x00000400
614 #define DDCAPS_OVERLAY 0x00000800
615 #define DDCAPS_OVERLAYCANTCLIP 0x00001000
616 #define DDCAPS_OVERLAYFOURCC 0x00002000
617 #define DDCAPS_OVERLAYSTRETCH 0x00004000
618 #define DDCAPS_PALETTE 0x00008000
619 #define DDCAPS_PALETTEVSYNC 0x00010000
620 #define DDCAPS_READSCANLINE 0x00020000
621 #define DDCAPS_STEREOVIEW 0x00040000
622 #define DDCAPS_VBI 0x00080000
623 #define DDCAPS_ZBLTS 0x00100000
624 #define DDCAPS_ZOVERLAYS 0x00200000
625 #define DDCAPS_COLORKEY 0x00400000
626 #define DDCAPS_ALPHA 0x00800000
627 #define DDCAPS_COLORKEYHWASSIST 0x01000000
628 #define DDCAPS_NOHARDWARE 0x02000000
629 #define DDCAPS_BLTCOLORFILL 0x04000000
630 #define DDCAPS_BANKSWITCHED 0x08000000
631 #define DDCAPS_BLTDEPTHFILL 0x10000000
632 #define DDCAPS_CANCLIP 0x20000000
633 #define DDCAPS_CANCLIPSTRETCHED 0x40000000
634 #define DDCAPS_CANBLTSYSMEM 0x80000000
636 /* DDCAPS.dwCaps2 */
637 #define DDCAPS2_CERTIFIED 0x00000001
638 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
639 #define DDCAPS2_VIDEOPORT 0x00000004
640 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
641 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
642 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
643 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
644 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
645 #define DDCAPS2_CANDROPZ16BIT 0x00000100
646 #define DDCAPS2_NONLOCALVIDMEM 0x00000200
647 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
648 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
649 #define DDCAPS2_WIDESURFACES 0x00001000
650 #define DDCAPS2_CANFLIPODDEVEN 0x00002000
651 #define DDCAPS2_CANBOBHARDWARE 0x00004000
652 #define DDCAPS2_COPYFOURCC 0x00008000
653 #define DDCAPS2_PRIMARYGAMMA 0x00020000
654 #define DDCAPS2_CANRENDERWINDOWED 0x00080000
655 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
656 #define DDCAPS2_FLIPINTERVAL 0x00200000
657 #define DDCAPS2_FLIPNOVSYNC 0x00400000
658 #define DDCAPS2_CANMANAGETEXTURE 0x00800000
659 #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
660 #define DDCAPS2_STEREO 0x02000000
661 #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
664 /* Set/Get Colour Key Flags */
665 #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
666 #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
667 #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
668 #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
669 #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
671 typedef struct _DDCOLORKEY
673 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
674 * be treated as Color Key, inclusive
676 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
677 * to be treated as Color Key, inclusive
679 } DDCOLORKEY,*LPDDCOLORKEY;
681 /* ddCKEYCAPS bits */
682 #define DDCKEYCAPS_DESTBLT 0x00000001
683 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
684 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
685 #define DDCKEYCAPS_DESTBLTYUV 0x00000008
686 #define DDCKEYCAPS_DESTOVERLAY 0x00000010
687 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
688 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
689 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
690 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
691 #define DDCKEYCAPS_SRCBLT 0x00000200
692 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
693 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
694 #define DDCKEYCAPS_SRCBLTYUV 0x00001000
695 #define DDCKEYCAPS_SRCOVERLAY 0x00002000
696 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
697 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
698 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
699 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
700 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
702 typedef struct _DDPIXELFORMAT {
703 DWORD dwSize; /* 0: size of structure */
704 DWORD dwFlags; /* 4: pixel format flags */
705 DWORD dwFourCC; /* 8: (FOURCC code) */
706 union {
707 DWORD dwRGBBitCount; /* C: how many bits per pixel */
708 DWORD dwYUVBitCount; /* C: how many bits per pixel */
709 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
710 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
711 } DUMMYUNIONNAME;
712 union {
713 DWORD dwRBitMask; /* 10: mask for red bit*/
714 DWORD dwYBitMask; /* 10: mask for Y bits*/
715 } DUMMYUNIONNAME1;
716 union {
717 DWORD dwGBitMask; /* 14: mask for green bits*/
718 DWORD dwUBitMask; /* 14: mask for U bits*/
719 } DUMMYUNIONNAME2;
720 union {
721 DWORD dwBBitMask; /* 18: mask for blue bits*/
722 DWORD dwVBitMask; /* 18: mask for V bits*/
723 } DUMMYUNIONNAME3;
724 union {
725 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
726 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
727 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
728 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
729 } DUMMYUNIONNAME4;
730 /* 20: next structure */
731 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
733 /* DDCAPS.dwFXCaps */
734 #define DDFXCAPS_BLTALPHA 0x00000001
735 #define DDFXCAPS_OVERLAYALPHA 0x00000004
736 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
737 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
738 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
739 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
740 #define DDFXCAPS_BLTROTATION 0x00000100
741 #define DDFXCAPS_BLTROTATION90 0x00000200
742 #define DDFXCAPS_BLTSHRINKX 0x00000400
743 #define DDFXCAPS_BLTSHRINKXN 0x00000800
744 #define DDFXCAPS_BLTSHRINKY 0x00001000
745 #define DDFXCAPS_BLTSHRINKYN 0x00002000
746 #define DDFXCAPS_BLTSTRETCHX 0x00004000
747 #define DDFXCAPS_BLTSTRETCHXN 0x00008000
748 #define DDFXCAPS_BLTSTRETCHY 0x00010000
749 #define DDFXCAPS_BLTSTRETCHYN 0x00020000
750 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
751 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
752 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
753 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
754 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
755 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
756 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
757 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
758 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
759 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
760 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
761 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
763 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
765 /* DDCAPS.dwFXAlphaCaps */
766 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
767 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
768 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
769 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
770 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
771 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
772 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
773 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
774 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
775 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
777 /* DDCAPS.dwPalCaps */
778 #define DDPCAPS_4BIT 0x00000001
779 #define DDPCAPS_8BITENTRIES 0x00000002
780 #define DDPCAPS_8BIT 0x00000004
781 #define DDPCAPS_INITIALIZE 0x00000008
782 #define DDPCAPS_PRIMARYSURFACE 0x00000010
783 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
784 #define DDPCAPS_ALLOW256 0x00000040
785 #define DDPCAPS_VSYNC 0x00000080
786 #define DDPCAPS_1BIT 0x00000100
787 #define DDPCAPS_2BIT 0x00000200
788 #define DDPCAPS_ALPHA 0x00000400
790 /* DDCAPS.dwSVCaps */
791 /* the first 4 of these are now obsolete */
792 #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occured */
793 #define DDSVCAPS_RESERVED1 0x00000001
794 #define DDSVCAPS_RESERVED2 0x00000002
795 #define DDSVCAPS_RESERVED3 0x00000004
796 #define DDSVCAPS_RESERVED4 0x00000008
797 #else
798 #define DDSVCAPS_ENIGMA 0x00000001
799 #define DDSVCAPS_FLICKER 0x00000002
800 #define DDSVCAPS_REDBLUE 0x00000004
801 #define DDSVCAPS_SPLIT 0x00000008
802 #endif
803 #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
805 /* BitDepths */
806 #define DDBD_1 0x00004000
807 #define DDBD_2 0x00002000
808 #define DDBD_4 0x00001000
809 #define DDBD_8 0x00000800
810 #define DDBD_16 0x00000400
811 #define DDBD_24 0x00000200
812 #define DDBD_32 0x00000100
814 /* DDOVERLAYFX.dwDDFX */
815 #define DDOVERFX_ARITHSTRETCHY 0x00000001
816 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
817 #define DDOVERFX_MIRRORUPDOWN 0x00000004
819 /* DDCOLORKEY.dwFlags */
820 #define DDPF_ALPHAPIXELS 0x00000001
821 #define DDPF_ALPHA 0x00000002
822 #define DDPF_FOURCC 0x00000004
823 #define DDPF_PALETTEINDEXED4 0x00000008
824 #define DDPF_PALETTEINDEXEDTO8 0x00000010
825 #define DDPF_PALETTEINDEXED8 0x00000020
826 #define DDPF_RGB 0x00000040
827 #define DDPF_COMPRESSED 0x00000080
828 #define DDPF_RGBTOYUV 0x00000100
829 #define DDPF_YUV 0x00000200
830 #define DDPF_ZBUFFER 0x00000400
831 #define DDPF_PALETTEINDEXED1 0x00000800
832 #define DDPF_PALETTEINDEXED2 0x00001000
833 #define DDPF_ZPIXELS 0x00002000
834 #define DDPF_STENCILBUFFER 0x00004000
835 #define DDPF_ALPHAPREMULT 0x00008000
836 #define DDPF_LUMINANCE 0x00020000
837 #define DDPF_BUMPLUMINANCE 0x00040000
838 #define DDPF_BUMPDUDV 0x00080000
840 /* SetCooperativeLevel dwFlags */
841 #define DDSCL_FULLSCREEN 0x00000001
842 #define DDSCL_ALLOWREBOOT 0x00000002
843 #define DDSCL_NOWINDOWCHANGES 0x00000004
844 #define DDSCL_NORMAL 0x00000008
845 #define DDSCL_EXCLUSIVE 0x00000010
846 #define DDSCL_ALLOWMODEX 0x00000040
847 #define DDSCL_SETFOCUSWINDOW 0x00000080
848 #define DDSCL_SETDEVICEWINDOW 0x00000100
849 #define DDSCL_CREATEDEVICEWINDOW 0x00000200
850 #define DDSCL_MULTITHREADED 0x00000400
851 #define DDSCL_FPUSETUP 0x00000800
852 #define DDSCL_FPUPRESERVE 0x00001000
855 /* DDSURFACEDESC.dwFlags */
856 #define DDSD_CAPS 0x00000001
857 #define DDSD_HEIGHT 0x00000002
858 #define DDSD_WIDTH 0x00000004
859 #define DDSD_PITCH 0x00000008
860 #define DDSD_BACKBUFFERCOUNT 0x00000020
861 #define DDSD_ZBUFFERBITDEPTH 0x00000040
862 #define DDSD_ALPHABITDEPTH 0x00000080
863 #define DDSD_LPSURFACE 0x00000800
864 #define DDSD_PIXELFORMAT 0x00001000
865 #define DDSD_CKDESTOVERLAY 0x00002000
866 #define DDSD_CKDESTBLT 0x00004000
867 #define DDSD_CKSRCOVERLAY 0x00008000
868 #define DDSD_CKSRCBLT 0x00010000
869 #define DDSD_MIPMAPCOUNT 0x00020000
870 #define DDSD_REFRESHRATE 0x00040000
871 #define DDSD_LINEARSIZE 0x00080000
872 #define DDSD_TEXTURESTAGE 0x00100000
873 #define DDSD_FVF 0x00200000
874 #define DDSD_SRCVBHANDLE 0x00400000
875 #define DDSD_ALL 0x007ff9ee
877 /* EnumSurfaces flags */
878 #define DDENUMSURFACES_ALL 0x00000001
879 #define DDENUMSURFACES_MATCH 0x00000002
880 #define DDENUMSURFACES_NOMATCH 0x00000004
881 #define DDENUMSURFACES_CANBECREATED 0x00000008
882 #define DDENUMSURFACES_DOESEXIST 0x00000010
884 /* SetDisplayMode flags */
885 #define DDSDM_STANDARDVGAMODE 0x00000001
887 /* EnumDisplayModes flags */
888 #define DDEDM_REFRESHRATES 0x00000001
889 #define DDEDM_STANDARDVGAMODES 0x00000002
891 /* WaitForVerticalDisplay flags */
893 #define DDWAITVB_BLOCKBEGIN 0x00000001
894 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002
895 #define DDWAITVB_BLOCKEND 0x00000004
897 typedef struct _DDSURFACEDESC
899 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
900 DWORD dwFlags; /* 4: determines what fields are valid*/
901 DWORD dwHeight; /* 8: height of surface to be created*/
902 DWORD dwWidth; /* C: width of input surface*/
903 LONG lPitch; /*10: distance to start of next line (return value only)*/
904 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
905 union {
906 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
907 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
908 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
909 } DUMMYUNIONNAME;
910 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
911 DWORD dwReserved; /* 20:reserved*/
912 union {
913 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
914 DWORD dwLinearSize; /* 24:Formless late-allocated optimized surface size*/
915 } DUMMYUNIONNAME1;
916 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
917 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
918 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
919 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
920 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
921 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
922 } DDSURFACEDESC,*LPDDSURFACEDESC;
924 typedef struct _DDSURFACEDESC2
926 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
927 DWORD dwFlags; /* 4: determines what fields are valid*/
928 DWORD dwHeight; /* 8: height of surface to be created*/
929 DWORD dwWidth; /* C: width of input surface*/
930 union {
931 LONG lPitch; /*10: distance to start of next line (return value only)*/
932 DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
933 } DUMMYUNIONNAME;
934 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
935 union {
936 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
937 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
938 DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
939 } DUMMYUNIONNAME2;
940 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
941 DWORD dwReserved; /* 20:reserved*/
942 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
943 union {
944 DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
945 DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
946 } DUMMYUNIONNAME3;
947 DDCOLORKEY ddckCKDestBlt; /* 2C: CK for destination blt use*/
948 DDCOLORKEY ddckCKSrcOverlay;/* 30: CK for source overlay use*/
949 DDCOLORKEY ddckCKSrcBlt; /* 34: CK for source blt use*/
951 union {
952 DDPIXELFORMAT ddpfPixelFormat;/* 38: pixel format description of the surface*/
953 DWORD dwFVF; /* 38: vertex format description of vertex buffers */
954 } DUMMYUNIONNAME4;
955 DDSCAPS2 ddsCaps; /* 3C: DDraw surface caps */
956 DWORD dwTextureStage; /* 40: stage in multitexture cascade */
957 } DDSURFACEDESC2,*LPDDSURFACEDESC2;
959 /* DDCOLORCONTROL.dwFlags */
960 #define DDCOLOR_BRIGHTNESS 0x00000001
961 #define DDCOLOR_CONTRAST 0x00000002
962 #define DDCOLOR_HUE 0x00000004
963 #define DDCOLOR_SATURATION 0x00000008
964 #define DDCOLOR_SHARPNESS 0x00000010
965 #define DDCOLOR_GAMMA 0x00000020
966 #define DDCOLOR_COLORENABLE 0x00000040
968 typedef struct {
969 DWORD dwSize;
970 DWORD dwFlags;
971 LONG lBrightness;
972 LONG lContrast;
973 LONG lHue;
974 LONG lSaturation;
975 LONG lSharpness;
976 LONG lGamma;
977 LONG lColorEnable;
978 DWORD dwReserved1;
979 } DDCOLORCONTROL,*LPDDCOLORCONTROL;
981 typedef BOOL CALLBACK (*LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
982 typedef BOOL CALLBACK (*LPDDENUMCALLBACKW)(GUID *, LPWSTR, LPWSTR, LPVOID);
983 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
985 typedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
986 typedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK7)(LPDDSURFACEDESC2, LPVOID);
987 typedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
988 typedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
990 typedef BOOL CALLBACK (*LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
991 typedef BOOL CALLBACK (*LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
992 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
994 HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
995 HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
996 #define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
998 /* flags for DirectDrawEnumerateEx */
999 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
1000 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
1001 #define DDENUM_NONDISPLAYDEVICES 0x00000004
1003 typedef struct _DDBLTFX
1005 DWORD dwSize; /* size of structure */
1006 DWORD dwDDFX; /* FX operations */
1007 DWORD dwROP; /* Win32 raster operations */
1008 DWORD dwDDROP; /* Raster operations new for DirectDraw */
1009 DWORD dwRotationAngle; /* Rotation angle for blt */
1010 DWORD dwZBufferOpCode; /* ZBuffer compares */
1011 DWORD dwZBufferLow; /* Low limit of Z buffer */
1012 DWORD dwZBufferHigh; /* High limit of Z buffer */
1013 DWORD dwZBufferBaseDest; /* Destination base value */
1014 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
1015 union
1017 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
1018 LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
1019 } DUMMYUNIONNAME;
1020 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
1021 union
1023 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
1024 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
1025 } DUMMYUNIONNAME1;
1026 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1027 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
1028 DWORD dwReserved;
1029 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1030 union
1032 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
1033 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
1034 } DUMMYUNIONNAME2;
1035 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1036 union
1038 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
1039 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
1040 } DUMMYUNIONNAME3;
1041 union
1043 DWORD dwFillColor; /* color in RGB or Palettized */
1044 DWORD dwFillDepth; /* depth value for z-buffer */
1045 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
1046 LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
1047 } DUMMYUNIONNAME4;
1048 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
1049 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
1050 } DDBLTFX,*LPDDBLTFX;
1052 /* dwDDFX */
1053 /* arithmetic stretching along y axis */
1054 #define DDBLTFX_ARITHSTRETCHY 0x00000001
1055 /* mirror on y axis */
1056 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
1057 /* mirror on x axis */
1058 #define DDBLTFX_MIRRORUPDOWN 0x00000004
1059 /* do not tear */
1060 #define DDBLTFX_NOTEARING 0x00000008
1061 /* 180 degrees clockwise rotation */
1062 #define DDBLTFX_ROTATE180 0x00000010
1063 /* 270 degrees clockwise rotation */
1064 #define DDBLTFX_ROTATE270 0x00000020
1065 /* 90 degrees clockwise rotation */
1066 #define DDBLTFX_ROTATE90 0x00000040
1067 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1068 #define DDBLTFX_ZBUFFERRANGE 0x00000080
1069 /* add dwZBufferBaseDest to every source z value before compare */
1070 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
1072 typedef struct _DDOVERLAYFX
1074 DWORD dwSize; /* size of structure */
1075 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1076 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
1077 DWORD dwReserved;
1078 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1079 union
1081 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
1082 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
1083 } DUMMYUNIONNAME;
1084 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1085 union
1087 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
1088 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
1089 } DUMMYUNIONNAME1;
1090 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
1091 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
1092 DWORD dwDDFX; /* Overlay FX */
1093 DWORD dwFlags; /* flags */
1094 } DDOVERLAYFX,*LPDDOVERLAYFX;
1096 typedef struct _DDBLTBATCH
1098 LPRECT lprDest;
1099 LPDIRECTDRAWSURFACE lpDDSSrc;
1100 LPRECT lprSrc;
1101 DWORD dwFlags;
1102 LPDDBLTFX lpDDBltFx;
1103 } DDBLTBATCH,*LPDDBLTBATCH;
1105 #define MAX_DDDEVICEID_STRING 512
1107 typedef struct tagDDDEVICEIDENTIFIER {
1108 char szDriver[MAX_DDDEVICEID_STRING];
1109 char szDescription[MAX_DDDEVICEID_STRING];
1110 LARGE_INTEGER liDriverVersion;
1111 DWORD dwVendorId;
1112 DWORD dwDeviceId;
1113 DWORD dwSubSysId;
1114 DWORD dwRevision;
1115 GUID guidDeviceIdentifier;
1116 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
1118 typedef struct tagDDDEVICEIDENTIFIER2 {
1119 char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
1120 char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
1121 LARGE_INTEGER liDriverVersion; /* driver version */
1122 DWORD dwVendorId; /* vendor ID, zero if unknown */
1123 DWORD dwDeviceId; /* chipset ID, zero if unknown */
1124 DWORD dwSubSysId; /* board ID, zero if unknown */
1125 DWORD dwRevision; /* chipset version, zero if unknown */
1126 GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
1127 DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
1128 } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
1130 /*****************************************************************************
1131 * IDirectDrawPalette interface
1133 #define ICOM_INTERFACE IDirectDrawPalette
1134 #define IDirectDrawPalette_METHODS \
1135 ICOM_METHOD1(HRESULT,GetCaps, LPDWORD,lpdwCaps) \
1136 ICOM_METHOD4(HRESULT,GetEntries, DWORD,dwFlags, DWORD,dwBase, DWORD,dwNumEntries, LPPALETTEENTRY,lpEntries) \
1137 ICOM_METHOD3(HRESULT,Initialize, LPDIRECTDRAW,lpDD, DWORD,dwFlags, LPPALETTEENTRY,lpDDColorTable) \
1138 ICOM_METHOD4(HRESULT,SetEntries, DWORD,dwFlags, DWORD,dwStartingEntry, DWORD,dwCount, LPPALETTEENTRY,lpEntries)
1139 #define IDirectDrawPalette_IMETHODS \
1140 IUnknown_IMETHODS \
1141 IDirectDrawPalette_METHODS
1142 ICOM_DEFINE(IDirectDrawPalette,IUnknown)
1143 #undef ICOM_INTERFACE
1145 /*** IUnknown methods ***/
1146 #define IDirectDrawPalette_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1147 #define IDirectDrawPalette_AddRef(p) ICOM_CALL (AddRef,p)
1148 #define IDirectDrawPalette_Release(p) ICOM_CALL (Release,p)
1149 /*** IDirectDrawPalette methods ***/
1150 #define IDirectDrawPalette_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1151 #define IDirectDrawPalette_GetEntries(p,a,b,c,d) ICOM_CALL4(GetEntries,p,a,b,c,d)
1152 #define IDirectDrawPalette_Initialize(p,a,b,c) ICOM_CALL3(Initialize,p,a,b,c)
1153 #define IDirectDrawPalette_SetEntries(p,a,b,c,d) ICOM_CALL4(SetEntries,p,a,b,c,d)
1156 /*****************************************************************************
1157 * IDirectDrawClipper interface
1159 #define ICOM_INTERFACE IDirectDrawClipper
1160 #define IDirectDrawClipper_METHODS \
1161 ICOM_METHOD3(HRESULT,GetClipList, LPRECT,lpRect, LPRGNDATA,lpClipList, LPDWORD,lpdwSize) \
1162 ICOM_METHOD1(HRESULT,GetHWnd, HWND*,lphWnd) \
1163 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, DWORD,dwFlags) \
1164 ICOM_METHOD1(HRESULT,IsClipListChanged, BOOL*,lpbChanged) \
1165 ICOM_METHOD2(HRESULT,SetClipList, LPRGNDATA,lpClipList, DWORD,dwFlags) \
1166 ICOM_METHOD2(HRESULT,SetHWnd, DWORD,dwFlags, HWND,hWnd)
1167 #define IDirectDrawClipper_IMETHODS \
1168 IUnknown_IMETHODS \
1169 IDirectDrawClipper_METHODS
1170 ICOM_DEFINE(IDirectDrawClipper,IUnknown)
1171 #undef ICOM_INTERFACE
1173 /*** IUnknown methods ***/
1174 #define IDirectDrawClipper_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1175 #define IDirectDrawClipper_AddRef(p) ICOM_CALL (AddRef,p)
1176 #define IDirectDrawClipper_Release(p) ICOM_CALL (Release,p)
1177 /*** IDirectDrawClipper methods ***/
1178 #define IDirectDrawClipper_GetClipList(p,a,b,c) ICOM_CALL3(GetClipList,p,a,b,c)
1179 #define IDirectDrawClipper_GetHWnd(p,a) ICOM_CALL1(GetHWnd,p,a)
1180 #define IDirectDrawClipper_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1181 #define IDirectDrawClipper_IsClipListChanged(p,a) ICOM_CALL1(IsClipListChanged,p,a)
1182 #define IDirectDrawClipper_SetClipList(p,a,b) ICOM_CALL2(SetClipList,p,a,b)
1183 #define IDirectDrawClipper_SetHWnd(p,a,b) ICOM_CALL2(SetHWnd,p,a,b)
1186 /*****************************************************************************
1187 * IDirectDraw interface
1189 #define ICOM_INTERFACE IDirectDraw
1190 #define IDirectDraw_METHODS \
1191 ICOM_METHOD (HRESULT,Compact) \
1192 ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
1193 ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
1194 ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE*,lplpDDSurface, IUnknown*,pUnkOuter) \
1195 ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE,lpDDSurface, LPDIRECTDRAWSURFACE*,lplpDupDDSurface) \
1196 ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK,lpEnumModesCallback) \
1197 ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1198 ICOM_METHOD (HRESULT,FlipToGDISurface) \
1199 ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
1200 ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1201 ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
1202 ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE*,lplpGDIDDSurface) \
1203 ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
1204 ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
1205 ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
1206 ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
1207 ICOM_METHOD (HRESULT,RestoreDisplayMode) \
1208 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
1209 ICOM_METHOD3(HRESULT,SetDisplayMode, DWORD,, DWORD,, DWORD,) \
1210 ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent)
1211 #define IDirectDraw_IMETHODS \
1212 IUnknown_IMETHODS \
1213 IDirectDraw_METHODS
1214 ICOM_DEFINE(IDirectDraw,IUnknown)
1215 #undef ICOM_INTERFACE
1217 /*** IUnknown methods ***/
1218 #define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1219 #define IDirectDraw_AddRef(p) ICOM_CALL (AddRef,p)
1220 #define IDirectDraw_Release(p) ICOM_CALL (Release,p)
1221 /*** IDirectDraw methods ***/
1222 #define IDirectDraw_Compact(p) ICOM_CALL (Compact,p)
1223 #define IDirectDraw_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1224 #define IDirectDraw_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1225 #define IDirectDraw_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1226 #define IDirectDraw_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1227 #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1228 #define IDirectDraw_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1229 #define IDirectDraw_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1230 #define IDirectDraw_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1231 #define IDirectDraw_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1232 #define IDirectDraw_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1233 #define IDirectDraw_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1234 #define IDirectDraw_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1235 #define IDirectDraw_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1236 #define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1237 #define IDirectDraw_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1238 #define IDirectDraw_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1239 #define IDirectDraw_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1240 #define IDirectDraw_SetDisplayMode(p,a,b,c) ICOM_CALL3(SetDisplayMode,p,a,b,c)
1241 #define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1244 /* flags for Lock() */
1245 #define DDLOCK_SURFACEMEMORYPTR 0x00000000
1246 #define DDLOCK_WAIT 0x00000001
1247 #define DDLOCK_EVENT 0x00000002
1248 #define DDLOCK_READONLY 0x00000010
1249 #define DDLOCK_WRITEONLY 0x00000020
1250 #define DDLOCK_NOSYSLOCK 0x00000800
1253 /*****************************************************************************
1254 * IDirectDraw2 interface
1256 /* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
1257 * arguments of SetDisplayMode has changed !
1259 #define ICOM_INTERFACE IDirectDraw2
1260 #define IDirectDraw2_METHODS \
1261 /*0c*/ ICOM_METHOD (HRESULT,Compact) \
1262 /*10*/ ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
1263 /*14*/ ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
1264 /*18*/ ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE*,lplpDDSurface, IUnknown*,pUnkOuter) \
1265 /*1c*/ ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE,lpDDSurface, LPDIRECTDRAWSURFACE*,lplpDupDDSurface) \
1266 /*20*/ ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK,lpEnumModesCallback) \
1267 /*24*/ ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1268 /*28*/ ICOM_METHOD (HRESULT,FlipToGDISurface) \
1269 /*2c*/ ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
1270 /*30*/ ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1271 /*34*/ ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
1272 /*38*/ ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE*,lplpGDIDDSurface) \
1273 /*3c*/ ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
1274 /*40*/ ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
1275 /*44*/ ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
1276 /*48*/ ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
1277 /*4c*/ ICOM_METHOD (HRESULT,RestoreDisplayMode) \
1278 /*50*/ ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
1279 /*54*/ ICOM_METHOD5(HRESULT,SetDisplayMode, DWORD,dwWidth, DWORD,dwHeight, DWORD,dwBPP, DWORD,dwRefreshRate, DWORD,dwFlags) \
1280 /*58*/ ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent) \
1281 /* added in v2 */ \
1282 /*5c*/ ICOM_METHOD3(HRESULT,GetAvailableVidMem, LPDDSCAPS,lpDDCaps, LPDWORD,lpdwTotal, LPDWORD,lpdwFree)
1283 #define IDirectDraw2_IMETHODS \
1284 IUnknown_IMETHODS \
1285 IDirectDraw2_METHODS
1286 ICOM_DEFINE(IDirectDraw2,IUnknown)
1287 #undef ICOM_INTERFACE
1289 /*** IUnknown methods ***/
1290 #define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1291 #define IDirectDraw2_AddRef(p) ICOM_CALL (AddRef,p)
1292 #define IDirectDraw2_Release(p) ICOM_CALL (Release,p)
1293 /*** IDirectDraw methods ***/
1294 #define IDirectDraw2_Compact(p) ICOM_CALL (Compact,p)
1295 #define IDirectDraw2_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1296 #define IDirectDraw2_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1297 #define IDirectDraw2_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1298 #define IDirectDraw2_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1299 #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1300 #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1301 #define IDirectDraw2_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1302 #define IDirectDraw2_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1303 #define IDirectDraw2_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1304 #define IDirectDraw2_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1305 #define IDirectDraw2_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1306 #define IDirectDraw2_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1307 #define IDirectDraw2_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1308 #define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1309 #define IDirectDraw2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1310 #define IDirectDraw2_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1311 #define IDirectDraw2_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1312 #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e)
1313 #define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1314 /*** IDirectDraw2 methods ***/
1315 #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
1318 /*****************************************************************************
1319 * IDirectDraw4 interface
1321 #define ICOM_INTERFACE IDirectDraw4
1322 #define IDirectDraw4_METHODS \
1323 ICOM_METHOD2(HRESULT,GetSurfaceFromDC, HDC,, LPDIRECTDRAWSURFACE*,) \
1324 ICOM_METHOD (HRESULT,RestoreAllSurfaces) \
1325 ICOM_METHOD (HRESULT,TestCooperativeLevel) \
1326 ICOM_METHOD2(HRESULT,GetDeviceIdentifier, LPDDDEVICEIDENTIFIER,, DWORD,)
1327 #define IDirectDraw4_IMETHODS \
1328 IDirectDraw2_IMETHODS \
1329 IDirectDraw4_METHODS
1330 ICOM_DEFINE(IDirectDraw4,IDirectDraw2)
1331 #undef ICOM_INTERFACE
1333 /*** IUnknown methods ***/
1334 #define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1335 #define IDirectDraw4_AddRef(p) ICOM_CALL (AddRef,p)
1336 #define IDirectDraw4_Release(p) ICOM_CALL (Release,p)
1337 /*** IDirectDraw methods ***/
1338 #define IDirectDraw4_Compact(p) ICOM_CALL (Compact,p)
1339 #define IDirectDraw4_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1340 #define IDirectDraw4_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1341 #define IDirectDraw4_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1342 #define IDirectDraw4_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1343 #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1344 #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1345 #define IDirectDraw4_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1346 #define IDirectDraw4_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1347 #define IDirectDraw4_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1348 #define IDirectDraw4_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1349 #define IDirectDraw4_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1350 #define IDirectDraw4_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1351 #define IDirectDraw4_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1352 #define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1353 #define IDirectDraw4_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1354 #define IDirectDraw4_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1355 #define IDirectDraw4_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1356 #define IDirectDraw4_SetDisplayMode(p,a,b,c) ICOM_CALL3(SetDisplayMode,p,a,b,c)
1357 #define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1358 /*** IDirectDraw2 methods ***/
1359 #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
1360 /*** IDirectDraw4 methods ***/
1361 #define IDirectDraw4_GetSurfaceFromDC(p,a,b) ICOM_CALL2(GetSurfaceFromDC,p,a,b,c)
1362 #define IDirectDraw4_RestoreAllSurfaces(pc) ICOM_CALL (RestoreAllSurfaces,p)
1363 #define IDirectDraw4_TestCooperativeLevel(p) ICOM_CALL (TestCooperativeLevel,p)
1364 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL2(GetDeviceIdentifier,p,a,b)
1367 /*****************************************************************************
1368 * IDirectDraw7 interface
1370 /* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
1371 * as not interchangeable with earlier DirectDraw interfaces.
1373 #define ICOM_INTERFACE IDirectDraw7
1374 #define IDirectDraw7_METHODS \
1375 /*0c*/ ICOM_METHOD (HRESULT,Compact) \
1376 /*10*/ ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
1377 /*14*/ ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
1378 /*18*/ ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC2,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE7*,lplpDDSurface, IUnknown*,pUnkOuter) \
1379 /*1c*/ ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE7,lpDDSurface, LPDIRECTDRAWSURFACE7*,lplpDupDDSurface) \
1380 /*20*/ ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC2,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK7,lpEnumModesCallback) \
1381 /*24*/ ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC2,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK7,lpEnumSurfacesCallback) \
1382 /*28*/ ICOM_METHOD (HRESULT,FlipToGDISurface) \
1383 /*2c*/ ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
1384 /*30*/ ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC2,lpDDSurfaceDesc) \
1385 /*34*/ ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
1386 /*38*/ ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE7*,lplpGDIDDSurface) \
1387 /*3c*/ ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
1388 /*40*/ ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
1389 /*44*/ ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
1390 /*48*/ ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
1391 /*4c*/ ICOM_METHOD (HRESULT,RestoreDisplayMode) \
1392 /*50*/ ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
1393 /*54*/ ICOM_METHOD5(HRESULT,SetDisplayMode, DWORD,dwWidth, DWORD,dwHeight, DWORD,dwBPP, DWORD,dwRefreshRate, DWORD,dwFlags) \
1394 /*58*/ ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent) \
1395 /* added in v2 */ \
1396 /*5c*/ ICOM_METHOD3(HRESULT,GetAvailableVidMem, LPDDSCAPS2,lpDDCaps, LPDWORD,lpdwTotal, LPDWORD,lpdwFree) \
1397 /* added in v4 */ \
1398 /*60*/ ICOM_METHOD2(HRESULT,GetSurfaceFromDC, HDC,, LPDIRECTDRAWSURFACE7*,) \
1399 /*64*/ ICOM_METHOD (HRESULT,RestoreAllSurfaces) \
1400 /*68*/ ICOM_METHOD (HRESULT,TestCooperativeLevel) \
1401 /*6c*/ ICOM_METHOD2(HRESULT,GetDeviceIdentifier, LPDDDEVICEIDENTIFIER,, DWORD,) \
1402 /* added in v7 */ \
1403 /*70*/ ICOM_METHOD3(HRESULT,StartModeTest, LPSIZE,, DWORD,, DWORD,) \
1404 /*74*/ ICOM_METHOD2(HRESULT,EvaluateMode, DWORD,, DWORD *,)
1405 #define IDirectDraw7_IMETHODS \
1406 IUnknown_IMETHODS \
1407 IDirectDraw7_METHODS
1408 ICOM_DEFINE(IDirectDraw7,IUnknown)
1409 #undef ICOM_INTERFACE
1411 /*** IUnknown methods ***/
1412 #define IDirectDraw7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1413 #define IDirectDraw7_AddRef(p) ICOM_CALL (AddRef,p)
1414 #define IDirectDraw7_Release(p) ICOM_CALL (Release,p)
1415 /*** IDirectDraw methods ***/
1416 #define IDirectDraw7_Compact(p) ICOM_CALL (Compact,p)
1417 #define IDirectDraw7_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1418 #define IDirectDraw7_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1419 #define IDirectDraw7_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1420 #define IDirectDraw7_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1421 #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1422 #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1423 #define IDirectDraw7_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1424 #define IDirectDraw7_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1425 #define IDirectDraw7_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1426 #define IDirectDraw7_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1427 #define IDirectDraw7_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1428 #define IDirectDraw7_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1429 #define IDirectDraw7_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1430 #define IDirectDraw7_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1431 #define IDirectDraw7_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1432 #define IDirectDraw7_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1433 #define IDirectDraw7_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1434 #define IDirectDraw7_SetDisplayMode(p,a,b,c) ICOM_CALL3(SetDisplayMode,p,a,b,c)
1435 #define IDirectDraw7_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1436 /*** added in IDirectDraw2 ***/
1437 #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
1438 /*** added in IDirectDraw4 ***/
1439 #define IDirectDraw7_GetSurfaceFromDC(p,a,b) ICOM_CALL2(GetSurfaceFromDC,p,a,b,c)
1440 #define IDirectDraw7_RestoreAllSurfaces(pc) ICOM_CALL (RestoreAllSurfaces,p)
1441 #define IDirectDraw7_TestCooperativeLevel(p) ICOM_CALL (TestCooperativeLevel,p)
1442 #define IDirectDraw7_GetDeviceIdentifier(p,a,b) ICOM_CALL2(GetDeviceIdentifier,p,a,b)
1443 /*** added in IDirectDraw 7 ***/
1444 #define IDirectDraw7_StartModeTest(p,a,b,c) ICOM_CALL3(StartModeTest,p,a,b,c)
1445 #define IDirectDraw7_EvaluateMode(p,a,b) ICOM_CALL2(EvaluateMode,p,a,b)
1448 /*****************************************************************************
1449 * IDirectDrawSurface interface
1451 #define ICOM_INTERFACE IDirectDrawSurface
1452 #define IDirectDrawSurface_METHODS \
1453 /*0c*/ ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE,lpDDSAttachedSurface) \
1454 /*10*/ ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1455 /*14*/ ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1456 /*18*/ ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1457 /*1c*/ ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1458 /*20*/ ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE,lpDDSAttachedSurface) \
1459 /*24*/ ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1460 /*28*/ ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1461 /*2c*/ ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1462 /*30*/ ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE*,lplpDDAttachedSurface) \
1463 /*34*/ ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1464 /*38*/ ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1465 /*3c*/ ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1466 /*40*/ ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1467 /*44*/ ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1468 /*48*/ ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1469 /*4c*/ ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1470 /*50*/ ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1471 /*54*/ ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1472 /*58*/ ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1473 /*5c*/ ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1474 /*60*/ ICOM_METHOD (HRESULT,IsLost) \
1475 /*64*/ ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1476 /*68*/ ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1477 /*6c*/ ICOM_METHOD (HRESULT,Restore) \
1478 /*70*/ ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1479 /*74*/ ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1480 /*78*/ ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1481 /*7c*/ ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1482 /*80*/ ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1483 /*84*/ ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1484 /*88*/ ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1485 /*8c*/ ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE,lpDDSReference)
1486 #define IDirectDrawSurface_IMETHODS \
1487 IUnknown_IMETHODS \
1488 IDirectDrawSurface_METHODS
1489 ICOM_DEFINE(IDirectDrawSurface,IUnknown)
1490 #undef ICOM_INTERFACE
1492 /*** IUnknown methods ***/
1493 #define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1494 #define IDirectDrawSurface_AddRef(p) ICOM_CALL (AddRef,p)
1495 #define IDirectDrawSurface_Release(p) ICOM_CALL (Release,p)
1496 /*** IDirectDrawSurface methods ***/
1497 #define IDirectDrawSurface_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1498 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1499 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1500 #define IDirectDrawSurface_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1501 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1502 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1503 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1504 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1505 #define IDirectDrawSurface_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1506 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1507 #define IDirectDrawSurface_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1508 #define IDirectDrawSurface_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1509 #define IDirectDrawSurface_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1510 #define IDirectDrawSurface_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1511 #define IDirectDrawSurface_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1512 #define IDirectDrawSurface_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1513 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1514 #define IDirectDrawSurface_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1515 #define IDirectDrawSurface_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1516 #define IDirectDrawSurface_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1517 #define IDirectDrawSurface_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1518 #define IDirectDrawSurface_IsLost(p) ICOM_CALL (IsLost,p)
1519 #define IDirectDrawSurface_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1520 #define IDirectDrawSurface_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1521 #define IDirectDrawSurface_Restore(p) ICOM_CALL (Restore,p)
1522 #define IDirectDrawSurface_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1523 #define IDirectDrawSurface_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1524 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1525 #define IDirectDrawSurface_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1526 #define IDirectDrawSurface_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1527 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1528 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1529 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1532 /*****************************************************************************
1533 * IDirectDrawSurface2 interface
1535 /* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
1536 * have been converted to LPDIRECTDRAWSURFACE2.
1538 #define ICOM_INTERFACE IDirectDrawSurface2
1539 #define IDirectDrawSurface2_METHODS \
1540 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE2,lpDDSAttachedSurface) \
1541 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1542 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE2,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1543 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1544 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE2,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1545 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE2,lpDDSAttachedSurface) \
1546 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1547 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1548 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE2,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1549 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE2*,lplpDDAttachedSurface) \
1550 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1551 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1552 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1553 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1554 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1555 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1556 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1557 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1558 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1559 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1560 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1561 ICOM_METHOD (HRESULT,IsLost) \
1562 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1563 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1564 ICOM_METHOD (HRESULT,Restore) \
1565 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1566 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1567 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1568 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1569 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1570 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE2,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1571 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1572 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE2,lpDDSReference) \
1573 /* added in v2 */ \
1574 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1575 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1576 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags)
1577 #define IDirectDrawSurface2_IMETHODS \
1578 IUnknown_IMETHODS \
1579 IDirectDrawSurface2_METHODS
1580 ICOM_DEFINE(IDirectDrawSurface2,IUnknown)
1581 #undef ICOM_INTERFACE
1583 /*** IUnknown methods ***/
1584 #define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1585 #define IDirectDrawSurface2_AddRef(p) ICOM_CALL (AddRef,p)
1586 #define IDirectDrawSurface2_Release(p) ICOM_CALL (Release,p)
1587 /*** IDirectDrawSurface methods (almost) ***/
1588 #define IDirectDrawSurface2_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1589 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1590 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1591 #define IDirectDrawSurface2_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1592 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1593 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1594 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1595 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1596 #define IDirectDrawSurface2_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1597 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1598 #define IDirectDrawSurface2_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1599 #define IDirectDrawSurface2_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1600 #define IDirectDrawSurface2_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1601 #define IDirectDrawSurface2_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1602 #define IDirectDrawSurface2_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1603 #define IDirectDrawSurface2_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1604 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1605 #define IDirectDrawSurface2_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1606 #define IDirectDrawSurface2_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1607 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1608 #define IDirectDrawSurface2_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1609 #define IDirectDrawSurface2_IsLost(p) ICOM_CALL (IsLost,p)
1610 #define IDirectDrawSurface2_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1611 #define IDirectDrawSurface2_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1612 #define IDirectDrawSurface2_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1613 #define IDirectDrawSurface2_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1614 #define IDirectDrawSurface2_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1615 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1616 #define IDirectDrawSurface2_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1617 #define IDirectDrawSurface2_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1618 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1619 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1620 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1621 /*** IDirectDrawSurface2 methods ***/
1622 #define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1623 #define IDirectDrawSurface2_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1624 #define IDirectDrawSurface2_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1627 /*****************************************************************************
1628 * IDirectDrawSurface3 interface
1630 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
1631 * have been converted to LPDIRECTDRAWSURFACE3.
1633 #define ICOM_INTERFACE IDirectDrawSurface3
1634 #define IDirectDrawSurface3_METHODS \
1635 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE3,lpDDSAttachedSurface) \
1636 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1637 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE3,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1638 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1639 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE3,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1640 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE3,lpDDSAttachedSurface) \
1641 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1642 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1643 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE3,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1644 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE3*,lplpDDAttachedSurface) \
1645 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1646 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1647 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1648 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1649 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1650 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1651 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1652 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1653 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1654 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1655 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1656 ICOM_METHOD (HRESULT,IsLost) \
1657 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1658 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1659 ICOM_METHOD (HRESULT,Restore) \
1660 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1661 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1662 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1663 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1664 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1665 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE3,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1666 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1667 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE3,lpDDSReference) \
1668 /* added in v2 */ \
1669 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1670 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1671 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1672 /* added in v3 */ \
1673 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC,lpDDSD, DWORD,dwFlags)
1674 #define IDirectDrawSurface3_IMETHODS \
1675 IUnknown_IMETHODS \
1676 IDirectDrawSurface3_METHODS
1677 ICOM_DEFINE(IDirectDrawSurface3,IUnknown)
1678 #undef ICOM_INTERFACE
1680 /*** IUnknown methods ***/
1681 #define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1682 #define IDirectDrawSurface3_AddRef(p) ICOM_CALL (AddRef,p)
1683 #define IDirectDrawSurface3_Release(p) ICOM_CALL (Release,p)
1684 /*** IDirectDrawSurface methods (almost) ***/
1685 #define IDirectDrawSurface3_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1686 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1687 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1688 #define IDirectDrawSurface3_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1689 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1690 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1691 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1692 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1693 #define IDirectDrawSurface3_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1694 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1695 #define IDirectDrawSurface3_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1696 #define IDirectDrawSurface3_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1697 #define IDirectDrawSurface3_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1698 #define IDirectDrawSurface3_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1699 #define IDirectDrawSurface3_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1700 #define IDirectDrawSurface3_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1701 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1702 #define IDirectDrawSurface3_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1703 #define IDirectDrawSurface3_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1704 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1705 #define IDirectDrawSurface3_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1706 #define IDirectDrawSurface3_IsLost(p) ICOM_CALL (IsLost,p)
1707 #define IDirectDrawSurface3_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1708 #define IDirectDrawSurface3_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1709 #define IDirectDrawSurface3_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1710 #define IDirectDrawSurface3_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1711 #define IDirectDrawSurface3_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1712 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1713 #define IDirectDrawSurface3_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1714 #define IDirectDrawSurface3_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1715 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1716 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1717 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1718 /*** IDirectDrawSurface2 methods ***/
1719 #define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1720 #define IDirectDrawSurface3_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1721 #define IDirectDrawSurface3_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1722 /*** IDirectDrawSurface3 methods ***/
1723 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL2(SetSurfaceDesc,p,a,b)
1726 /*****************************************************************************
1727 * IDirectDrawSurface4 interface
1729 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
1730 * have been converted to LPDIRECTDRAWSURFACE3.
1732 /* FIXME: I assumed IDirectDrawSurface4 does not inherit from IDirectDrawSurface3 but I
1733 * have actually not proof of that. Can someone check and remove this comment or patch
1734 * accordingly ?
1736 #define ICOM_INTERFACE IDirectDrawSurface4
1737 #define IDirectDrawSurface4_METHODS \
1738 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
1739 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1740 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE4,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1741 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1742 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE4,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1743 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
1744 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1745 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1746 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE4,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1747 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE4*,lplpDDAttachedSurface) \
1748 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1749 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1750 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1751 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1752 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1753 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1754 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1755 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1756 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1757 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1758 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1759 ICOM_METHOD (HRESULT,IsLost) \
1760 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1761 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1762 ICOM_METHOD (HRESULT,Restore) \
1763 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1764 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1765 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1766 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1767 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1768 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE4,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1769 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1770 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE4,lpDDSReference) \
1771 /* added in v2 */ \
1772 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1773 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1774 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1775 /* added in v3 */ \
1776 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC,lpDDSD, DWORD,dwFlags) \
1777 /* added in v4 */ \
1778 ICOM_METHOD4(HRESULT,SetPrivateData, REFGUID,, LPVOID,, DWORD,, DWORD,) \
1779 ICOM_METHOD3(HRESULT,GetPrivateData, REFGUID,, LPVOID,, LPDWORD,) \
1780 ICOM_METHOD1(HRESULT,FreePrivateData, REFGUID,) \
1781 ICOM_METHOD1(HRESULT,GetUniquenessValue, LPDWORD,) \
1782 ICOM_METHOD (HRESULT,ChangeUniquenessValue)
1783 #define IDirectDrawSurface4_IMETHODS \
1784 IUnknown_IMETHODS \
1785 IDirectDrawSurface4_METHODS
1786 ICOM_DEFINE(IDirectDrawSurface4,IUnknown)
1787 #undef ICOM_INTERFACE
1789 /*** IUnknown methods ***/
1790 #define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1791 #define IDirectDrawSurface4_AddRef(p) ICOM_CALL (AddRef,p)
1792 #define IDirectDrawSurface4_Release(p) ICOM_CALL (Release,p)
1793 /*** IDirectDrawSurface (almost) methods ***/
1794 #define IDirectDrawSurface4_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1795 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1796 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1797 #define IDirectDrawSurface4_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1798 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1799 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1800 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1801 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1802 #define IDirectDrawSurface4_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1803 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1804 #define IDirectDrawSurface4_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1805 #define IDirectDrawSurface4_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1806 #define IDirectDrawSurface4_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1807 #define IDirectDrawSurface4_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1808 #define IDirectDrawSurface4_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1809 #define IDirectDrawSurface4_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1810 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1811 #define IDirectDrawSurface4_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1812 #define IDirectDrawSurface4_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1813 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1814 #define IDirectDrawSurface4_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1815 #define IDirectDrawSurface4_IsLost(p) ICOM_CALL (IsLost,p)
1816 #define IDirectDrawSurface4_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1817 #define IDirectDrawSurface4_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1818 #define IDirectDrawSurface4_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1819 #define IDirectDrawSurface4_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1820 #define IDirectDrawSurface4_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1821 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1822 #define IDirectDrawSurface4_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1823 #define IDirectDrawSurface4_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1824 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1825 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1826 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1827 /*** IDirectDrawSurface2 methods ***/
1828 #define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1829 #define IDirectDrawSurface4_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1830 #define IDirectDrawSurface4_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1831 /*** IDirectDrawSurface3 methods ***/
1832 #define IDirectDrawSurface4_SetSurfaceDesc(p,a) ICOM_CALL(SetSurfaceDesc,p,a)
1833 /*** IDirectDrawSurface4 methods ***/
1834 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL4(SetPrivateData,p,a,b,c,d)
1835 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) ICOM_CALL3(GetPrivateData,p,a,b,c)
1836 #define IDirectDrawSurface4_FreePrivateData(p,a) ICOM_CALL1(FreePrivateData,p,a)
1837 #define IDirectDrawSurface4_GetUniquenessValue(p,a) ICOM_CALL1(GetUniquenessValue,p,a)
1838 #define IDirectDrawSurface4_ChangeUniquenessValue(p) ICOM_CALL (ChangeUniquenessValue,p)
1841 /*****************************************************************************
1842 * IDirectDrawSurface7 interface
1844 #define ICOM_INTERFACE IDirectDrawSurface7
1845 #define IDirectDrawSurface7_METHODS \
1846 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE7,lpDDSAttachedSurface) \
1847 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1848 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE7,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1849 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1850 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE7,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1851 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE7,lpDDSAttachedSurface) \
1852 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1853 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1854 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE7,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1855 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS2,lpDDSCaps, LPDIRECTDRAWSURFACE7*,lplpDDAttachedSurface) \
1856 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1857 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS2,lpDDSCaps) \
1858 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1859 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1860 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1861 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1862 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1863 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1864 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1865 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC2,lpDDSurfaceDesc) \
1866 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC2,lpDDSurfaceDesc) \
1867 ICOM_METHOD (HRESULT,IsLost) \
1868 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC2,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1869 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1870 ICOM_METHOD (HRESULT,Restore) \
1871 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1872 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1873 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1874 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1875 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1876 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE7,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1877 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1878 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE7,lpDDSReference) \
1879 /* added in v2 */ \
1880 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1881 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1882 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1883 /* added in v3 */ \
1884 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC2,lpDDSD, DWORD,dwFlags) \
1885 /* added in v4 */ \
1886 ICOM_METHOD4(HRESULT,SetPrivateData, REFGUID,, LPVOID,, DWORD,, DWORD,) \
1887 ICOM_METHOD3(HRESULT,GetPrivateData, REFGUID,, LPVOID,, LPDWORD,) \
1888 ICOM_METHOD1(HRESULT,FreePrivateData, REFGUID,) \
1889 ICOM_METHOD1(HRESULT,GetUniquenessValue, LPDWORD,) \
1890 ICOM_METHOD (HRESULT,ChangeUniquenessValue) \
1891 /* added in v7 */ \
1892 ICOM_METHOD1(HRESULT,SetPriority, DWORD,prio) \
1893 ICOM_METHOD1(HRESULT,GetPriority, LPDWORD,prio) \
1894 ICOM_METHOD1(HRESULT,SetLOD, DWORD,lod) \
1895 ICOM_METHOD1(HRESULT,GetLOD, LPDWORD,lod)
1896 #define IDirectDrawSurface7_IMETHODS \
1897 IUnknown_IMETHODS \
1898 IDirectDrawSurface7_METHODS
1899 ICOM_DEFINE(IDirectDrawSurface7,IUnknown)
1900 #undef ICOM_INTERFACE
1903 /*****************************************************************************
1904 * IDirectDrawColorControl interface
1906 #define ICOM_INTERFACE IDirectDrawColorControl
1907 #define IDirectDrawColorControl_METHODS \
1908 ICOM_METHOD1(HRESULT,GetColorControls, LPDDCOLORCONTROL,lpColorControl) \
1909 ICOM_METHOD1(HRESULT,SetColorControls, LPDDCOLORCONTROL,lpColorControl)
1910 #define IDirectDrawColorControl_IMETHODS \
1911 IUnknown_IMETHODS \
1912 IDirectDrawColorControl_METHODS
1913 ICOM_DEFINE(IDirectDrawColorControl,IUnknown)
1914 #undef ICOM_INTERFACE
1916 /*** IUnknown methods ***/
1917 #define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1918 #define IDirectDrawColorControl_AddRef(p) ICOM_CALL (AddRef,p)
1919 #define IDirectDrawColorControl_Release(p) ICOM_CALL (Release,p)
1920 /*** IDirectDrawColorControl methods ***/
1921 #define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL(GetColorControls,p,a)
1922 #define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL(SetColorControls,p,a)
1925 HRESULT WINAPI DirectDrawCreate(LPGUID,LPDIRECTDRAW*,LPUNKNOWN);
1926 HRESULT WINAPI DirectDrawCreateEx(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
1927 HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA,LPVOID);
1928 HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW,LPVOID);
1929 #define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
1930 HRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,LPUNKNOWN);
1932 #ifdef __cplusplus
1933 } /* extern "C" */
1934 #endif /* defined(__cplusplus) */
1936 #endif /* __WINE_DDRAW_H */