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