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