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