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