1706f2543Smrg#ifndef __XWIN_DDRAW_H
2706f2543Smrg#define __XWIN_DDRAW_H
3706f2543Smrg
4706f2543Smrg#include <winnt.h>
5706f2543Smrg#include <wingdi.h>
6706f2543Smrg#include <objbase.h>
7706f2543Smrg
8706f2543Smrg#if defined(NONAMELESSUNION) && !defined(DUMMYUNIONNAME1)
9706f2543Smrg#define DUMMYUNIONNAME1 u1
10706f2543Smrg#endif
11706f2543Smrg
12706f2543Smrg#define ICOM_CALL_( xfn, p, args) (p)->lpVtbl->xfn args
13706f2543Smrg
14706f2543Smrg# ifdef UNICODE
15706f2543Smrg#  define WINELIB_NAME_AW(func) func##W
16706f2543Smrg# else
17706f2543Smrg#  define WINELIB_NAME_AW(func) func##A
18706f2543Smrg# endif  /* UNICODE */
19706f2543Smrg#define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;
20706f2543Smrg
21706f2543Smrg#ifdef __cplusplus
22706f2543Smrgextern "C" {
23706f2543Smrg#endif /* defined(__cplusplus) */
24706f2543Smrg
25706f2543Smrg#ifndef	DIRECTDRAW_VERSION
26706f2543Smrg#define	DIRECTDRAW_VERSION	0x0700
27706f2543Smrg#endif /* DIRECTDRAW_VERSION */
28706f2543Smrg
29706f2543Smrg/*****************************************************************************
30706f2543Smrg * Predeclare the interfaces
31706f2543Smrg */
32706f2543SmrgDEFINE_GUID( CLSID_DirectDraw,		0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
33706f2543SmrgDEFINE_GUID( CLSID_DirectDraw7,         0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
34706f2543SmrgDEFINE_GUID( CLSID_DirectDrawClipper,	0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
35706f2543SmrgDEFINE_GUID( IID_IDirectDraw,		0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
36706f2543SmrgDEFINE_GUID( IID_IDirectDraw2,		0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
37706f2543SmrgDEFINE_GUID( IID_IDirectDraw4,          0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
38706f2543SmrgDEFINE_GUID( IID_IDirectDraw7,          0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
39706f2543SmrgDEFINE_GUID( IID_IDirectDrawSurface,	0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
40706f2543SmrgDEFINE_GUID( IID_IDirectDrawSurface2,	0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
41706f2543SmrgDEFINE_GUID( IID_IDirectDrawSurface3,	0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
42706f2543SmrgDEFINE_GUID( IID_IDirectDrawSurface4,   0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
43706f2543SmrgDEFINE_GUID( IID_IDirectDrawSurface7,   0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
44706f2543SmrgDEFINE_GUID( IID_IDirectDrawPalette,	0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
45706f2543SmrgDEFINE_GUID( IID_IDirectDrawClipper,	0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
46706f2543SmrgDEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
47706f2543SmrgDEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
48706f2543Smrg
49706f2543Smrgtypedef struct IDirectDraw *LPDIRECTDRAW;
50706f2543Smrgtypedef struct IDirectDraw2 *LPDIRECTDRAW2;
51706f2543Smrgtypedef struct IDirectDraw4 *LPDIRECTDRAW4;
52706f2543Smrgtypedef struct IDirectDraw7 *LPDIRECTDRAW7;
53706f2543Smrgtypedef struct IDirectDrawClipper *LPDIRECTDRAWCLIPPER;
54706f2543Smrgtypedef struct IDirectDrawPalette *LPDIRECTDRAWPALETTE;
55706f2543Smrgtypedef struct IDirectDrawSurface *LPDIRECTDRAWSURFACE;
56706f2543Smrgtypedef struct IDirectDrawSurface2 *LPDIRECTDRAWSURFACE2;
57706f2543Smrgtypedef struct IDirectDrawSurface3 *LPDIRECTDRAWSURFACE3;
58706f2543Smrgtypedef struct IDirectDrawSurface4 *LPDIRECTDRAWSURFACE4;
59706f2543Smrgtypedef struct IDirectDrawSurface7 *LPDIRECTDRAWSURFACE7;
60706f2543Smrgtypedef struct IDirectDrawColorControl *LPDIRECTDRAWCOLORCONTROL;
61706f2543Smrgtypedef struct IDirectDrawGammaControl *LPDIRECTDRAWGAMMACONTROL;
62706f2543Smrg
63706f2543Smrg
64706f2543Smrg#define DDENUMRET_CANCEL	0
65706f2543Smrg#define DDENUMRET_OK		1
66706f2543Smrg
67706f2543Smrg#define DD_OK			0
68706f2543Smrg
69706f2543Smrg
70706f2543Smrg#define _FACDD		0x876
71706f2543Smrg#define MAKE_DDHRESULT( code )  MAKE_HRESULT( 1, _FACDD, code )
72706f2543Smrg
73706f2543Smrg#define DDERR_ALREADYINITIALIZED		MAKE_DDHRESULT( 5 )
74706f2543Smrg#define DDERR_CANNOTATTACHSURFACE		MAKE_DDHRESULT( 10 )
75706f2543Smrg#define DDERR_CANNOTDETACHSURFACE		MAKE_DDHRESULT( 20 )
76706f2543Smrg#define DDERR_CURRENTLYNOTAVAIL			MAKE_DDHRESULT( 40 )
77706f2543Smrg#define DDERR_EXCEPTION				MAKE_DDHRESULT( 55 )
78706f2543Smrg#define DDERR_GENERIC				E_FAIL
79706f2543Smrg#define DDERR_HEIGHTALIGN			MAKE_DDHRESULT( 90 )
80706f2543Smrg#define DDERR_INCOMPATIBLEPRIMARY		MAKE_DDHRESULT( 95 )
81706f2543Smrg#define DDERR_INVALIDCAPS			MAKE_DDHRESULT( 100 )
82706f2543Smrg#define DDERR_INVALIDCLIPLIST			MAKE_DDHRESULT( 110 )
83706f2543Smrg#define DDERR_INVALIDMODE			MAKE_DDHRESULT( 120 )
84706f2543Smrg#define DDERR_INVALIDOBJECT			MAKE_DDHRESULT( 130 )
85706f2543Smrg#define DDERR_INVALIDPARAMS			E_INVALIDARG
86706f2543Smrg#define DDERR_INVALIDPIXELFORMAT		MAKE_DDHRESULT( 145 )
87706f2543Smrg#define DDERR_INVALIDRECT			MAKE_DDHRESULT( 150 )
88706f2543Smrg#define DDERR_LOCKEDSURFACES			MAKE_DDHRESULT( 160 )
89706f2543Smrg#define DDERR_NO3D				MAKE_DDHRESULT( 170 )
90706f2543Smrg#define DDERR_NOALPHAHW				MAKE_DDHRESULT( 180 )
91706f2543Smrg#define DDERR_NOSTEREOHARDWARE          	MAKE_DDHRESULT( 181 )
92706f2543Smrg#define DDERR_NOSURFACELEFT                     MAKE_DDHRESULT( 182 )
93706f2543Smrg#define DDERR_NOCLIPLIST			MAKE_DDHRESULT( 205 )
94706f2543Smrg#define DDERR_NOCOLORCONVHW			MAKE_DDHRESULT( 210 )
95706f2543Smrg#define DDERR_NOCOOPERATIVELEVELSET		MAKE_DDHRESULT( 212 )
96706f2543Smrg#define DDERR_NOCOLORKEY			MAKE_DDHRESULT( 215 )
97706f2543Smrg#define DDERR_NOCOLORKEYHW			MAKE_DDHRESULT( 220 )
98706f2543Smrg#define DDERR_NODIRECTDRAWSUPPORT		MAKE_DDHRESULT( 222 )
99706f2543Smrg#define DDERR_NOEXCLUSIVEMODE			MAKE_DDHRESULT( 225 )
100706f2543Smrg#define DDERR_NOFLIPHW				MAKE_DDHRESULT( 230 )
101706f2543Smrg#define DDERR_NOGDI				MAKE_DDHRESULT( 240 )
102706f2543Smrg#define DDERR_NOMIRRORHW			MAKE_DDHRESULT( 250 )
103706f2543Smrg#define DDERR_NOTFOUND				MAKE_DDHRESULT( 255 )
104706f2543Smrg#define DDERR_NOOVERLAYHW			MAKE_DDHRESULT( 260 )
105706f2543Smrg#define DDERR_OVERLAPPINGRECTS                  MAKE_DDHRESULT( 270 )
106706f2543Smrg#define DDERR_NORASTEROPHW			MAKE_DDHRESULT( 280 )
107706f2543Smrg#define DDERR_NOROTATIONHW			MAKE_DDHRESULT( 290 )
108706f2543Smrg#define DDERR_NOSTRETCHHW			MAKE_DDHRESULT( 310 )
109706f2543Smrg#define DDERR_NOT4BITCOLOR			MAKE_DDHRESULT( 316 )
110706f2543Smrg#define DDERR_NOT4BITCOLORINDEX			MAKE_DDHRESULT( 317 )
111706f2543Smrg#define DDERR_NOT8BITCOLOR			MAKE_DDHRESULT( 320 )
112706f2543Smrg#define DDERR_NOTEXTUREHW			MAKE_DDHRESULT( 330 )
113706f2543Smrg#define DDERR_NOVSYNCHW				MAKE_DDHRESULT( 335 )
114706f2543Smrg#define DDERR_NOZBUFFERHW			MAKE_DDHRESULT( 340 )
115706f2543Smrg#define DDERR_NOZOVERLAYHW			MAKE_DDHRESULT( 350 )
116706f2543Smrg#define DDERR_OUTOFCAPS				MAKE_DDHRESULT( 360 )
117706f2543Smrg#define DDERR_OUTOFMEMORY			E_OUTOFMEMORY
118706f2543Smrg#define DDERR_OUTOFVIDEOMEMORY			MAKE_DDHRESULT( 380 )
119706f2543Smrg#define DDERR_OVERLAYCANTCLIP			MAKE_DDHRESULT( 382 )
120706f2543Smrg#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE	MAKE_DDHRESULT( 384 )
121706f2543Smrg#define DDERR_PALETTEBUSY			MAKE_DDHRESULT( 387 )
122706f2543Smrg#define DDERR_COLORKEYNOTSET			MAKE_DDHRESULT( 400 )
123706f2543Smrg#define DDERR_SURFACEALREADYATTACHED		MAKE_DDHRESULT( 410 )
124706f2543Smrg#define DDERR_SURFACEALREADYDEPENDENT		MAKE_DDHRESULT( 420 )
125706f2543Smrg#define DDERR_SURFACEBUSY			MAKE_DDHRESULT( 430 )
126706f2543Smrg#define DDERR_CANTLOCKSURFACE			MAKE_DDHRESULT( 435 )
127706f2543Smrg#define DDERR_SURFACEISOBSCURED			MAKE_DDHRESULT( 440 )
128706f2543Smrg#define DDERR_SURFACELOST			MAKE_DDHRESULT( 450 )
129706f2543Smrg#define DDERR_SURFACENOTATTACHED		MAKE_DDHRESULT( 460 )
130706f2543Smrg#define DDERR_TOOBIGHEIGHT			MAKE_DDHRESULT( 470 )
131706f2543Smrg#define DDERR_TOOBIGSIZE			MAKE_DDHRESULT( 480 )
132706f2543Smrg#define DDERR_TOOBIGWIDTH			MAKE_DDHRESULT( 490 )
133706f2543Smrg#define DDERR_UNSUPPORTED			E_NOTIMPL
134706f2543Smrg#define DDERR_UNSUPPORTEDFORMAT			MAKE_DDHRESULT( 510 )
135706f2543Smrg#define DDERR_UNSUPPORTEDMASK			MAKE_DDHRESULT( 520 )
136706f2543Smrg#define DDERR_INVALIDSTREAM                     MAKE_DDHRESULT( 521 )
137706f2543Smrg#define DDERR_VERTICALBLANKINPROGRESS		MAKE_DDHRESULT( 537 )
138706f2543Smrg#define DDERR_WASSTILLDRAWING			MAKE_DDHRESULT( 540 )
139706f2543Smrg#define DDERR_DDSCAPSCOMPLEXREQUIRED            MAKE_DDHRESULT( 542 )
140706f2543Smrg#define DDERR_XALIGN				MAKE_DDHRESULT( 560 )
141706f2543Smrg#define DDERR_INVALIDDIRECTDRAWGUID		MAKE_DDHRESULT( 561 )
142706f2543Smrg#define DDERR_DIRECTDRAWALREADYCREATED		MAKE_DDHRESULT( 562 )
143706f2543Smrg#define DDERR_NODIRECTDRAWHW			MAKE_DDHRESULT( 563 )
144706f2543Smrg#define DDERR_PRIMARYSURFACEALREADYEXISTS	MAKE_DDHRESULT( 564 )
145706f2543Smrg#define DDERR_NOEMULATION			MAKE_DDHRESULT( 565 )
146706f2543Smrg#define DDERR_REGIONTOOSMALL			MAKE_DDHRESULT( 566 )
147706f2543Smrg#define DDERR_CLIPPERISUSINGHWND		MAKE_DDHRESULT( 567 )
148706f2543Smrg#define DDERR_NOCLIPPERATTACHED			MAKE_DDHRESULT( 568 )
149706f2543Smrg#define DDERR_NOHWND				MAKE_DDHRESULT( 569 )
150706f2543Smrg#define DDERR_HWNDSUBCLASSED			MAKE_DDHRESULT( 570 )
151706f2543Smrg#define DDERR_HWNDALREADYSET			MAKE_DDHRESULT( 571 )
152706f2543Smrg#define DDERR_NOPALETTEATTACHED			MAKE_DDHRESULT( 572 )
153706f2543Smrg#define DDERR_NOPALETTEHW			MAKE_DDHRESULT( 573 )
154706f2543Smrg#define DDERR_BLTFASTCANTCLIP			MAKE_DDHRESULT( 574 )
155706f2543Smrg#define DDERR_NOBLTHW				MAKE_DDHRESULT( 575 )
156706f2543Smrg#define DDERR_NODDROPSHW			MAKE_DDHRESULT( 576 )
157706f2543Smrg#define DDERR_OVERLAYNOTVISIBLE			MAKE_DDHRESULT( 577 )
158706f2543Smrg#define DDERR_NOOVERLAYDEST			MAKE_DDHRESULT( 578 )
159706f2543Smrg#define DDERR_INVALIDPOSITION			MAKE_DDHRESULT( 579 )
160706f2543Smrg#define DDERR_NOTAOVERLAYSURFACE		MAKE_DDHRESULT( 580 )
161706f2543Smrg#define DDERR_EXCLUSIVEMODEALREADYSET		MAKE_DDHRESULT( 581 )
162706f2543Smrg#define DDERR_NOTFLIPPABLE			MAKE_DDHRESULT( 582 )
163706f2543Smrg#define DDERR_CANTDUPLICATE			MAKE_DDHRESULT( 583 )
164706f2543Smrg#define DDERR_NOTLOCKED				MAKE_DDHRESULT( 584 )
165706f2543Smrg#define DDERR_CANTCREATEDC			MAKE_DDHRESULT( 585 )
166706f2543Smrg#define DDERR_NODC				MAKE_DDHRESULT( 586 )
167706f2543Smrg#define DDERR_WRONGMODE				MAKE_DDHRESULT( 587 )
168706f2543Smrg#define DDERR_IMPLICITLYCREATED			MAKE_DDHRESULT( 588 )
169706f2543Smrg#define DDERR_NOTPALETTIZED			MAKE_DDHRESULT( 589 )
170706f2543Smrg#define DDERR_UNSUPPORTEDMODE			MAKE_DDHRESULT( 590 )
171706f2543Smrg#define DDERR_NOMIPMAPHW			MAKE_DDHRESULT( 591 )
172706f2543Smrg#define DDERR_INVALIDSURFACETYPE		MAKE_DDHRESULT( 592 )
173706f2543Smrg#define DDERR_NOOPTIMIZEHW			MAKE_DDHRESULT( 600 )
174706f2543Smrg#define DDERR_NOTLOADED				MAKE_DDHRESULT( 601 )
175706f2543Smrg#define DDERR_NOFOCUSWINDOW			MAKE_DDHRESULT( 602 )
176706f2543Smrg#define DDERR_NOTONMIPMAPSUBLEVEL               MAKE_DDHRESULT( 603 )
177706f2543Smrg#define DDERR_DCALREADYCREATED			MAKE_DDHRESULT( 620 )
178706f2543Smrg#define DDERR_NONONLOCALVIDMEM			MAKE_DDHRESULT( 630 )
179706f2543Smrg#define DDERR_CANTPAGELOCK			MAKE_DDHRESULT( 640 )
180706f2543Smrg#define DDERR_CANTPAGEUNLOCK			MAKE_DDHRESULT( 660 )
181706f2543Smrg#define DDERR_NOTPAGELOCKED			MAKE_DDHRESULT( 680 )
182706f2543Smrg#define DDERR_MOREDATA				MAKE_DDHRESULT( 690 )
183706f2543Smrg#define DDERR_EXPIRED                           MAKE_DDHRESULT( 691 )
184706f2543Smrg#define DDERR_TESTFINISHED                      MAKE_DDHRESULT( 692 )
185706f2543Smrg#define DDERR_NEWMODE                           MAKE_DDHRESULT( 693 )
186706f2543Smrg#define DDERR_D3DNOTINITIALIZED                 MAKE_DDHRESULT( 694 )
187706f2543Smrg#define DDERR_VIDEONOTACTIVE			MAKE_DDHRESULT( 695 )
188706f2543Smrg#define DDERR_NOMONITORINFORMATION              MAKE_DDHRESULT( 696 )
189706f2543Smrg#define DDERR_NODRIVERSUPPORT                   MAKE_DDHRESULT( 697 )
190706f2543Smrg#define DDERR_DEVICEDOESNTOWNSURFACE		MAKE_DDHRESULT( 699 )
191706f2543Smrg#define DDERR_NOTINITIALIZED			CO_E_NOTINITIALIZED
192706f2543Smrg
193706f2543Smrg/* dwFlags for Blt* */
194706f2543Smrg#define DDBLT_ALPHADEST				0x00000001
195706f2543Smrg#define DDBLT_ALPHADESTCONSTOVERRIDE		0x00000002
196706f2543Smrg#define DDBLT_ALPHADESTNEG			0x00000004
197706f2543Smrg#define DDBLT_ALPHADESTSURFACEOVERRIDE		0x00000008
198706f2543Smrg#define DDBLT_ALPHAEDGEBLEND			0x00000010
199706f2543Smrg#define DDBLT_ALPHASRC				0x00000020
200706f2543Smrg#define DDBLT_ALPHASRCCONSTOVERRIDE		0x00000040
201706f2543Smrg#define DDBLT_ALPHASRCNEG			0x00000080
202706f2543Smrg#define DDBLT_ALPHASRCSURFACEOVERRIDE		0x00000100
203706f2543Smrg#define DDBLT_ASYNC				0x00000200
204706f2543Smrg#define DDBLT_COLORFILL				0x00000400
205706f2543Smrg#define DDBLT_DDFX				0x00000800
206706f2543Smrg#define DDBLT_DDROPS				0x00001000
207706f2543Smrg#define DDBLT_KEYDEST				0x00002000
208706f2543Smrg#define DDBLT_KEYDESTOVERRIDE			0x00004000
209706f2543Smrg#define DDBLT_KEYSRC				0x00008000
210706f2543Smrg#define DDBLT_KEYSRCOVERRIDE			0x00010000
211706f2543Smrg#define DDBLT_ROP				0x00020000
212706f2543Smrg#define DDBLT_ROTATIONANGLE			0x00040000
213706f2543Smrg#define DDBLT_ZBUFFER				0x00080000
214706f2543Smrg#define DDBLT_ZBUFFERDESTCONSTOVERRIDE		0x00100000
215706f2543Smrg#define DDBLT_ZBUFFERDESTOVERRIDE		0x00200000
216706f2543Smrg#define DDBLT_ZBUFFERSRCCONSTOVERRIDE		0x00400000
217706f2543Smrg#define DDBLT_ZBUFFERSRCOVERRIDE		0x00800000
218706f2543Smrg#define DDBLT_WAIT				0x01000000
219706f2543Smrg#define DDBLT_DEPTHFILL				0x02000000
220706f2543Smrg#define DDBLT_DONOTWAIT                         0x08000000
221706f2543Smrg
222706f2543Smrg/* dwTrans for BltFast */
223706f2543Smrg#define DDBLTFAST_NOCOLORKEY			0x00000000
224706f2543Smrg#define DDBLTFAST_SRCCOLORKEY			0x00000001
225706f2543Smrg#define DDBLTFAST_DESTCOLORKEY			0x00000002
226706f2543Smrg#define DDBLTFAST_WAIT				0x00000010
227706f2543Smrg#define DDBLTFAST_DONOTWAIT                     0x00000020
228706f2543Smrg
229706f2543Smrg/* dwFlags for Flip */
230706f2543Smrg#define DDFLIP_WAIT		0x00000001
231706f2543Smrg#define DDFLIP_EVEN		0x00000002 /* only valid for overlay */
232706f2543Smrg#define DDFLIP_ODD		0x00000004 /* only valid for overlay */
233706f2543Smrg#define DDFLIP_NOVSYNC		0x00000008
234706f2543Smrg#define DDFLIP_STEREO		0x00000010
235706f2543Smrg#define DDFLIP_DONOTWAIT	0x00000020
236706f2543Smrg
237706f2543Smrg/* dwFlags for GetBltStatus */
238706f2543Smrg#define DDGBS_CANBLT				0x00000001
239706f2543Smrg#define DDGBS_ISBLTDONE				0x00000002
240706f2543Smrg
241706f2543Smrg/* dwFlags for IDirectDrawSurface7::GetFlipStatus */
242706f2543Smrg#define DDGFS_CANFLIP		1L
243706f2543Smrg#define DDGFS_ISFLIPDONE	2L
244706f2543Smrg
245706f2543Smrg/* dwFlags for IDirectDrawSurface7::SetPrivateData */
246706f2543Smrg#define DDSPD_IUNKNOWNPTR	1L
247706f2543Smrg#define DDSPD_VOLATILE		2L
248706f2543Smrg
249706f2543Smrg/* DDSCAPS.dwCaps */
250706f2543Smrg/* reserved1, was 3d capable */
251706f2543Smrg#define DDSCAPS_RESERVED1		0x00000001
252706f2543Smrg/* surface contains alpha information */
253706f2543Smrg#define DDSCAPS_ALPHA			0x00000002
254706f2543Smrg/* this surface is a backbuffer */
255706f2543Smrg#define DDSCAPS_BACKBUFFER		0x00000004
256706f2543Smrg/* complex surface structure */
257706f2543Smrg#define DDSCAPS_COMPLEX			0x00000008
258706f2543Smrg/* part of surface flipping structure */
259706f2543Smrg#define DDSCAPS_FLIP			0x00000010
260706f2543Smrg/* this surface is the frontbuffer surface */
261706f2543Smrg#define DDSCAPS_FRONTBUFFER		0x00000020
262706f2543Smrg/* this is a plain offscreen surface */
263706f2543Smrg#define DDSCAPS_OFFSCREENPLAIN		0x00000040
264706f2543Smrg/* overlay */
265706f2543Smrg#define DDSCAPS_OVERLAY			0x00000080
266706f2543Smrg/* palette objects can be created and attached to us */
267706f2543Smrg#define DDSCAPS_PALETTE			0x00000100
268706f2543Smrg/* primary surface (the one the user looks at currently)(right eye)*/
269706f2543Smrg#define DDSCAPS_PRIMARYSURFACE		0x00000200
270706f2543Smrg/* primary surface for left eye */
271706f2543Smrg#define DDSCAPS_PRIMARYSURFACELEFT	0x00000400
272706f2543Smrg/* surface exists in systemmemory */
273706f2543Smrg#define DDSCAPS_SYSTEMMEMORY		0x00000800
274706f2543Smrg/* surface can be used as a texture */
275706f2543Smrg#define DDSCAPS_TEXTURE		        0x00001000
276706f2543Smrg/* surface may be destination for 3d rendering */
277706f2543Smrg#define DDSCAPS_3DDEVICE		0x00002000
278706f2543Smrg/* surface exists in videomemory */
279706f2543Smrg#define DDSCAPS_VIDEOMEMORY		0x00004000
280706f2543Smrg/* surface changes immediately visible */
281706f2543Smrg#define DDSCAPS_VISIBLE			0x00008000
282706f2543Smrg/* write only surface */
283706f2543Smrg#define DDSCAPS_WRITEONLY		0x00010000
284706f2543Smrg/* zbuffer surface */
285706f2543Smrg#define DDSCAPS_ZBUFFER			0x00020000
286706f2543Smrg/* has its own DC */
287706f2543Smrg#define DDSCAPS_OWNDC			0x00040000
288706f2543Smrg/* surface should be able to receive live video */
289706f2543Smrg#define DDSCAPS_LIVEVIDEO		0x00080000
290706f2543Smrg/* should be able to have a hw codec decompress stuff into it */
291706f2543Smrg#define DDSCAPS_HWCODEC			0x00100000
292706f2543Smrg/* mode X (320x200 or 320x240) surface */
293706f2543Smrg#define DDSCAPS_MODEX			0x00200000
294706f2543Smrg/* one mipmap surface (1 level) */
295706f2543Smrg#define DDSCAPS_MIPMAP			0x00400000
296706f2543Smrg#define DDSCAPS_RESERVED2		0x00800000
297706f2543Smrg/* memory allocation delayed until Load() */
298706f2543Smrg#define DDSCAPS_ALLOCONLOAD		0x04000000
299706f2543Smrg/* Indicates that the surface will receive data from a video port */
300706f2543Smrg#define DDSCAPS_VIDEOPORT		0x08000000
301706f2543Smrg/* surface is in local videomemory */
302706f2543Smrg#define DDSCAPS_LOCALVIDMEM		0x10000000
303706f2543Smrg/* surface is in nonlocal videomemory */
304706f2543Smrg#define DDSCAPS_NONLOCALVIDMEM		0x20000000
305706f2543Smrg/* surface is a standard VGA mode surface (NOT ModeX) */
306706f2543Smrg#define DDSCAPS_STANDARDVGAMODE		0x40000000
307706f2543Smrg/* optimized? surface */
308706f2543Smrg#define DDSCAPS_OPTIMIZED		0x80000000
309706f2543Smrg
310706f2543Smrgtypedef struct _DDSCAPS {
311706f2543Smrg	DWORD	dwCaps;	/* capabilities of surface wanted */
312706f2543Smrg} DDSCAPS,*LPDDSCAPS;
313706f2543Smrg
314706f2543Smrg/* DDSCAPS2.dwCaps2 */
315706f2543Smrg/* indicates the surface will receive data from a video port using
316706f2543Smrg   deinterlacing hardware. */
317706f2543Smrg#define DDSCAPS2_HARDWAREDEINTERLACE	0x00000002
318706f2543Smrg/* indicates the surface will be locked very frequently. */
319706f2543Smrg#define DDSCAPS2_HINTDYNAMIC		0x00000004
320706f2543Smrg/* indicates surface can be re-ordered or retiled on load() */
321706f2543Smrg#define DDSCAPS2_HINTSTATIC             0x00000008
322706f2543Smrg/* indicates surface to be managed by directdraw/direct3D */
323706f2543Smrg#define DDSCAPS2_TEXTUREMANAGE          0x00000010
324706f2543Smrg/* reserved bits */
325706f2543Smrg#define DDSCAPS2_RESERVED1              0x00000020
326706f2543Smrg#define DDSCAPS2_RESERVED2              0x00000040
327706f2543Smrg/* indicates surface will never be locked again */
328706f2543Smrg#define DDSCAPS2_OPAQUE                 0x00000080
329706f2543Smrg/* set at CreateSurface() time to indicate antialising will be used */
330706f2543Smrg#define DDSCAPS2_HINTANTIALIASING       0x00000100
331706f2543Smrg/* set at CreateSurface() time to indicate cubic environment map */
332706f2543Smrg#define DDSCAPS2_CUBEMAP                0x00000200
333706f2543Smrg/* face flags for cube maps */
334706f2543Smrg#define DDSCAPS2_CUBEMAP_POSITIVEX      0x00000400
335706f2543Smrg#define DDSCAPS2_CUBEMAP_NEGATIVEX      0x00000800
336706f2543Smrg#define DDSCAPS2_CUBEMAP_POSITIVEY      0x00001000
337706f2543Smrg#define DDSCAPS2_CUBEMAP_NEGATIVEY      0x00002000
338706f2543Smrg#define DDSCAPS2_CUBEMAP_POSITIVEZ      0x00004000
339706f2543Smrg#define DDSCAPS2_CUBEMAP_NEGATIVEZ      0x00008000
340706f2543Smrg/* specifies all faces of a cube for CreateSurface() */
341706f2543Smrg#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
342706f2543Smrg                                    DDSCAPS2_CUBEMAP_NEGATIVEX |\
343706f2543Smrg                                    DDSCAPS2_CUBEMAP_POSITIVEY |\
344706f2543Smrg                                    DDSCAPS2_CUBEMAP_NEGATIVEY |\
345706f2543Smrg                                    DDSCAPS2_CUBEMAP_POSITIVEZ |\
346706f2543Smrg                                    DDSCAPS2_CUBEMAP_NEGATIVEZ )
347706f2543Smrg/* set for mipmap sublevels on DirectX7 and later.  ignored by CreateSurface() */
348706f2543Smrg#define DDSCAPS2_MIPMAPSUBLEVEL         0x00010000
349706f2543Smrg/* indicates texture surface to be managed by Direct3D *only* */
350706f2543Smrg#define DDSCAPS2_D3DTEXTUREMANAGE       0x00020000
351706f2543Smrg/* indicates managed surface that can safely be lost */
352706f2543Smrg#define DDSCAPS2_DONOTPERSIST           0x00040000
353706f2543Smrg/* indicates surface is part of a stereo flipping chain */
354706f2543Smrg#define DDSCAPS2_STEREOSURFACELEFT      0x00080000
355706f2543Smrg
356706f2543Smrgtypedef struct _DDSCAPS2 {
357706f2543Smrg	DWORD	dwCaps;	/* capabilities of surface wanted */
358706f2543Smrg	DWORD   dwCaps2; /* additional capabilities */
359706f2543Smrg	DWORD   dwCaps3; /* reserved capabilities */
360706f2543Smrg	DWORD   dwCaps4; /* more reserved capabilities */
361706f2543Smrg} DDSCAPS2,*LPDDSCAPS2;
362706f2543Smrg
363706f2543Smrg#define	DD_ROP_SPACE	(256/32)	/* space required to store ROP array */
364706f2543Smrg
365706f2543Smrgtypedef struct _DDCAPS_DX7		/* DirectX 7 version of caps struct */
366706f2543Smrg{
367706f2543Smrg    DWORD	dwSize;                 /* size of the DDDRIVERCAPS structure */
368706f2543Smrg    DWORD	dwCaps;                 /* driver specific capabilities */
369706f2543Smrg    DWORD	dwCaps2;                /* more driver specific capabilites */
370706f2543Smrg    DWORD	dwCKeyCaps;             /* color key capabilities of the surface */
371706f2543Smrg    DWORD	dwFXCaps;               /* driver specific stretching and effects capabilites */
372706f2543Smrg    DWORD	dwFXAlphaCaps;          /* alpha driver specific capabilities */
373706f2543Smrg    DWORD	dwPalCaps;              /* palette capabilities */
374706f2543Smrg    DWORD	dwSVCaps;               /* stereo vision capabilities */
375706f2543Smrg    DWORD	dwAlphaBltConstBitDepths;       /* DDBD_2,4,8 */
376706f2543Smrg    DWORD	dwAlphaBltPixelBitDepths;       /* DDBD_1,2,4,8 */
377706f2543Smrg    DWORD	dwAlphaBltSurfaceBitDepths;     /* DDBD_1,2,4,8 */
378706f2543Smrg    DWORD	dwAlphaOverlayConstBitDepths;   /* DDBD_2,4,8 */
379706f2543Smrg    DWORD	dwAlphaOverlayPixelBitDepths;   /* DDBD_1,2,4,8 */
380706f2543Smrg    DWORD	dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
381706f2543Smrg    DWORD	dwZBufferBitDepths;             /* DDBD_8,16,24,32 */
382706f2543Smrg    DWORD	dwVidMemTotal;          /* total amount of video memory */
383706f2543Smrg    DWORD	dwVidMemFree;           /* amount of free video memory */
384706f2543Smrg    DWORD	dwMaxVisibleOverlays;   /* maximum number of visible overlays */
385706f2543Smrg    DWORD	dwCurrVisibleOverlays;  /* current number of visible overlays */
386706f2543Smrg    DWORD	dwNumFourCCCodes;       /* number of four cc codes */
387706f2543Smrg    DWORD	dwAlignBoundarySrc;     /* source rectangle alignment */
388706f2543Smrg    DWORD	dwAlignSizeSrc;         /* source rectangle byte size */
389706f2543Smrg    DWORD	dwAlignBoundaryDest;    /* dest rectangle alignment */
390706f2543Smrg    DWORD	dwAlignSizeDest;        /* dest rectangle byte size */
391706f2543Smrg    DWORD	dwAlignStrideAlign;     /* stride alignment */
392706f2543Smrg    DWORD	dwRops[DD_ROP_SPACE];   /* ROPS supported */
393706f2543Smrg    DDSCAPS	ddsOldCaps;             /* old DDSCAPS - superceded for DirectX6+ */
394706f2543Smrg    DWORD	dwMinOverlayStretch;    /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
395706f2543Smrg    DWORD	dwMaxOverlayStretch;    /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
396706f2543Smrg    DWORD	dwMinLiveVideoStretch;  /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
397706f2543Smrg    DWORD	dwMaxLiveVideoStretch;  /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
398706f2543Smrg    DWORD	dwMinHwCodecStretch;    /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
399706f2543Smrg    DWORD	dwMaxHwCodecStretch;    /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
400706f2543Smrg    DWORD	dwReserved1;
401706f2543Smrg    DWORD	dwReserved2;
402706f2543Smrg    DWORD	dwReserved3;
403706f2543Smrg    DWORD	dwSVBCaps;              /* driver specific capabilities for System->Vmem blts */
404706f2543Smrg    DWORD	dwSVBCKeyCaps;          /* driver color key capabilities for System->Vmem blts */
405706f2543Smrg    DWORD	dwSVBFXCaps;            /* driver FX capabilities for System->Vmem blts */
406706f2543Smrg    DWORD	dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
407706f2543Smrg    DWORD	dwVSBCaps;              /* driver specific capabilities for Vmem->System blts */
408706f2543Smrg    DWORD	dwVSBCKeyCaps;          /* driver color key capabilities for Vmem->System blts */
409706f2543Smrg    DWORD	dwVSBFXCaps;            /* driver FX capabilities for Vmem->System blts */
410706f2543Smrg    DWORD	dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
411706f2543Smrg    DWORD	dwSSBCaps;              /* driver specific capabilities for System->System blts */
412706f2543Smrg    DWORD	dwSSBCKeyCaps;          /* driver color key capabilities for System->System blts */
413706f2543Smrg    DWORD	dwSSBFXCaps;            /* driver FX capabilities for System->System blts */
414706f2543Smrg    DWORD	dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
415706f2543Smrg    DWORD       dwMaxVideoPorts;        /* maximum number of usable video ports */
416706f2543Smrg    DWORD   	dwCurrVideoPorts;       /* current number of video ports used */
417706f2543Smrg    DWORD   	dwSVBCaps2;             /* more driver specific capabilities for System->Vmem blts */
418706f2543Smrg    DWORD   	dwNLVBCaps;             /* driver specific capabilities for non-local->local vidmem blts */
419706f2543Smrg    DWORD   	dwNLVBCaps2;            /* more driver specific capabilities non-local->local vidmem blts */
420706f2543Smrg    DWORD   	dwNLVBCKeyCaps;         /* driver color key capabilities for non-local->local vidmem blts */
421706f2543Smrg    DWORD   	dwNLVBFXCaps;           /* driver FX capabilities for non-local->local blts */
422706f2543Smrg    DWORD   	dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
423706f2543Smrg    DDSCAPS2    ddsCaps;		/* surface capabilities */
424706f2543Smrg} DDCAPS_DX7,*LPDDCAPS_DX7;
425706f2543Smrg
426706f2543Smrgtypedef struct _DDCAPS_DX6		/* DirectX 6 version of caps struct */
427706f2543Smrg{
428706f2543Smrg    DWORD	dwSize;                 /* size of the DDDRIVERCAPS structure */
429706f2543Smrg    DWORD	dwCaps;                 /* driver specific capabilities */
430706f2543Smrg    DWORD	dwCaps2;                /* more driver specific capabilites */
431706f2543Smrg    DWORD	dwCKeyCaps;             /* color key capabilities of the surface */
432706f2543Smrg    DWORD	dwFXCaps;               /* driver specific stretching and effects capabilites */
433706f2543Smrg    DWORD	dwFXAlphaCaps;          /* alpha driver specific capabilities */
434706f2543Smrg    DWORD	dwPalCaps;              /* palette capabilities */
435706f2543Smrg    DWORD	dwSVCaps;               /* stereo vision capabilities */
436706f2543Smrg    DWORD	dwAlphaBltConstBitDepths;       /* DDBD_2,4,8 */
437706f2543Smrg    DWORD	dwAlphaBltPixelBitDepths;       /* DDBD_1,2,4,8 */
438706f2543Smrg    DWORD	dwAlphaBltSurfaceBitDepths;     /* DDBD_1,2,4,8 */
439706f2543Smrg    DWORD	dwAlphaOverlayConstBitDepths;   /* DDBD_2,4,8 */
440706f2543Smrg    DWORD	dwAlphaOverlayPixelBitDepths;   /* DDBD_1,2,4,8 */
441706f2543Smrg    DWORD	dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
442706f2543Smrg    DWORD	dwZBufferBitDepths;             /* DDBD_8,16,24,32 */
443706f2543Smrg    DWORD	dwVidMemTotal;          /* total amount of video memory */
444706f2543Smrg    DWORD	dwVidMemFree;           /* amount of free video memory */
445706f2543Smrg    DWORD	dwMaxVisibleOverlays;   /* maximum number of visible overlays */
446706f2543Smrg    DWORD	dwCurrVisibleOverlays;  /* current number of visible overlays */
447706f2543Smrg    DWORD	dwNumFourCCCodes;       /* number of four cc codes */
448706f2543Smrg    DWORD	dwAlignBoundarySrc;     /* source rectangle alignment */
449706f2543Smrg    DWORD	dwAlignSizeSrc;         /* source rectangle byte size */
450706f2543Smrg    DWORD	dwAlignBoundaryDest;    /* dest rectangle alignment */
451706f2543Smrg    DWORD	dwAlignSizeDest;        /* dest rectangle byte size */
452706f2543Smrg    DWORD	dwAlignStrideAlign;     /* stride alignment */
453706f2543Smrg    DWORD	dwRops[DD_ROP_SPACE];   /* ROPS supported */
454706f2543Smrg    DDSCAPS	ddsOldCaps;             /* old DDSCAPS - superceded for DirectX6+ */
455706f2543Smrg    DWORD	dwMinOverlayStretch;    /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
456706f2543Smrg    DWORD	dwMaxOverlayStretch;    /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
457706f2543Smrg    DWORD	dwMinLiveVideoStretch;  /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
458706f2543Smrg    DWORD	dwMaxLiveVideoStretch;  /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
459706f2543Smrg    DWORD	dwMinHwCodecStretch;    /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
460706f2543Smrg    DWORD	dwMaxHwCodecStretch;    /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
461706f2543Smrg    DWORD	dwReserved1;
462706f2543Smrg    DWORD	dwReserved2;
463706f2543Smrg    DWORD	dwReserved3;
464706f2543Smrg    DWORD	dwSVBCaps;              /* driver specific capabilities for System->Vmem blts */
465706f2543Smrg    DWORD	dwSVBCKeyCaps;          /* driver color key capabilities for System->Vmem blts */
466706f2543Smrg    DWORD	dwSVBFXCaps;            /* driver FX capabilities for System->Vmem blts */
467706f2543Smrg    DWORD	dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
468706f2543Smrg    DWORD	dwVSBCaps;              /* driver specific capabilities for Vmem->System blts */
469706f2543Smrg    DWORD	dwVSBCKeyCaps;          /* driver color key capabilities for Vmem->System blts */
470706f2543Smrg    DWORD	dwVSBFXCaps;            /* driver FX capabilities for Vmem->System blts */
471706f2543Smrg    DWORD	dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
472706f2543Smrg    DWORD	dwSSBCaps;              /* driver specific capabilities for System->System blts */
473706f2543Smrg    DWORD	dwSSBCKeyCaps;          /* driver color key capabilities for System->System blts */
474706f2543Smrg    DWORD	dwSSBFXCaps;            /* driver FX capabilities for System->System blts */
475706f2543Smrg    DWORD	dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
476706f2543Smrg    DWORD       dwMaxVideoPorts;        /* maximum number of usable video ports */
477706f2543Smrg    DWORD   	dwCurrVideoPorts;       /* current number of video ports used */
478706f2543Smrg    DWORD   	dwSVBCaps2;             /* more driver specific capabilities for System->Vmem blts */
479706f2543Smrg    DWORD   	dwNLVBCaps;             /* driver specific capabilities for non-local->local vidmem blts */
480706f2543Smrg    DWORD   	dwNLVBCaps2;            /* more driver specific capabilities non-local->local vidmem blts */
481706f2543Smrg    DWORD   	dwNLVBCKeyCaps;         /* driver color key capabilities for non-local->local vidmem blts */
482706f2543Smrg    DWORD   	dwNLVBFXCaps;           /* driver FX capabilities for non-local->local blts */
483706f2543Smrg    DWORD   	dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
484706f2543Smrg    /* and one new member for DirectX 6 */
485706f2543Smrg    DDSCAPS2    ddsCaps;		/* surface capabilities */
486706f2543Smrg} DDCAPS_DX6,*LPDDCAPS_DX6;
487706f2543Smrg
488706f2543Smrgtypedef struct _DDCAPS_DX5		/* DirectX5 version of caps struct */
489706f2543Smrg{
490706f2543Smrg    DWORD	dwSize;                 /* size of the DDDRIVERCAPS structure */
491706f2543Smrg    DWORD	dwCaps;                 /* driver specific capabilities */
492706f2543Smrg    DWORD	dwCaps2;                /* more driver specific capabilites */
493706f2543Smrg    DWORD	dwCKeyCaps;             /* color key capabilities of the surface */
494706f2543Smrg    DWORD	dwFXCaps;               /* driver specific stretching and effects capabilites */
495706f2543Smrg    DWORD	dwFXAlphaCaps;          /* alpha driver specific capabilities */
496706f2543Smrg    DWORD	dwPalCaps;              /* palette capabilities */
497706f2543Smrg    DWORD	dwSVCaps;               /* stereo vision capabilities */
498706f2543Smrg    DWORD	dwAlphaBltConstBitDepths;       /* DDBD_2,4,8 */
499706f2543Smrg    DWORD	dwAlphaBltPixelBitDepths;       /* DDBD_1,2,4,8 */
500706f2543Smrg    DWORD	dwAlphaBltSurfaceBitDepths;     /* DDBD_1,2,4,8 */
501706f2543Smrg    DWORD	dwAlphaOverlayConstBitDepths;   /* DDBD_2,4,8 */
502706f2543Smrg    DWORD	dwAlphaOverlayPixelBitDepths;   /* DDBD_1,2,4,8 */
503706f2543Smrg    DWORD	dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
504706f2543Smrg    DWORD	dwZBufferBitDepths;             /* DDBD_8,16,24,32 */
505706f2543Smrg    DWORD	dwVidMemTotal;          /* total amount of video memory */
506706f2543Smrg    DWORD	dwVidMemFree;           /* amount of free video memory */
507706f2543Smrg    DWORD	dwMaxVisibleOverlays;   /* maximum number of visible overlays */
508706f2543Smrg    DWORD	dwCurrVisibleOverlays;  /* current number of visible overlays */
509706f2543Smrg    DWORD	dwNumFourCCCodes;       /* number of four cc codes */
510706f2543Smrg    DWORD	dwAlignBoundarySrc;     /* source rectangle alignment */
511706f2543Smrg    DWORD	dwAlignSizeSrc;         /* source rectangle byte size */
512706f2543Smrg    DWORD	dwAlignBoundaryDest;    /* dest rectangle alignment */
513706f2543Smrg    DWORD	dwAlignSizeDest;        /* dest rectangle byte size */
514706f2543Smrg    DWORD	dwAlignStrideAlign;     /* stride alignment */
515706f2543Smrg    DWORD	dwRops[DD_ROP_SPACE];   /* ROPS supported */
516706f2543Smrg    DDSCAPS	ddsCaps;                /* DDSCAPS structure has all the general capabilities */
517706f2543Smrg    DWORD	dwMinOverlayStretch;    /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
518706f2543Smrg    DWORD	dwMaxOverlayStretch;    /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
519706f2543Smrg    DWORD	dwMinLiveVideoStretch;  /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
520706f2543Smrg    DWORD	dwMaxLiveVideoStretch;  /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
521706f2543Smrg    DWORD	dwMinHwCodecStretch;    /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
522706f2543Smrg    DWORD	dwMaxHwCodecStretch;    /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
523706f2543Smrg    DWORD	dwReserved1;
524706f2543Smrg    DWORD	dwReserved2;
525706f2543Smrg    DWORD	dwReserved3;
526706f2543Smrg    DWORD	dwSVBCaps;              /* driver specific capabilities for System->Vmem blts */
527706f2543Smrg    DWORD	dwSVBCKeyCaps;          /* driver color key capabilities for System->Vmem blts */
528706f2543Smrg    DWORD	dwSVBFXCaps;            /* driver FX capabilities for System->Vmem blts */
529706f2543Smrg    DWORD	dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
530706f2543Smrg    DWORD	dwVSBCaps;              /* driver specific capabilities for Vmem->System blts */
531706f2543Smrg    DWORD	dwVSBCKeyCaps;          /* driver color key capabilities for Vmem->System blts */
532706f2543Smrg    DWORD	dwVSBFXCaps;            /* driver FX capabilities for Vmem->System blts */
533706f2543Smrg    DWORD	dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
534706f2543Smrg    DWORD	dwSSBCaps;              /* driver specific capabilities for System->System blts */
535706f2543Smrg    DWORD	dwSSBCKeyCaps;          /* driver color key capabilities for System->System blts */
536706f2543Smrg    DWORD	dwSSBFXCaps;            /* driver FX capabilities for System->System blts */
537706f2543Smrg    DWORD	dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
538706f2543Smrg    /* the following are the new DirectX 5 members */
539706f2543Smrg    DWORD       dwMaxVideoPorts;        /* maximum number of usable video ports */
540706f2543Smrg    DWORD   	dwCurrVideoPorts;       /* current number of video ports used */
541706f2543Smrg    DWORD   	dwSVBCaps2;             /* more driver specific capabilities for System->Vmem blts */
542706f2543Smrg    DWORD   	dwNLVBCaps;             /* driver specific capabilities for non-local->local vidmem blts */
543706f2543Smrg    DWORD   	dwNLVBCaps2;            /* more driver specific capabilities non-local->local vidmem blts */
544706f2543Smrg    DWORD   	dwNLVBCKeyCaps;         /* driver color key capabilities for non-local->local vidmem blts */
545706f2543Smrg    DWORD   	dwNLVBFXCaps;           /* driver FX capabilities for non-local->local blts */
546706f2543Smrg    DWORD   	dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
547706f2543Smrg} DDCAPS_DX5,*LPDDCAPS_DX5;
548706f2543Smrg
549706f2543Smrgtypedef struct _DDCAPS_DX3		/* DirectX3 version of caps struct */
550706f2543Smrg{
551706f2543Smrg    DWORD	dwSize;                 /* size of the DDDRIVERCAPS structure */
552706f2543Smrg    DWORD	dwCaps;                 /* driver specific capabilities */
553706f2543Smrg    DWORD	dwCaps2;                /* more driver specific capabilites */
554706f2543Smrg    DWORD	dwCKeyCaps;             /* color key capabilities of the surface */
555706f2543Smrg    DWORD	dwFXCaps;               /* driver specific stretching and effects capabilites */
556706f2543Smrg    DWORD	dwFXAlphaCaps;          /* alpha driver specific capabilities */
557706f2543Smrg    DWORD	dwPalCaps;              /* palette capabilities */
558706f2543Smrg    DWORD	dwSVCaps;               /* stereo vision capabilities */
559706f2543Smrg    DWORD	dwAlphaBltConstBitDepths;       /* DDBD_2,4,8 */
560706f2543Smrg    DWORD	dwAlphaBltPixelBitDepths;       /* DDBD_1,2,4,8 */
561706f2543Smrg    DWORD	dwAlphaBltSurfaceBitDepths;     /* DDBD_1,2,4,8 */
562706f2543Smrg    DWORD	dwAlphaOverlayConstBitDepths;   /* DDBD_2,4,8 */
563706f2543Smrg    DWORD	dwAlphaOverlayPixelBitDepths;   /* DDBD_1,2,4,8 */
564706f2543Smrg    DWORD	dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
565706f2543Smrg    DWORD	dwZBufferBitDepths;             /* DDBD_8,16,24,32 */
566706f2543Smrg    DWORD	dwVidMemTotal;          /* total amount of video memory */
567706f2543Smrg    DWORD	dwVidMemFree;           /* amount of free video memory */
568706f2543Smrg    DWORD	dwMaxVisibleOverlays;   /* maximum number of visible overlays */
569706f2543Smrg    DWORD	dwCurrVisibleOverlays;  /* current number of visible overlays */
570706f2543Smrg    DWORD	dwNumFourCCCodes;       /* number of four cc codes */
571706f2543Smrg    DWORD	dwAlignBoundarySrc;     /* source rectangle alignment */
572706f2543Smrg    DWORD	dwAlignSizeSrc;         /* source rectangle byte size */
573706f2543Smrg    DWORD	dwAlignBoundaryDest;    /* dest rectangle alignment */
574706f2543Smrg    DWORD	dwAlignSizeDest;        /* dest rectangle byte size */
575706f2543Smrg    DWORD	dwAlignStrideAlign;     /* stride alignment */
576706f2543Smrg    DWORD	dwRops[DD_ROP_SPACE];   /* ROPS supported */
577706f2543Smrg    DDSCAPS	ddsCaps;                /* DDSCAPS structure has all the general capabilities */
578706f2543Smrg    DWORD	dwMinOverlayStretch;    /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
579706f2543Smrg    DWORD	dwMaxOverlayStretch;    /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
580706f2543Smrg    DWORD	dwMinLiveVideoStretch;  /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
581706f2543Smrg    DWORD	dwMaxLiveVideoStretch;  /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
582706f2543Smrg    DWORD	dwMinHwCodecStretch;    /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
583706f2543Smrg    DWORD	dwMaxHwCodecStretch;    /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
584706f2543Smrg    DWORD	dwReserved1;
585706f2543Smrg    DWORD	dwReserved2;
586706f2543Smrg    DWORD	dwReserved3;
587706f2543Smrg    DWORD	dwSVBCaps;              /* driver specific capabilities for System->Vmem blts */
588706f2543Smrg    DWORD	dwSVBCKeyCaps;          /* driver color key capabilities for System->Vmem blts */
589706f2543Smrg    DWORD	dwSVBFXCaps;            /* driver FX capabilities for System->Vmem blts */
590706f2543Smrg    DWORD	dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
591706f2543Smrg    DWORD	dwVSBCaps;              /* driver specific capabilities for Vmem->System blts */
592706f2543Smrg    DWORD	dwVSBCKeyCaps;          /* driver color key capabilities for Vmem->System blts */
593706f2543Smrg    DWORD	dwVSBFXCaps;            /* driver FX capabilities for Vmem->System blts */
594706f2543Smrg    DWORD	dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
595706f2543Smrg    DWORD	dwSSBCaps;              /* driver specific capabilities for System->System blts */
596706f2543Smrg    DWORD	dwSSBCKeyCaps;          /* driver color key capabilities for System->System blts */
597706f2543Smrg    DWORD	dwSSBFXCaps;            /* driver FX capabilities for System->System blts */
598706f2543Smrg    DWORD	dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
599706f2543Smrg    DWORD	dwReserved4;
600706f2543Smrg    DWORD	dwReserved5;
601706f2543Smrg    DWORD	dwReserved6;
602706f2543Smrg} DDCAPS_DX3,*LPDDCAPS_DX3;
603706f2543Smrg
604706f2543Smrg/* set caps struct according to DIRECTDRAW_VERSION */
605706f2543Smrg
606706f2543Smrg#if DIRECTDRAW_VERSION <= 0x300
607706f2543Smrgtypedef DDCAPS_DX3 DDCAPS;
608706f2543Smrg#elif DIRECTDRAW_VERSION <= 0x500
609706f2543Smrgtypedef DDCAPS_DX5 DDCAPS;
610706f2543Smrg#elif DIRECTDRAW_VERSION <= 0x600
611706f2543Smrgtypedef DDCAPS_DX6 DDCAPS;
612706f2543Smrg#else
613706f2543Smrgtypedef DDCAPS_DX7 DDCAPS;
614706f2543Smrg#endif
615706f2543Smrg
616706f2543Smrgtypedef DDCAPS *LPDDCAPS;
617706f2543Smrg
618706f2543Smrg/* DDCAPS.dwCaps */
619706f2543Smrg#define DDCAPS_3D			0x00000001
620706f2543Smrg#define DDCAPS_ALIGNBOUNDARYDEST	0x00000002
621706f2543Smrg#define DDCAPS_ALIGNSIZEDEST		0x00000004
622706f2543Smrg#define DDCAPS_ALIGNBOUNDARYSRC		0x00000008
623706f2543Smrg#define DDCAPS_ALIGNSIZESRC		0x00000010
624706f2543Smrg#define DDCAPS_ALIGNSTRIDE		0x00000020
625706f2543Smrg#define DDCAPS_BLT			0x00000040
626706f2543Smrg#define DDCAPS_BLTQUEUE			0x00000080
627706f2543Smrg#define DDCAPS_BLTFOURCC		0x00000100
628706f2543Smrg#define DDCAPS_BLTSTRETCH		0x00000200
629706f2543Smrg#define DDCAPS_GDI			0x00000400
630706f2543Smrg#define DDCAPS_OVERLAY			0x00000800
631706f2543Smrg#define DDCAPS_OVERLAYCANTCLIP		0x00001000
632706f2543Smrg#define DDCAPS_OVERLAYFOURCC		0x00002000
633706f2543Smrg#define DDCAPS_OVERLAYSTRETCH		0x00004000
634706f2543Smrg#define DDCAPS_PALETTE			0x00008000
635706f2543Smrg#define DDCAPS_PALETTEVSYNC		0x00010000
636706f2543Smrg#define DDCAPS_READSCANLINE		0x00020000
637706f2543Smrg#define DDCAPS_STEREOVIEW		0x00040000
638706f2543Smrg#define DDCAPS_VBI			0x00080000
639706f2543Smrg#define DDCAPS_ZBLTS			0x00100000
640706f2543Smrg#define DDCAPS_ZOVERLAYS		0x00200000
641706f2543Smrg#define DDCAPS_COLORKEY			0x00400000
642706f2543Smrg#define DDCAPS_ALPHA			0x00800000
643706f2543Smrg#define DDCAPS_COLORKEYHWASSIST		0x01000000
644706f2543Smrg#define DDCAPS_NOHARDWARE		0x02000000
645706f2543Smrg#define DDCAPS_BLTCOLORFILL		0x04000000
646706f2543Smrg#define DDCAPS_BANKSWITCHED		0x08000000
647706f2543Smrg#define DDCAPS_BLTDEPTHFILL		0x10000000
648706f2543Smrg#define DDCAPS_CANCLIP			0x20000000
649706f2543Smrg#define DDCAPS_CANCLIPSTRETCHED		0x40000000
650706f2543Smrg#define DDCAPS_CANBLTSYSMEM		0x80000000
651706f2543Smrg
652706f2543Smrg/* DDCAPS.dwCaps2 */
653706f2543Smrg#define DDCAPS2_CERTIFIED		0x00000001
654706f2543Smrg#define DDCAPS2_NO2DDURING3DSCENE       0x00000002
655706f2543Smrg#define DDCAPS2_VIDEOPORT		0x00000004
656706f2543Smrg#define DDCAPS2_AUTOFLIPOVERLAY		0x00000008
657706f2543Smrg#define DDCAPS2_CANBOBINTERLEAVED	0x00000010
658706f2543Smrg#define DDCAPS2_CANBOBNONINTERLEAVED	0x00000020
659706f2543Smrg#define DDCAPS2_COLORCONTROLOVERLAY	0x00000040
660706f2543Smrg#define DDCAPS2_COLORCONTROLPRIMARY	0x00000080
661706f2543Smrg#define DDCAPS2_CANDROPZ16BIT		0x00000100
662706f2543Smrg#define DDCAPS2_NONLOCALVIDMEM		0x00000200
663706f2543Smrg#define DDCAPS2_NONLOCALVIDMEMCAPS	0x00000400
664706f2543Smrg#define DDCAPS2_NOPAGELOCKREQUIRED	0x00000800
665706f2543Smrg#define DDCAPS2_WIDESURFACES		0x00001000
666706f2543Smrg#define DDCAPS2_CANFLIPODDEVEN		0x00002000
667706f2543Smrg#define DDCAPS2_CANBOBHARDWARE		0x00004000
668706f2543Smrg#define DDCAPS2_COPYFOURCC              0x00008000
669706f2543Smrg#define DDCAPS2_PRIMARYGAMMA            0x00020000
670706f2543Smrg#define DDCAPS2_CANRENDERWINDOWED       0x00080000
671706f2543Smrg#define DDCAPS2_CANCALIBRATEGAMMA       0x00100000
672706f2543Smrg#define DDCAPS2_FLIPINTERVAL            0x00200000
673706f2543Smrg#define DDCAPS2_FLIPNOVSYNC             0x00400000
674706f2543Smrg#define DDCAPS2_CANMANAGETEXTURE        0x00800000
675706f2543Smrg#define DDCAPS2_TEXMANINNONLOCALVIDMEM  0x01000000
676706f2543Smrg#define DDCAPS2_STEREO                  0x02000000
677706f2543Smrg#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL   0x04000000
678706f2543Smrg
679706f2543Smrg
680706f2543Smrg/* Set/Get Colour Key Flags */
681706f2543Smrg#define DDCKEY_COLORSPACE  0x00000001  /* Struct is single colour space */
682706f2543Smrg#define DDCKEY_DESTBLT     0x00000002  /* To be used as dest for blt */
683706f2543Smrg#define DDCKEY_DESTOVERLAY 0x00000004  /* To be used as dest for CK overlays */
684706f2543Smrg#define DDCKEY_SRCBLT      0x00000008  /* To be used as src for blt */
685706f2543Smrg#define DDCKEY_SRCOVERLAY  0x00000010  /* To be used as src for CK overlays */
686706f2543Smrg
687706f2543Smrgtypedef struct _DDCOLORKEY
688706f2543Smrg{
689706f2543Smrg	DWORD	dwColorSpaceLowValue;/* low boundary of color space that is to
690706f2543Smrg                                      * be treated as Color Key, inclusive
691706f2543Smrg				      */
692706f2543Smrg	DWORD	dwColorSpaceHighValue;/* high boundary of color space that is
693706f2543Smrg                                       * to be treated as Color Key, inclusive
694706f2543Smrg				       */
695706f2543Smrg} DDCOLORKEY,*LPDDCOLORKEY;
696706f2543Smrg
697706f2543Smrg/* ddCKEYCAPS bits */
698706f2543Smrg#define DDCKEYCAPS_DESTBLT			0x00000001
699706f2543Smrg#define DDCKEYCAPS_DESTBLTCLRSPACE		0x00000002
700706f2543Smrg#define DDCKEYCAPS_DESTBLTCLRSPACEYUV		0x00000004
701706f2543Smrg#define DDCKEYCAPS_DESTBLTYUV			0x00000008
702706f2543Smrg#define DDCKEYCAPS_DESTOVERLAY			0x00000010
703706f2543Smrg#define DDCKEYCAPS_DESTOVERLAYCLRSPACE		0x00000020
704706f2543Smrg#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV	0x00000040
705706f2543Smrg#define DDCKEYCAPS_DESTOVERLAYONEACTIVE		0x00000080
706706f2543Smrg#define DDCKEYCAPS_DESTOVERLAYYUV		0x00000100
707706f2543Smrg#define DDCKEYCAPS_SRCBLT			0x00000200
708706f2543Smrg#define DDCKEYCAPS_SRCBLTCLRSPACE		0x00000400
709706f2543Smrg#define DDCKEYCAPS_SRCBLTCLRSPACEYUV		0x00000800
710706f2543Smrg#define DDCKEYCAPS_SRCBLTYUV			0x00001000
711706f2543Smrg#define DDCKEYCAPS_SRCOVERLAY			0x00002000
712706f2543Smrg#define DDCKEYCAPS_SRCOVERLAYCLRSPACE		0x00004000
713706f2543Smrg#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV	0x00008000
714706f2543Smrg#define DDCKEYCAPS_SRCOVERLAYONEACTIVE		0x00010000
715706f2543Smrg#define DDCKEYCAPS_SRCOVERLAYYUV		0x00020000
716706f2543Smrg#define DDCKEYCAPS_NOCOSTOVERLAY		0x00040000
717706f2543Smrg
718706f2543Smrgtypedef struct _DDPIXELFORMAT {
719706f2543Smrg    DWORD	dwSize;                 /* 0: size of structure */
720706f2543Smrg    DWORD	dwFlags;                /* 4: pixel format flags */
721706f2543Smrg    DWORD	dwFourCC;               /* 8: (FOURCC code) */
722706f2543Smrg    union {
723706f2543Smrg	DWORD	dwRGBBitCount;          /* C: how many bits per pixel */
724706f2543Smrg	DWORD	dwYUVBitCount;          /* C: how many bits per pixel */
725706f2543Smrg	DWORD	dwZBufferBitDepth;      /* C: how many bits for z buffers */
726706f2543Smrg	DWORD	dwAlphaBitDepth;        /* C: how many bits for alpha channels*/
727706f2543Smrg	DWORD	dwLuminanceBitCount;
728706f2543Smrg	DWORD	dwBumpBitCount;
729706f2543Smrg    } DUMMYUNIONNAME1;
730706f2543Smrg    union {
731706f2543Smrg	DWORD	dwRBitMask;             /* 10: mask for red bit*/
732706f2543Smrg	DWORD	dwYBitMask;             /* 10: mask for Y bits*/
733706f2543Smrg	DWORD	dwStencilBitDepth;
734706f2543Smrg	DWORD	dwLuminanceBitMask;
735706f2543Smrg	DWORD	dwBumpDuBitMask;
736706f2543Smrg    } DUMMYUNIONNAME2;
737706f2543Smrg    union {
738706f2543Smrg	DWORD	dwGBitMask;             /* 14: mask for green bits*/
739706f2543Smrg	DWORD	dwUBitMask;             /* 14: mask for U bits*/
740706f2543Smrg	DWORD	dwZBitMask;
741706f2543Smrg	DWORD	dwBumpDvBitMask;
742706f2543Smrg    } DUMMYUNIONNAME3;
743706f2543Smrg    union {
744706f2543Smrg	DWORD   dwBBitMask;             /* 18: mask for blue bits*/
745706f2543Smrg	DWORD   dwVBitMask;             /* 18: mask for V bits*/
746706f2543Smrg	DWORD	dwStencilBitMask;
747706f2543Smrg	DWORD	dwBumpLuminanceBitMask;
748706f2543Smrg    } DUMMYUNIONNAME4;
749706f2543Smrg    union {
750706f2543Smrg    	DWORD	dwRGBAlphaBitMask;	/* 1C: mask for alpha channel */
751706f2543Smrg    	DWORD	dwYUVAlphaBitMask;	/* 1C: mask for alpha channel */
752706f2543Smrg	DWORD	dwLuminanceAlphaBitMask;
753706f2543Smrg	DWORD	dwRGBZBitMask;		/* 1C: mask for Z channel */
754706f2543Smrg	DWORD	dwYUVZBitMask;		/* 1C: mask for Z channel */
755706f2543Smrg    } DUMMYUNIONNAME5;
756706f2543Smrg    					/* 20: next structure */
757706f2543Smrg} DDPIXELFORMAT,*LPDDPIXELFORMAT;
758706f2543Smrg
759706f2543Smrg/* DDCAPS.dwFXCaps */
760706f2543Smrg#define DDFXCAPS_BLTALPHA               0x00000001
761706f2543Smrg#define DDFXCAPS_OVERLAYALPHA           0x00000004
762706f2543Smrg#define DDFXCAPS_BLTARITHSTRETCHYN	0x00000010
763706f2543Smrg#define DDFXCAPS_BLTARITHSTRETCHY	0x00000020
764706f2543Smrg#define DDFXCAPS_BLTMIRRORLEFTRIGHT	0x00000040
765706f2543Smrg#define DDFXCAPS_BLTMIRRORUPDOWN	0x00000080
766706f2543Smrg#define DDFXCAPS_BLTROTATION		0x00000100
767706f2543Smrg#define DDFXCAPS_BLTROTATION90		0x00000200
768706f2543Smrg#define DDFXCAPS_BLTSHRINKX		0x00000400
769706f2543Smrg#define DDFXCAPS_BLTSHRINKXN		0x00000800
770706f2543Smrg#define DDFXCAPS_BLTSHRINKY		0x00001000
771706f2543Smrg#define DDFXCAPS_BLTSHRINKYN		0x00002000
772706f2543Smrg#define DDFXCAPS_BLTSTRETCHX		0x00004000
773706f2543Smrg#define DDFXCAPS_BLTSTRETCHXN		0x00008000
774706f2543Smrg#define DDFXCAPS_BLTSTRETCHY		0x00010000
775706f2543Smrg#define DDFXCAPS_BLTSTRETCHYN		0x00020000
776706f2543Smrg#define DDFXCAPS_OVERLAYARITHSTRETCHY	0x00040000
777706f2543Smrg#define DDFXCAPS_OVERLAYARITHSTRETCHYN	0x00000008
778706f2543Smrg#define DDFXCAPS_OVERLAYSHRINKX		0x00080000
779706f2543Smrg#define DDFXCAPS_OVERLAYSHRINKXN	0x00100000
780706f2543Smrg#define DDFXCAPS_OVERLAYSHRINKY		0x00200000
781706f2543Smrg#define DDFXCAPS_OVERLAYSHRINKYN	0x00400000
782706f2543Smrg#define DDFXCAPS_OVERLAYSTRETCHX	0x00800000
783706f2543Smrg#define DDFXCAPS_OVERLAYSTRETCHXN	0x01000000
784706f2543Smrg#define DDFXCAPS_OVERLAYSTRETCHY	0x02000000
785706f2543Smrg#define DDFXCAPS_OVERLAYSTRETCHYN	0x04000000
786706f2543Smrg#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT	0x08000000
787706f2543Smrg#define DDFXCAPS_OVERLAYMIRRORUPDOWN	0x10000000
788706f2543Smrg
789706f2543Smrg#define DDFXCAPS_OVERLAYFILTER          DDFXCAPS_OVERLAYARITHSTRETCHY
790706f2543Smrg
791706f2543Smrg/* DDCAPS.dwFXAlphaCaps */
792706f2543Smrg#define DDFXALPHACAPS_BLTALPHAEDGEBLEND		0x00000001
793706f2543Smrg#define DDFXALPHACAPS_BLTALPHAPIXELS		0x00000002
794706f2543Smrg#define DDFXALPHACAPS_BLTALPHAPIXELSNEG		0x00000004
795706f2543Smrg#define DDFXALPHACAPS_BLTALPHASURFACES		0x00000008
796706f2543Smrg#define DDFXALPHACAPS_BLTALPHASURFACESNEG	0x00000010
797706f2543Smrg#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND	0x00000020
798706f2543Smrg#define DDFXALPHACAPS_OVERLAYALPHAPIXELS	0x00000040
799706f2543Smrg#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG	0x00000080
800706f2543Smrg#define DDFXALPHACAPS_OVERLAYALPHASURFACES	0x00000100
801706f2543Smrg#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG	0x00000200
802706f2543Smrg
803706f2543Smrg/* DDCAPS.dwPalCaps */
804706f2543Smrg#define DDPCAPS_4BIT			0x00000001
805706f2543Smrg#define DDPCAPS_8BITENTRIES		0x00000002
806706f2543Smrg#define DDPCAPS_8BIT			0x00000004
807706f2543Smrg#define DDPCAPS_INITIALIZE		0x00000008
808706f2543Smrg#define DDPCAPS_PRIMARYSURFACE		0x00000010
809706f2543Smrg#define DDPCAPS_PRIMARYSURFACELEFT	0x00000020
810706f2543Smrg#define DDPCAPS_ALLOW256		0x00000040
811706f2543Smrg#define DDPCAPS_VSYNC			0x00000080
812706f2543Smrg#define DDPCAPS_1BIT			0x00000100
813706f2543Smrg#define DDPCAPS_2BIT			0x00000200
814706f2543Smrg#define DDPCAPS_ALPHA                   0x00000400
815706f2543Smrg
816706f2543Smrg/* DDCAPS.dwSVCaps */
817706f2543Smrg/* the first 4 of these are now obsolete */
818706f2543Smrg#if DIRECTDRAW_VERSION >= 0x700	/* FIXME: I'm not sure when this switch occured */
819706f2543Smrg#define DDSVCAPS_RESERVED1		0x00000001
820706f2543Smrg#define DDSVCAPS_RESERVED2		0x00000002
821706f2543Smrg#define DDSVCAPS_RESERVED3		0x00000004
822706f2543Smrg#define DDSVCAPS_RESERVED4		0x00000008
823706f2543Smrg#else
824706f2543Smrg#define DDSVCAPS_ENIGMA			0x00000001
825706f2543Smrg#define DDSVCAPS_FLICKER		0x00000002
826706f2543Smrg#define DDSVCAPS_REDBLUE		0x00000004
827706f2543Smrg#define DDSVCAPS_SPLIT			0x00000008
828706f2543Smrg#endif
829706f2543Smrg#define DDSVCAPS_STEREOSEQUENTIAL       0x00000010
830706f2543Smrg
831706f2543Smrg/* BitDepths */
832706f2543Smrg#define DDBD_1				0x00004000
833706f2543Smrg#define DDBD_2				0x00002000
834706f2543Smrg#define DDBD_4				0x00001000
835706f2543Smrg#define DDBD_8				0x00000800
836706f2543Smrg#define DDBD_16				0x00000400
837706f2543Smrg#define DDBD_24				0x00000200
838706f2543Smrg#define DDBD_32				0x00000100
839706f2543Smrg
840706f2543Smrg/* DDOVERLAYFX.dwDDFX */
841706f2543Smrg#define DDOVERFX_ARITHSTRETCHY		0x00000001
842706f2543Smrg#define DDOVERFX_MIRRORLEFTRIGHT	0x00000002
843706f2543Smrg#define DDOVERFX_MIRRORUPDOWN		0x00000004
844706f2543Smrg
845706f2543Smrg/* UpdateOverlay flags */
846706f2543Smrg#define DDOVER_ALPHADEST                        0x00000001
847706f2543Smrg#define DDOVER_ALPHADESTCONSTOVERRIDE           0x00000002
848706f2543Smrg#define DDOVER_ALPHADESTNEG                     0x00000004
849706f2543Smrg#define DDOVER_ALPHADESTSURFACEOVERRIDE         0x00000008
850706f2543Smrg#define DDOVER_ALPHAEDGEBLEND                   0x00000010
851706f2543Smrg#define DDOVER_ALPHASRC                         0x00000020
852706f2543Smrg#define DDOVER_ALPHASRCCONSTOVERRIDE            0x00000040
853706f2543Smrg#define DDOVER_ALPHASRCNEG                      0x00000080
854706f2543Smrg#define DDOVER_ALPHASRCSURFACEOVERRIDE          0x00000100
855706f2543Smrg#define DDOVER_HIDE                             0x00000200
856706f2543Smrg#define DDOVER_KEYDEST                          0x00000400
857706f2543Smrg#define DDOVER_KEYDESTOVERRIDE                  0x00000800
858706f2543Smrg#define DDOVER_KEYSRC                           0x00001000
859706f2543Smrg#define DDOVER_KEYSRCOVERRIDE                   0x00002000
860706f2543Smrg#define DDOVER_SHOW                             0x00004000
861706f2543Smrg#define DDOVER_ADDDIRTYRECT                     0x00008000
862706f2543Smrg#define DDOVER_REFRESHDIRTYRECTS                0x00010000
863706f2543Smrg#define DDOVER_REFRESHALL                       0x00020000
864706f2543Smrg#define DDOVER_DDFX                             0x00080000
865706f2543Smrg#define DDOVER_AUTOFLIP                         0x00100000
866706f2543Smrg#define DDOVER_BOB                              0x00200000
867706f2543Smrg#define DDOVER_OVERRIDEBOBWEAVE                 0x00400000
868706f2543Smrg#define DDOVER_INTERLEAVED                      0x00800000
869706f2543Smrg
870706f2543Smrg/* DDCOLORKEY.dwFlags */
871706f2543Smrg#define DDPF_ALPHAPIXELS		0x00000001
872706f2543Smrg#define DDPF_ALPHA			0x00000002
873706f2543Smrg#define DDPF_FOURCC			0x00000004
874706f2543Smrg#define DDPF_PALETTEINDEXED4		0x00000008
875706f2543Smrg#define DDPF_PALETTEINDEXEDTO8		0x00000010
876706f2543Smrg#define DDPF_PALETTEINDEXED8		0x00000020
877706f2543Smrg#define DDPF_RGB			0x00000040
878706f2543Smrg#define DDPF_COMPRESSED			0x00000080
879706f2543Smrg#define DDPF_RGBTOYUV			0x00000100
880706f2543Smrg#define DDPF_YUV			0x00000200
881706f2543Smrg#define DDPF_ZBUFFER			0x00000400
882706f2543Smrg#define DDPF_PALETTEINDEXED1		0x00000800
883706f2543Smrg#define DDPF_PALETTEINDEXED2		0x00001000
884706f2543Smrg#define DDPF_ZPIXELS			0x00002000
885706f2543Smrg#define DDPF_STENCILBUFFER              0x00004000
886706f2543Smrg#define DDPF_ALPHAPREMULT               0x00008000
887706f2543Smrg#define DDPF_LUMINANCE                  0x00020000
888706f2543Smrg#define DDPF_BUMPLUMINANCE              0x00040000
889706f2543Smrg#define DDPF_BUMPDUDV                   0x00080000
890706f2543Smrg
891706f2543Smrg/* SetCooperativeLevel dwFlags */
892706f2543Smrg#define DDSCL_FULLSCREEN		0x00000001
893706f2543Smrg#define DDSCL_ALLOWREBOOT		0x00000002
894706f2543Smrg#define DDSCL_NOWINDOWCHANGES		0x00000004
895706f2543Smrg#define DDSCL_NORMAL			0x00000008
896706f2543Smrg#define DDSCL_EXCLUSIVE			0x00000010
897706f2543Smrg#define DDSCL_ALLOWMODEX		0x00000040
898706f2543Smrg#define DDSCL_SETFOCUSWINDOW		0x00000080
899706f2543Smrg#define DDSCL_SETDEVICEWINDOW		0x00000100
900706f2543Smrg#define DDSCL_CREATEDEVICEWINDOW	0x00000200
901706f2543Smrg#define DDSCL_MULTITHREADED             0x00000400
902706f2543Smrg#define DDSCL_FPUSETUP                  0x00000800
903706f2543Smrg#define DDSCL_FPUPRESERVE               0x00001000
904706f2543Smrg
905706f2543Smrg
906706f2543Smrg/* DDSURFACEDESC.dwFlags */
907706f2543Smrg#define	DDSD_CAPS		0x00000001
908706f2543Smrg#define	DDSD_HEIGHT		0x00000002
909706f2543Smrg#define	DDSD_WIDTH		0x00000004
910706f2543Smrg#define	DDSD_PITCH		0x00000008
911706f2543Smrg#define	DDSD_BACKBUFFERCOUNT	0x00000020
912706f2543Smrg#define	DDSD_ZBUFFERBITDEPTH	0x00000040
913706f2543Smrg#define	DDSD_ALPHABITDEPTH	0x00000080
914706f2543Smrg#define	DDSD_LPSURFACE		0x00000800
915706f2543Smrg#define	DDSD_PIXELFORMAT	0x00001000
916706f2543Smrg#define	DDSD_CKDESTOVERLAY	0x00002000
917706f2543Smrg#define	DDSD_CKDESTBLT		0x00004000
918706f2543Smrg#define	DDSD_CKSRCOVERLAY	0x00008000
919706f2543Smrg#define	DDSD_CKSRCBLT		0x00010000
920706f2543Smrg#define	DDSD_MIPMAPCOUNT	0x00020000
921706f2543Smrg#define	DDSD_REFRESHRATE	0x00040000
922706f2543Smrg#define	DDSD_LINEARSIZE		0x00080000
923706f2543Smrg#define DDSD_TEXTURESTAGE       0x00100000
924706f2543Smrg#define DDSD_FVF                0x00200000
925706f2543Smrg#define DDSD_SRCVBHANDLE        0x00400000
926706f2543Smrg#define	DDSD_ALL		0x007ff9ee
927706f2543Smrg
928706f2543Smrg/* EnumSurfaces flags */
929706f2543Smrg#define DDENUMSURFACES_ALL          0x00000001
930706f2543Smrg#define DDENUMSURFACES_MATCH        0x00000002
931706f2543Smrg#define DDENUMSURFACES_NOMATCH      0x00000004
932706f2543Smrg#define DDENUMSURFACES_CANBECREATED 0x00000008
933706f2543Smrg#define DDENUMSURFACES_DOESEXIST    0x00000010
934706f2543Smrg
935706f2543Smrg/* SetDisplayMode flags */
936706f2543Smrg#define DDSDM_STANDARDVGAMODE	0x00000001
937706f2543Smrg
938706f2543Smrg/* EnumDisplayModes flags */
939706f2543Smrg#define DDEDM_REFRESHRATES	0x00000001
940706f2543Smrg#define DDEDM_STANDARDVGAMODES	0x00000002
941706f2543Smrg
942706f2543Smrg/* WaitForVerticalDisplay flags */
943706f2543Smrg
944706f2543Smrg#define DDWAITVB_BLOCKBEGIN		0x00000001
945706f2543Smrg#define DDWAITVB_BLOCKBEGINEVENT	0x00000002
946706f2543Smrg#define DDWAITVB_BLOCKEND		0x00000004
947706f2543Smrg
948706f2543Smrgtypedef struct _DDSURFACEDESC
949706f2543Smrg{
950706f2543Smrg	DWORD	dwSize;		/* 0: size of the DDSURFACEDESC structure*/
951706f2543Smrg	DWORD	dwFlags;	/* 4: determines what fields are valid*/
952706f2543Smrg	DWORD	dwHeight;	/* 8: height of surface to be created*/
953706f2543Smrg	DWORD	dwWidth;	/* C: width of input surface*/
954706f2543Smrg	union {
955706f2543Smrg		LONG	lPitch;	/* 10: distance to start of next line (return value only)*/
956706f2543Smrg		DWORD	dwLinearSize;
957706f2543Smrg	} DUMMYUNIONNAME1;
958706f2543Smrg	DWORD	dwBackBufferCount;/* 14: number of back buffers requested*/
959706f2543Smrg	union {
960706f2543Smrg		DWORD	dwMipMapCount;/* 18:number of mip-map levels requested*/
961706f2543Smrg		DWORD	dwZBufferBitDepth;/*18: depth of Z buffer requested*/
962706f2543Smrg		DWORD	dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
963706f2543Smrg	} DUMMYUNIONNAME2;
964706f2543Smrg	DWORD	dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
965706f2543Smrg	DWORD	dwReserved;	/* 20:reserved*/
966706f2543Smrg	LPVOID	lpSurface;	/* 24:pointer to the associated surface memory*/
967706f2543Smrg	DDCOLORKEY	ddckCKDestOverlay;/* 28: CK for dest overlay use*/
968706f2543Smrg	DDCOLORKEY	ddckCKDestBlt;	/* 30: CK for destination blt use*/
969706f2543Smrg	DDCOLORKEY	ddckCKSrcOverlay;/* 38: CK for source overlay use*/
970706f2543Smrg	DDCOLORKEY	ddckCKSrcBlt;	/* 40: CK for source blt use*/
971706f2543Smrg	DDPIXELFORMAT	ddpfPixelFormat;/* 48: pixel format description of the surface*/
972706f2543Smrg	DDSCAPS		ddsCaps;	/* 68: direct draw surface caps */
973706f2543Smrg} DDSURFACEDESC,*LPDDSURFACEDESC;
974706f2543Smrg
975706f2543Smrgtypedef struct _DDSURFACEDESC2
976706f2543Smrg{
977706f2543Smrg	DWORD	dwSize;		/* 0: size of the DDSURFACEDESC structure*/
978706f2543Smrg	DWORD	dwFlags;	/* 4: determines what fields are valid*/
979706f2543Smrg	DWORD	dwHeight;	/* 8: height of surface to be created*/
980706f2543Smrg	DWORD	dwWidth;	/* C: width of input surface*/
981706f2543Smrg	union {
982706f2543Smrg		LONG	lPitch;	      /*10: distance to start of next line (return value only)*/
983706f2543Smrg		DWORD   dwLinearSize; /*10: formless late-allocated optimized surface size */
984706f2543Smrg	} DUMMYUNIONNAME1;
985706f2543Smrg	DWORD	dwBackBufferCount;/* 14: number of back buffers requested*/
986706f2543Smrg	union {
987706f2543Smrg		DWORD	dwMipMapCount;/* 18:number of mip-map levels requested*/
988706f2543Smrg		DWORD	dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
989706f2543Smrg		DWORD   dwSrcVBHandle;/* 18:source used in VB::Optimize */
990706f2543Smrg	} DUMMYUNIONNAME2;
991706f2543Smrg	DWORD	dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
992706f2543Smrg	DWORD	dwReserved;	/* 20:reserved*/
993706f2543Smrg	LPVOID	lpSurface;	/* 24:pointer to the associated surface memory*/
994706f2543Smrg	union {
995706f2543Smrg		DDCOLORKEY	ddckCKDestOverlay; /* 28: CK for dest overlay use*/
996706f2543Smrg		DWORD 		dwEmptyFaceColor;  /* 28: color for empty cubemap faces */
997706f2543Smrg	} DUMMYUNIONNAME3;
998706f2543Smrg	DDCOLORKEY	ddckCKDestBlt;	/* 30: CK for destination blt use*/
999706f2543Smrg	DDCOLORKEY	ddckCKSrcOverlay;/* 38: CK for source overlay use*/
1000706f2543Smrg	DDCOLORKEY	ddckCKSrcBlt;	/* 40: CK for source blt use*/
1001706f2543Smrg
1002706f2543Smrg	union {
1003706f2543Smrg		DDPIXELFORMAT	ddpfPixelFormat;/* 48: pixel format description of the surface*/
1004706f2543Smrg		DWORD 		dwFVF;	/* 48: vertex format description of vertex buffers */
1005706f2543Smrg	} DUMMYUNIONNAME4;
1006706f2543Smrg	DDSCAPS2	ddsCaps;  /* 68: DDraw surface caps */
1007706f2543Smrg	DWORD		dwTextureStage; /* 78: stage in multitexture cascade */
1008706f2543Smrg} DDSURFACEDESC2,*LPDDSURFACEDESC2;
1009706f2543Smrg
1010706f2543Smrg/* DDCOLORCONTROL.dwFlags */
1011706f2543Smrg#define DDCOLOR_BRIGHTNESS	0x00000001
1012706f2543Smrg#define DDCOLOR_CONTRAST	0x00000002
1013706f2543Smrg#define DDCOLOR_HUE		0x00000004
1014706f2543Smrg#define DDCOLOR_SATURATION	0x00000008
1015706f2543Smrg#define DDCOLOR_SHARPNESS	0x00000010
1016706f2543Smrg#define DDCOLOR_GAMMA		0x00000020
1017706f2543Smrg#define DDCOLOR_COLORENABLE	0x00000040
1018706f2543Smrg
1019706f2543Smrgtypedef struct {
1020706f2543Smrg	DWORD	dwSize;
1021706f2543Smrg	DWORD	dwFlags;
1022706f2543Smrg	LONG	lBrightness;
1023706f2543Smrg	LONG	lContrast;
1024706f2543Smrg	LONG	lHue;
1025706f2543Smrg	LONG	lSaturation;
1026706f2543Smrg	LONG	lSharpness;
1027706f2543Smrg	LONG	lGamma;
1028706f2543Smrg	LONG	lColorEnable;
1029706f2543Smrg	DWORD	dwReserved1;
1030706f2543Smrg} DDCOLORCONTROL,*LPDDCOLORCONTROL;
1031706f2543Smrg
1032706f2543Smrgtypedef struct {
1033706f2543Smrg	WORD	red[256];
1034706f2543Smrg	WORD	green[256];
1035706f2543Smrg	WORD	blue[256];
1036706f2543Smrg} DDGAMMARAMP,*LPDDGAMMARAMP;
1037706f2543Smrg
1038706f2543Smrgtypedef BOOL CALLBACK (*LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
1039706f2543Smrgtypedef BOOL CALLBACK (*LPDDENUMCALLBACKW)(GUID *, LPWSTR, LPWSTR, LPVOID);
1040706f2543SmrgDECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
1041706f2543Smrg
1042706f2543Smrgtypedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
1043706f2543Smrgtypedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
1044706f2543Smrgtypedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
1045706f2543Smrgtypedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
1046706f2543Smrgtypedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
1047706f2543Smrg
1048706f2543Smrgtypedef BOOL CALLBACK (*LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
1049706f2543Smrgtypedef BOOL CALLBACK (*LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
1050706f2543SmrgDECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
1051706f2543Smrg
1052706f2543SmrgHRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
1053706f2543SmrgHRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
1054706f2543Smrg#define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
1055706f2543Smrg
1056706f2543Smrg/* flags for DirectDrawEnumerateEx */
1057706f2543Smrg#define DDENUM_ATTACHEDSECONDARYDEVICES	0x00000001
1058706f2543Smrg#define DDENUM_DETACHEDSECONDARYDEVICES	0x00000002
1059706f2543Smrg#define DDENUM_NONDISPLAYDEVICES	0x00000004
1060706f2543Smrg
1061706f2543Smrg/* flags for DirectDrawCreate or IDirectDraw::Initialize */
1062706f2543Smrg#define DDCREATE_HARDWAREONLY	1L
1063706f2543Smrg#define DDCREATE_EMULATIONONLY	2L
1064706f2543Smrg
1065706f2543Smrgtypedef struct _DDBLTFX
1066706f2543Smrg{
1067706f2543Smrg    DWORD       dwSize;                         /* size of structure */
1068706f2543Smrg    DWORD       dwDDFX;                         /* FX operations */
1069706f2543Smrg    DWORD       dwROP;                          /* Win32 raster operations */
1070706f2543Smrg    DWORD       dwDDROP;                        /* Raster operations new for DirectDraw */
1071706f2543Smrg    DWORD       dwRotationAngle;                /* Rotation angle for blt */
1072706f2543Smrg    DWORD       dwZBufferOpCode;                /* ZBuffer compares */
1073706f2543Smrg    DWORD       dwZBufferLow;                   /* Low limit of Z buffer */
1074706f2543Smrg    DWORD       dwZBufferHigh;                  /* High limit of Z buffer */
1075706f2543Smrg    DWORD       dwZBufferBaseDest;              /* Destination base value */
1076706f2543Smrg    DWORD       dwZDestConstBitDepth;           /* Bit depth used to specify Z constant for destination */
1077706f2543Smrg    union
1078706f2543Smrg    {
1079706f2543Smrg        DWORD   dwZDestConst;                   /* Constant to use as Z buffer for dest */
1080706f2543Smrg        LPDIRECTDRAWSURFACE lpDDSZBufferDest;   /* Surface to use as Z buffer for dest */
1081706f2543Smrg    } DUMMYUNIONNAME1;
1082706f2543Smrg    DWORD       dwZSrcConstBitDepth;            /* Bit depth used to specify Z constant for source */
1083706f2543Smrg    union
1084706f2543Smrg    {
1085706f2543Smrg        DWORD   dwZSrcConst;                    /* Constant to use as Z buffer for src */
1086706f2543Smrg        LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    /* Surface to use as Z buffer for src */
1087706f2543Smrg    } DUMMYUNIONNAME2;
1088706f2543Smrg    DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
1089706f2543Smrg    DWORD       dwAlphaEdgeBlend;               /* Alpha for edge blending */
1090706f2543Smrg    DWORD       dwReserved;
1091706f2543Smrg    DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
1092706f2543Smrg    union
1093706f2543Smrg    {
1094706f2543Smrg        DWORD   dwAlphaDestConst;               /* Constant to use as Alpha Channel */
1095706f2543Smrg        LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as Alpha Channel */
1096706f2543Smrg    } DUMMYUNIONNAME3;
1097706f2543Smrg    DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
1098706f2543Smrg    union
1099706f2543Smrg    {
1100706f2543Smrg        DWORD   dwAlphaSrcConst;                /* Constant to use as Alpha Channel */
1101706f2543Smrg        LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as Alpha Channel */
1102706f2543Smrg    } DUMMYUNIONNAME4;
1103706f2543Smrg    union
1104706f2543Smrg    {
1105706f2543Smrg        DWORD   dwFillColor;                    /* color in RGB or Palettized */
1106706f2543Smrg        DWORD   dwFillDepth;                    /* depth value for z-buffer */
1107706f2543Smrg	DWORD   dwFillPixel;			/* pixel val for RGBA or RGBZ */
1108706f2543Smrg        LPDIRECTDRAWSURFACE lpDDSPattern;       /* Surface to use as pattern */
1109706f2543Smrg    } DUMMYUNIONNAME5;
1110706f2543Smrg    DDCOLORKEY  ddckDestColorkey;               /* DestColorkey override */
1111706f2543Smrg    DDCOLORKEY  ddckSrcColorkey;                /* SrcColorkey override */
1112706f2543Smrg} DDBLTFX,*LPDDBLTFX;
1113706f2543Smrg
1114706f2543Smrg/* dwDDFX */
1115706f2543Smrg/* arithmetic stretching along y axis */
1116706f2543Smrg#define DDBLTFX_ARITHSTRETCHY			0x00000001
1117706f2543Smrg/* mirror on y axis */
1118706f2543Smrg#define DDBLTFX_MIRRORLEFTRIGHT			0x00000002
1119706f2543Smrg/* mirror on x axis */
1120706f2543Smrg#define DDBLTFX_MIRRORUPDOWN			0x00000004
1121706f2543Smrg/* do not tear */
1122706f2543Smrg#define DDBLTFX_NOTEARING			0x00000008
1123706f2543Smrg/* 180 degrees clockwise rotation */
1124706f2543Smrg#define DDBLTFX_ROTATE180			0x00000010
1125706f2543Smrg/* 270 degrees clockwise rotation */
1126706f2543Smrg#define DDBLTFX_ROTATE270			0x00000020
1127706f2543Smrg/* 90 degrees clockwise rotation */
1128706f2543Smrg#define DDBLTFX_ROTATE90			0x00000040
1129706f2543Smrg/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1130706f2543Smrg#define DDBLTFX_ZBUFFERRANGE			0x00000080
1131706f2543Smrg/* add dwZBufferBaseDest to every source z value before compare */
1132706f2543Smrg#define DDBLTFX_ZBUFFERBASEDEST			0x00000100
1133706f2543Smrg
1134706f2543Smrgtypedef struct _DDOVERLAYFX
1135706f2543Smrg{
1136706f2543Smrg    DWORD       dwSize;                         /* size of structure */
1137706f2543Smrg    DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
1138706f2543Smrg    DWORD       dwAlphaEdgeBlend;               /* Constant to use as alpha for edge blend */
1139706f2543Smrg    DWORD       dwReserved;
1140706f2543Smrg    DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
1141706f2543Smrg    union
1142706f2543Smrg    {
1143706f2543Smrg        DWORD   dwAlphaDestConst;               /* Constant to use as alpha channel for dest */
1144706f2543Smrg        LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as alpha channel for dest */
1145706f2543Smrg    } DUMMYUNIONNAME1;
1146706f2543Smrg    DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
1147706f2543Smrg    union
1148706f2543Smrg    {
1149706f2543Smrg        DWORD   dwAlphaSrcConst;                /* Constant to use as alpha channel for src */
1150706f2543Smrg        LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as alpha channel for src */
1151706f2543Smrg    } DUMMYUNIONNAME2;
1152706f2543Smrg    DDCOLORKEY  dckDestColorkey;                /* DestColorkey override */
1153706f2543Smrg    DDCOLORKEY  dckSrcColorkey;                 /* DestColorkey override */
1154706f2543Smrg    DWORD       dwDDFX;                         /* Overlay FX */
1155706f2543Smrg    DWORD       dwFlags;                        /* flags */
1156706f2543Smrg} DDOVERLAYFX,*LPDDOVERLAYFX;
1157706f2543Smrg
1158706f2543Smrgtypedef struct _DDBLTBATCH
1159706f2543Smrg{
1160706f2543Smrg    LPRECT		lprDest;
1161706f2543Smrg    LPDIRECTDRAWSURFACE	lpDDSSrc;
1162706f2543Smrg    LPRECT		lprSrc;
1163706f2543Smrg    DWORD		dwFlags;
1164706f2543Smrg    LPDDBLTFX		lpDDBltFx;
1165706f2543Smrg} DDBLTBATCH,*LPDDBLTBATCH;
1166706f2543Smrg
1167706f2543Smrg#define MAX_DDDEVICEID_STRING          512
1168706f2543Smrg
1169706f2543Smrgtypedef struct tagDDDEVICEIDENTIFIER {
1170706f2543Smrg  char    szDriver[MAX_DDDEVICEID_STRING];
1171706f2543Smrg  char    szDescription[MAX_DDDEVICEID_STRING];
1172706f2543Smrg  LARGE_INTEGER  liDriverVersion;
1173706f2543Smrg  DWORD   dwVendorId;
1174706f2543Smrg  DWORD   dwDeviceId;
1175706f2543Smrg  DWORD   dwSubSysId;
1176706f2543Smrg  DWORD   dwRevision;
1177706f2543Smrg  GUID    guidDeviceIdentifier;
1178706f2543Smrg} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
1179706f2543Smrg
1180706f2543Smrgtypedef struct tagDDDEVICEIDENTIFIER2 {
1181706f2543Smrg  char    szDriver[MAX_DDDEVICEID_STRING];	/* user readable driver name */
1182706f2543Smrg  char    szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
1183706f2543Smrg  LARGE_INTEGER  liDriverVersion;		/* driver version */
1184706f2543Smrg  DWORD   dwVendorId;				/* vendor ID, zero if unknown */
1185706f2543Smrg  DWORD   dwDeviceId;				/* chipset ID, zero if unknown */
1186706f2543Smrg  DWORD   dwSubSysId;				/* board ID, zero if unknown */
1187706f2543Smrg  DWORD   dwRevision;				/* chipset version, zero if unknown */
1188706f2543Smrg  GUID    guidDeviceIdentifier;			/* unique ID for this driver/chipset combination */
1189706f2543Smrg  DWORD   dwWHQLLevel;				/* Windows Hardware Quality Lab certification level */
1190706f2543Smrg} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
1191706f2543Smrg
1192706f2543Smrg/*****************************************************************************
1193706f2543Smrg * IDirectDrawPalette interface
1194706f2543Smrg */
1195706f2543Smrg#undef INTERFACE
1196706f2543Smrg#define INTERFACE IDirectDrawPalette
1197706f2543SmrgDECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
1198706f2543Smrg{
1199706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1200706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1201706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1202706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDWORD lpdwCaps) PURE;
1203706f2543Smrg    STDMETHOD(GetEntries)(THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE;
1204706f2543Smrg    STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags, LPPALETTEENTRY lpDDColorTable) PURE;
1205706f2543Smrg    STDMETHOD(SetEntries)(THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE;
1206706f2543Smrg};
1207706f2543Smrg
1208706f2543Smrg    /*** IUnknown methods ***/
1209706f2543Smrg#define IDirectDrawPalette_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1210706f2543Smrg#define IDirectDrawPalette_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1211706f2543Smrg#define IDirectDrawPalette_Release(p)            ICOM_CALL_(Release,p,(p))
1212706f2543Smrg    /*** IDirectDrawPalette methods ***/
1213706f2543Smrg#define IDirectDrawPalette_GetCaps(p,a)          ICOM_CALL_(GetCaps,p,(p,a))
1214706f2543Smrg#define IDirectDrawPalette_GetEntries(p,a,b,c,d) ICOM_CALL_(GetEntries,p,(p,a,b,c,d))
1215706f2543Smrg#define IDirectDrawPalette_Initialize(p,a,b,c)   ICOM_CALL_(Initialize,p,(p,a,b,c))
1216706f2543Smrg#define IDirectDrawPalette_SetEntries(p,a,b,c,d) ICOM_CALL_(SetEntries,p,(p,a,b,c,d))
1217706f2543Smrg
1218706f2543Smrg
1219706f2543Smrg/*****************************************************************************
1220706f2543Smrg * IDirectDrawClipper interface
1221706f2543Smrg */
1222706f2543Smrg#undef INTERFACE
1223706f2543Smrg#define INTERFACE IDirectDrawClipper
1224706f2543SmrgDECLARE_INTERFACE_(IDirectDrawClipper,IUnknown)
1225706f2543Smrg{
1226706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1227706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1228706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1229706f2543Smrg    STDMETHOD(GetClipList)(THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE;
1230706f2543Smrg    STDMETHOD(GetHWnd)(THIS_ HWND* lphWnd) PURE;
1231706f2543Smrg    STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags) PURE;
1232706f2543Smrg    STDMETHOD(IsClipListChanged)(THIS_ BOOL* lpbChanged) PURE;
1233706f2543Smrg    STDMETHOD(SetClipList)(THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE;
1234706f2543Smrg    STDMETHOD(SetHWnd)(THIS_ DWORD dwFlags, HWND hWnd) PURE;
1235706f2543Smrg};
1236706f2543Smrg
1237706f2543Smrg    /*** IUnknown methods ***/
1238706f2543Smrg#define IDirectDrawClipper_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1239706f2543Smrg#define IDirectDrawClipper_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1240706f2543Smrg#define IDirectDrawClipper_Release(p)            ICOM_CALL_(Release,p,(p))
1241706f2543Smrg    /*** IDirectDrawClipper methods ***/
1242706f2543Smrg#define IDirectDrawClipper_GetClipList(p,a,b,c)   ICOM_CALL_(GetClipList,p,(p,a,b,c))
1243706f2543Smrg#define IDirectDrawClipper_GetHWnd(p,a)           ICOM_CALL_(GetHWnd,p,(p,a))
1244706f2543Smrg#define IDirectDrawClipper_Initialize(p,a,b)      ICOM_CALL_(Initialize,p,(p,a,b))
1245706f2543Smrg#define IDirectDrawClipper_IsClipListChanged(p,a) ICOM_CALL_(IsClipListChanged,p,(p,a))
1246706f2543Smrg#define IDirectDrawClipper_SetClipList(p,a,b)     ICOM_CALL_(SetClipList,p,(p,a,b))
1247706f2543Smrg#define IDirectDrawClipper_SetHWnd(p,a,b)         ICOM_CALL_(SetHWnd,p,(p,a,b))
1248706f2543Smrg
1249706f2543Smrg
1250706f2543Smrg/*****************************************************************************
1251706f2543Smrg * IDirectDraw interface
1252706f2543Smrg */
1253706f2543Smrg#undef INTERFACE
1254706f2543Smrg#define INTERFACE IDirectDraw
1255706f2543SmrgDECLARE_INTERFACE_(IDirectDraw,IUnknown)
1256706f2543Smrg{
1257706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1258706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1259706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1260706f2543Smrg    STDMETHOD(Compact)(THIS) PURE;
1261706f2543Smrg    STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
1262706f2543Smrg    STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
1263706f2543Smrg    STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE* lplpDDSurface, IUnknown* pUnkOuter) PURE;
1264706f2543Smrg    STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE* lplpDupDDSurface) PURE;
1265706f2543Smrg    STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
1266706f2543Smrg    STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
1267706f2543Smrg    STDMETHOD(FlipToGDISurface)(THIS) PURE;
1268706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
1269706f2543Smrg    STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1270706f2543Smrg    STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1271706f2543Smrg    STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE* lplpGDIDDSurface) PURE;
1272706f2543Smrg    STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1273706f2543Smrg    STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1274706f2543Smrg    STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
1275706f2543Smrg    STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
1276706f2543Smrg    STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1277706f2543Smrg    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1278706f2543Smrg    STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD, DWORD) PURE;
1279706f2543Smrg    STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1280706f2543Smrg};
1281706f2543Smrg
1282706f2543Smrg    /*** IUnknown methods ***/
1283706f2543Smrg#define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1284706f2543Smrg#define IDirectDraw_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1285706f2543Smrg#define IDirectDraw_Release(p)            ICOM_CALL_(Release,p,(p))
1286706f2543Smrg    /*** IDirectDraw methods ***/
1287706f2543Smrg#define IDirectDraw_Compact(p)                  ICOM_CALL_(Compact,p,(p))
1288706f2543Smrg#define IDirectDraw_CreateClipper(p,a,b,c)      ICOM_CALL_(CreateClipper,p,(p,a,b,c))
1289706f2543Smrg#define IDirectDraw_CreatePalette(p,a,b,c,d)    ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
1290706f2543Smrg#define IDirectDraw_CreateSurface(p,a,b,c)      ICOM_CALL_(CreateSurface,p,(p,a,b,c))
1291706f2543Smrg#define IDirectDraw_DuplicateSurface(p,a,b)     ICOM_CALL_(DuplicateSurface,p,(p,a,b))
1292706f2543Smrg#define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
1293706f2543Smrg#define IDirectDraw_EnumSurfaces(p,a,b,c,d)     ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
1294706f2543Smrg#define IDirectDraw_FlipToGDISurface(p)         ICOM_CALL_(FlipToGDISurface,p,(p))
1295706f2543Smrg#define IDirectDraw_GetCaps(p,a,b)              ICOM_CALL_(GetCaps,p,(p,a,b))
1296706f2543Smrg#define IDirectDraw_GetDisplayMode(p,a)         ICOM_CALL_(GetDisplayMode,p,(p,a))
1297706f2543Smrg#define IDirectDraw_GetFourCCCodes(p,a,b)       ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
1298706f2543Smrg#define IDirectDraw_GetGDISurface(p,a)          ICOM_CALL_(GetGDISurface,p,(p,a))
1299706f2543Smrg#define IDirectDraw_GetMonitorFrequency(p,a)    ICOM_CALL_(GetMonitorFrequency,p,(p,a))
1300706f2543Smrg#define IDirectDraw_GetScanLine(p,a)            ICOM_CALL_(GetScanLine,p,(p,a))
1301706f2543Smrg#define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
1302706f2543Smrg#define IDirectDraw_Initialize(p,a)             ICOM_CALL_(Initialize,p,(p,a))
1303706f2543Smrg#define IDirectDraw_RestoreDisplayMode(p)       ICOM_CALL_(RestoreDisplayMode,p,(p))
1304706f2543Smrg#define IDirectDraw_SetCooperativeLevel(p,a,b)  ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
1305706f2543Smrg#define IDirectDraw_SetDisplayMode(p,a,b,c)     ICOM_CALL_(SetDisplayMode,p,(p,a,b,c))
1306706f2543Smrg#define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
1307706f2543Smrg
1308706f2543Smrg
1309706f2543Smrg/* flags for Lock() */
1310706f2543Smrg#define DDLOCK_SURFACEMEMORYPTR	0x00000000
1311706f2543Smrg#define DDLOCK_WAIT		0x00000001
1312706f2543Smrg#define DDLOCK_EVENT		0x00000002
1313706f2543Smrg#define DDLOCK_READONLY		0x00000010
1314706f2543Smrg#define DDLOCK_WRITEONLY	0x00000020
1315706f2543Smrg#define DDLOCK_NOSYSLOCK	0x00000800
1316706f2543Smrg
1317706f2543Smrg
1318706f2543Smrg/*****************************************************************************
1319706f2543Smrg * IDirectDraw2 interface
1320706f2543Smrg */
1321706f2543Smrg/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
1322706f2543Smrg * arguments of SetDisplayMode has changed !
1323706f2543Smrg */
1324706f2543Smrg#undef INTERFACE
1325706f2543Smrg#define INTERFACE IDirectDraw2
1326706f2543SmrgDECLARE_INTERFACE_(IDirectDraw2,IUnknown)
1327706f2543Smrg{
1328706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1329706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1330706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1331706f2543Smrg    STDMETHOD(Compact)(THIS) PURE;
1332706f2543Smrg    STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
1333706f2543Smrg    STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
1334706f2543Smrg    STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE2* lplpDDSurface, IUnknown* pUnkOuter) PURE;
1335706f2543Smrg    STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSurface, LPDIRECTDRAWSURFACE2* lplpDupDDSurface) PURE;
1336706f2543Smrg    STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
1337706f2543Smrg    STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
1338706f2543Smrg    STDMETHOD(FlipToGDISurface)(THIS) PURE;
1339706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
1340706f2543Smrg    STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1341706f2543Smrg    STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1342706f2543Smrg    STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE2* lplpGDIDDSurface) PURE;
1343706f2543Smrg    STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1344706f2543Smrg    STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1345706f2543Smrg    STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
1346706f2543Smrg    STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
1347706f2543Smrg    STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1348706f2543Smrg    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1349706f2543Smrg    STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1350706f2543Smrg    STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1351706f2543Smrg
1352706f2543Smrg    STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
1353706f2543Smrg};
1354706f2543Smrg
1355706f2543Smrg    /*** IUnknown methods ***/
1356706f2543Smrg#define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1357706f2543Smrg#define IDirectDraw2_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1358706f2543Smrg#define IDirectDraw2_Release(p)            ICOM_CALL_(Release,p,(p))
1359706f2543Smrg    /*** IDirectDraw methods ***/
1360706f2543Smrg#define IDirectDraw2_Compact(p)                  ICOM_CALL_(Compact,p,(p))
1361706f2543Smrg#define IDirectDraw2_CreateClipper(p,a,b,c)      ICOM_CALL_(CreateClipper,p,(p,a,b,c))
1362706f2543Smrg#define IDirectDraw2_CreatePalette(p,a,b,c,d)    ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
1363706f2543Smrg#define IDirectDraw2_CreateSurface(p,a,b,c)      ICOM_CALL_(CreateSurface,p,(p,a,b,c))
1364706f2543Smrg#define IDirectDraw2_DuplicateSurface(p,a,b)     ICOM_CALL_(DuplicateSurface,p,(p,a,b))
1365706f2543Smrg#define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
1366706f2543Smrg#define IDirectDraw2_EnumSurfaces(p,a,b,c,d)     ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
1367706f2543Smrg#define IDirectDraw2_FlipToGDISurface(p)         ICOM_CALL_(FlipToGDISurface,p,(p))
1368706f2543Smrg#define IDirectDraw2_GetCaps(p,a,b)              ICOM_CALL_(GetCaps,p,(p,a,b))
1369706f2543Smrg#define IDirectDraw2_GetDisplayMode(p,a)         ICOM_CALL_(GetDisplayMode,p,(p,a))
1370706f2543Smrg#define IDirectDraw2_GetFourCCCodes(p,a,b)       ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
1371706f2543Smrg#define IDirectDraw2_GetGDISurface(p,a)          ICOM_CALL_(GetGDISurface,p,(p,a))
1372706f2543Smrg#define IDirectDraw2_GetMonitorFrequency(p,a)    ICOM_CALL_(GetMonitorFrequency,p,(p,a))
1373706f2543Smrg#define IDirectDraw2_GetScanLine(p,a)            ICOM_CALL_(GetScanLine,p,(p,a))
1374706f2543Smrg#define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
1375706f2543Smrg#define IDirectDraw2_Initialize(p,a)             ICOM_CALL_(Initialize,p,(p,a))
1376706f2543Smrg#define IDirectDraw2_RestoreDisplayMode(p)       ICOM_CALL_(RestoreDisplayMode,p,(p))
1377706f2543Smrg#define IDirectDraw2_SetCooperativeLevel(p,a,b)  ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
1378706f2543Smrg#define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e))
1379706f2543Smrg#define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
1380706f2543Smrg/*** IDirectDraw2 methods ***/
1381706f2543Smrg#define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
1382706f2543Smrg
1383706f2543Smrg
1384706f2543Smrg/*****************************************************************************
1385706f2543Smrg * IDirectDraw4 interface
1386706f2543Smrg */
1387706f2543Smrg#undef INTERFACE
1388706f2543Smrg#define INTERFACE IDirectDraw4
1389706f2543SmrgDECLARE_INTERFACE_(IDirectDraw4,IUnknown)
1390706f2543Smrg{
1391706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1392706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1393706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1394706f2543Smrg    STDMETHOD(Compact)(THIS) PURE;
1395706f2543Smrg    STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
1396706f2543Smrg    STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
1397706f2543Smrg    STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE4* lplpDDSurface, IUnknown* pUnkOuter) PURE;
1398706f2543Smrg    STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurface, LPDIRECTDRAWSURFACE4* lplpDupDDSurface) PURE;
1399706f2543Smrg    STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE;
1400706f2543Smrg    STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE;
1401706f2543Smrg    STDMETHOD(FlipToGDISurface)(THIS) PURE;
1402706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
1403706f2543Smrg    STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
1404706f2543Smrg    STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1405706f2543Smrg    STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4* lplpGDIDDSurface) PURE;
1406706f2543Smrg    STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1407706f2543Smrg    STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1408706f2543Smrg    STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
1409706f2543Smrg    STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
1410706f2543Smrg    STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1411706f2543Smrg    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1412706f2543Smrg    STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1413706f2543Smrg    STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1414706f2543Smrg
1415706f2543Smrg    STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
1416706f2543Smrg
1417706f2543Smrg    STDMETHOD(GetSurfaceFromDC)(THIS_ HDC , LPDIRECTDRAWSURFACE4* ) PURE;
1418706f2543Smrg    STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1419706f2543Smrg    STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1420706f2543Smrg    STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER , DWORD ) PURE;
1421706f2543Smrg};
1422706f2543Smrg
1423706f2543Smrg    /*** IUnknown methods ***/
1424706f2543Smrg#define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1425706f2543Smrg#define IDirectDraw4_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1426706f2543Smrg#define IDirectDraw4_Release(p)            ICOM_CALL_(Release,p,(p))
1427706f2543Smrg    /*** IDirectDraw methods ***/
1428706f2543Smrg#define IDirectDraw4_Compact(p)                  ICOM_CALL_(Compact,p,(p))
1429706f2543Smrg#define IDirectDraw4_CreateClipper(p,a,b,c)      ICOM_CALL_(CreateClipper,p,(p,a,b,c))
1430706f2543Smrg#define IDirectDraw4_CreatePalette(p,a,b,c,d)    ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
1431706f2543Smrg#define IDirectDraw4_CreateSurface(p,a,b,c)      ICOM_CALL_(CreateSurface,p,(p,a,b,c))
1432706f2543Smrg#define IDirectDraw4_DuplicateSurface(p,a,b)     ICOM_CALL_(DuplicateSurface,p,(p,a,b))
1433706f2543Smrg#define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
1434706f2543Smrg#define IDirectDraw4_EnumSurfaces(p,a,b,c,d)     ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
1435706f2543Smrg#define IDirectDraw4_FlipToGDISurface(p)         ICOM_CALL_(FlipToGDISurface,p,(p))
1436706f2543Smrg#define IDirectDraw4_GetCaps(p,a,b)              ICOM_CALL_(GetCaps,p,(p,a,b))
1437706f2543Smrg#define IDirectDraw4_GetDisplayMode(p,a)         ICOM_CALL_(GetDisplayMode,p,(p,a))
1438706f2543Smrg#define IDirectDraw4_GetFourCCCodes(p,a,b)       ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
1439706f2543Smrg#define IDirectDraw4_GetGDISurface(p,a)          ICOM_CALL_(GetGDISurface,p,(p,a))
1440706f2543Smrg#define IDirectDraw4_GetMonitorFrequency(p,a)    ICOM_CALL_(GetMonitorFrequency,p,(p,a))
1441706f2543Smrg#define IDirectDraw4_GetScanLine(p,a)            ICOM_CALL_(GetScanLine,p,(p,a))
1442706f2543Smrg#define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
1443706f2543Smrg#define IDirectDraw4_Initialize(p,a)             ICOM_CALL_(Initialize,p,(p,a))
1444706f2543Smrg#define IDirectDraw4_RestoreDisplayMode(p)       ICOM_CALL_(RestoreDisplayMode,p,(p))
1445706f2543Smrg#define IDirectDraw4_SetCooperativeLevel(p,a,b)  ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
1446706f2543Smrg#define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e))
1447706f2543Smrg#define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
1448706f2543Smrg/*** IDirectDraw2 methods ***/
1449706f2543Smrg#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
1450706f2543Smrg/*** IDirectDraw4 methods ***/
1451706f2543Smrg#define IDirectDraw4_GetSurfaceFromDC(p,a,b)    ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b))
1452706f2543Smrg#define IDirectDraw4_RestoreAllSurfaces(pc)     ICOM_CALL_(RestoreAllSurfaces,p,(p))
1453706f2543Smrg#define IDirectDraw4_TestCooperativeLevel(p)    ICOM_CALL_(TestCooperativeLevel,p,(p))
1454706f2543Smrg#define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b))
1455706f2543Smrg
1456706f2543Smrg
1457706f2543Smrg/*****************************************************************************
1458706f2543Smrg * IDirectDraw7 interface
1459706f2543Smrg */
1460706f2543Smrg/* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
1461706f2543Smrg * as not interchangeable with earlier DirectDraw interfaces.
1462706f2543Smrg */
1463706f2543Smrg#undef INTERFACE
1464706f2543Smrg#define INTERFACE IDirectDraw7
1465706f2543SmrgDECLARE_INTERFACE_(IDirectDraw7,IUnknown)
1466706f2543Smrg{
1467706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1468706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1469706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1470706f2543Smrg    STDMETHOD(Compact)(THIS) PURE;
1471706f2543Smrg    STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
1472706f2543Smrg    STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
1473706f2543Smrg    STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE7* lplpDDSurface, IUnknown* pUnkOuter) PURE;
1474706f2543Smrg    STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurface, LPDIRECTDRAWSURFACE7* lplpDupDDSurface) PURE;
1475706f2543Smrg    STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE;
1476706f2543Smrg    STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE;
1477706f2543Smrg    STDMETHOD(FlipToGDISurface)(THIS) PURE;
1478706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
1479706f2543Smrg    STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
1480706f2543Smrg    STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1481706f2543Smrg    STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7* lplpGDIDDSurface) PURE;
1482706f2543Smrg    STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1483706f2543Smrg    STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1484706f2543Smrg    STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
1485706f2543Smrg    STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
1486706f2543Smrg    STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1487706f2543Smrg    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1488706f2543Smrg    STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1489706f2543Smrg    STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1490706f2543Smrg
1491706f2543Smrg    STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
1492706f2543Smrg
1493706f2543Smrg    STDMETHOD(GetSurfaceFromDC)(THIS_ HDC , LPDIRECTDRAWSURFACE7* ) PURE;
1494706f2543Smrg    STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1495706f2543Smrg    STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1496706f2543Smrg    STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2 , DWORD ) PURE;
1497706f2543Smrg
1498706f2543Smrg    STDMETHOD(StartModeTest)(THIS_ LPSIZE , DWORD , DWORD ) PURE;
1499706f2543Smrg    STDMETHOD(EvaluateMode)(THIS_ DWORD , DWORD * ) PURE;
1500706f2543Smrg};
1501706f2543Smrg
1502706f2543Smrg    /*** IUnknown methods ***/
1503706f2543Smrg#define IDirectDraw7_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1504706f2543Smrg#define IDirectDraw7_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1505706f2543Smrg#define IDirectDraw7_Release(p)            ICOM_CALL_(Release,p,(p))
1506706f2543Smrg    /*** IDirectDraw methods ***/
1507706f2543Smrg#define IDirectDraw7_Compact(p)                  ICOM_CALL_(Compact,p,(p))
1508706f2543Smrg#define IDirectDraw7_CreateClipper(p,a,b,c)      ICOM_CALL_(CreateClipper,p,(p,a,b,c))
1509706f2543Smrg#define IDirectDraw7_CreatePalette(p,a,b,c,d)    ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
1510706f2543Smrg#define IDirectDraw7_CreateSurface(p,a,b,c)      ICOM_CALL_(CreateSurface,p,(p,a,b,c))
1511706f2543Smrg#define IDirectDraw7_DuplicateSurface(p,a,b)     ICOM_CALL_(DuplicateSurface,p,(p,a,b))
1512706f2543Smrg#define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
1513706f2543Smrg#define IDirectDraw7_EnumSurfaces(p,a,b,c,d)     ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
1514706f2543Smrg#define IDirectDraw7_FlipToGDISurface(p)         ICOM_CALL_(FlipToGDISurface,p,(p))
1515706f2543Smrg#define IDirectDraw7_GetCaps(p,a,b)              ICOM_CALL_(GetCaps,p,(p,a,b))
1516706f2543Smrg#define IDirectDraw7_GetDisplayMode(p,a)         ICOM_CALL_(GetDisplayMode,p,(p,a))
1517706f2543Smrg#define IDirectDraw7_GetFourCCCodes(p,a,b)       ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
1518706f2543Smrg#define IDirectDraw7_GetGDISurface(p,a)          ICOM_CALL_(GetGDISurface,p,(p,a))
1519706f2543Smrg#define IDirectDraw7_GetMonitorFrequency(p,a)    ICOM_CALL_(GetMonitorFrequency,p,(p,a))
1520706f2543Smrg#define IDirectDraw7_GetScanLine(p,a)            ICOM_CALL_(GetScanLine,p,(p,a))
1521706f2543Smrg#define IDirectDraw7_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
1522706f2543Smrg#define IDirectDraw7_Initialize(p,a)             ICOM_CALL_(Initialize,p,(p,a))
1523706f2543Smrg#define IDirectDraw7_RestoreDisplayMode(p)       ICOM_CALL_(RestoreDisplayMode,p,(p))
1524706f2543Smrg#define IDirectDraw7_SetCooperativeLevel(p,a,b)  ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
1525706f2543Smrg#define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e))
1526706f2543Smrg#define IDirectDraw7_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
1527706f2543Smrg/*** added in IDirectDraw2 ***/
1528706f2543Smrg#define IDirectDraw7_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
1529706f2543Smrg/*** added in IDirectDraw4 ***/
1530706f2543Smrg#define IDirectDraw7_GetSurfaceFromDC(p,a,b)    ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b))
1531706f2543Smrg#define IDirectDraw7_RestoreAllSurfaces(p)     ICOM_CALL_(RestoreAllSurfaces,p,(p))
1532706f2543Smrg#define IDirectDraw7_TestCooperativeLevel(p)    ICOM_CALL_(TestCooperativeLevel,p,(p))
1533706f2543Smrg#define IDirectDraw7_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b))
1534706f2543Smrg/*** added in IDirectDraw 7 ***/
1535706f2543Smrg#define IDirectDraw7_StartModeTest(p,a,b,c)     ICOM_CALL_(StartModeTest,p,(p,a,b,c))
1536706f2543Smrg#define IDirectDraw7_EvaluateMode(p,a,b)        ICOM_CALL_(EvaluateMode,p,(p,a,b))
1537706f2543Smrg
1538706f2543Smrg
1539706f2543Smrg/*****************************************************************************
1540706f2543Smrg * IDirectDrawSurface interface
1541706f2543Smrg */
1542706f2543Smrg#undef INTERFACE
1543706f2543Smrg#define INTERFACE IDirectDrawSurface
1544706f2543SmrgDECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
1545706f2543Smrg{
1546706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1547706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1548706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1549706f2543Smrg    STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE;
1550706f2543Smrg    STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1551706f2543Smrg    STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
1552706f2543Smrg    STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
1553706f2543Smrg    STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
1554706f2543Smrg    STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE;
1555706f2543Smrg    STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
1556706f2543Smrg    STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
1557706f2543Smrg    STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
1558706f2543Smrg    STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE* lplpDDAttachedSurface) PURE;
1559706f2543Smrg    STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1560706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
1561706f2543Smrg    STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
1562706f2543Smrg    STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1563706f2543Smrg    STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
1564706f2543Smrg    STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1565706f2543Smrg    STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1566706f2543Smrg    STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
1567706f2543Smrg    STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
1568706f2543Smrg    STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1569706f2543Smrg    STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1570706f2543Smrg    STDMETHOD(IsLost)(THIS) PURE;
1571706f2543Smrg    STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
1572706f2543Smrg    STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1573706f2543Smrg    STDMETHOD(Restore)(THIS) PURE;
1574706f2543Smrg    STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
1575706f2543Smrg    STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1576706f2543Smrg    STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1577706f2543Smrg    STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
1578706f2543Smrg    STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
1579706f2543Smrg    STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
1580706f2543Smrg    STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1581706f2543Smrg    STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSReference) PURE;
1582706f2543Smrg};
1583706f2543Smrg
1584706f2543Smrg    /*** IUnknown methods ***/
1585706f2543Smrg#define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1586706f2543Smrg#define IDirectDrawSurface_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1587706f2543Smrg#define IDirectDrawSurface_Release(p)            ICOM_CALL_(Release,p,(p))
1588706f2543Smrg    /*** IDirectDrawSurface methods ***/
1589706f2543Smrg#define IDirectDrawSurface_AddAttachedSurface(p,a)      ICOM_CALL_(AddAttachedSurface,p,(p,a))
1590706f2543Smrg#define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
1591706f2543Smrg#define IDirectDrawSurface_Blt(p,a,b,c,d,e)             ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
1592706f2543Smrg#define IDirectDrawSurface_BltBatch(p,a,b,c)            ICOM_CALL_(BltBatch,p,(p,a,b,c))
1593706f2543Smrg#define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
1594706f2543Smrg#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
1595706f2543Smrg#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
1596706f2543Smrg#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
1597706f2543Smrg#define IDirectDrawSurface_Flip(p,a,b)                  ICOM_CALL_(Flip,p,(p,a,b))
1598706f2543Smrg#define IDirectDrawSurface_GetAttachedSurface(p,a,b)    ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
1599706f2543Smrg#define IDirectDrawSurface_GetBltStatus(p,a)            ICOM_CALL_(GetBltStatus,p,(p,a))
1600706f2543Smrg#define IDirectDrawSurface_GetCaps(p,a)                 ICOM_CALL_(GetCaps,p,(p,a))
1601706f2543Smrg#define IDirectDrawSurface_GetClipper(p,a)              ICOM_CALL_(GetClipper,p,(p,a))
1602706f2543Smrg#define IDirectDrawSurface_GetColorKey(p,a,b)           ICOM_CALL_(GetColorKey,p,(p,a,b))
1603706f2543Smrg#define IDirectDrawSurface_GetDC(p,a)                   ICOM_CALL_(GetDC,p,(p,a))
1604706f2543Smrg#define IDirectDrawSurface_GetFlipStatus(p,a)           ICOM_CALL_(GetFlipStatus,p,(p,a))
1605706f2543Smrg#define IDirectDrawSurface_GetOverlayPosition(p,a,b)    ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
1606706f2543Smrg#define IDirectDrawSurface_GetPalette(p,a)              ICOM_CALL_(GetPalette,p,(p,a))
1607706f2543Smrg#define IDirectDrawSurface_GetPixelFormat(p,a)          ICOM_CALL_(GetPixelFormat,p,(p,a))
1608706f2543Smrg#define IDirectDrawSurface_GetSurfaceDesc(p,a)          ICOM_CALL_(GetSurfaceDesc,p,(p,a))
1609706f2543Smrg#define IDirectDrawSurface_Initialize(p,a,b)            ICOM_CALL_(Initialize,p,(p,a,b))
1610706f2543Smrg#define IDirectDrawSurface_IsLost(p)                    ICOM_CALL_(IsLost,p,(p))
1611706f2543Smrg#define IDirectDrawSurface_Lock(p,a,b,c,d)              ICOM_CALL_(Lock,p,(p,a,b,c,d))
1612706f2543Smrg#define IDirectDrawSurface_ReleaseDC(p,a)               ICOM_CALL_(ReleaseDC,p,(p,a))
1613706f2543Smrg#define IDirectDrawSurface_Restore(p)                   ICOM_CALL_(Restore,p,(p))
1614706f2543Smrg#define IDirectDrawSurface_SetClipper(p,a)              ICOM_CALL_(SetClipper,p,(p,a))
1615706f2543Smrg#define IDirectDrawSurface_SetColorKey(p,a,b)           ICOM_CALL_(SetColorKey,p,(p,a,b))
1616706f2543Smrg#define IDirectDrawSurface_SetOverlayPosition(p,a,b)    ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
1617706f2543Smrg#define IDirectDrawSurface_SetPalette(p,a)              ICOM_CALL_(SetPalette,p,(p,a))
1618706f2543Smrg#define IDirectDrawSurface_Unlock(p,a)                  ICOM_CALL_(Unlock,p,(p,a))
1619706f2543Smrg#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
1620706f2543Smrg#define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
1621706f2543Smrg#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
1622706f2543Smrg
1623706f2543Smrg
1624706f2543Smrg/*****************************************************************************
1625706f2543Smrg * IDirectDrawSurface2 interface
1626706f2543Smrg */
1627706f2543Smrg/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
1628706f2543Smrg * have been converted to LPDIRECTDRAWSURFACE2.
1629706f2543Smrg */
1630706f2543Smrg#undef INTERFACE
1631706f2543Smrg#define INTERFACE IDirectDrawSurface2
1632706f2543SmrgDECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
1633706f2543Smrg{
1634706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1635706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1636706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1637706f2543Smrg    STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE;
1638706f2543Smrg    STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1639706f2543Smrg    STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
1640706f2543Smrg    STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
1641706f2543Smrg    STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
1642706f2543Smrg    STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE;
1643706f2543Smrg    STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
1644706f2543Smrg    STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
1645706f2543Smrg    STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
1646706f2543Smrg    STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE2* lplpDDAttachedSurface) PURE;
1647706f2543Smrg    STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1648706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
1649706f2543Smrg    STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
1650706f2543Smrg    STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1651706f2543Smrg    STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
1652706f2543Smrg    STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1653706f2543Smrg    STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1654706f2543Smrg    STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
1655706f2543Smrg    STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
1656706f2543Smrg    STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1657706f2543Smrg    STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1658706f2543Smrg    STDMETHOD(IsLost)(THIS) PURE;
1659706f2543Smrg    STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
1660706f2543Smrg    STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1661706f2543Smrg    STDMETHOD(Restore)(THIS) PURE;
1662706f2543Smrg    STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
1663706f2543Smrg    STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1664706f2543Smrg    STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1665706f2543Smrg    STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
1666706f2543Smrg    STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
1667706f2543Smrg    STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE2 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
1668706f2543Smrg    STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1669706f2543Smrg    STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSReference) PURE;
1670706f2543Smrg    /* added in v2 */
1671706f2543Smrg    STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
1672706f2543Smrg    STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
1673706f2543Smrg    STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
1674706f2543Smrg};
1675706f2543Smrg
1676706f2543Smrg    /*** IUnknown methods ***/
1677706f2543Smrg#define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1678706f2543Smrg#define IDirectDrawSurface2_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1679706f2543Smrg#define IDirectDrawSurface2_Release(p)            ICOM_CALL_(Release,p,(p))
1680706f2543Smrg/*** IDirectDrawSurface methods (almost) ***/
1681706f2543Smrg#define IDirectDrawSurface2_AddAttachedSurface(p,a)      ICOM_CALL_(AddAttachedSurface,p,(p,a))
1682706f2543Smrg#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
1683706f2543Smrg#define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
1684706f2543Smrg#define IDirectDrawSurface2_BltBatch(p,a,b,c)            ICOM_CALL_(BltBatch,p,(p,a,b,c))
1685706f2543Smrg#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
1686706f2543Smrg#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
1687706f2543Smrg#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
1688706f2543Smrg#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
1689706f2543Smrg#define IDirectDrawSurface2_Flip(p,a,b)                  ICOM_CALL_(Flip,p,(p,a,b))
1690706f2543Smrg#define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
1691706f2543Smrg#define IDirectDrawSurface2_GetBltStatus(p,a)            ICOM_CALL_(GetBltStatus,p,(p,a))
1692706f2543Smrg#define IDirectDrawSurface2_GetCaps(p,a)                 ICOM_CALL_(GetCaps,p,(p,a))
1693706f2543Smrg#define IDirectDrawSurface2_GetClipper(p,a)              ICOM_CALL_(GetClipper,p,(p,a))
1694706f2543Smrg#define IDirectDrawSurface2_GetColorKey(p,a,b)           ICOM_CALL_(GetColorKey,p,(p,a,b))
1695706f2543Smrg#define IDirectDrawSurface2_GetDC(p,a)                   ICOM_CALL_(GetDC,p,(p,a))
1696706f2543Smrg#define IDirectDrawSurface2_GetFlipStatus(p,a)           ICOM_CALL_(GetFlipStatus,p,(p,a))
1697706f2543Smrg#define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
1698706f2543Smrg#define IDirectDrawSurface2_GetPalette(p,a)              ICOM_CALL_(GetPalette,p,(p,a))
1699706f2543Smrg#define IDirectDrawSurface2_GetPixelFormat(p,a)          ICOM_CALL_(GetPixelFormat,p,(p,a))
1700706f2543Smrg#define IDirectDrawSurface2_GetSurfaceDesc(p,a)          ICOM_CALL_(GetSurfaceDesc,p,(p,a))
1701706f2543Smrg#define IDirectDrawSurface2_Initialize(p,a,b)            ICOM_CALL_(Initialize,p,(p,a,b))
1702706f2543Smrg#define IDirectDrawSurface2_IsLost(p)                    ICOM_CALL_(IsLost,p,(p))
1703706f2543Smrg#define IDirectDrawSurface2_Lock(p,a,b,c,d)              ICOM_CALL_(Lock,p,(p,a,b,c,d))
1704706f2543Smrg#define IDirectDrawSurface2_ReleaseDC(p,a)               ICOM_CALL_(ReleaseDC,p,(p,a))
1705706f2543Smrg#define IDirectDrawSurface2_Restore(p)                   ICOM_CALL_(Restore,p,(p))
1706706f2543Smrg#define IDirectDrawSurface2_SetClipper(p,a)              ICOM_CALL_(SetClipper,p,(p,a))
1707706f2543Smrg#define IDirectDrawSurface2_SetColorKey(p,a,b)           ICOM_CALL_(SetColorKey,p,(p,a,b))
1708706f2543Smrg#define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
1709706f2543Smrg#define IDirectDrawSurface2_SetPalette(p,a)              ICOM_CALL_(SetPalette,p,(p,a))
1710706f2543Smrg#define IDirectDrawSurface2_Unlock(p,a)                  ICOM_CALL_(Unlock,p,(p,a))
1711706f2543Smrg#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
1712706f2543Smrg#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
1713706f2543Smrg#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
1714706f2543Smrg/*** IDirectDrawSurface2 methods ***/
1715706f2543Smrg#define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
1716706f2543Smrg#define IDirectDrawSurface2_PageLock(p,a)       ICOM_CALL_(PageLock,p,(p,a))
1717706f2543Smrg#define IDirectDrawSurface2_PageUnlock(p,a)     ICOM_CALL_(PageUnlock,p,(p,a))
1718706f2543Smrg
1719706f2543Smrg
1720706f2543Smrg/*****************************************************************************
1721706f2543Smrg * IDirectDrawSurface3 interface
1722706f2543Smrg */
1723706f2543Smrg/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
1724706f2543Smrg * have been converted to LPDIRECTDRAWSURFACE3.
1725706f2543Smrg */
1726706f2543Smrg#undef INTERFACE
1727706f2543Smrg#define INTERFACE IDirectDrawSurface3
1728706f2543SmrgDECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
1729706f2543Smrg{
1730706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1731706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1732706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1733706f2543Smrg    STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE;
1734706f2543Smrg    STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1735706f2543Smrg    STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
1736706f2543Smrg    STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
1737706f2543Smrg    STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
1738706f2543Smrg    STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE;
1739706f2543Smrg    STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
1740706f2543Smrg    STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
1741706f2543Smrg    STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
1742706f2543Smrg    STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE3* lplpDDAttachedSurface) PURE;
1743706f2543Smrg    STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1744706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
1745706f2543Smrg    STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
1746706f2543Smrg    STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1747706f2543Smrg    STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
1748706f2543Smrg    STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1749706f2543Smrg    STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1750706f2543Smrg    STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
1751706f2543Smrg    STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
1752706f2543Smrg    STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1753706f2543Smrg    STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1754706f2543Smrg    STDMETHOD(IsLost)(THIS) PURE;
1755706f2543Smrg    STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
1756706f2543Smrg    STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1757706f2543Smrg    STDMETHOD(Restore)(THIS) PURE;
1758706f2543Smrg    STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
1759706f2543Smrg    STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1760706f2543Smrg    STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1761706f2543Smrg    STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
1762706f2543Smrg    STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
1763706f2543Smrg    STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE3 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
1764706f2543Smrg    STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1765706f2543Smrg    STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSReference) PURE;
1766706f2543Smrg    /* added in v2 */
1767706f2543Smrg    STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
1768706f2543Smrg    STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
1769706f2543Smrg    STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
1770706f2543Smrg    /* added in v3 */
1771706f2543Smrg    STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE;
1772706f2543Smrg};
1773706f2543Smrg
1774706f2543Smrg    /*** IUnknown methods ***/
1775706f2543Smrg#define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1776706f2543Smrg#define IDirectDrawSurface3_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1777706f2543Smrg#define IDirectDrawSurface3_Release(p)            ICOM_CALL_(Release,p,(p))
1778706f2543Smrg/*** IDirectDrawSurface methods (almost) ***/
1779706f2543Smrg#define IDirectDrawSurface3_AddAttachedSurface(p,a)      ICOM_CALL_(AddAttachedSurface,p,(p,a))
1780706f2543Smrg#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a)     ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
1781706f2543Smrg#define IDirectDrawSurface3_Blt(p,a,b,c,d,e)             ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
1782706f2543Smrg#define IDirectDrawSurface3_BltBatch(p,a,b,c)            ICOM_CALL_(BltBatch,p,(p,a,b,c))
1783706f2543Smrg#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e)         ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
1784706f2543Smrg#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
1785706f2543Smrg#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b)  ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
1786706f2543Smrg#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
1787706f2543Smrg#define IDirectDrawSurface3_Flip(p,a,b)                  ICOM_CALL_(Flip,p,(p,a,b))
1788706f2543Smrg#define IDirectDrawSurface3_GetAttachedSurface(p,a,b)    ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
1789706f2543Smrg#define IDirectDrawSurface3_GetBltStatus(p,a)            ICOM_CALL_(GetBltStatus,p,(p,a))
1790706f2543Smrg#define IDirectDrawSurface3_GetCaps(p,a)                 ICOM_CALL_(GetCaps,p,(p,a))
1791706f2543Smrg#define IDirectDrawSurface3_GetClipper(p,a)              ICOM_CALL_(GetClipper,p,(p,a))
1792706f2543Smrg#define IDirectDrawSurface3_GetColorKey(p,a,b)           ICOM_CALL_(GetColorKey,p,(p,a,b))
1793706f2543Smrg#define IDirectDrawSurface3_GetDC(p,a)                   ICOM_CALL_(GetDC,p,(p,a))
1794706f2543Smrg#define IDirectDrawSurface3_GetFlipStatus(p,a)           ICOM_CALL_(GetFlipStatus,p,(p,a))
1795706f2543Smrg#define IDirectDrawSurface3_GetOverlayPosition(p,a,b)    ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
1796706f2543Smrg#define IDirectDrawSurface3_GetPalette(p,a)              ICOM_CALL_(GetPalette,p,(p,a))
1797706f2543Smrg#define IDirectDrawSurface3_GetPixelFormat(p,a)          ICOM_CALL_(GetPixelFormat,p,(p,a))
1798706f2543Smrg#define IDirectDrawSurface3_GetSurfaceDesc(p,a)          ICOM_CALL_(GetSurfaceDesc,p,(p,a))
1799706f2543Smrg#define IDirectDrawSurface3_Initialize(p,a,b)            ICOM_CALL_(Initialize,p,(p,a,b))
1800706f2543Smrg#define IDirectDrawSurface3_IsLost(p)                    ICOM_CALL_(IsLost,p,(p))
1801706f2543Smrg#define IDirectDrawSurface3_Lock(p,a,b,c,d)              ICOM_CALL_(Lock,p,(p,a,b,c,d))
1802706f2543Smrg#define IDirectDrawSurface3_ReleaseDC(p,a)               ICOM_CALL_(ReleaseDC,p,(p,a))
1803706f2543Smrg#define IDirectDrawSurface3_Restore(p)                   ICOM_CALL_(Restore,p,(p))
1804706f2543Smrg#define IDirectDrawSurface3_SetClipper(p,a)              ICOM_CALL_(SetClipper,p,(p,a))
1805706f2543Smrg#define IDirectDrawSurface3_SetColorKey(p,a,b)           ICOM_CALL_(SetColorKey,p,(p,a,b))
1806706f2543Smrg#define IDirectDrawSurface3_SetOverlayPosition(p,a,b)    ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
1807706f2543Smrg#define IDirectDrawSurface3_SetPalette(p,a)              ICOM_CALL_(SetPalette,p,(p,a))
1808706f2543Smrg#define IDirectDrawSurface3_Unlock(p,a)                  ICOM_CALL_(Unlock,p,(p,a))
1809706f2543Smrg#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
1810706f2543Smrg#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a)    ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
1811706f2543Smrg#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b)   ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
1812706f2543Smrg/*** IDirectDrawSurface2 methods ***/
1813706f2543Smrg#define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
1814706f2543Smrg#define IDirectDrawSurface3_PageLock(p,a)       ICOM_CALL_(PageLock,p,(p,a))
1815706f2543Smrg#define IDirectDrawSurface3_PageUnlock(p,a)     ICOM_CALL_(PageUnlock,p,(p,a))
1816706f2543Smrg/*** IDirectDrawSurface3 methods ***/
1817706f2543Smrg#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b))
1818706f2543Smrg
1819706f2543Smrg
1820706f2543Smrg/*****************************************************************************
1821706f2543Smrg * IDirectDrawSurface4 interface
1822706f2543Smrg */
1823706f2543Smrg/* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2.
1824706f2543Smrg */
1825706f2543Smrg#undef INTERFACE
1826706f2543Smrg#define INTERFACE IDirectDrawSurface4
1827706f2543SmrgDECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown)
1828706f2543Smrg{
1829706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1830706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1831706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1832706f2543Smrg    STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE;
1833706f2543Smrg    STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1834706f2543Smrg    STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
1835706f2543Smrg    STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
1836706f2543Smrg    STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
1837706f2543Smrg    STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE;
1838706f2543Smrg    STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
1839706f2543Smrg    STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
1840706f2543Smrg    STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
1841706f2543Smrg    STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4* lplpDDAttachedSurface) PURE;
1842706f2543Smrg    STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1843706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE;
1844706f2543Smrg    STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
1845706f2543Smrg    STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1846706f2543Smrg    STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
1847706f2543Smrg    STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1848706f2543Smrg    STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1849706f2543Smrg    STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
1850706f2543Smrg    STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
1851706f2543Smrg    STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1852706f2543Smrg    STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
1853706f2543Smrg    STDMETHOD(IsLost)(THIS) PURE;
1854706f2543Smrg    STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
1855706f2543Smrg    STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1856706f2543Smrg    STDMETHOD(Restore)(THIS) PURE;
1857706f2543Smrg    STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
1858706f2543Smrg    STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1859706f2543Smrg    STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1860706f2543Smrg    STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
1861706f2543Smrg    STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
1862706f2543Smrg    STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE4 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
1863706f2543Smrg    STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1864706f2543Smrg    STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSReference) PURE;
1865706f2543Smrg    /* added in v2 */
1866706f2543Smrg    STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
1867706f2543Smrg    STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
1868706f2543Smrg    STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
1869706f2543Smrg    /* added in v3 */
1870706f2543Smrg    STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE;
1871706f2543Smrg    /* added in v4 */
1872706f2543Smrg    STDMETHOD(SetPrivateData)(THIS_ REFGUID , LPVOID , DWORD , DWORD ) PURE;
1873706f2543Smrg    STDMETHOD(GetPrivateData)(THIS_ REFGUID , LPVOID , LPDWORD ) PURE;
1874706f2543Smrg    STDMETHOD(FreePrivateData)(THIS_ REFGUID ) PURE;
1875706f2543Smrg    STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD ) PURE;
1876706f2543Smrg    STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
1877706f2543Smrg};
1878706f2543Smrg
1879706f2543Smrg    /*** IUnknown methods ***/
1880706f2543Smrg#define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1881706f2543Smrg#define IDirectDrawSurface4_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1882706f2543Smrg#define IDirectDrawSurface4_Release(p)            ICOM_CALL_(Release,p,(p))
1883706f2543Smrg/*** IDirectDrawSurface (almost) methods ***/
1884706f2543Smrg#define IDirectDrawSurface4_AddAttachedSurface(p,a)      ICOM_CALL_(AddAttachedSurface,p,(p,a))
1885706f2543Smrg#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a)     ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
1886706f2543Smrg#define IDirectDrawSurface4_Blt(p,a,b,c,d,e)             ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
1887706f2543Smrg#define IDirectDrawSurface4_BltBatch(p,a,b,c)            ICOM_CALL_(BltBatch,p,(p,a,b,c))
1888706f2543Smrg#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e)         ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
1889706f2543Smrg#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
1890706f2543Smrg#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b)  ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
1891706f2543Smrg#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
1892706f2543Smrg#define IDirectDrawSurface4_Flip(p,a,b)                  ICOM_CALL_(Flip,p,(p,a,b))
1893706f2543Smrg#define IDirectDrawSurface4_GetAttachedSurface(p,a,b)    ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
1894706f2543Smrg#define IDirectDrawSurface4_GetBltStatus(p,a)            ICOM_CALL_(GetBltStatus,p,(p,a))
1895706f2543Smrg#define IDirectDrawSurface4_GetCaps(p,a)                 ICOM_CALL_(GetCaps,p,(p,a))
1896706f2543Smrg#define IDirectDrawSurface4_GetClipper(p,a)              ICOM_CALL_(GetClipper,p,(p,a))
1897706f2543Smrg#define IDirectDrawSurface4_GetColorKey(p,a,b)           ICOM_CALL_(GetColorKey,p,(p,a,b))
1898706f2543Smrg#define IDirectDrawSurface4_GetDC(p,a)                   ICOM_CALL_(GetDC,p,(p,a))
1899706f2543Smrg#define IDirectDrawSurface4_GetFlipStatus(p,a)           ICOM_CALL_(GetFlipStatus,p,(p,a))
1900706f2543Smrg#define IDirectDrawSurface4_GetOverlayPosition(p,a,b)    ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
1901706f2543Smrg#define IDirectDrawSurface4_GetPalette(p,a)              ICOM_CALL_(GetPalette,p,(p,a))
1902706f2543Smrg#define IDirectDrawSurface4_GetPixelFormat(p,a)          ICOM_CALL_(GetPixelFormat,p,(p,a))
1903706f2543Smrg#define IDirectDrawSurface4_GetSurfaceDesc(p,a)          ICOM_CALL_(GetSurfaceDesc,p,(p,a))
1904706f2543Smrg#define IDirectDrawSurface4_Initialize(p,a,b)            ICOM_CALL_(Initialize,p,(p,a,b))
1905706f2543Smrg#define IDirectDrawSurface4_IsLost(p)                    ICOM_CALL_(IsLost,p,(p))
1906706f2543Smrg#define IDirectDrawSurface4_Lock(p,a,b,c,d)              ICOM_CALL_(Lock,p,(p,a,b,c,d))
1907706f2543Smrg#define IDirectDrawSurface4_ReleaseDC(p,a)               ICOM_CALL_(ReleaseDC,p,(p,a))
1908706f2543Smrg#define IDirectDrawSurface4_Restore(p)                   ICOM_CALL_(Restore,p,(p))
1909706f2543Smrg#define IDirectDrawSurface4_SetClipper(p,a)              ICOM_CALL_(SetClipper,p,(p,a))
1910706f2543Smrg#define IDirectDrawSurface4_SetColorKey(p,a,b)           ICOM_CALL_(SetColorKey,p,(p,a,b))
1911706f2543Smrg#define IDirectDrawSurface4_SetOverlayPosition(p,a,b)    ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
1912706f2543Smrg#define IDirectDrawSurface4_SetPalette(p,a)              ICOM_CALL_(SetPalette,p,(p,a))
1913706f2543Smrg#define IDirectDrawSurface4_Unlock(p,a)                  ICOM_CALL_(Unlock,p,(p,a))
1914706f2543Smrg#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
1915706f2543Smrg#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a)    ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
1916706f2543Smrg#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b)   ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
1917706f2543Smrg/*** IDirectDrawSurface2 methods ***/
1918706f2543Smrg#define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
1919706f2543Smrg#define IDirectDrawSurface4_PageLock(p,a)       ICOM_CALL_(PageLock,p,(p,a))
1920706f2543Smrg#define IDirectDrawSurface4_PageUnlock(p,a)     ICOM_CALL_(PageUnlock,p,(p,a))
1921706f2543Smrg/*** IDirectDrawSurface3 methods ***/
1922706f2543Smrg#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b))
1923706f2543Smrg/*** IDirectDrawSurface4 methods ***/
1924706f2543Smrg#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL_(SetPrivateData,p,(p,a,b,c,d))
1925706f2543Smrg#define IDirectDrawSurface4_GetPrivateData(p,a,b,c)   ICOM_CALL_(GetPrivateData,p,(p,a,b,c))
1926706f2543Smrg#define IDirectDrawSurface4_FreePrivateData(p,a)      ICOM_CALL_(FreePrivateData,p,(p,a))
1927706f2543Smrg#define IDirectDrawSurface4_GetUniquenessValue(p,a)   ICOM_CALL_(GetUniquenessValue,p,(p,a))
1928706f2543Smrg#define IDirectDrawSurface4_ChangeUniquenessValue(p)  ICOM_CALL_(ChangeUniquenessValue,p,(p))
1929706f2543Smrg
1930706f2543Smrg
1931706f2543Smrg/*****************************************************************************
1932706f2543Smrg * IDirectDrawSurface7 interface
1933706f2543Smrg */
1934706f2543Smrg#undef INTERFACE
1935706f2543Smrg#define INTERFACE IDirectDrawSurface7
1936706f2543SmrgDECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown)
1937706f2543Smrg{
1938706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
1939706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1940706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
1941706f2543Smrg    STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE;
1942706f2543Smrg    STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1943706f2543Smrg    STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
1944706f2543Smrg    STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
1945706f2543Smrg    STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
1946706f2543Smrg    STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE;
1947706f2543Smrg    STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE;
1948706f2543Smrg    STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpfnCallback) PURE;
1949706f2543Smrg    STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
1950706f2543Smrg    STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE7* lplpDDAttachedSurface) PURE;
1951706f2543Smrg    STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1952706f2543Smrg    STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE;
1953706f2543Smrg    STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
1954706f2543Smrg    STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1955706f2543Smrg    STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
1956706f2543Smrg    STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1957706f2543Smrg    STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1958706f2543Smrg    STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
1959706f2543Smrg    STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
1960706f2543Smrg    STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
1961706f2543Smrg    STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
1962706f2543Smrg    STDMETHOD(IsLost)(THIS) PURE;
1963706f2543Smrg    STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
1964706f2543Smrg    STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1965706f2543Smrg    STDMETHOD(Restore)(THIS) PURE;
1966706f2543Smrg    STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
1967706f2543Smrg    STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
1968706f2543Smrg    STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1969706f2543Smrg    STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
1970706f2543Smrg    STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
1971706f2543Smrg    STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE7 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
1972706f2543Smrg    STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1973706f2543Smrg    STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSReference) PURE;
1974706f2543Smrg    /* added in v2 */
1975706f2543Smrg    STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
1976706f2543Smrg    STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
1977706f2543Smrg    STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
1978706f2543Smrg    /* added in v3 */
1979706f2543Smrg    STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSD, DWORD dwFlags) PURE;
1980706f2543Smrg    /* added in v4 */
1981706f2543Smrg    STDMETHOD(SetPrivateData)(THIS_ REFGUID , LPVOID , DWORD , DWORD ) PURE;
1982706f2543Smrg    STDMETHOD(GetPrivateData)(THIS_ REFGUID , LPVOID , LPDWORD ) PURE;
1983706f2543Smrg    STDMETHOD(FreePrivateData)(THIS_ REFGUID ) PURE;
1984706f2543Smrg    STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD ) PURE;
1985706f2543Smrg    STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
1986706f2543Smrg    /* added in v7 */
1987706f2543Smrg    STDMETHOD(SetPriority)(THIS_ DWORD prio) PURE;
1988706f2543Smrg    STDMETHOD(GetPriority)(THIS_ LPDWORD prio) PURE;
1989706f2543Smrg    STDMETHOD(SetLOD)(THIS_ DWORD lod) PURE;
1990706f2543Smrg    STDMETHOD(GetLOD)(THIS_ LPDWORD lod) PURE;
1991706f2543Smrg};
1992706f2543Smrg
1993706f2543Smrg    /*** IUnknown methods ***/
1994706f2543Smrg#define IDirectDrawSurface7_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
1995706f2543Smrg#define IDirectDrawSurface7_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
1996706f2543Smrg#define IDirectDrawSurface7_Release(p)            ICOM_CALL_(Release,p,(p))
1997706f2543Smrg/*** IDirectDrawSurface (almost) methods ***/
1998706f2543Smrg#define IDirectDrawSurface7_AddAttachedSurface(p,a)      ICOM_CALL_(AddAttachedSurface,p,(p,a))
1999706f2543Smrg#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a)     ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
2000706f2543Smrg#define IDirectDrawSurface7_Blt(p,a,b,c,d,e)             ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
2001706f2543Smrg#define IDirectDrawSurface7_BltBatch(p,a,b,c)            ICOM_CALL_(BltBatch,p,(p,a,b,c))
2002706f2543Smrg#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e)         ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
2003706f2543Smrg#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
2004706f2543Smrg#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b)  ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
2005706f2543Smrg#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
2006706f2543Smrg#define IDirectDrawSurface7_Flip(p,a,b)                  ICOM_CALL_(Flip,p,(p,a,b))
2007706f2543Smrg#define IDirectDrawSurface7_GetAttachedSurface(p,a,b)    ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
2008706f2543Smrg#define IDirectDrawSurface7_GetBltStatus(p,a)            ICOM_CALL_(GetBltStatus,p,(p,a))
2009706f2543Smrg#define IDirectDrawSurface7_GetCaps(p,a)                 ICOM_CALL_(GetCaps,p,(p,a))
2010706f2543Smrg#define IDirectDrawSurface7_GetClipper(p,a)              ICOM_CALL_(GetClipper,p,(p,a))
2011706f2543Smrg#define IDirectDrawSurface7_GetColorKey(p,a,b)           ICOM_CALL_(GetColorKey,p,(p,a,b))
2012706f2543Smrg#define IDirectDrawSurface7_GetDC(p,a)                   ICOM_CALL_(GetDC,p,(p,a))
2013706f2543Smrg#define IDirectDrawSurface7_GetFlipStatus(p,a)           ICOM_CALL_(GetFlipStatus,p,(p,a))
2014706f2543Smrg#define IDirectDrawSurface7_GetOverlayPosition(p,a,b)    ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
2015706f2543Smrg#define IDirectDrawSurface7_GetPalette(p,a)              ICOM_CALL_(GetPalette,p,(p,a))
2016706f2543Smrg#define IDirectDrawSurface7_GetPixelFormat(p,a)          ICOM_CALL_(GetPixelFormat,p,(p,a))
2017706f2543Smrg#define IDirectDrawSurface7_GetSurfaceDesc(p,a)          ICOM_CALL_(GetSurfaceDesc,p,(p,a))
2018706f2543Smrg#define IDirectDrawSurface7_Initialize(p,a,b)            ICOM_CALL_(Initialize,p,(p,a,b))
2019706f2543Smrg#define IDirectDrawSurface7_IsLost(p)                    ICOM_CALL_(IsLost,p,(p))
2020706f2543Smrg#define IDirectDrawSurface7_Lock(p,a,b,c,d)              ICOM_CALL_(Lock,p,(p,a,b,c,d))
2021706f2543Smrg#define IDirectDrawSurface7_ReleaseDC(p,a)               ICOM_CALL_(ReleaseDC,p,(p,a))
2022706f2543Smrg#define IDirectDrawSurface7_Restore(p)                   ICOM_CALL_(Restore,p,(p))
2023706f2543Smrg#define IDirectDrawSurface7_SetClipper(p,a)              ICOM_CALL_(SetClipper,p,(p,a))
2024706f2543Smrg#define IDirectDrawSurface7_SetColorKey(p,a,b)           ICOM_CALL_(SetColorKey,p,(p,a,b))
2025706f2543Smrg#define IDirectDrawSurface7_SetOverlayPosition(p,a,b)    ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
2026706f2543Smrg#define IDirectDrawSurface7_SetPalette(p,a)              ICOM_CALL_(SetPalette,p,(p,a))
2027706f2543Smrg#define IDirectDrawSurface7_Unlock(p,a)                  ICOM_CALL_(Unlock,p,(p,a))
2028706f2543Smrg#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
2029706f2543Smrg#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a)    ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
2030706f2543Smrg#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b)   ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
2031706f2543Smrg/*** IDirectDrawSurface2 methods ***/
2032706f2543Smrg#define IDirectDrawSurface7_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
2033706f2543Smrg#define IDirectDrawSurface7_PageLock(p,a)       ICOM_CALL_(PageLock,p,(p,a))
2034706f2543Smrg#define IDirectDrawSurface7_PageUnlock(p,a)     ICOM_CALL_(PageUnlock,p,(p,a))
2035706f2543Smrg/*** IDirectDrawSurface3 methods ***/
2036706f2543Smrg#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b))
2037706f2543Smrg/*** IDirectDrawSurface4 methods ***/
2038706f2543Smrg#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) ICOM_CALL_(SetPrivateData,p,(p,a,b,c,d))
2039706f2543Smrg#define IDirectDrawSurface7_GetPrivateData(p,a,b,c)   ICOM_CALL_(GetPrivateData,p,(p,a,b,c))
2040706f2543Smrg#define IDirectDrawSurface7_FreePrivateData(p,a)      ICOM_CALL_(FreePrivateData,p,(p,a))
2041706f2543Smrg#define IDirectDrawSurface7_GetUniquenessValue(p,a)   ICOM_CALL_(GetUniquenessValue,p,(p,a))
2042706f2543Smrg#define IDirectDrawSurface7_ChangeUniquenessValue(p)  ICOM_CALL_(ChangeUniquenessValue,p,(p))
2043706f2543Smrg/*** IDirectDrawSurface7 methods ***/
2044706f2543Smrg#define IDirectDrawSurface7_SetPriority(p,a)          ICOM_CALL_(SetPriority,p,(p,a))
2045706f2543Smrg#define IDirectDrawSurface7_GetPriority(p,a)          ICOM_CALL_(GetPriority,p,(p,a))
2046706f2543Smrg#define IDirectDrawSurface7_SetLOD(p,a)               ICOM_CALL_(SetLOD,p,(p,a))
2047706f2543Smrg#define IDirectDrawSurface7_GetLOD(p,a)               ICOM_CALL_(GetLOD,p,(p,a))
2048706f2543Smrg
2049706f2543Smrg/*****************************************************************************
2050706f2543Smrg * IDirectDrawColorControl interface
2051706f2543Smrg */
2052706f2543Smrg#undef INTERFACE
2053706f2543Smrg#define INTERFACE IDirectDrawColorControl
2054706f2543SmrgDECLARE_INTERFACE_(IDirectDrawColorControl,IUnknown)
2055706f2543Smrg{
2056706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
2057706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2058706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
2059706f2543Smrg    STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE;
2060706f2543Smrg    STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE;
2061706f2543Smrg};
2062706f2543Smrg
2063706f2543Smrg	/*** IUnknown methods ***/
2064706f2543Smrg#define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
2065706f2543Smrg#define IDirectDrawColorControl_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
2066706f2543Smrg#define IDirectDrawColorControl_Release(p)            ICOM_CALL_(Release,p,(p))
2067706f2543Smrg	/*** IDirectDrawColorControl methods ***/
2068706f2543Smrg#define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL_(GetColorControls,p,(p,a))
2069706f2543Smrg#define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL_(SetColorControls,p,(p,a))
2070706f2543Smrg
2071706f2543Smrg/*****************************************************************************
2072706f2543Smrg * IDirectDrawGammaControl interface
2073706f2543Smrg */
2074706f2543Smrg#undef INTERFACE
2075706f2543Smrg#define INTERFACE IDirectDrawGammaControl
2076706f2543SmrgDECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown)
2077706f2543Smrg{
2078706f2543Smrg    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
2079706f2543Smrg    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2080706f2543Smrg    STDMETHOD_(ULONG,Release)(THIS) PURE;
2081706f2543Smrg    STDMETHOD(GetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE;
2082706f2543Smrg    STDMETHOD(SetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE;
2083706f2543Smrg};
2084706f2543Smrg
2085706f2543Smrg	/*** IUnknown methods ***/
2086706f2543Smrg#define IDirectDrawGammaControl_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
2087706f2543Smrg#define IDirectDrawGammaControl_AddRef(p)             ICOM_CALL_(AddRef,p,(p))
2088706f2543Smrg#define IDirectDrawGammaControl_Release(p)            ICOM_CALL_(Release,p,(p))
2089706f2543Smrg	/*** IDirectDrawGammaControl methods ***/
2090706f2543Smrg#define IDirectDrawGammaControl_GetGammaRamp(p,a,b)   ICOM_CALL_(GetGammaRamp,p,(p,a,b))
2091706f2543Smrg#define IDirectDrawGammaControl_SetGammaRamp(p,a,b)   ICOM_CALL_(SetGammaRamp,p,(p,a,b))
2092706f2543Smrg
2093706f2543Smrg
2094706f2543SmrgHRESULT WINAPI DirectDrawCreate(LPGUID,LPDIRECTDRAW*,LPUNKNOWN);
2095706f2543SmrgHRESULT WINAPI DirectDrawCreateEx(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
2096706f2543SmrgHRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA,LPVOID);
2097706f2543SmrgHRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW,LPVOID);
2098706f2543Smrg#define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
2099706f2543SmrgHRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,LPUNKNOWN);
2100706f2543Smrg
2101706f2543Smrg
2102706f2543Smrg#ifdef __cplusplus
2103706f2543Smrg} /* extern "C" */
2104706f2543Smrg#endif /* defined(__cplusplus) */
2105706f2543Smrg
2106706f2543Smrg#endif /* __XWIN_DDRAW_H */
2107