blob: 79207464b97fe1891042964f62fd0afa1ba1b427 [file] [log] [blame]
Alexandre Julliard02e90081998-01-04 17:49:09 +00001#ifndef __WINE_DDRAW_H
2#define __WINE_DDRAW_H
3
Patrik Stridvall151170c1998-12-26 12:00:43 +00004#include <X11/Xlib.h>
Alexandre Julliard642d3131998-07-12 19:29:36 +00005#ifdef HAVE_LIBXXSHM
Patrik Stridvall151170c1998-12-26 12:00:43 +00006#include <X11/extensions/XShm.h>
7#endif /* defined(HAVE_LIBXXSHM) */
Patrik Stridvall8d8703c1999-02-04 14:05:38 +00008
Michael Veksler3fbb8dc1999-02-21 18:23:26 +00009#include "winnt.h" /* LARGE_INTEGER ... */
Marcus Meissner317af321999-02-17 13:51:06 +000010#include "wingdi.h" /* PALETTE stuff ... */
Patrik Stridvall8d8703c1999-02-04 14:05:38 +000011#include "wine/obj_base.h"
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000012
Patrik Stridvall14da7b11999-06-12 10:53:06 +000013#ifdef __cplusplus
14extern "C" {
15#endif /* defined(__cplusplus) */
16
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000017#ifndef DIRECTDRAW_VERSION
18#define DIRECTDRAW_VERSION 0x0500
19#endif /* DIRECTDRAW_VERSION */
Alexandre Julliard02e90081998-01-04 17:49:09 +000020
Francois Gouget81de59a1999-03-27 16:48:25 +000021/*****************************************************************************
22 * Predeclare the interfaces
23 */
Alexandre Julliard02e90081998-01-04 17:49:09 +000024DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
25DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
26DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
27DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
Lionel Ulmer1b95d731999-02-02 13:27:38 +000028DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
Alexandre Julliard02e90081998-01-04 17:49:09 +000029DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
30DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000031DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
Lionel Ulmer1b95d731999-02-02 13:27:38 +000032DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
Alexandre Julliard02e90081998-01-04 17:49:09 +000033DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
34DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000035DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
Alexandre Julliard02e90081998-01-04 17:49:09 +000036
37typedef struct IDirectDraw IDirectDraw,*LPDIRECTDRAW;
38typedef struct IDirectDraw2 IDirectDraw2,*LPDIRECTDRAW2;
Lionel Ulmer1b95d731999-02-02 13:27:38 +000039typedef struct IDirectDraw4 IDirectDraw4,*LPDIRECTDRAW4;
Alexandre Julliard02e90081998-01-04 17:49:09 +000040typedef struct IDirectDrawClipper IDirectDrawClipper,*LPDIRECTDRAWCLIPPER;
41typedef struct IDirectDrawPalette IDirectDrawPalette,*LPDIRECTDRAWPALETTE;
42typedef struct IDirectDrawSurface IDirectDrawSurface,*LPDIRECTDRAWSURFACE;
43typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000044typedef struct IDirectDrawSurface3 IDirectDrawSurface3,*LPDIRECTDRAWSURFACE3;
Lionel Ulmer1b95d731999-02-02 13:27:38 +000045typedef struct IDirectDrawSurface4 IDirectDrawSurface4,*LPDIRECTDRAWSURFACE4;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000046typedef struct IDirectDrawColorControl IDirectDrawColorControl,*LPDIRECTDRAWCOLORCONTROL;
Alexandre Julliard02e90081998-01-04 17:49:09 +000047
Francois Gouget81de59a1999-03-27 16:48:25 +000048
Alexandre Julliard0623a6f1998-01-18 18:01:49 +000049#define DDENUMRET_CANCEL 0
50#define DDENUMRET_OK 1
51
52#define DD_OK 0
53
54
Alexandre Julliard02e90081998-01-04 17:49:09 +000055#define _FACDD 0x876
56#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
57
58#define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
59#define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
60#define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
61#define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
62#define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
63#define DDERR_GENERIC E_FAIL
64#define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
65#define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
66#define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
67#define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
68#define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
69#define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
70#define DDERR_INVALIDPARAMS E_INVALIDARG
71#define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
72#define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
73#define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
74#define DDERR_NO3D MAKE_DDHRESULT( 170 )
75#define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
76#define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
77#define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
78#define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
79#define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
80#define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
81#define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
82#define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
83#define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
84#define DDERR_NOGDI MAKE_DDHRESULT( 240 )
85#define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
86#define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
87#define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
88#define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
89#define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
90#define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
91#define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
92#define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
93#define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
94#define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
95#define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
96#define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
97#define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
98#define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
99#define DDERR_OUTOFMEMORY E_OUTOFMEMORY
100#define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
101#define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
102#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
103#define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
104#define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
105#define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
106#define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
107#define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
108#define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
109#define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
110#define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
111#define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
112#define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
113#define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
114#define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
115#define DDERR_UNSUPPORTED E_NOTIMPL
116#define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
117#define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
118#define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
119#define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
120#define DDERR_XALIGN MAKE_DDHRESULT( 560 )
121#define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
122#define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
123#define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
124#define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
125#define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
126#define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
127#define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
128#define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
129#define DDERR_NOHWND MAKE_DDHRESULT( 569 )
130#define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
131#define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
132#define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
133#define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
134#define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
135#define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
136#define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
137#define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
138#define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
139#define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
140#define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
141#define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
142#define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
143#define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
144#define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
145#define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
146#define DDERR_NODC MAKE_DDHRESULT( 586 )
147#define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
148#define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
149#define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
150#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
151#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
152#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000153#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
154#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
155#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
Alexandre Julliard02e90081998-01-04 17:49:09 +0000156#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000157#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
Alexandre Julliard02e90081998-01-04 17:49:09 +0000158#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
159#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
160#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000161#define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
162#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
163#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
Alexandre Julliard02e90081998-01-04 17:49:09 +0000164#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
165
166/* dwFlags for Blt* */
167#define DDBLT_ALPHADEST 0x00000001
168#define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
169#define DDBLT_ALPHADESTNEG 0x00000004
170#define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
171#define DDBLT_ALPHAEDGEBLEND 0x00000010
172#define DDBLT_ALPHASRC 0x00000020
173#define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
174#define DDBLT_ALPHASRCNEG 0x00000080
175#define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
176#define DDBLT_ASYNC 0x00000200
177#define DDBLT_COLORFILL 0x00000400
178#define DDBLT_DDFX 0x00000800
179#define DDBLT_DDROPS 0x00001000
180#define DDBLT_KEYDEST 0x00002000
181#define DDBLT_KEYDESTOVERRIDE 0x00004000
182#define DDBLT_KEYSRC 0x00008000
183#define DDBLT_KEYSRCOVERRIDE 0x00010000
184#define DDBLT_ROP 0x00020000
185#define DDBLT_ROTATIONANGLE 0x00040000
186#define DDBLT_ZBUFFER 0x00080000
187#define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
188#define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
189#define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
190#define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
191#define DDBLT_WAIT 0x01000000
192#define DDBLT_DEPTHFILL 0x02000000
193
194/* dwTrans for BltFast */
195#define DDBLTFAST_NOCOLORKEY 0x00000000
196#define DDBLTFAST_SRCCOLORKEY 0x00000001
197#define DDBLTFAST_DESTCOLORKEY 0x00000002
198#define DDBLTFAST_WAIT 0x00000010
199
200/* dwFlags for Flip */
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000201#define DDFLIP_WAIT 0x00000001
202#define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
203#define DDFLIP_ODD 0x00000004 /* only valid for overlay */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000204
205/* dwFlags for GetBltStatus */
206#define DDGBS_CANBLT 0x00000001
207#define DDGBS_ISBLTDONE 0x00000002
208
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000209/* DDSCAPS.dwCaps */
210/* reserved1, was 3d capable */
211#define DDSCAPS_RESERVED1 0x00000001
Alexandre Julliard02e90081998-01-04 17:49:09 +0000212/* surface contains alpha information */
213#define DDSCAPS_ALPHA 0x00000002
214/* this surface is a backbuffer */
215#define DDSCAPS_BACKBUFFER 0x00000004
216/* complex surface structure */
217#define DDSCAPS_COMPLEX 0x00000008
218/* part of surface flipping structure */
219#define DDSCAPS_FLIP 0x00000010
220/* this surface is the frontbuffer surface */
221#define DDSCAPS_FRONTBUFFER 0x00000020
222/* this is a plain offscreen surface */
223#define DDSCAPS_OFFSCREENPLAIN 0x00000040
224/* overlay */
225#define DDSCAPS_OVERLAY 0x00000080
226/* palette objects can be created and attached to us */
227#define DDSCAPS_PALETTE 0x00000100
228/* primary surface (the one the user looks at currently)(right eye)*/
229#define DDSCAPS_PRIMARYSURFACE 0x00000200
230/* primary surface for left eye */
231#define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
232/* surface exists in systemmemory */
233#define DDSCAPS_SYSTEMMEMORY 0x00000800
234/* surface can be used as a texture */
235#define DDSCAPS_TEXTURE 0x00001000
236/* surface may be destination for 3d rendering */
237#define DDSCAPS_3DDEVICE 0x00002000
238/* surface exists in videomemory */
239#define DDSCAPS_VIDEOMEMORY 0x00004000
240/* surface changes immediately visible */
241#define DDSCAPS_VISIBLE 0x00008000
242/* write only surface */
243#define DDSCAPS_WRITEONLY 0x00010000
244/* zbuffer surface */
245#define DDSCAPS_ZBUFFER 0x00020000
246/* has its own DC */
247#define DDSCAPS_OWNDC 0x00040000
248/* surface should be able to receive live video */
249#define DDSCAPS_LIVEVIDEO 0x00080000
250/* should be able to have a hw codec decompress stuff into it */
251#define DDSCAPS_HWCODEC 0x00100000
252/* mode X (320x200 or 320x240) surface */
253#define DDSCAPS_MODEX 0x00200000
254/* one mipmap surface (1 level) */
255#define DDSCAPS_MIPMAP 0x00400000
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000256#define DDSCAPS_RESERVED2 0x00800000
Alexandre Julliard02e90081998-01-04 17:49:09 +0000257/* memory allocation delayed until Load() */
258#define DDSCAPS_ALLOCONLOAD 0x04000000
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000259/* Indicates that the surface will recieve data from a video port */
260#define DDSCAPS_VIDEOPORT 0x08000000
261/* surface is in local videomemory */
262#define DDSCAPS_LOCALVIDMEM 0x10000000
263/* surface is in nonlocal videomemory */
264#define DDSCAPS_NONLOCALVIDMEM 0x20000000
265/* surface is a standard VGA mode surface (NOT ModeX) */
266#define DDSCAPS_STANDARDVGAMODE 0x40000000
267/* optimized? surface */
268#define DDSCAPS_OPTIMIZED 0x80000000
Alexandre Julliard02e90081998-01-04 17:49:09 +0000269
270typedef struct _DDSCAPS {
271 DWORD dwCaps; /* capabilities of surface wanted */
272} DDSCAPS,*LPDDSCAPS;
273
274#define DD_ROP_SPACE (256/32) /* space required to store ROP array */
275
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000276typedef struct _DDCAPS_DX3
Alexandre Julliard02e90081998-01-04 17:49:09 +0000277{
278 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
279 DWORD dwCaps; /* driver specific capabilities */
280 DWORD dwCaps2; /* more driver specific capabilites */
281 DWORD dwCKeyCaps; /* color key capabilities of the surface */
282 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
283 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
284 DWORD dwPalCaps; /* palette capabilities */
285 DWORD dwSVCaps; /* stereo vision capabilities */
286 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
287 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
288 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
289 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
290 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
291 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
292 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
293 DWORD dwVidMemTotal; /* total amount of video memory */
294 DWORD dwVidMemFree; /* amount of free video memory */
295 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
296 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
297 DWORD dwNumFourCCCodes; /* number of four cc codes */
298 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
299 DWORD dwAlignSizeSrc; /* source rectangle byte size */
300 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
301 DWORD dwAlignSizeDest; /* dest rectangle byte size */
302 DWORD dwAlignStrideAlign; /* stride alignment */
303 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
304 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
305 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
306 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
307 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
308 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
309 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
310 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
311 DWORD dwReserved1;
312 DWORD dwReserved2;
313 DWORD dwReserved3;
314 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
315 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
316 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
317 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
318 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
319 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
320 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
321 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
322 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
323 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
324 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
325 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
326 DWORD dwReserved4;
327 DWORD dwReserved5;
328 DWORD dwReserved6;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000329} DDCAPS_DX3,*LPDDCAPS_DX3;
330
331typedef struct _DDCAPS
332{
333/* 0*/ DWORD dwSize; /* size of the DDDRIVERCAPS structure */
334/* 4*/ DWORD dwCaps; /* driver specific capabilities */
335/* 8*/ DWORD dwCaps2; /* more driver specific capabilites */
336/* c*/ DWORD dwCKeyCaps; /* color key capabilities of the surface */
337/* 10*/ DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
338/* 14*/ DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
339/* 18*/ DWORD dwPalCaps; /* palette capabilities */
340/* 1c*/ DWORD dwSVCaps; /* stereo vision capabilities */
341/* 20*/ DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
342/* 24*/ DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
343/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
344/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
345/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
346/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
347/* 38*/ DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
348/* 3c*/ DWORD dwVidMemTotal; /* total amount of video memory */
349/* 40*/ DWORD dwVidMemFree; /* amount of free video memory */
350/* 44*/ DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
351/* 48*/ DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
352/* 4c*/ DWORD dwNumFourCCCodes; /* number of four cc codes */
353/* 50*/ DWORD dwAlignBoundarySrc; /* source rectangle alignment */
354/* 54*/ DWORD dwAlignSizeSrc; /* source rectangle byte size */
355/* 58*/ DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
356/* 5c*/ DWORD dwAlignSizeDest; /* dest rectangle byte size */
357/* 60*/ DWORD dwAlignStrideAlign; /* stride alignment */
358/* 64*/ DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
359/* 84*/ DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
360/* 88*/ DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
361/* 8c*/ DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
362/* 90*/ DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
363/* 94*/ DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
364/* 98*/ DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
365/* 9c*/ DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
366/* a0*/ DWORD dwReserved1;
367/* a4*/ DWORD dwReserved2;
368/* a8*/ DWORD dwReserved3;
369/* ac*/ DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
370/* b0*/ DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
371/* b4*/ DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
372/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
373/* d8*/ DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
374/* dc*/ DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
375/* e0*/ DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
376/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
377/*104*/ DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
378/*108*/ DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
379/*10c*/ DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
380/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
381#if DIRECTDRAW_VERSION >= 0x0500
382/*130*/ DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
383/*134*/ DWORD dwCurrVideoPorts;/* current number of video ports used */
384/*138*/ DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
385/*13c*/ DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
386/*140*/ DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
387/*144*/ DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
388/*148*/ DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
389/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE];/* ROPS supported for non-local->local blts */
390#else /* DIRECTDRAW_VERSION >= 0x0500 */
391/*130*/ DWORD dwReserved4;
392/*134*/ DWORD dwReserved5;
393/*138*/ DWORD dwReserved6;
394#endif /* DIRECTDRAW_VERSION >= 0x0500 */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000395} DDCAPS,*LPDDCAPS;
396
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000397
398/* DDCAPS.dwCaps */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000399#define DDCAPS_3D 0x00000001
Alexandre Julliard02e90081998-01-04 17:49:09 +0000400#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
401#define DDCAPS_ALIGNSIZEDEST 0x00000004
402#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
403#define DDCAPS_ALIGNSIZESRC 0x00000010
404#define DDCAPS_ALIGNSTRIDE 0x00000020
405#define DDCAPS_BLT 0x00000040
406#define DDCAPS_BLTQUEUE 0x00000080
407#define DDCAPS_BLTFOURCC 0x00000100
408#define DDCAPS_BLTSTRETCH 0x00000200
409#define DDCAPS_GDI 0x00000400
410#define DDCAPS_OVERLAY 0x00000800
411#define DDCAPS_OVERLAYCANTCLIP 0x00001000
412#define DDCAPS_OVERLAYFOURCC 0x00002000
413#define DDCAPS_OVERLAYSTRETCH 0x00004000
414#define DDCAPS_PALETTE 0x00008000
415#define DDCAPS_PALETTEVSYNC 0x00010000
416#define DDCAPS_READSCANLINE 0x00020000
417#define DDCAPS_STEREOVIEW 0x00040000
418#define DDCAPS_VBI 0x00080000
419#define DDCAPS_ZBLTS 0x00100000
420#define DDCAPS_ZOVERLAYS 0x00200000
421#define DDCAPS_COLORKEY 0x00400000
422#define DDCAPS_ALPHA 0x00800000
423#define DDCAPS_COLORKEYHWASSIST 0x01000000
424#define DDCAPS_NOHARDWARE 0x02000000
425#define DDCAPS_BLTCOLORFILL 0x04000000
426#define DDCAPS_BANKSWITCHED 0x08000000
427#define DDCAPS_BLTDEPTHFILL 0x10000000
428#define DDCAPS_CANCLIP 0x20000000
429#define DDCAPS_CANCLIPSTRETCHED 0x40000000
430#define DDCAPS_CANBLTSYSMEM 0x80000000
431
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000432/* DDCAPS.dwCaps2 */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000433#define DDCAPS2_CERTIFIED 0x00000001
Alexandre Julliard02e90081998-01-04 17:49:09 +0000434#define DDCAPS2_NO2DDURING3DSCENE 0x00000002
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000435#define DDCAPS2_VIDEOPORT 0x00000004
436#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
437#define DDCAPS2_CANBOBINTERLEAVED 0x00000010
438#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
439#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
440#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
441#define DDCAPS2_CANDROPZ16BIT 0x00000100
442#define DDCAPS2_NONLOCALVIDMEM 0x00000200
443#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
444#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
445#define DDCAPS2_WIDESURFACES 0x00001000
446#define DDCAPS2_CANFLIPODDEVEN 0x00002000
447#define DDCAPS2_CANBOBHARDWARE 0x00004000
Alexandre Julliard02e90081998-01-04 17:49:09 +0000448
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000449
450/* Set/Get Colour Key Flags */
Peter Hunnisett34499cc1998-10-17 12:22:49 +0000451#define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000452#define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
453#define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
454#define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
455#define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
456
Alexandre Julliard02e90081998-01-04 17:49:09 +0000457typedef struct _DDCOLORKEY
458{
459 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
460 * be treated as Color Key, inclusive
461 */
462 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
463 * to be treated as Color Key, inclusive
464 */
465} DDCOLORKEY,*LPDDCOLORKEY;
466
467/* ddCKEYCAPS bits */
468#define DDCKEYCAPS_DESTBLT 0x00000001
469#define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
470#define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
471#define DDCKEYCAPS_DESTBLTYUV 0x00000008
472#define DDCKEYCAPS_DESTOVERLAY 0x00000010
473#define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
474#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
475#define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
476#define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
477#define DDCKEYCAPS_SRCBLT 0x00000200
478#define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
479#define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
480#define DDCKEYCAPS_SRCBLTYUV 0x00001000
481#define DDCKEYCAPS_SRCOVERLAY 0x00002000
482#define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
483#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
484#define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
485#define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
486#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
487
488typedef struct _DDPIXELFORMAT {
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000489 DWORD dwSize; /* 0: size of structure */
490 DWORD dwFlags; /* 4: pixel format flags */
491 DWORD dwFourCC; /* 8: (FOURCC code) */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000492 union {
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000493 DWORD dwRGBBitCount; /* C: how many bits per pixel */
494 DWORD dwYUVBitCount; /* C: how many bits per pixel */
495 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
496 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
Jim Astone0f604a1999-10-23 16:55:28 +0000497 } DUMMYUNIONNAME;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000498 union {
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000499 DWORD dwRBitMask; /* 10: mask for red bit*/
500 DWORD dwYBitMask; /* 10: mask for Y bits*/
Jim Astone0f604a1999-10-23 16:55:28 +0000501 } DUMMYUNIONNAME1;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000502 union {
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000503 DWORD dwGBitMask; /* 14: mask for green bits*/
504 DWORD dwUBitMask; /* 14: mask for U bits*/
Jim Astone0f604a1999-10-23 16:55:28 +0000505 } DUMMYUNIONNAME2;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000506 union {
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000507 DWORD dwBBitMask; /* 18: mask for blue bits*/
508 DWORD dwVBitMask; /* 18: mask for V bits*/
Jim Astone0f604a1999-10-23 16:55:28 +0000509 } DUMMYUNIONNAME3;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000510 union {
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000511 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
512 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
513 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
514 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
Jim Astone0f604a1999-10-23 16:55:28 +0000515 } DUMMYUNIONNAME4;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000516 /* 20: next structure */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000517} DDPIXELFORMAT,*LPDDPIXELFORMAT;
518
519/* DDCAPS.dwFXCaps */
520#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
521#define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
522#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
523#define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
524#define DDFXCAPS_BLTROTATION 0x00000100
525#define DDFXCAPS_BLTROTATION90 0x00000200
526#define DDFXCAPS_BLTSHRINKX 0x00000400
527#define DDFXCAPS_BLTSHRINKXN 0x00000800
528#define DDFXCAPS_BLTSHRINKY 0x00001000
529#define DDFXCAPS_BLTSHRINKYN 0x00002000
530#define DDFXCAPS_BLTSTRETCHX 0x00004000
531#define DDFXCAPS_BLTSTRETCHXN 0x00008000
532#define DDFXCAPS_BLTSTRETCHY 0x00010000
533#define DDFXCAPS_BLTSTRETCHYN 0x00020000
534#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
535#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
536#define DDFXCAPS_OVERLAYSHRINKX 0x00080000
537#define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
538#define DDFXCAPS_OVERLAYSHRINKY 0x00200000
539#define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
540#define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
541#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
542#define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
543#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
544#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
545#define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
546
547/* DDCAPS.dwFXAlphaCaps */
548#define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
549#define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
550#define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
551#define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
552#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
553#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
554#define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
555#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
556#define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
557#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
558
559/* DDCAPS.dwPalCaps */
560#define DDPCAPS_4BIT 0x00000001
561#define DDPCAPS_8BITENTRIES 0x00000002
562#define DDPCAPS_8BIT 0x00000004
563#define DDPCAPS_INITIALIZE 0x00000008
564#define DDPCAPS_PRIMARYSURFACE 0x00000010
565#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
566#define DDPCAPS_ALLOW256 0x00000040
567#define DDPCAPS_VSYNC 0x00000080
568#define DDPCAPS_1BIT 0x00000100
569#define DDPCAPS_2BIT 0x00000200
Lionel Ulmer4ef92511999-02-05 10:23:37 +0000570#define DDPCAPS_ALPHA 0x00000400
Alexandre Julliard02e90081998-01-04 17:49:09 +0000571
572/* DDCAPS.dwSVCaps */
573#define DDSVCAPS_ENIGMA 0x00000001l
574#define DDSVCAPS_FLICKER 0x00000002l
575#define DDSVCAPS_REDBLUE 0x00000004l
576#define DDSVCAPS_SPLIT 0x00000008l
577
578/* BitDepths */
579#define DDBD_1 0x00004000
580#define DDBD_2 0x00002000
581#define DDBD_4 0x00001000
582#define DDBD_8 0x00000800
583#define DDBD_16 0x00000400
584#define DDBD_24 0x00000200
585#define DDBD_32 0x00000100
586
587/* DDOVERLAYFX.dwDDFX */
588#define DDOVERFX_ARITHSTRETCHY 0x00000001
589#define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
590#define DDOVERFX_MIRRORUPDOWN 0x00000004
591
592/* DDCOLORKEY.dwFlags */
593#define DDPF_ALPHAPIXELS 0x00000001
594#define DDPF_ALPHA 0x00000002
595#define DDPF_FOURCC 0x00000004
596#define DDPF_PALETTEINDEXED4 0x00000008
597#define DDPF_PALETTEINDEXEDTO8 0x00000010
598#define DDPF_PALETTEINDEXED8 0x00000020
599#define DDPF_RGB 0x00000040
600#define DDPF_COMPRESSED 0x00000080
601#define DDPF_RGBTOYUV 0x00000100
602#define DDPF_YUV 0x00000200
603#define DDPF_ZBUFFER 0x00000400
604#define DDPF_PALETTEINDEXED1 0x00000800
605#define DDPF_PALETTEINDEXED2 0x00001000
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000606#define DDPF_ZPIXELS 0x00002000
Alexandre Julliard02e90081998-01-04 17:49:09 +0000607
608/* SetCooperativeLevel dwFlags */
609#define DDSCL_FULLSCREEN 0x00000001
610#define DDSCL_ALLOWREBOOT 0x00000002
611#define DDSCL_NOWINDOWCHANGES 0x00000004
612#define DDSCL_NORMAL 0x00000008
613#define DDSCL_EXCLUSIVE 0x00000010
614#define DDSCL_ALLOWMODEX 0x00000040
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000615#define DDSCL_SETFOCUSWINDOW 0x00000080
616#define DDSCL_SETDEVICEWINDOW 0x00000100
617#define DDSCL_CREATEDEVICEWINDOW 0x00000200
Alexandre Julliard02e90081998-01-04 17:49:09 +0000618
Alexandre Julliard02e90081998-01-04 17:49:09 +0000619
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000620/* DDSURFACEDESC.dwFlags */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000621#define DDSD_CAPS 0x00000001
622#define DDSD_HEIGHT 0x00000002
623#define DDSD_WIDTH 0x00000004
624#define DDSD_PITCH 0x00000008
625#define DDSD_BACKBUFFERCOUNT 0x00000020
626#define DDSD_ZBUFFERBITDEPTH 0x00000040
627#define DDSD_ALPHABITDEPTH 0x00000080
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000628#define DDSD_LPSURFACE 0x00000800
Alexandre Julliard02e90081998-01-04 17:49:09 +0000629#define DDSD_PIXELFORMAT 0x00001000
630#define DDSD_CKDESTOVERLAY 0x00002000
631#define DDSD_CKDESTBLT 0x00004000
632#define DDSD_CKSRCOVERLAY 0x00008000
633#define DDSD_CKSRCBLT 0x00010000
634#define DDSD_MIPMAPCOUNT 0x00020000
635#define DDSD_REFRESHRATE 0x00040000
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000636#define DDSD_LINEARSIZE 0x00080000
637#define DDSD_ALL 0x000ff9ee
638
Peter Hunnisett2d37e9b1998-12-24 16:28:57 +0000639/* EnumSurfaces flags */
640#define DDENUMSURFACES_ALL 0x00000001
641#define DDENUMSURFACES_MATCH 0x00000002
642#define DDENUMSURFACES_NOMATCH 0x00000004
643#define DDENUMSURFACES_CANBECREATED 0x00000008
644#define DDENUMSURFACES_DOESEXIST 0x00000010
645
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000646/* SetDisplayMode flags */
647#define DDSDM_STANDARDVGAMODE 0x00000001
648
649/* EnumDisplayModes flags */
650#define DDEDM_REFRESHRATES 0x00000001
651#define DDEDM_STANDARDVGAMODES 0x00000002
652
653
654typedef struct _DDSURFACEDESC
655{
656 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
657 DWORD dwFlags; /* 4: determines what fields are valid*/
658 DWORD dwHeight; /* 8: height of surface to be created*/
659 DWORD dwWidth; /* C: width of input surface*/
660 LONG lPitch; /*10: distance to start of next line (return value only)*/
661 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
662 union {
663 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
664 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
665 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
Jim Astone0f604a1999-10-23 16:55:28 +0000666 } DUMMYUNIONNAME;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000667 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
668 DWORD dwReserved; /* 20:reserved*/
669 union {
670 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
671 DWORD dwLinearSize; /* 24:Formless late-allocated optimized surface size*/
Jim Astone0f604a1999-10-23 16:55:28 +0000672 } DUMMYUNIONNAME1;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000673 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
674 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
675 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
676 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
677 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
678 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
679} DDSURFACEDESC,*LPDDSURFACEDESC;
680
681/* DDCOLORCONTROL.dwFlags */
682#define DDCOLOR_BRIGHTNESS 0x00000001
683#define DDCOLOR_CONTRAST 0x00000002
684#define DDCOLOR_HUE 0x00000004
685#define DDCOLOR_SATURATION 0x00000008
686#define DDCOLOR_SHARPNESS 0x00000010
687#define DDCOLOR_GAMMA 0x00000020
688#define DDCOLOR_COLORENABLE 0x00000040
689
690typedef struct {
691 DWORD dwSize;
692 DWORD dwFlags;
693 LONG lBrightness;
694 LONG lContrast;
695 LONG lHue;
696 LONG lSaturation;
697 LONG lSharpness;
698 LONG lGamma;
699 LONG lColorEnable;
700 DWORD dwReserved1;
701} DDCOLORCONTROL,*LPDDCOLORCONTROL;
702
Alexandre Julliarda3960291999-02-26 11:11:13 +0000703typedef BOOL (CALLBACK * LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
704typedef BOOL (CALLBACK * LPDDENUMCALLBACKW)(GUID *, LPWSTR, LPWSTR, LPVOID);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000705DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000706
707typedef HRESULT (CALLBACK * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
708typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
709
Alexandre Julliarda3960291999-02-26 11:11:13 +0000710typedef BOOL (CALLBACK * LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
711typedef BOOL (CALLBACK * LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000712DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000713
Alexandre Julliarda3960291999-02-26 11:11:13 +0000714HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
715HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000716
717/* flags for DirectDrawEnumerateEx */
718#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
719#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
720#define DDENUM_NONDISPLAYDEVICES 0x00000004
Alexandre Julliard02e90081998-01-04 17:49:09 +0000721
722typedef struct _DDBLTFX
723{
724 DWORD dwSize; /* size of structure */
725 DWORD dwDDFX; /* FX operations */
726 DWORD dwROP; /* Win32 raster operations */
727 DWORD dwDDROP; /* Raster operations new for DirectDraw */
728 DWORD dwRotationAngle; /* Rotation angle for blt */
729 DWORD dwZBufferOpCode; /* ZBuffer compares */
730 DWORD dwZBufferLow; /* Low limit of Z buffer */
731 DWORD dwZBufferHigh; /* High limit of Z buffer */
732 DWORD dwZBufferBaseDest; /* Destination base value */
733 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
734 union
735 {
736 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
737 LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
Jim Astone0f604a1999-10-23 16:55:28 +0000738 } DUMMYUNIONNAME;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000739 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
740 union
741 {
742 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
743 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
Jim Astone0f604a1999-10-23 16:55:28 +0000744 } DUMMYUNIONNAME1;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000745 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
746 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
747 DWORD dwReserved;
748 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
749 union
750 {
751 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
752 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
Jim Astone0f604a1999-10-23 16:55:28 +0000753 } DUMMYUNIONNAME2;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000754 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
755 union
756 {
757 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
758 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
Jim Astone0f604a1999-10-23 16:55:28 +0000759 } DUMMYUNIONNAME3;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000760 union
761 {
762 DWORD dwFillColor; /* color in RGB or Palettized */
763 DWORD dwFillDepth; /* depth value for z-buffer */
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000764 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000765 LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
Jim Astone0f604a1999-10-23 16:55:28 +0000766 } DUMMYUNIONNAME4;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000767 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
768 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
769} DDBLTFX,*LPDDBLTFX;
770
771/* dwDDFX */
772/* arithmetic stretching along y axis */
773#define DDBLTFX_ARITHSTRETCHY 0x00000001
774/* mirror on y axis */
775#define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
776/* mirror on x axis */
777#define DDBLTFX_MIRRORUPDOWN 0x00000004
778/* do not tear */
779#define DDBLTFX_NOTEARING 0x00000008
780/* 180 degrees clockwise rotation */
781#define DDBLTFX_ROTATE180 0x00000010
782/* 270 degrees clockwise rotation */
783#define DDBLTFX_ROTATE270 0x00000020
784/* 90 degrees clockwise rotation */
785#define DDBLTFX_ROTATE90 0x00000040
786/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
787#define DDBLTFX_ZBUFFERRANGE 0x00000080
788/* add dwZBufferBaseDest to every source z value before compare */
789#define DDBLTFX_ZBUFFERBASEDEST 0x00000100
790
791typedef struct _DDOVERLAYFX
792{
793 DWORD dwSize; /* size of structure */
794 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
795 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
796 DWORD dwReserved;
797 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
798 union
799 {
800 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
801 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
Jim Astone0f604a1999-10-23 16:55:28 +0000802 } DUMMYUNIONNAME;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000803 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
804 union
805 {
806 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
807 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
Jim Astone0f604a1999-10-23 16:55:28 +0000808 } DUMMYUNIONNAME1;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000809 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
810 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
811 DWORD dwDDFX; /* Overlay FX */
812 DWORD dwFlags; /* flags */
813} DDOVERLAYFX,*LPDDOVERLAYFX;
814
815typedef struct _DDBLTBATCH
816{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000817 LPRECT lprDest;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000818 LPDIRECTDRAWSURFACE lpDDSSrc;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000819 LPRECT lprSrc;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000820 DWORD dwFlags;
821 LPDDBLTFX lpDDBltFx;
822} DDBLTBATCH,*LPDDBLTBATCH;
823
Lionel Ulmer1b95d731999-02-02 13:27:38 +0000824#define MAX_DDDEVICEID_STRING 512
825
826typedef struct tagDDDEVICEIDENTIFIER {
827 char szDriver[MAX_DDDEVICEID_STRING];
828 char szDescription[MAX_DDDEVICEID_STRING];
829 LARGE_INTEGER liDriverVersion;
830 DWORD dwVendorId;
831 DWORD dwDeviceId;
832 DWORD dwSubSysId;
833 DWORD dwRevision;
834 GUID guidDeviceIdentifier;
835} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
836
Alexandre Julliard02e90081998-01-04 17:49:09 +0000837
Francois Gouget81de59a1999-03-27 16:48:25 +0000838/*****************************************************************************
839 * IDirectDrawPalette interface
840 */
841#define ICOM_INTERFACE IDirectDrawPalette
842#define IDirectDrawPalette_METHODS \
843 ICOM_METHOD1(HRESULT,GetCaps, LPDWORD,lpdwCaps) \
844 ICOM_METHOD4(HRESULT,GetEntries, DWORD,dwFlags, DWORD,dwBase, DWORD,dwNumEntries, LPPALETTEENTRY,lpEntries) \
845 ICOM_METHOD3(HRESULT,Initialize, LPDIRECTDRAW,lpDD, DWORD,dwFlags, LPPALETTEENTRY,lpDDColorTable) \
846 ICOM_METHOD4(HRESULT,SetEntries, DWORD,dwFlags, DWORD,dwStartingEntry, DWORD,dwCount, LPPALETTEENTRY,lpEntries)
847#define IDirectDrawPalette_IMETHODS \
848 IUnknown_IMETHODS \
849 IDirectDrawPalette_METHODS
850ICOM_DEFINE(IDirectDrawPalette,IUnknown)
851#undef ICOM_INTERFACE
Alexandre Julliard02e90081998-01-04 17:49:09 +0000852
Alexandre Julliard02e90081998-01-04 17:49:09 +0000853 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +0000854#define IDirectDrawPalette_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
855#define IDirectDrawPalette_AddRef(p) ICOM_CALL (AddRef,p)
856#define IDirectDrawPalette_Release(p) ICOM_CALL (Release,p)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000857 /*** IDirectDrawPalette methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +0000858#define IDirectDrawPalette_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
859#define IDirectDrawPalette_GetEntries(p,a,b,c,d) ICOM_CALL4(GetEntries,p,a,b,c,d)
860#define IDirectDrawPalette_Initialize(p,a,b,c) ICOM_CALL3(Initialize,p,a,b,c)
861#define IDirectDrawPalette_SetEntries(p,a,b,c,d) ICOM_CALL4(SetEntries,p,a,b,c,d)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000862
Lionel Ulmer6e953991999-01-26 15:16:41 +0000863
Francois Gouget81de59a1999-03-27 16:48:25 +0000864/*****************************************************************************
865 * IDirectDrawClipper interface
866 */
867#define ICOM_INTERFACE IDirectDrawClipper
868#define IDirectDrawClipper_METHODS \
869 ICOM_METHOD3(HRESULT,GetClipList, LPRECT,lpRect, LPRGNDATA,lpClipList, LPDWORD,lpdwSize) \
870 ICOM_METHOD1(HRESULT,GetHWnd, HWND*,lphWnd) \
871 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, DWORD,dwFlags) \
872 ICOM_METHOD1(HRESULT,IsClipListChanged, BOOL*,lpbChanged) \
873 ICOM_METHOD2(HRESULT,SetClipList, LPRGNDATA,lpClipList, DWORD,dwFlags) \
874 ICOM_METHOD2(HRESULT,SetHWnd, DWORD,dwFlags, HWND,hWnd)
875#define IDirectDrawClipper_IMETHODS \
876 IUnknown_IMETHODS \
877 IDirectDrawClipper_METHODS
878ICOM_DEFINE(IDirectDrawClipper,IUnknown)
879#undef ICOM_INTERFACE
Alexandre Julliard02e90081998-01-04 17:49:09 +0000880
Alexandre Julliard02e90081998-01-04 17:49:09 +0000881 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +0000882#define IDirectDrawClipper_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
883#define IDirectDrawClipper_AddRef(p) ICOM_CALL (AddRef,p)
884#define IDirectDrawClipper_Release(p) ICOM_CALL (Release,p)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000885 /*** IDirectDrawClipper methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +0000886#define IDirectDrawClipper_GetClipList(p,a,b,c) ICOM_CALL3(GetClipList,p,a,b,c)
887#define IDirectDrawClipper_GetHWnd(p,a) ICOM_CALL1(GetHWnd,p,a)
888#define IDirectDrawClipper_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
889#define IDirectDrawClipper_IsClipListChanged(p,a) ICOM_CALL1(IsClipListChanged,p,a)
890#define IDirectDrawClipper_SetClipList(p,a,b) ICOM_CALL2(SetClipList,p,a,b)
891#define IDirectDrawClipper_SetHWnd(p,a,b) ICOM_CALL2(SetHWnd,p,a,b)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000892
Alexandre Julliard02e90081998-01-04 17:49:09 +0000893
Francois Gouget81de59a1999-03-27 16:48:25 +0000894/*****************************************************************************
895 * IDirectDraw interface
896 */
897#define ICOM_INTERFACE IDirectDraw
898#define IDirectDraw_METHODS \
899 ICOM_METHOD (HRESULT,Compact) \
900 ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
901 ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
902 ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE*,lplpDDSurface, IUnknown*,pUnkOuter) \
903 ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE,lpDDSurface, LPDIRECTDRAWSURFACE*,lplpDupDDSurface) \
904 ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK,lpEnumModesCallback) \
905 ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
906 ICOM_METHOD (HRESULT,FlipToGDISurface) \
907 ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
908 ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC,lpDDSurfaceDesc) \
909 ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
910 ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE*,lplpGDIDDSurface) \
911 ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
912 ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
913 ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
914 ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
915 ICOM_METHOD (HRESULT,RestoreDisplayMode) \
916 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
917 ICOM_METHOD3(HRESULT,SetDisplayMode, DWORD,, DWORD,, DWORD,) \
918 ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent)
919#define IDirectDraw_IMETHODS \
920 IUnknown_IMETHODS \
921 IDirectDraw_METHODS
922ICOM_DEFINE(IDirectDraw,IUnknown)
923#undef ICOM_INTERFACE
924
Alexandre Julliard02e90081998-01-04 17:49:09 +0000925 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +0000926#define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
927#define IDirectDraw_AddRef(p) ICOM_CALL (AddRef,p)
928#define IDirectDraw_Release(p) ICOM_CALL (Release,p)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000929 /*** IDirectDraw methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +0000930#define IDirectDraw_Compact(p) ICOM_CALL (Compact,p)
931#define IDirectDraw_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
932#define IDirectDraw_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
933#define IDirectDraw_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
934#define IDirectDraw_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
935#define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
936#define IDirectDraw_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
937#define IDirectDraw_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
938#define IDirectDraw_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
939#define IDirectDraw_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
940#define IDirectDraw_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
941#define IDirectDraw_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
942#define IDirectDraw_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
943#define IDirectDraw_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
944#define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
945#define IDirectDraw_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
946#define IDirectDraw_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
947#define IDirectDraw_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
948#define IDirectDraw_SetDisplayMode(p,a,b,c) ICOM_CALL3(SetDisplayMode,p,a,b,c)
949#define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000950
Alexandre Julliard02e90081998-01-04 17:49:09 +0000951
952/* flags for Lock() */
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000953#define DDLOCK_SURFACEMEMORYPTR 0x00000000
954#define DDLOCK_WAIT 0x00000001
955#define DDLOCK_EVENT 0x00000002
956#define DDLOCK_READONLY 0x00000010
957#define DDLOCK_WRITEONLY 0x00000020
958#define DDLOCK_NOSYSLOCK 0x00000800
Alexandre Julliard02e90081998-01-04 17:49:09 +0000959
Alexandre Julliard02e90081998-01-04 17:49:09 +0000960
Francois Gouget81de59a1999-03-27 16:48:25 +0000961/*****************************************************************************
962 * IDirectDraw2 interface
963 */
964/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
965 * arguments of SetDisplayMode has changed !
966 */
967#define ICOM_INTERFACE IDirectDraw2
968#define IDirectDraw2_METHODS \
969 ICOM_METHOD (HRESULT,Compact) \
970 ICOM_METHOD3(HRESULT,CreateClipper, DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
971 ICOM_METHOD4(HRESULT,CreatePalette, DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
972 ICOM_METHOD3(HRESULT,CreateSurface, LPDDSURFACEDESC,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE*,lplpDDSurface, IUnknown*,pUnkOuter) \
973 ICOM_METHOD2(HRESULT,DuplicateSurface, LPDIRECTDRAWSURFACE,lpDDSurface, LPDIRECTDRAWSURFACE*,lplpDupDDSurface) \
974 ICOM_METHOD4(HRESULT,EnumDisplayModes, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK,lpEnumModesCallback) \
975 ICOM_METHOD4(HRESULT,EnumSurfaces, DWORD,dwFlags, LPDDSURFACEDESC,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
976 ICOM_METHOD (HRESULT,FlipToGDISurface) \
977 ICOM_METHOD2(HRESULT,GetCaps, LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
978 ICOM_METHOD1(HRESULT,GetDisplayMode, LPDDSURFACEDESC,lpDDSurfaceDesc) \
979 ICOM_METHOD2(HRESULT,GetFourCCCodes, LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
980 ICOM_METHOD1(HRESULT,GetGDISurface, LPDIRECTDRAWSURFACE*,lplpGDIDDSurface) \
981 ICOM_METHOD1(HRESULT,GetMonitorFrequency, LPDWORD,lpdwFrequency) \
982 ICOM_METHOD1(HRESULT,GetScanLine, LPDWORD,lpdwScanLine) \
983 ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
984 ICOM_METHOD1(HRESULT,Initialize, GUID*,lpGUID) \
985 ICOM_METHOD (HRESULT,RestoreDisplayMode) \
986 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hWnd, DWORD,dwFlags) \
987 ICOM_METHOD5(HRESULT,SetDisplayMode, DWORD,dwWidth, DWORD,dwHeight, DWORD,dwBPP, DWORD,dwRefreshRate, DWORD,dwFlags) \
988 ICOM_METHOD2(HRESULT,WaitForVerticalBlank, DWORD,dwFlags, HANDLE,hEvent) \
989 /* added in v2 */ \
990 ICOM_METHOD3(HRESULT,GetAvailableVidMem, LPDDSCAPS,lpDDCaps, LPDWORD,lpdwTotal, LPDWORD,lpdwFree)
991#define IDirectDraw2_IMETHODS \
992 IUnknown_IMETHODS \
993 IDirectDraw2_METHODS
994ICOM_DEFINE(IDirectDraw2,IUnknown)
995#undef ICOM_INTERFACE
996
Alexandre Julliard02e90081998-01-04 17:49:09 +0000997 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +0000998#define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
999#define IDirectDraw2_AddRef(p) ICOM_CALL (AddRef,p)
1000#define IDirectDraw2_Release(p) ICOM_CALL (Release,p)
Alexandre Julliard02e90081998-01-04 17:49:09 +00001001 /*** IDirectDraw methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001002#define IDirectDraw2_Compact(p) ICOM_CALL (Compact,p)
1003#define IDirectDraw2_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1004#define IDirectDraw2_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1005#define IDirectDraw2_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1006#define IDirectDraw2_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1007#define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1008#define IDirectDraw2_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1009#define IDirectDraw2_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1010#define IDirectDraw2_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1011#define IDirectDraw2_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1012#define IDirectDraw2_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1013#define IDirectDraw2_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1014#define IDirectDraw2_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1015#define IDirectDraw2_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1016#define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1017#define IDirectDraw2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1018#define IDirectDraw2_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1019#define IDirectDraw2_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1020#define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e)
1021#define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1022/*** IDirectDraw2 methods ***/
1023#define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001024
Francois Gouget81de59a1999-03-27 16:48:25 +00001025
1026/*****************************************************************************
1027 * IDirectDraw4 interface
1028 */
1029#define ICOM_INTERFACE IDirectDraw4
1030#define IDirectDraw4_METHODS \
1031 ICOM_METHOD2(HRESULT,GetSurfaceFromDC, HDC,, LPDIRECTDRAWSURFACE*,) \
1032 ICOM_METHOD (HRESULT,RestoreAllSurfaces) \
1033 ICOM_METHOD (HRESULT,TestCooperativeLevel) \
1034 ICOM_METHOD2(HRESULT,GetDeviceIdentifier, LPDDDEVICEIDENTIFIER,, DWORD,)
1035#define IDirectDraw4_IMETHODS \
1036 IDirectDraw2_IMETHODS \
1037 IDirectDraw4_METHODS
1038ICOM_DEFINE(IDirectDraw4,IDirectDraw2)
1039#undef ICOM_INTERFACE
1040
Alexandre Julliard02e90081998-01-04 17:49:09 +00001041 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001042#define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1043#define IDirectDraw4_AddRef(p) ICOM_CALL (AddRef,p)
1044#define IDirectDraw4_Release(p) ICOM_CALL (Release,p)
1045 /*** IDirectDraw methods ***/
1046#define IDirectDraw4_Compact(p) ICOM_CALL (Compact,p)
1047#define IDirectDraw4_CreateClipper(p,a,b,c) ICOM_CALL3(CreateClipper,p,a,b,c)
1048#define IDirectDraw4_CreatePalette(p,a,b,c,d) ICOM_CALL4(CreatePalette,p,a,b,c,d)
1049#define IDirectDraw4_CreateSurface(p,a,b,c) ICOM_CALL3(CreateSurface,p,a,b,c)
1050#define IDirectDraw4_DuplicateSurface(p,a,b) ICOM_CALL2(DuplicateSurface,p,a,b)
1051#define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
1052#define IDirectDraw4_EnumSurfaces(p,a,b,c,d) ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
1053#define IDirectDraw4_FlipToGDISurface(p) ICOM_CALL (FlipToGDISurface,p)
1054#define IDirectDraw4_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1055#define IDirectDraw4_GetDisplayMode(p,a) ICOM_CALL1(GetDisplayMode,p,a)
1056#define IDirectDraw4_GetFourCCCodes(p,a,b) ICOM_CALL2(GetFourCCCodes,p,a,b)
1057#define IDirectDraw4_GetGDISurface(p,a) ICOM_CALL1(GetGDISurface,p,a)
1058#define IDirectDraw4_GetMonitorFrequency(p,a) ICOM_CALL1(GetMonitorFrequency,p,a)
1059#define IDirectDraw4_GetScanLine(p,a) ICOM_CALL1(GetScanLine,p,a)
1060#define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
1061#define IDirectDraw4_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1062#define IDirectDraw4_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
1063#define IDirectDraw4_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1064#define IDirectDraw4_SetDisplayMode(p,a,b,c) ICOM_CALL3(SetDisplayMode,p,a,b,c)
1065#define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
1066/*** IDirectDraw2 methods ***/
1067#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
1068/*** IDirectDraw4 methods ***/
1069#define IDirectDraw4_GetSurfaceFromDC(p,a,b) ICOM_CALL2(GetSurfaceFromDC,p,a,b,c)
1070#define IDirectDraw4_RestoreAllSurfaces(pc) ICOM_CALL (RestoreAllSurfaces,p)
1071#define IDirectDraw4_TestCooperativeLevel(p) ICOM_CALL (TestCooperativeLevel,p)
1072#define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL2(GetDeviceIdentifier,p,a,b)
Alexandre Julliard02e90081998-01-04 17:49:09 +00001073
Alexandre Julliard02e90081998-01-04 17:49:09 +00001074
Francois Gouget81de59a1999-03-27 16:48:25 +00001075/*****************************************************************************
1076 * IDirectDrawSurface interface
1077 */
1078#define ICOM_INTERFACE IDirectDrawSurface
1079#define IDirectDrawSurface_METHODS \
1080 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE,lpDDSAttachedSurface) \
1081 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1082 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1083 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1084 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1085 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE,lpDDSAttachedSurface) \
1086 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1087 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1088 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1089 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE*,lplpDDAttachedSurface) \
1090 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1091 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1092 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1093 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1094 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1095 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1096 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1097 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1098 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1099 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1100 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1101 ICOM_METHOD (HRESULT,IsLost) \
1102 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1103 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1104 ICOM_METHOD (HRESULT,Restore) \
1105 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1106 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1107 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1108 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1109 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1110 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1111 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1112 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE,lpDDSReference)
1113#define IDirectDrawSurface_IMETHODS \
1114 IUnknown_IMETHODS \
1115 IDirectDrawSurface_METHODS
1116ICOM_DEFINE(IDirectDrawSurface,IUnknown)
1117#undef ICOM_INTERFACE
1118
Alexandre Julliard02e90081998-01-04 17:49:09 +00001119 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001120#define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1121#define IDirectDrawSurface_AddRef(p) ICOM_CALL (AddRef,p)
1122#define IDirectDrawSurface_Release(p) ICOM_CALL (Release,p)
Alexandre Julliard02e90081998-01-04 17:49:09 +00001123 /*** IDirectDrawSurface methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001124#define IDirectDrawSurface_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1125#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1126#define IDirectDrawSurface_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1127#define IDirectDrawSurface_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1128#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1129#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1130#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1131#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1132#define IDirectDrawSurface_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1133#define IDirectDrawSurface_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1134#define IDirectDrawSurface_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1135#define IDirectDrawSurface_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1136#define IDirectDrawSurface_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1137#define IDirectDrawSurface_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1138#define IDirectDrawSurface_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1139#define IDirectDrawSurface_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1140#define IDirectDrawSurface_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1141#define IDirectDrawSurface_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1142#define IDirectDrawSurface_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1143#define IDirectDrawSurface_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1144#define IDirectDrawSurface_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1145#define IDirectDrawSurface_IsLost(p) ICOM_CALL (IsLost,p)
1146#define IDirectDrawSurface_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1147#define IDirectDrawSurface_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1148#define IDirectDrawSurface_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1149#define IDirectDrawSurface_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1150#define IDirectDrawSurface_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1151#define IDirectDrawSurface_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1152#define IDirectDrawSurface_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1153#define IDirectDrawSurface_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1154#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1155#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1156#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
Alexandre Julliard02e90081998-01-04 17:49:09 +00001157
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001158
Francois Gouget81de59a1999-03-27 16:48:25 +00001159/*****************************************************************************
1160 * IDirectDrawSurface2 interface
1161 */
1162/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
1163 * have been converted to LPDIRECTDRAWSURFACE2.
1164 */
1165#define ICOM_INTERFACE IDirectDrawSurface2
1166#define IDirectDrawSurface2_METHODS \
1167 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE2,lpDDSAttachedSurface) \
1168 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1169 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE2,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1170 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1171 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE2,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1172 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE2,lpDDSAttachedSurface) \
1173 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1174 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1175 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE2,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1176 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE2*,lplpDDAttachedSurface) \
1177 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1178 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1179 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1180 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1181 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1182 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1183 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1184 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1185 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1186 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1187 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1188 ICOM_METHOD (HRESULT,IsLost) \
1189 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1190 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1191 ICOM_METHOD (HRESULT,Restore) \
1192 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1193 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1194 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1195 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1196 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1197 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE2,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1198 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1199 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE2,lpDDSReference) \
1200 /* added in v2 */ \
1201 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1202 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1203 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags)
1204#define IDirectDrawSurface2_IMETHODS \
1205 IUnknown_IMETHODS \
1206 IDirectDrawSurface2_METHODS
1207ICOM_DEFINE(IDirectDrawSurface2,IUnknown)
1208#undef ICOM_INTERFACE
1209
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001210 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001211#define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1212#define IDirectDrawSurface2_AddRef(p) ICOM_CALL (AddRef,p)
1213#define IDirectDrawSurface2_Release(p) ICOM_CALL (Release,p)
1214/*** IDirectDrawSurface methods (almost) ***/
1215#define IDirectDrawSurface2_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1216#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1217#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1218#define IDirectDrawSurface2_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1219#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1220#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1221#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1222#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1223#define IDirectDrawSurface2_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1224#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1225#define IDirectDrawSurface2_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1226#define IDirectDrawSurface2_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1227#define IDirectDrawSurface2_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1228#define IDirectDrawSurface2_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1229#define IDirectDrawSurface2_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1230#define IDirectDrawSurface2_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1231#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1232#define IDirectDrawSurface2_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1233#define IDirectDrawSurface2_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1234#define IDirectDrawSurface2_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1235#define IDirectDrawSurface2_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1236#define IDirectDrawSurface2_IsLost(p) ICOM_CALL (IsLost,p)
1237#define IDirectDrawSurface2_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1238#define IDirectDrawSurface2_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1239#define IDirectDrawSurface2_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1240#define IDirectDrawSurface2_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1241#define IDirectDrawSurface2_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1242#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1243#define IDirectDrawSurface2_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1244#define IDirectDrawSurface2_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1245#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1246#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1247#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1248/*** IDirectDrawSurface2 methods ***/
1249#define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1250#define IDirectDrawSurface2_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1251#define IDirectDrawSurface2_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001252
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001253
Francois Gouget81de59a1999-03-27 16:48:25 +00001254/*****************************************************************************
1255 * IDirectDrawSurface3 interface
1256 */
1257/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
1258 * have been converted to LPDIRECTDRAWSURFACE3.
1259 */
1260#define ICOM_INTERFACE IDirectDrawSurface3
1261#define IDirectDrawSurface3_METHODS \
1262 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE3,lpDDSAttachedSurface) \
1263 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1264 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE3,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1265 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1266 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE3,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1267 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE3,lpDDSAttachedSurface) \
1268 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1269 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1270 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE3,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1271 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE3*,lplpDDAttachedSurface) \
1272 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1273 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1274 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1275 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1276 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1277 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1278 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1279 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1280 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1281 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1282 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1283 ICOM_METHOD (HRESULT,IsLost) \
1284 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1285 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1286 ICOM_METHOD (HRESULT,Restore) \
1287 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1288 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1289 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1290 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1291 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1292 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE3,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1293 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1294 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE3,lpDDSReference) \
1295 /* added in v2 */ \
1296 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1297 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1298 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1299 /* added in v3 */ \
1300 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC,lpDDSD, DWORD,dwFlags)
1301#define IDirectDrawSurface3_IMETHODS \
1302 IUnknown_IMETHODS \
1303 IDirectDrawSurface3_METHODS
1304ICOM_DEFINE(IDirectDrawSurface3,IUnknown)
1305#undef ICOM_INTERFACE
Lionel Ulmer1b95d731999-02-02 13:27:38 +00001306
Lionel Ulmer1b95d731999-02-02 13:27:38 +00001307 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001308#define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1309#define IDirectDrawSurface3_AddRef(p) ICOM_CALL (AddRef,p)
1310#define IDirectDrawSurface3_Release(p) ICOM_CALL (Release,p)
1311/*** IDirectDrawSurface methods (almost) ***/
1312#define IDirectDrawSurface3_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1313#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1314#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1315#define IDirectDrawSurface3_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1316#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1317#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1318#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1319#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1320#define IDirectDrawSurface3_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1321#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1322#define IDirectDrawSurface3_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1323#define IDirectDrawSurface3_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1324#define IDirectDrawSurface3_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1325#define IDirectDrawSurface3_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1326#define IDirectDrawSurface3_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1327#define IDirectDrawSurface3_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1328#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1329#define IDirectDrawSurface3_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1330#define IDirectDrawSurface3_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1331#define IDirectDrawSurface3_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1332#define IDirectDrawSurface3_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1333#define IDirectDrawSurface3_IsLost(p) ICOM_CALL (IsLost,p)
1334#define IDirectDrawSurface3_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1335#define IDirectDrawSurface3_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1336#define IDirectDrawSurface3_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1337#define IDirectDrawSurface3_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1338#define IDirectDrawSurface3_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1339#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1340#define IDirectDrawSurface3_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1341#define IDirectDrawSurface3_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1342#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1343#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1344#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1345/*** IDirectDrawSurface2 methods ***/
1346#define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1347#define IDirectDrawSurface3_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1348#define IDirectDrawSurface3_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1349/*** IDirectDrawSurface3 methods ***/
1350#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL2(SetSurfaceDesc,p,a,b)
Lionel Ulmer1b95d731999-02-02 13:27:38 +00001351
1352
Francois Gouget81de59a1999-03-27 16:48:25 +00001353/*****************************************************************************
1354 * IDirectDrawSurface4 interface
1355 */
1356/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
1357 * have been converted to LPDIRECTDRAWSURFACE3.
1358 */
1359/* FIXME: I assumed IDirectDrawSurface4 does not inherit from IDirectDrawSurface3 but I
1360 * have actually not proof of that. Can someone check and remove this comment or patch
1361 * accordingly ?
1362 */
1363#define ICOM_INTERFACE IDirectDrawSurface4
1364#define IDirectDrawSurface4_METHODS \
1365 ICOM_METHOD1(HRESULT,AddAttachedSurface, LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
1366 ICOM_METHOD1(HRESULT,AddOverlayDirtyRect, LPRECT,lpRect) \
1367 ICOM_METHOD5(HRESULT,Blt, LPRECT,lpDestRect, LPDIRECTDRAWSURFACE4,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwFlags, LPDDBLTFX,lpDDBltFx) \
1368 ICOM_METHOD3(HRESULT,BltBatch, LPDDBLTBATCH,lpDDBltBatch, DWORD,dwCount, DWORD,dwFlags) \
1369 ICOM_METHOD5(HRESULT,BltFast, DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE4,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
1370 ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
1371 ICOM_METHOD2(HRESULT,EnumAttachedSurfaces, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
1372 ICOM_METHOD3(HRESULT,EnumOverlayZOrders, DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
1373 ICOM_METHOD2(HRESULT,Flip, LPDIRECTDRAWSURFACE4,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
1374 ICOM_METHOD2(HRESULT,GetAttachedSurface, LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE4*,lplpDDAttachedSurface) \
1375 ICOM_METHOD1(HRESULT,GetBltStatus, DWORD,dwFlags) \
1376 ICOM_METHOD1(HRESULT,GetCaps, LPDDSCAPS,lpDDSCaps) \
1377 ICOM_METHOD1(HRESULT,GetClipper, LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
1378 ICOM_METHOD2(HRESULT,GetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1379 ICOM_METHOD1(HRESULT,GetDC, HDC*,lphDC) \
1380 ICOM_METHOD1(HRESULT,GetFlipStatus, DWORD,dwFlags) \
1381 ICOM_METHOD2(HRESULT,GetOverlayPosition, LPLONG,lplX, LPLONG,lplY) \
1382 ICOM_METHOD1(HRESULT,GetPalette, LPDIRECTDRAWPALETTE*,lplpDDPalette) \
1383 ICOM_METHOD1(HRESULT,GetPixelFormat, LPDDPIXELFORMAT,lpDDPixelFormat) \
1384 ICOM_METHOD1(HRESULT,GetSurfaceDesc, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1385 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
1386 ICOM_METHOD (HRESULT,IsLost) \
1387 ICOM_METHOD4(HRESULT,Lock, LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
1388 ICOM_METHOD1(HRESULT,ReleaseDC, HDC,hDC) \
1389 ICOM_METHOD (HRESULT,Restore) \
1390 ICOM_METHOD1(HRESULT,SetClipper, LPDIRECTDRAWCLIPPER,lpDDClipper) \
1391 ICOM_METHOD2(HRESULT,SetColorKey, DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
1392 ICOM_METHOD2(HRESULT,SetOverlayPosition, LONG,lX, LONG,lY) \
1393 ICOM_METHOD1(HRESULT,SetPalette, LPDIRECTDRAWPALETTE,lpDDPalette) \
1394 ICOM_METHOD1(HRESULT,Unlock, LPVOID,lpSurfaceData) \
1395 ICOM_METHOD5(HRESULT,UpdateOverlay, LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE4,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
1396 ICOM_METHOD1(HRESULT,UpdateOverlayDisplay, DWORD,dwFlags) \
1397 ICOM_METHOD2(HRESULT,UpdateOverlayZOrder, DWORD,dwFlags, LPDIRECTDRAWSURFACE4,lpDDSReference) \
1398 /* added in v2 */ \
1399 ICOM_METHOD1(HRESULT,GetDDInterface, LPVOID*,lplpDD) \
1400 ICOM_METHOD1(HRESULT,PageLock, DWORD,dwFlags) \
1401 ICOM_METHOD1(HRESULT,PageUnlock, DWORD,dwFlags) \
1402 /* added in v3 */ \
1403 ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC,lpDDSD, DWORD,dwFlags) \
1404 /* added in v4 */ \
1405 ICOM_METHOD4(HRESULT,SetPrivateData, REFGUID,, LPVOID,, DWORD,, DWORD,) \
1406 ICOM_METHOD3(HRESULT,GetPrivateData, REFGUID,, LPVOID,, LPDWORD,) \
1407 ICOM_METHOD1(HRESULT,FreePrivateData, REFGUID,) \
1408 ICOM_METHOD1(HRESULT,GetUniquenessValue, LPDWORD,) \
1409 ICOM_METHOD (HRESULT,ChangeUniquenessValue)
1410#define IDirectDrawSurface4_IMETHODS \
1411 IUnknown_IMETHODS \
1412 IDirectDrawSurface4_METHODS
1413ICOM_DEFINE(IDirectDrawSurface4,IUnknown)
1414#undef ICOM_INTERFACE
1415
Francois Gouget81de59a1999-03-27 16:48:25 +00001416 /*** IUnknown methods ***/
1417#define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1418#define IDirectDrawSurface4_AddRef(p) ICOM_CALL (AddRef,p)
1419#define IDirectDrawSurface4_Release(p) ICOM_CALL (Release,p)
1420/*** IDirectDrawSurface (almost) methods ***/
1421#define IDirectDrawSurface4_AddAttachedSurface(p,a) ICOM_CALL1(AddAttachedSurface,p,a)
1422#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) ICOM_CALL1(AddOverlayDirtyRect,p,a)
1423#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) ICOM_CALL5(Blt,p,a,b,c,d,e)
1424#define IDirectDrawSurface4_BltBatch(p,a,b,c) ICOM_CALL3(BltBatch,p,a,b,c)
1425#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) ICOM_CALL5(BltFast,p,a,b,c,d,e)
1426#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
1427#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
1428#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
1429#define IDirectDrawSurface4_Flip(p,a,b) ICOM_CALL2(Flip,p,a,b)
1430#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) ICOM_CALL2(GetAttachedSurface,p,a,b)
1431#define IDirectDrawSurface4_GetBltStatus(p,a) ICOM_CALL1(GetBltStatus,p,a)
1432#define IDirectDrawSurface4_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
1433#define IDirectDrawSurface4_GetClipper(p,a) ICOM_CALL1(GetClipper,p,a)
1434#define IDirectDrawSurface4_GetColorKey(p,a,b) ICOM_CALL2(GetColorKey,p,a,b)
1435#define IDirectDrawSurface4_GetDC(p,a) ICOM_CALL1(GetDC,p,a)
1436#define IDirectDrawSurface4_GetFlipStatus(p,a) ICOM_CALL1(GetFlipStatus,p,a)
1437#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) ICOM_CALL2(GetOverlayPosition,p,a,b)
1438#define IDirectDrawSurface4_GetPalette(p,a) ICOM_CALL1(GetPalette,p,a)
1439#define IDirectDrawSurface4_GetPixelFormat(p,a) ICOM_CALL1(GetPixelFormat,p,a)
1440#define IDirectDrawSurface4_GetSurfaceDesc(p,a) ICOM_CALL1(GetSurfaceDesc,p,a)
1441#define IDirectDrawSurface4_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1442#define IDirectDrawSurface4_IsLost(p) ICOM_CALL (IsLost,p)
1443#define IDirectDrawSurface4_Lock(p,a,b,c,d) ICOM_CALL4(Lock,p,a,b,c,d)
1444#define IDirectDrawSurface4_ReleaseDC(p,a) ICOM_CALL1(ReleaseDC,p,a)
1445#define IDirectDrawSurface4_Restore(p,a,b) ICOM_CALL (Restore,p,a,b)
1446#define IDirectDrawSurface4_SetClipper(p,a,b) ICOM_CALL1(SetClipper,p,a,b)
1447#define IDirectDrawSurface4_SetColorKey(p,a,b) ICOM_CALL2(SetColorKey,p,a,b)
1448#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) ICOM_CALL2(SetOverlayPosition,p,a,b)
1449#define IDirectDrawSurface4_SetPalette(p,a) ICOM_CALL1(SetPalette,p,a)
1450#define IDirectDrawSurface4_Unlock(p,a) ICOM_CALL1(Unlock,p,a)
1451#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
1452#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) ICOM_CALL1(UpdateOverlayDisplay,p,a)
1453#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
1454/*** IDirectDrawSurface2 methods ***/
1455#define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
1456#define IDirectDrawSurface4_PageLock(p,a) ICOM_CALL1(PageLock,p,a)
1457#define IDirectDrawSurface4_PageUnlock(p,a) ICOM_CALL1(PageUnlock,p,a)
1458/*** IDirectDrawSurface3 methods ***/
1459#define IDirectDrawSurface4_SetSurfaceDesc(p,a) ICOM_CALL(SetSurfaceDesc,p,a)
1460/*** IDirectDrawSurface4 methods ***/
1461#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL4(SetPrivateData,p,a,b,c,d)
1462#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) ICOM_CALL3(GetPrivateData,p,a,b,c)
1463#define IDirectDrawSurface4_FreePrivateData(p,a) ICOM_CALL1(FreePrivateData,p,a)
1464#define IDirectDrawSurface4_GetUniquenessValue(p,a) ICOM_CALL1(GetUniquenessValue,p,a)
1465#define IDirectDrawSurface4_ChangeUniquenessValue(p) ICOM_CALL (ChangeUniquenessValue,p)
Francois Gouget81de59a1999-03-27 16:48:25 +00001466
1467
1468/*****************************************************************************
1469 * IDirectDrawColorControl interface
1470 */
1471#define ICOM_INTERFACE IDirectDrawColorControl
1472#define IDirectDrawColorControl_METHODS \
1473 ICOM_METHOD1(HRESULT,GetColorControls, LPDDCOLORCONTROL,lpColorControl) \
1474 ICOM_METHOD1(HRESULT,SetColorControls, LPDDCOLORCONTROL,lpColorControl)
1475#define IDirectDrawColorControl_IMETHODS \
1476 IUnknown_IMETHODS \
1477 IDirectDrawColorControl_METHODS
1478ICOM_DEFINE(IDirectDrawColorControl,IUnknown)
1479#undef ICOM_INTERFACE
1480
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001481 /*** IUnknown methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001482#define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1483#define IDirectDrawColorControl_AddRef(p) ICOM_CALL (AddRef,p)
1484#define IDirectDrawColorControl_Release(p) ICOM_CALL (Release,p)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001485 /*** IDirectDrawColorControl methods ***/
Francois Gouget81de59a1999-03-27 16:48:25 +00001486#define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL(GetColorControls,p,a)
1487#define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL(SetColorControls,p,a)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001488
Alexandre Julliard02e90081998-01-04 17:49:09 +00001489
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001490HRESULT WINAPI DirectDrawCreate(LPGUID,LPDIRECTDRAW*,LPUNKNOWN);
Alexandre Julliarda3960291999-02-26 11:11:13 +00001491HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA,LPVOID);
1492HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW,LPVOID);
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001493#define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
Francois Gouget81de59a1999-03-27 16:48:25 +00001494HRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,LPUNKNOWN);
1495
Patrik Stridvall14da7b11999-06-12 10:53:06 +00001496#ifdef __cplusplus
1497} /* extern "C" */
1498#endif /* defined(__cplusplus) */
1499
Francois Gouget81de59a1999-03-27 16:48:25 +00001500#endif /* __WINE_DDRAW_H */