Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5703 lines
236 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddraw.h
  6. * Content: DirectDraw include file
  7. *
  8. ***************************************************************************/
  9. #ifndef __DDRAW_INCLUDED__
  10. #define __DDRAW_INCLUDED__
  11. //Disable the nameless union warning when building internally
  12. #undef ENABLE_NAMELESS_UNION_PRAGMA
  13. #ifdef DIRECTX_REDIST
  14. #define ENABLE_NAMELESS_UNION_PRAGMA
  15. #endif
  16. #ifdef ENABLE_NAMELESS_UNION_PRAGMA
  17. #pragma warning(disable:4201)
  18. #endif
  19. /*
  20. * If you wish an application built against the newest version of DirectDraw
  21. * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION
  22. * to be the earlies version of DirectDraw you wish to run against. For,
  23. * example if you wish an application to run against a DX 3 runtime define
  24. * DIRECTDRAW_VERSION to be 0x0300.
  25. */
  26. #ifndef DIRECTDRAW_VERSION
  27. #define DIRECTDRAW_VERSION 0x0700
  28. #endif /* DIRECTDRAW_VERSION */
  29. #if defined( _WIN32 ) && !defined( _NO_COM )
  30. #define COM_NO_WINDOWS_H
  31. #include <objbase.h>
  32. #else
  33. #define IUnknown void
  34. #if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
  35. #define CO_E_NOTINITIALIZED 0x800401F0L
  36. #endif
  37. #endif
  38. #define _FACDD 0x876
  39. #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. //
  44. // For compilers that don't support nameless unions, do a
  45. //
  46. // #define NONAMELESSUNION
  47. //
  48. // before #include <ddraw.h>
  49. //
  50. #ifndef DUMMYUNIONNAMEN
  51. #if defined(__cplusplus) || !defined(NONAMELESSUNION)
  52. #define DUMMYUNIONNAMEN(n)
  53. #else
  54. #define DUMMYUNIONNAMEN(n) u##n
  55. #endif
  56. #endif
  57. #ifndef MAKEFOURCC
  58. #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
  59. ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
  60. ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
  61. #endif //defined(MAKEFOURCC)
  62. /*
  63. * FOURCC codes for DX compressed-texture pixel formats
  64. */
  65. #define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
  66. #define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
  67. #define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
  68. #define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
  69. #define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
  70. /*
  71. * GUIDS used by DirectDraw objects
  72. */
  73. #if defined( _WIN32 ) && !defined( _NO_COM )
  74. DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  75. DEFINE_GUID( CLSID_DirectDraw7, 0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  76. DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  77. DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  78. DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  79. DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  80. DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  81. DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  82. DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  83. DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
  84. DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
  85. DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  86. DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  87. DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  88. DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
  89. DEFINE_GUID( IID_IDirectDrawGammaControl, 0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
  90. #endif
  91. /*============================================================================
  92. *
  93. * DirectDraw Structures
  94. *
  95. * Various structures used to invoke DirectDraw.
  96. *
  97. *==========================================================================*/
  98. struct IDirectDraw;
  99. struct IDirectDrawSurface;
  100. struct IDirectDrawPalette;
  101. struct IDirectDrawClipper;
  102. typedef struct IDirectDraw FAR *LPDIRECTDRAW;
  103. typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
  104. typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4;
  105. typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7;
  106. typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
  107. typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
  108. typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
  109. typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4;
  110. typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7;
  111. typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
  112. typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
  113. typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
  114. typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL;
  115. typedef struct _DDFXROP FAR *LPDDFXROP;
  116. typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
  117. typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2;
  118. typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;
  119. /*
  120. * API's
  121. */
  122. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  123. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  124. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  125. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  126. extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  127. extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  128. /*
  129. * Protect against old SDKs
  130. */
  131. #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
  132. #define HMONITOR_DECLARED
  133. DECLARE_HANDLE(HMONITOR);
  134. #endif
  135. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
  136. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
  137. extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  138. extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  139. typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  140. typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  141. #ifdef UNICODE
  142. typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
  143. #define DirectDrawEnumerate DirectDrawEnumerateW
  144. typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX;
  145. typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX;
  146. #define DirectDrawEnumerateEx DirectDrawEnumerateExW
  147. #else
  148. typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
  149. #define DirectDrawEnumerate DirectDrawEnumerateA
  150. typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX;
  151. typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX;
  152. #define DirectDrawEnumerateEx DirectDrawEnumerateExA
  153. #endif
  154. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  155. extern HRESULT WINAPI DirectDrawCreateEx( GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid,IUnknown FAR *pUnkOuter );
  156. extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  157. #endif
  158. /*
  159. * Flags for DirectDrawEnumerateEx
  160. * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
  161. * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
  162. * By default, only the primary display device is enumerated.
  163. * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
  164. */
  165. /*
  166. * This flag causes enumeration of any GDI display devices which are part of
  167. * the Windows Desktop
  168. */
  169. #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001L
  170. /*
  171. * This flag causes enumeration of any GDI display devices which are not
  172. * part of the Windows Desktop
  173. */
  174. #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002L
  175. /*
  176. * This flag causes enumeration of non-display devices
  177. */
  178. #define DDENUM_NONDISPLAYDEVICES 0x00000004L
  179. #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
  180. #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
  181. #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
  182. #define DDCREATE_HARDWAREONLY 0x00000001l
  183. #define DDCREATE_EMULATIONONLY 0x00000002l
  184. #if defined(WINNT) || !defined(WIN32)
  185. typedef long HRESULT;
  186. #endif
  187. //#ifndef WINNT
  188. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  189. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
  190. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  191. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
  192. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
  193. //#endif
  194. /*
  195. * Generic pixel format with 8-bit RGB and alpha components
  196. */
  197. typedef struct _DDARGB
  198. {
  199. BYTE blue;
  200. BYTE green;
  201. BYTE red;
  202. BYTE alpha;
  203. } DDARGB;
  204. typedef DDARGB FAR *LPDDARGB;
  205. /*
  206. * This version of the structure remains for backwards source compatibility.
  207. * The DDARGB structure is the one that should be used for all DirectDraw APIs.
  208. */
  209. typedef struct _DDRGBA
  210. {
  211. BYTE red;
  212. BYTE green;
  213. BYTE blue;
  214. BYTE alpha;
  215. } DDRGBA;
  216. typedef DDRGBA FAR *LPDDRGBA;
  217. /*
  218. * DDCOLORKEY
  219. */
  220. typedef struct _DDCOLORKEY
  221. {
  222. DWORD dwColorSpaceLowValue; // low boundary of color space that is to
  223. // be treated as Color Key, inclusive
  224. DWORD dwColorSpaceHighValue; // high boundary of color space that is
  225. // to be treated as Color Key, inclusive
  226. } DDCOLORKEY;
  227. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  228. /*
  229. * DDBLTFX
  230. * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  231. */
  232. typedef struct _DDBLTFX
  233. {
  234. DWORD dwSize; // size of structure
  235. DWORD dwDDFX; // FX operations
  236. DWORD dwROP; // Win32 raster operations
  237. DWORD dwDDROP; // Raster operations new for DirectDraw
  238. DWORD dwRotationAngle; // Rotation angle for blt
  239. DWORD dwZBufferOpCode; // ZBuffer compares
  240. DWORD dwZBufferLow; // Low limit of Z buffer
  241. DWORD dwZBufferHigh; // High limit of Z buffer
  242. DWORD dwZBufferBaseDest; // Destination base value
  243. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  244. union
  245. {
  246. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  247. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  248. } DUMMYUNIONNAMEN(1);
  249. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  250. union
  251. {
  252. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  253. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  254. } DUMMYUNIONNAMEN(2);
  255. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  256. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  257. DWORD dwReserved;
  258. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  259. union
  260. {
  261. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  262. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  263. } DUMMYUNIONNAMEN(3);
  264. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  265. union
  266. {
  267. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  268. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  269. } DUMMYUNIONNAMEN(4);
  270. union
  271. {
  272. DWORD dwFillColor; // color in RGB or Palettized
  273. DWORD dwFillDepth; // depth value for z-buffer
  274. DWORD dwFillPixel; // pixel value for RGBA or RGBZ
  275. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  276. } DUMMYUNIONNAMEN(5);
  277. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  278. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  279. } DDBLTFX;
  280. typedef DDBLTFX FAR* LPDDBLTFX;
  281. /*
  282. * DDSCAPS
  283. */
  284. typedef struct _DDSCAPS
  285. {
  286. DWORD dwCaps; // capabilities of surface wanted
  287. } DDSCAPS;
  288. typedef DDSCAPS FAR* LPDDSCAPS;
  289. /*
  290. * DDOSCAPS
  291. */
  292. typedef struct _DDOSCAPS
  293. {
  294. DWORD dwCaps; // capabilities of surface wanted
  295. } DDOSCAPS;
  296. typedef DDOSCAPS FAR* LPDDOSCAPS;
  297. /*
  298. * This structure is used internally by DirectDraw.
  299. */
  300. typedef struct _DDSCAPSEX
  301. {
  302. DWORD dwCaps2;
  303. DWORD dwCaps3;
  304. union
  305. {
  306. DWORD dwCaps4;
  307. DWORD dwVolumeDepth;
  308. } DUMMYUNIONNAMEN(1);
  309. } DDSCAPSEX, FAR * LPDDSCAPSEX;
  310. /*
  311. * DDSCAPS2
  312. */
  313. typedef struct _DDSCAPS2
  314. {
  315. DWORD dwCaps; // capabilities of surface wanted
  316. DWORD dwCaps2;
  317. DWORD dwCaps3;
  318. union
  319. {
  320. DWORD dwCaps4;
  321. DWORD dwVolumeDepth;
  322. } DUMMYUNIONNAMEN(1);
  323. } DDSCAPS2;
  324. typedef DDSCAPS2 FAR* LPDDSCAPS2;
  325. /*
  326. * DDCAPS
  327. */
  328. #define DD_ROP_SPACE (256/32) // space required to store ROP array
  329. /*
  330. * NOTE: Our choosen structure number scheme is to append a single digit to
  331. * the end of the structure giving the version that structure is associated
  332. * with.
  333. */
  334. /*
  335. * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally
  336. * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0.
  337. * New applications should use the DDCAPS structure defined below.
  338. */
  339. typedef struct _DDCAPS_DX1
  340. {
  341. DWORD dwSize; // size of the DDDRIVERCAPS structure
  342. DWORD dwCaps; // driver specific capabilities
  343. DWORD dwCaps2; // more driver specific capabilites
  344. DWORD dwCKeyCaps; // color key capabilities of the surface
  345. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  346. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  347. DWORD dwPalCaps; // palette capabilities
  348. DWORD dwSVCaps; // stereo vision capabilities
  349. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  350. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  351. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  352. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  353. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  354. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  355. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  356. DWORD dwVidMemTotal; // total amount of video memory
  357. DWORD dwVidMemFree; // amount of free video memory
  358. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  359. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  360. DWORD dwNumFourCCCodes; // number of four cc codes
  361. DWORD dwAlignBoundarySrc; // source rectangle alignment
  362. DWORD dwAlignSizeSrc; // source rectangle byte size
  363. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  364. DWORD dwAlignSizeDest; // dest rectangle byte size
  365. DWORD dwAlignStrideAlign; // stride alignment
  366. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  367. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  368. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  369. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  370. DWORD dwMinLiveVideoStretch; // OBSOLETE! This field remains for compatability reasons only
  371. DWORD dwMaxLiveVideoStretch; // OBSOLETE! This field remains for compatability reasons only
  372. DWORD dwMinHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only
  373. DWORD dwMaxHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only
  374. DWORD dwReserved1; // reserved
  375. DWORD dwReserved2; // reserved
  376. DWORD dwReserved3; // reserved
  377. } DDCAPS_DX1;
  378. typedef DDCAPS_DX1 FAR* LPDDCAPS_DX1;
  379. /*
  380. * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
  381. * It is present for back compatability.
  382. */
  383. typedef struct _DDCAPS_DX3
  384. {
  385. DWORD dwSize; // size of the DDDRIVERCAPS structure
  386. DWORD dwCaps; // driver specific capabilities
  387. DWORD dwCaps2; // more driver specific capabilites
  388. DWORD dwCKeyCaps; // color key capabilities of the surface
  389. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  390. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  391. DWORD dwPalCaps; // palette capabilities
  392. DWORD dwSVCaps; // stereo vision capabilities
  393. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  394. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  395. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  396. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  397. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  398. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  399. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  400. DWORD dwVidMemTotal; // total amount of video memory
  401. DWORD dwVidMemFree; // amount of free video memory
  402. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  403. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  404. DWORD dwNumFourCCCodes; // number of four cc codes
  405. DWORD dwAlignBoundarySrc; // source rectangle alignment
  406. DWORD dwAlignSizeSrc; // source rectangle byte size
  407. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  408. DWORD dwAlignSizeDest; // dest rectangle byte size
  409. DWORD dwAlignStrideAlign; // stride alignment
  410. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  411. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  412. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  413. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  414. DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  415. DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  416. DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  417. DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  418. DWORD dwReserved1; // reserved
  419. DWORD dwReserved2; // reserved
  420. DWORD dwReserved3; // reserved
  421. DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  422. DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  423. DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  424. DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  425. DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  426. DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  427. DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  428. DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  429. DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  430. DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  431. DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  432. DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  433. DWORD dwReserved4; // reserved
  434. DWORD dwReserved5; // reserved
  435. DWORD dwReserved6; // reserved
  436. } DDCAPS_DX3;
  437. typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
  438. /*
  439. * This structure is the DDCAPS structure as it was in version 5 of Direct X.
  440. * It is present for back compatability.
  441. */
  442. typedef struct _DDCAPS_DX5
  443. {
  444. /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
  445. /* 4*/ DWORD dwCaps; // driver specific capabilities
  446. /* 8*/ DWORD dwCaps2; // more driver specific capabilites
  447. /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
  448. /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
  449. /* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  450. /* 18*/ DWORD dwPalCaps; // palette capabilities
  451. /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
  452. /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  453. /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  454. /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  455. /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  456. /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  457. /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  458. /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  459. /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
  460. /* 40*/ DWORD dwVidMemFree; // amount of free video memory
  461. /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  462. /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
  463. /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
  464. /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
  465. /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
  466. /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
  467. /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
  468. /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
  469. /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  470. /* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  471. /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  472. /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  473. /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  474. /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  475. /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  476. /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  477. /* a0*/ DWORD dwReserved1; // reserved
  478. /* a4*/ DWORD dwReserved2; // reserved
  479. /* a8*/ DWORD dwReserved3; // reserved
  480. /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  481. /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  482. /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  483. /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  484. /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  485. /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  486. /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  487. /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  488. /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  489. /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  490. /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  491. /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  492. // Members added for DX5:
  493. /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
  494. /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
  495. /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
  496. /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
  497. /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
  498. /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
  499. /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
  500. /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  501. } DDCAPS_DX5;
  502. typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5;
  503. typedef struct _DDCAPS_DX6
  504. {
  505. /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
  506. /* 4*/ DWORD dwCaps; // driver specific capabilities
  507. /* 8*/ DWORD dwCaps2; // more driver specific capabilites
  508. /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
  509. /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
  510. /* 14*/ DWORD dwFXAlphaCaps; // alpha caps
  511. /* 18*/ DWORD dwPalCaps; // palette capabilities
  512. /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
  513. /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  514. /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  515. /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  516. /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  517. /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  518. /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  519. /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  520. /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
  521. /* 40*/ DWORD dwVidMemFree; // amount of free video memory
  522. /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  523. /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
  524. /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
  525. /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
  526. /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
  527. /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
  528. /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
  529. /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
  530. /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  531. /* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  532. /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  533. /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  534. /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  535. /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  536. /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  537. /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  538. /* a0*/ DWORD dwReserved1; // reserved
  539. /* a4*/ DWORD dwReserved2; // reserved
  540. /* a8*/ DWORD dwReserved3; // reserved
  541. /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  542. /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  543. /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  544. /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  545. /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  546. /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  547. /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  548. /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  549. /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  550. /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  551. /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  552. /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  553. /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
  554. /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
  555. /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
  556. /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
  557. /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
  558. /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
  559. /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
  560. /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  561. // Members added for DX6 release
  562. /*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
  563. } DDCAPS_DX6;
  564. typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
  565. typedef struct _DDCAPS_DX7
  566. {
  567. /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
  568. /* 4*/ DWORD dwCaps; // driver specific capabilities
  569. /* 8*/ DWORD dwCaps2; // more driver specific capabilites
  570. /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
  571. /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
  572. /* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  573. /* 18*/ DWORD dwPalCaps; // palette capabilities
  574. /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
  575. /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  576. /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  577. /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  578. /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  579. /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  580. /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  581. /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  582. /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
  583. /* 40*/ DWORD dwVidMemFree; // amount of free video memory
  584. /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  585. /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
  586. /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
  587. /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
  588. /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
  589. /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
  590. /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
  591. /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
  592. /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  593. /* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  594. /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  595. /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  596. /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  597. /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  598. /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  599. /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  600. /* a0*/ DWORD dwReserved1; // reserved
  601. /* a4*/ DWORD dwReserved2; // reserved
  602. /* a8*/ DWORD dwReserved3; // reserved
  603. /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  604. /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  605. /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  606. /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  607. /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  608. /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  609. /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  610. /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  611. /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  612. /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  613. /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  614. /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  615. /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
  616. /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
  617. /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
  618. /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
  619. /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
  620. /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
  621. /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
  622. /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  623. // Members added for DX6 release
  624. /*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
  625. } DDCAPS_DX7;
  626. typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7;
  627. #if DIRECTDRAW_VERSION <= 0x300
  628. typedef DDCAPS_DX3 DDCAPS;
  629. #elif DIRECTDRAW_VERSION <= 0x500
  630. typedef DDCAPS_DX5 DDCAPS;
  631. #elif DIRECTDRAW_VERSION <= 0x600
  632. typedef DDCAPS_DX6 DDCAPS;
  633. #else
  634. typedef DDCAPS_DX7 DDCAPS;
  635. #endif
  636. typedef DDCAPS FAR* LPDDCAPS;
  637. /*
  638. * DDPIXELFORMAT
  639. */
  640. typedef struct _DDPIXELFORMAT
  641. {
  642. DWORD dwSize; // size of structure
  643. DWORD dwFlags; // pixel format flags
  644. DWORD dwFourCC; // (FOURCC code)
  645. union
  646. {
  647. DWORD dwRGBBitCount; // how many bits per pixel
  648. DWORD dwYUVBitCount; // how many bits per pixel
  649. DWORD dwZBufferBitDepth; // how many total bits/pixel in z buffer (including any stencil bits)
  650. DWORD dwAlphaBitDepth; // how many bits for alpha channels
  651. DWORD dwLuminanceBitCount; // how many bits per pixel
  652. DWORD dwBumpBitCount; // how many bits per "buxel", total
  653. DWORD dwPrivateFormatBitCount;// Bits per pixel of private driver formats. Only valid in texture
  654. // format list and if DDPF_D3DFORMAT is set
  655. } DUMMYUNIONNAMEN(1);
  656. union
  657. {
  658. DWORD dwRBitMask; // mask for red bit
  659. DWORD dwYBitMask; // mask for Y bits
  660. DWORD dwStencilBitDepth; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
  661. DWORD dwLuminanceBitMask; // mask for luminance bits
  662. DWORD dwBumpDuBitMask; // mask for bump map U delta bits
  663. DWORD dwOperations; // DDPF_D3DFORMAT Operations
  664. } DUMMYUNIONNAMEN(2);
  665. union
  666. {
  667. DWORD dwGBitMask; // mask for green bits
  668. DWORD dwUBitMask; // mask for U bits
  669. DWORD dwZBitMask; // mask for Z bits
  670. DWORD dwBumpDvBitMask; // mask for bump map V delta bits
  671. struct
  672. {
  673. WORD wFlipMSTypes; // Multisample methods supported via flip for this D3DFORMAT
  674. WORD wBltMSTypes; // Multisample methods supported via blt for this D3DFORMAT
  675. } MultiSampleCaps;
  676. } DUMMYUNIONNAMEN(3);
  677. union
  678. {
  679. DWORD dwBBitMask; // mask for blue bits
  680. DWORD dwVBitMask; // mask for V bits
  681. DWORD dwStencilBitMask; // mask for stencil bits
  682. DWORD dwBumpLuminanceBitMask; // mask for luminance in bump map
  683. } DUMMYUNIONNAMEN(4);
  684. union
  685. {
  686. DWORD dwRGBAlphaBitMask; // mask for alpha channel
  687. DWORD dwYUVAlphaBitMask; // mask for alpha channel
  688. DWORD dwLuminanceAlphaBitMask;// mask for alpha channel
  689. DWORD dwRGBZBitMask; // mask for Z channel
  690. DWORD dwYUVZBitMask; // mask for Z channel
  691. } DUMMYUNIONNAMEN(5);
  692. } DDPIXELFORMAT;
  693. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  694. /*
  695. * DDOVERLAYFX
  696. */
  697. typedef struct _DDOVERLAYFX
  698. {
  699. DWORD dwSize; // size of structure
  700. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  701. DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
  702. DWORD dwReserved;
  703. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  704. union
  705. {
  706. DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
  707. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
  708. } DUMMYUNIONNAMEN(1);
  709. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  710. union
  711. {
  712. DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
  713. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
  714. } DUMMYUNIONNAMEN(2);
  715. DDCOLORKEY dckDestColorkey; // DestColorkey override
  716. DDCOLORKEY dckSrcColorkey; // DestColorkey override
  717. DWORD dwDDFX; // Overlay FX
  718. DWORD dwFlags; // flags
  719. } DDOVERLAYFX;
  720. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  721. /*
  722. * DDBLTBATCH: BltBatch entry structure
  723. */
  724. typedef struct _DDBLTBATCH
  725. {
  726. LPRECT lprDest;
  727. LPDIRECTDRAWSURFACE lpDDSSrc;
  728. LPRECT lprSrc;
  729. DWORD dwFlags;
  730. LPDDBLTFX lpDDBltFx;
  731. } DDBLTBATCH;
  732. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  733. /*
  734. * DDGAMMARAMP
  735. */
  736. typedef struct _DDGAMMARAMP
  737. {
  738. WORD red[256];
  739. WORD green[256];
  740. WORD blue[256];
  741. } DDGAMMARAMP;
  742. typedef DDGAMMARAMP FAR * LPDDGAMMARAMP;
  743. /*
  744. * This is the structure within which DirectDraw returns data about the current graphics driver and chipset
  745. */
  746. #define MAX_DDDEVICEID_STRING 512
  747. typedef struct tagDDDEVICEIDENTIFIER
  748. {
  749. /*
  750. * These elements are for presentation to the user only. They should not be used to identify particular
  751. * drivers, since this is unreliable and many different strings may be associated with the same
  752. * device, and the same driver from different vendors.
  753. */
  754. char szDriver[MAX_DDDEVICEID_STRING];
  755. char szDescription[MAX_DDDEVICEID_STRING];
  756. /*
  757. * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  758. * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  759. * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  760. *
  761. * This version has the form:
  762. * wProduct = HIWORD(liDriverVersion.HighPart)
  763. * wVersion = LOWORD(liDriverVersion.HighPart)
  764. * wSubVersion = HIWORD(liDriverVersion.LowPart)
  765. * wBuild = LOWORD(liDriverVersion.LowPart)
  766. */
  767. #ifdef _WIN32
  768. LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
  769. #else
  770. DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
  771. DWORD dwDriverVersionHighPart;
  772. #endif
  773. /*
  774. * These elements can be used to identify particular chipsets. Use with extreme caution.
  775. * dwVendorId Identifies the manufacturer. May be zero if unknown.
  776. * dwDeviceId Identifies the type of chipset. May be zero if unknown.
  777. * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  778. * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
  779. */
  780. DWORD dwVendorId;
  781. DWORD dwDeviceId;
  782. DWORD dwSubSysId;
  783. DWORD dwRevision;
  784. /*
  785. * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  786. * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  787. * reprofile the graphics subsystem.
  788. * This element can also be used to identify particular problematic drivers.
  789. */
  790. GUID guidDeviceIdentifier;
  791. } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
  792. typedef struct tagDDDEVICEIDENTIFIER2
  793. {
  794. /*
  795. * These elements are for presentation to the user only. They should not be used to identify particular
  796. * drivers, since this is unreliable and many different strings may be associated with the same
  797. * device, and the same driver from different vendors.
  798. */
  799. char szDriver[MAX_DDDEVICEID_STRING];
  800. char szDescription[MAX_DDDEVICEID_STRING];
  801. /*
  802. * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  803. * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  804. * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  805. *
  806. * This version has the form:
  807. * wProduct = HIWORD(liDriverVersion.HighPart)
  808. * wVersion = LOWORD(liDriverVersion.HighPart)
  809. * wSubVersion = HIWORD(liDriverVersion.LowPart)
  810. * wBuild = LOWORD(liDriverVersion.LowPart)
  811. */
  812. #ifdef _WIN32
  813. LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
  814. #else
  815. DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
  816. DWORD dwDriverVersionHighPart;
  817. #endif
  818. /*
  819. * These elements can be used to identify particular chipsets. Use with extreme caution.
  820. * dwVendorId Identifies the manufacturer. May be zero if unknown.
  821. * dwDeviceId Identifies the type of chipset. May be zero if unknown.
  822. * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  823. * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
  824. */
  825. DWORD dwVendorId;
  826. DWORD dwDeviceId;
  827. DWORD dwSubSysId;
  828. DWORD dwRevision;
  829. /*
  830. * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  831. * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  832. * reprofile the graphics subsystem.
  833. * This element can also be used to identify particular problematic drivers.
  834. */
  835. GUID guidDeviceIdentifier;
  836. /*
  837. * This element is used to determine the Windows Hardware Quality Lab (WHQL)
  838. * certification level for this driver/device pair.
  839. */
  840. DWORD dwWHQLLevel;
  841. } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
  842. /*
  843. * Flags for the IDirectDraw4::GetDeviceIdentifier method
  844. */
  845. /*
  846. * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
  847. * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
  848. * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
  849. * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
  850. * of the DirectDraw object involved.
  851. */
  852. #define DDGDI_GETHOSTIDENTIFIER 0x00000001L
  853. /*
  854. * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel
  855. */
  856. #define GET_WHQL_YEAR( dwWHQLLevel ) \
  857. ( (dwWHQLLevel) / 0x10000 )
  858. #define GET_WHQL_MONTH( dwWHQLLevel ) \
  859. ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff )
  860. #define GET_WHQL_DAY( dwWHQLLevel ) \
  861. ( (dwWHQLLevel) & 0xff )
  862. /*
  863. * callbacks
  864. */
  865. typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  866. #ifdef STREAMING
  867. typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  868. #endif
  869. /*
  870. * INTERACES FOLLOW:
  871. * IDirectDraw
  872. * IDirectDrawClipper
  873. * IDirectDrawPalette
  874. * IDirectDrawSurface
  875. */
  876. /*
  877. * IDirectDraw
  878. */
  879. #if defined( _WIN32 ) && !defined( _NO_COM )
  880. #undef INTERFACE
  881. #define INTERFACE IDirectDraw
  882. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  883. {
  884. /*** IUnknown methods ***/
  885. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  886. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  887. STDMETHOD_(ULONG,Release) (THIS) PURE;
  888. /*** IDirectDraw methods ***/
  889. STDMETHOD(Compact)(THIS) PURE;
  890. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  891. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  892. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  893. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  894. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  895. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  896. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  897. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  898. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  899. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  900. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  901. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  902. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  903. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  904. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  905. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  906. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  907. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  908. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  909. };
  910. #if !defined(__cplusplus) || defined(CINTERFACE)
  911. #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  912. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  913. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  914. #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
  915. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  916. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  917. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  918. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  919. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  920. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  921. #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  922. #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  923. #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  924. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  925. #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  926. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  927. #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  928. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  929. #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  930. #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  931. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  932. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  933. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  934. #else
  935. #define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  936. #define IDirectDraw_AddRef(p) (p)->AddRef()
  937. #define IDirectDraw_Release(p) (p)->Release()
  938. #define IDirectDraw_Compact(p) (p)->Compact()
  939. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  940. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  941. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  942. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  943. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  944. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  945. #define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
  946. #define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b)
  947. #define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  948. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  949. #define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a)
  950. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  951. #define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a)
  952. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  953. #define IDirectDraw_Initialize(p, a) (p)->Initialize(a)
  954. #define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  955. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  956. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c)
  957. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  958. #endif
  959. #endif
  960. #if defined( _WIN32 ) && !defined( _NO_COM )
  961. #undef INTERFACE
  962. #define INTERFACE IDirectDraw2
  963. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  964. {
  965. /*** IUnknown methods ***/
  966. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  967. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  968. STDMETHOD_(ULONG,Release) (THIS) PURE;
  969. /*** IDirectDraw methods ***/
  970. STDMETHOD(Compact)(THIS) PURE;
  971. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  972. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  973. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  974. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  975. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  976. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  977. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  978. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  979. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  980. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  981. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  982. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  983. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  984. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  985. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  986. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  987. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  988. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  989. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  990. /*** Added in the v2 interface ***/
  991. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  992. };
  993. #if !defined(__cplusplus) || defined(CINTERFACE)
  994. #define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  995. #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
  996. #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
  997. #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
  998. #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  999. #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1000. #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  1001. #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  1002. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1003. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1004. #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1005. #define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  1006. #define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  1007. #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1008. #define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  1009. #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  1010. #define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  1011. #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1012. #define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  1013. #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1014. #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1015. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1016. #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1017. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1018. #else
  1019. #define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1020. #define IDirectDraw2_AddRef(p) (p)->AddRef()
  1021. #define IDirectDraw2_Release(p) (p)->Release()
  1022. #define IDirectDraw2_Compact(p) (p)->Compact()
  1023. #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  1024. #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  1025. #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  1026. #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  1027. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1028. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  1029. #define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1030. #define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b)
  1031. #define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  1032. #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  1033. #define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a)
  1034. #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  1035. #define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a)
  1036. #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  1037. #define IDirectDraw2_Initialize(p, a) (p)->Initialize(a)
  1038. #define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1039. #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  1040. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1041. #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  1042. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
  1043. #endif
  1044. #endif
  1045. #if defined( _WIN32 ) && !defined( _NO_COM )
  1046. #undef INTERFACE
  1047. #define INTERFACE IDirectDraw4
  1048. DECLARE_INTERFACE_( IDirectDraw4, IUnknown )
  1049. {
  1050. /*** IUnknown methods ***/
  1051. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1052. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1053. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1054. /*** IDirectDraw methods ***/
  1055. STDMETHOD(Compact)(THIS) PURE;
  1056. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1057. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1058. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE;
  1059. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE;
  1060. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
  1061. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE;
  1062. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1063. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1064. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
  1065. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  1066. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE;
  1067. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1068. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1069. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1070. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1071. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1072. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1073. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1074. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1075. /*** Added in the v2 interface ***/
  1076. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
  1077. /*** Added in the V4 Interface ***/
  1078. STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE;
  1079. STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1080. STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1081. STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE;
  1082. };
  1083. #if !defined(__cplusplus) || defined(CINTERFACE)
  1084. #define IDirectDraw4_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1085. #define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
  1086. #define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
  1087. #define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
  1088. #define IDirectDraw4_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  1089. #define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1090. #define IDirectDraw4_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  1091. #define IDirectDraw4_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  1092. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1093. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1094. #define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1095. #define IDirectDraw4_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  1096. #define IDirectDraw4_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  1097. #define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1098. #define IDirectDraw4_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  1099. #define IDirectDraw4_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  1100. #define IDirectDraw4_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  1101. #define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1102. #define IDirectDraw4_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  1103. #define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1104. #define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1105. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1106. #define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1107. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1108. #define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
  1109. #define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
  1110. #define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
  1111. #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1112. #else
  1113. #define IDirectDraw4_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1114. #define IDirectDraw4_AddRef(p) (p)->AddRef()
  1115. #define IDirectDraw4_Release(p) (p)->Release()
  1116. #define IDirectDraw4_Compact(p) (p)->Compact()
  1117. #define IDirectDraw4_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  1118. #define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  1119. #define IDirectDraw4_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  1120. #define IDirectDraw4_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  1121. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1122. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  1123. #define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1124. #define IDirectDraw4_GetCaps(p, a, b) (p)->GetCaps(a, b)
  1125. #define IDirectDraw4_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  1126. #define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  1127. #define IDirectDraw4_GetGDISurface(p, a) (p)->GetGDISurface(a)
  1128. #define IDirectDraw4_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  1129. #define IDirectDraw4_GetScanLine(p, a) (p)->GetScanLine(a)
  1130. #define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  1131. #define IDirectDraw4_Initialize(p, a) (p)->Initialize(a)
  1132. #define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1133. #define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  1134. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1135. #define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  1136. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
  1137. #define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b)
  1138. #define IDirectDraw4_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
  1139. #define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
  1140. #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
  1141. #endif
  1142. #endif
  1143. #if defined( _WIN32 ) && !defined( _NO_COM )
  1144. #undef INTERFACE
  1145. #define INTERFACE IDirectDraw7
  1146. DECLARE_INTERFACE_( IDirectDraw7, IUnknown )
  1147. {
  1148. /*** IUnknown methods ***/
  1149. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1150. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1151. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1152. /*** IDirectDraw methods ***/
  1153. STDMETHOD(Compact)(THIS) PURE;
  1154. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1155. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1156. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE7 FAR *, IUnknown FAR *) PURE;
  1157. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE7, LPDIRECTDRAWSURFACE7 FAR * ) PURE;
  1158. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
  1159. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK7 ) PURE;
  1160. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1161. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1162. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
  1163. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  1164. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 FAR *) PURE;
  1165. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1166. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1167. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1168. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1169. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1170. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1171. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1172. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1173. /*** Added in the v2 interface ***/
  1174. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
  1175. /*** Added in the V4 Interface ***/
  1176. STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE7 *) PURE;
  1177. STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1178. STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1179. STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2, DWORD ) PURE;
  1180. STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE;
  1181. STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE;
  1182. };
  1183. #if !defined(__cplusplus) || defined(CINTERFACE)
  1184. #define IDirectDraw7_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1185. #define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1186. #define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p)
  1187. #define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p)
  1188. #define IDirectDraw7_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  1189. #define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1190. #define IDirectDraw7_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  1191. #define IDirectDraw7_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  1192. #define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1193. #define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1194. #define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1195. #define IDirectDraw7_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  1196. #define IDirectDraw7_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  1197. #define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1198. #define IDirectDraw7_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  1199. #define IDirectDraw7_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  1200. #define IDirectDraw7_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  1201. #define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1202. #define IDirectDraw7_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  1203. #define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1204. #define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1205. #define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1206. #define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1207. #define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1208. #define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
  1209. #define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
  1210. #define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
  1211. #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1212. #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c)
  1213. #define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b)
  1214. #else
  1215. #define IDirectDraw7_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1216. #define IDirectDraw7_AddRef(p) (p)->AddRef()
  1217. #define IDirectDraw7_Release(p) (p)->Release()
  1218. #define IDirectDraw7_Compact(p) (p)->Compact()
  1219. #define IDirectDraw7_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  1220. #define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  1221. #define IDirectDraw7_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  1222. #define IDirectDraw7_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  1223. #define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1224. #define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  1225. #define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1226. #define IDirectDraw7_GetCaps(p, a, b) (p)->GetCaps(a, b)
  1227. #define IDirectDraw7_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  1228. #define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  1229. #define IDirectDraw7_GetGDISurface(p, a) (p)->GetGDISurface(a)
  1230. #define IDirectDraw7_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  1231. #define IDirectDraw7_GetScanLine(p, a) (p)->GetScanLine(a)
  1232. #define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  1233. #define IDirectDraw7_Initialize(p, a) (p)->Initialize(a)
  1234. #define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1235. #define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  1236. #define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1237. #define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  1238. #define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
  1239. #define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b)
  1240. #define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
  1241. #define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
  1242. #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
  1243. #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(a,b,c)
  1244. #define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(a,b)
  1245. #endif
  1246. #endif
  1247. /*
  1248. * IDirectDrawPalette
  1249. */
  1250. #if defined( _WIN32 ) && !defined( _NO_COM )
  1251. #undef INTERFACE
  1252. #define INTERFACE IDirectDrawPalette
  1253. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  1254. {
  1255. /*** IUnknown methods ***/
  1256. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1257. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1258. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1259. /*** IDirectDrawPalette methods ***/
  1260. STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  1261. STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1262. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  1263. STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1264. };
  1265. #if !defined(__cplusplus) || defined(CINTERFACE)
  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. #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  1270. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
  1271. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  1272. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
  1273. #else
  1274. #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1275. #define IDirectDrawPalette_AddRef(p) (p)->AddRef()
  1276. #define IDirectDrawPalette_Release(p) (p)->Release()
  1277. #define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a)
  1278. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d)
  1279. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
  1280. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d)
  1281. #endif
  1282. #endif
  1283. /*
  1284. * IDirectDrawClipper
  1285. */
  1286. #if defined( _WIN32 ) && !defined( _NO_COM )
  1287. #undef INTERFACE
  1288. #define INTERFACE IDirectDrawClipper
  1289. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  1290. {
  1291. /*** IUnknown methods ***/
  1292. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1293. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1294. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1295. /*** IDirectDrawClipper methods ***/
  1296. STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  1297. STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  1298. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  1299. STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  1300. STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  1301. STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  1302. };
  1303. #if !defined(__cplusplus) || defined(CINTERFACE)
  1304. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1305. #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
  1306. #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
  1307. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
  1308. #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
  1309. #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  1310. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
  1311. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
  1312. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
  1313. #else
  1314. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1315. #define IDirectDrawClipper_AddRef(p) (p)->AddRef()
  1316. #define IDirectDrawClipper_Release(p) (p)->Release()
  1317. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c)
  1318. #define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a)
  1319. #define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b)
  1320. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a)
  1321. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b)
  1322. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b)
  1323. #endif
  1324. #endif
  1325. /*
  1326. * IDirectDrawSurface and related interfaces
  1327. */
  1328. #if defined( _WIN32 ) && !defined( _NO_COM )
  1329. #undef INTERFACE
  1330. #define INTERFACE IDirectDrawSurface
  1331. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  1332. {
  1333. /*** IUnknown methods ***/
  1334. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1335. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1336. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1337. /*** IDirectDrawSurface methods ***/
  1338. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1339. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1340. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  1341. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1342. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  1343. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  1344. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1345. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1346. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  1347. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  1348. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1349. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1350. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1351. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1352. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1353. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1354. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1355. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1356. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1357. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1358. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1359. STDMETHOD(IsLost)(THIS) PURE;
  1360. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1361. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1362. STDMETHOD(Restore)(THIS) PURE;
  1363. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1364. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1365. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1366. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1367. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1368. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1369. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1370. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  1371. };
  1372. #if !defined(__cplusplus) || defined(CINTERFACE)
  1373. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1374. #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  1375. #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
  1376. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1377. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1378. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1379. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1380. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1381. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1382. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1383. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1384. #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1385. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1386. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1387. #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  1388. #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1389. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1390. #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1391. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1392. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1393. #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1394. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1395. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1396. #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1397. #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
  1398. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1399. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1400. #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
  1401. #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1402. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1403. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1404. #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1405. #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  1406. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1407. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1408. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1409. #else
  1410. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1411. #define IDirectDrawSurface_AddRef(p) (p)->AddRef()
  1412. #define IDirectDrawSurface_Release(p) (p)->Release()
  1413. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1414. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1415. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1416. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1417. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1418. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1419. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1420. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1421. #define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
  1422. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1423. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1424. #define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b)
  1425. #define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
  1426. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1427. #define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
  1428. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1429. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1430. #define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
  1431. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1432. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1433. #define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
  1434. #define IDirectDrawSurface_IsLost(p) (p)->IsLost()
  1435. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  1436. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
  1437. #define IDirectDrawSurface_Restore(p) (p)->Restore()
  1438. #define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
  1439. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  1440. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  1441. #define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
  1442. #define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b)
  1443. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  1444. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  1445. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  1446. #endif
  1447. /*
  1448. * IDirectDrawSurface2 and related interfaces
  1449. */
  1450. #undef INTERFACE
  1451. #define INTERFACE IDirectDrawSurface2
  1452. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  1453. {
  1454. /*** IUnknown methods ***/
  1455. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1456. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1457. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1458. /*** IDirectDrawSurface methods ***/
  1459. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  1460. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1461. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  1462. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1463. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  1464. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  1465. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1466. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1467. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  1468. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  1469. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1470. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1471. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1472. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1473. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1474. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1475. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1476. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1477. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1478. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1479. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1480. STDMETHOD(IsLost)(THIS) PURE;
  1481. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1482. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1483. STDMETHOD(Restore)(THIS) PURE;
  1484. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1485. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1486. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1487. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1488. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1489. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1490. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1491. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  1492. /*** Added in the v2 interface ***/
  1493. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1494. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1495. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1496. };
  1497. #if !defined(__cplusplus) || defined(CINTERFACE)
  1498. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1499. #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1500. #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
  1501. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1502. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1503. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1504. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1505. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1506. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1507. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1508. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1509. #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1510. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1511. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1512. #define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  1513. #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1514. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1515. #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1516. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1517. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1518. #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1519. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1520. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1521. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1522. #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
  1523. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1524. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1525. #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
  1526. #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1527. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1528. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1529. #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1530. #define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  1531. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1532. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1533. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1534. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  1535. #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  1536. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  1537. #else
  1538. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1539. #define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
  1540. #define IDirectDrawSurface2_Release(p) (p)->Release()
  1541. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1542. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1543. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1544. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1545. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1546. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1547. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1548. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1549. #define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
  1550. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1551. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1552. #define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b)
  1553. #define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
  1554. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1555. #define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
  1556. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1557. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1558. #define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
  1559. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1560. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1561. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
  1562. #define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
  1563. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  1564. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
  1565. #define IDirectDrawSurface2_Restore(p) (p)->Restore()
  1566. #define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
  1567. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  1568. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  1569. #define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
  1570. #define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b)
  1571. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  1572. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  1573. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  1574. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
  1575. #define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
  1576. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
  1577. #endif
  1578. /*
  1579. * IDirectDrawSurface3 and related interfaces
  1580. */
  1581. #undef INTERFACE
  1582. #define INTERFACE IDirectDrawSurface3
  1583. DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
  1584. {
  1585. /*** IUnknown methods ***/
  1586. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1587. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1588. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1589. /*** IDirectDrawSurface methods ***/
  1590. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
  1591. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1592. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
  1593. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1594. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
  1595. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
  1596. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1597. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1598. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
  1599. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
  1600. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1601. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1602. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1603. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1604. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1605. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1606. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1607. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1608. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1609. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1610. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1611. STDMETHOD(IsLost)(THIS) PURE;
  1612. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1613. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1614. STDMETHOD(Restore)(THIS) PURE;
  1615. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1616. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1617. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1618. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1619. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1620. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1621. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1622. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
  1623. /*** Added in the v2 interface ***/
  1624. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1625. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1626. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1627. /*** Added in the V3 interface ***/
  1628. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
  1629. };
  1630. #if !defined(__cplusplus) || defined(CINTERFACE)
  1631. #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1632. #define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
  1633. #define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
  1634. #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1635. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1636. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1637. #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1638. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1639. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1640. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1641. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1642. #define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1643. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1644. #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1645. #define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  1646. #define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1647. #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1648. #define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1649. #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1650. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1651. #define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1652. #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1653. #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1654. #define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1655. #define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
  1656. #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1657. #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1658. #define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
  1659. #define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1660. #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1661. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1662. #define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1663. #define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  1664. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1665. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1666. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1667. #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  1668. #define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  1669. #define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  1670. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1671. #else
  1672. #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1673. #define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
  1674. #define IDirectDrawSurface3_Release(p) (p)->Release()
  1675. #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1676. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1677. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1678. #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1679. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1680. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1681. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1682. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1683. #define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
  1684. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1685. #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1686. #define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b)
  1687. #define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
  1688. #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1689. #define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
  1690. #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1691. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1692. #define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
  1693. #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1694. #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1695. #define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
  1696. #define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
  1697. #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  1698. #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
  1699. #define IDirectDrawSurface3_Restore(p) (p)->Restore()
  1700. #define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
  1701. #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  1702. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  1703. #define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
  1704. #define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b)
  1705. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  1706. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  1707. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  1708. #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
  1709. #define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
  1710. #define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
  1711. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  1712. #endif
  1713. /*
  1714. * IDirectDrawSurface4 and related interfaces
  1715. */
  1716. #undef INTERFACE
  1717. #define INTERFACE IDirectDrawSurface4
  1718. DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown )
  1719. {
  1720. /*** IUnknown methods ***/
  1721. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1722. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1723. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1724. /*** IDirectDrawSurface methods ***/
  1725. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  1726. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1727. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE4, LPRECT,DWORD, LPDDBLTFX) PURE;
  1728. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1729. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE4, LPRECT,DWORD) PURE;
  1730. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE;
  1731. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  1732. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  1733. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE;
  1734. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE;
  1735. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1736. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
  1737. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1738. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1739. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1740. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1741. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1742. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1743. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1744. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
  1745. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
  1746. STDMETHOD(IsLost)(THIS) PURE;
  1747. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
  1748. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1749. STDMETHOD(Restore)(THIS) PURE;
  1750. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1751. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1752. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1753. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1754. STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
  1755. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1756. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1757. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE;
  1758. /*** Added in the v2 interface ***/
  1759. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1760. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1761. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1762. /*** Added in the v3 interface ***/
  1763. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
  1764. /*** Added in the v4 interface ***/
  1765. STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  1766. STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  1767. STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  1768. STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  1769. STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  1770. };
  1771. #if !defined(__cplusplus) || defined(CINTERFACE)
  1772. #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1773. #define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
  1774. #define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
  1775. #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1776. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1777. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1778. #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1779. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1780. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1781. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1782. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1783. #define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1784. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1785. #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1786. #define IDirectDrawSurface4_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  1787. #define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1788. #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1789. #define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1790. #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1791. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1792. #define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1793. #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1794. #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1795. #define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1796. #define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
  1797. #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1798. #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1799. #define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
  1800. #define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1801. #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1802. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1803. #define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1804. #define IDirectDrawSurface4_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  1805. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1806. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1807. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1808. #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  1809. #define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  1810. #define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  1811. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1812. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  1813. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
  1814. #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
  1815. #define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
  1816. #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
  1817. #else
  1818. #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1819. #define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
  1820. #define IDirectDrawSurface4_Release(p) (p)->Release()
  1821. #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1822. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1823. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1824. #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1825. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1826. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1827. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1828. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1829. #define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
  1830. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1831. #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1832. #define IDirectDrawSurface4_GetCaps(p,b) (p)->GetCaps(b)
  1833. #define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
  1834. #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1835. #define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
  1836. #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1837. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1838. #define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
  1839. #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1840. #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1841. #define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
  1842. #define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
  1843. #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  1844. #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
  1845. #define IDirectDrawSurface4_Restore(p) (p)->Restore()
  1846. #define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
  1847. #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  1848. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  1849. #define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
  1850. #define IDirectDrawSurface4_Unlock(p,b) (p)->Unlock(b)
  1851. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  1852. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  1853. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  1854. #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
  1855. #define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
  1856. #define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
  1857. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  1858. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
  1859. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
  1860. #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
  1861. #define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
  1862. #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
  1863. #endif
  1864. /*
  1865. * IDirectDrawSurface7 and related interfaces
  1866. */
  1867. #undef INTERFACE
  1868. #define INTERFACE IDirectDrawSurface7
  1869. DECLARE_INTERFACE_( IDirectDrawSurface7, IUnknown )
  1870. {
  1871. /*** IUnknown methods ***/
  1872. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1873. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1874. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1875. /*** IDirectDrawSurface methods ***/
  1876. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7) PURE;
  1877. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1878. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE7, LPRECT,DWORD, LPDDBLTFX) PURE;
  1879. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1880. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE7, LPRECT,DWORD) PURE;
  1881. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE;
  1882. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
  1883. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
  1884. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7, DWORD) PURE;
  1885. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE7 FAR *) PURE;
  1886. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1887. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
  1888. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1889. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1890. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1891. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1892. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1893. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1894. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1895. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
  1896. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
  1897. STDMETHOD(IsLost)(THIS) PURE;
  1898. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
  1899. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1900. STDMETHOD(Restore)(THIS) PURE;
  1901. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1902. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1903. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1904. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1905. STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
  1906. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE7,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1907. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1908. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE7) PURE;
  1909. /*** Added in the v2 interface ***/
  1910. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1911. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1912. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1913. /*** Added in the v3 interface ***/
  1914. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
  1915. /*** Added in the v4 interface ***/
  1916. STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  1917. STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  1918. STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  1919. STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  1920. STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  1921. /*** Moved Texture7 methods here ***/
  1922. STDMETHOD(SetPriority)(THIS_ DWORD) PURE;
  1923. STDMETHOD(GetPriority)(THIS_ LPDWORD) PURE;
  1924. STDMETHOD(SetLOD)(THIS_ DWORD) PURE;
  1925. STDMETHOD(GetLOD)(THIS_ LPDWORD) PURE;
  1926. };
  1927. #if !defined(__cplusplus) || defined(CINTERFACE)
  1928. #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1929. #define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1930. #define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p)
  1931. #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1932. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1933. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1934. #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1935. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1936. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1937. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1938. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1939. #define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1940. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1941. #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1942. #define IDirectDrawSurface7_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  1943. #define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1944. #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1945. #define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1946. #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1947. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1948. #define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1949. #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1950. #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1951. #define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1952. #define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p)
  1953. #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1954. #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1955. #define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p)
  1956. #define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1957. #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1958. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1959. #define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1960. #define IDirectDrawSurface7_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  1961. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1962. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1963. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1964. #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  1965. #define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  1966. #define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  1967. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1968. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  1969. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
  1970. #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
  1971. #define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
  1972. #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
  1973. #define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
  1974. #define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
  1975. #define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
  1976. #define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a)
  1977. #else
  1978. #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1979. #define IDirectDrawSurface7_AddRef(p) (p)->AddRef()
  1980. #define IDirectDrawSurface7_Release(p) (p)->Release()
  1981. #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1982. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1983. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1984. #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1985. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1986. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1987. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1988. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1989. #define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b)
  1990. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1991. #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1992. #define IDirectDrawSurface7_GetCaps(p,b) (p)->GetCaps(b)
  1993. #define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a)
  1994. #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1995. #define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a)
  1996. #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1997. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1998. #define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a)
  1999. #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  2000. #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  2001. #define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b)
  2002. #define IDirectDrawSurface7_IsLost(p) (p)->IsLost()
  2003. #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2004. #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2005. #define IDirectDrawSurface7_Restore(p) (p)->Restore()
  2006. #define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a)
  2007. #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2008. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2009. #define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a)
  2010. #define IDirectDrawSurface7_Unlock(p,b) (p)->Unlock(b)
  2011. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2012. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2013. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2014. #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2015. #define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a)
  2016. #define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a)
  2017. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  2018. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
  2019. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
  2020. #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a)
  2021. #define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
  2022. #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
  2023. #define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a)
  2024. #define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a)
  2025. #define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a)
  2026. #define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a)
  2027. #endif
  2028. /*
  2029. * IDirectDrawColorControl
  2030. */
  2031. #if defined( _WIN32 ) && !defined( _NO_COM )
  2032. #undef INTERFACE
  2033. #define INTERFACE IDirectDrawColorControl
  2034. DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
  2035. {
  2036. /*** IUnknown methods ***/
  2037. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2038. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2039. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2040. /*** IDirectDrawColorControl methods ***/
  2041. STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  2042. STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  2043. };
  2044. #if !defined(__cplusplus) || defined(CINTERFACE)
  2045. #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  2046. #define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
  2047. #define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
  2048. #define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a)
  2049. #define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a)
  2050. #else
  2051. #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  2052. #define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
  2053. #define IDirectDrawColorControl_Release(p) (p)->Release()
  2054. #define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a)
  2055. #define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a)
  2056. #endif
  2057. #endif
  2058. /*
  2059. * IDirectDrawGammaControl
  2060. */
  2061. #if defined( _WIN32 ) && !defined( _NO_COM )
  2062. #undef INTERFACE
  2063. #define INTERFACE IDirectDrawGammaControl
  2064. DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown )
  2065. {
  2066. /*** IUnknown methods ***/
  2067. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2068. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2069. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2070. /*** IDirectDrawGammaControl methods ***/
  2071. STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  2072. STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  2073. };
  2074. #if !defined(__cplusplus) || defined(CINTERFACE)
  2075. #define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  2076. #define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
  2077. #define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
  2078. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->lpVtbl->GetGammaRamp(p, a, b)
  2079. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->lpVtbl->SetGammaRamp(p, a, b)
  2080. #else
  2081. #define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  2082. #define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
  2083. #define IDirectDrawGammaControl_Release(p) (p)->Release()
  2084. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->GetGammaRamp(a, b)
  2085. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->SetGammaRamp(a, b)
  2086. #endif
  2087. #endif
  2088. #endif
  2089. /*
  2090. * DDSURFACEDESC
  2091. */
  2092. typedef struct _DDSURFACEDESC
  2093. {
  2094. DWORD dwSize; // size of the DDSURFACEDESC structure
  2095. DWORD dwFlags; // determines what fields are valid
  2096. DWORD dwHeight; // height of surface to be created
  2097. DWORD dwWidth; // width of input surface
  2098. union
  2099. {
  2100. LONG lPitch; // distance to start of next line (return value only)
  2101. DWORD dwLinearSize; // Formless late-allocated optimized surface size
  2102. } DUMMYUNIONNAMEN(1);
  2103. DWORD dwBackBufferCount; // number of back buffers requested
  2104. union
  2105. {
  2106. DWORD dwMipMapCount; // number of mip-map levels requested
  2107. DWORD dwZBufferBitDepth; // depth of Z buffer requested
  2108. DWORD dwRefreshRate; // refresh rate (used when display mode is described)
  2109. } DUMMYUNIONNAMEN(2);
  2110. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  2111. DWORD dwReserved; // reserved
  2112. LPVOID lpSurface; // pointer to the associated surface memory
  2113. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  2114. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  2115. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  2116. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  2117. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  2118. DDSCAPS ddsCaps; // direct draw surface capabilities
  2119. } DDSURFACEDESC;
  2120. /*
  2121. * DDSURFACEDESC2
  2122. */
  2123. typedef struct _DDSURFACEDESC2
  2124. {
  2125. DWORD dwSize; // size of the DDSURFACEDESC structure
  2126. DWORD dwFlags; // determines what fields are valid
  2127. DWORD dwHeight; // height of surface to be created
  2128. DWORD dwWidth; // width of input surface
  2129. union
  2130. {
  2131. LONG lPitch; // distance to start of next line (return value only)
  2132. DWORD dwLinearSize; // Formless late-allocated optimized surface size
  2133. } DUMMYUNIONNAMEN(1);
  2134. union
  2135. {
  2136. DWORD dwBackBufferCount; // number of back buffers requested
  2137. DWORD dwDepth; // the depth if this is a volume texture
  2138. } DUMMYUNIONNAMEN(5);
  2139. union
  2140. {
  2141. DWORD dwMipMapCount; // number of mip-map levels requestde
  2142. // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
  2143. DWORD dwRefreshRate; // refresh rate (used when display mode is described)
  2144. DWORD dwSrcVBHandle; // The source used in VB::Optimize
  2145. } DUMMYUNIONNAMEN(2);
  2146. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  2147. DWORD dwReserved; // reserved
  2148. LPVOID lpSurface; // pointer to the associated surface memory
  2149. union
  2150. {
  2151. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  2152. DWORD dwEmptyFaceColor; // Physical color for empty cubemap faces
  2153. } DUMMYUNIONNAMEN(3);
  2154. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  2155. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  2156. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  2157. union
  2158. {
  2159. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  2160. DWORD dwFVF; // vertex format description of vertex buffers
  2161. } DUMMYUNIONNAMEN(4);
  2162. DDSCAPS2 ddsCaps; // direct draw surface capabilities
  2163. DWORD dwTextureStage; // stage in multitexture cascade
  2164. } DDSURFACEDESC2;
  2165. /*
  2166. * ddsCaps field is valid.
  2167. */
  2168. #define DDSD_CAPS 0x00000001l // default
  2169. /*
  2170. * dwHeight field is valid.
  2171. */
  2172. #define DDSD_HEIGHT 0x00000002l
  2173. /*
  2174. * dwWidth field is valid.
  2175. */
  2176. #define DDSD_WIDTH 0x00000004l
  2177. /*
  2178. * lPitch is valid.
  2179. */
  2180. #define DDSD_PITCH 0x00000008l
  2181. /*
  2182. * dwBackBufferCount is valid.
  2183. */
  2184. #define DDSD_BACKBUFFERCOUNT 0x00000020l
  2185. /*
  2186. * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2)
  2187. */
  2188. #define DDSD_ZBUFFERBITDEPTH 0x00000040l
  2189. /*
  2190. * dwAlphaBitDepth is valid.
  2191. */
  2192. #define DDSD_ALPHABITDEPTH 0x00000080l
  2193. /*
  2194. * lpSurface is valid.
  2195. */
  2196. #define DDSD_LPSURFACE 0x00000800l
  2197. /*
  2198. * ddpfPixelFormat is valid.
  2199. */
  2200. #define DDSD_PIXELFORMAT 0x00001000l
  2201. /*
  2202. * ddckCKDestOverlay is valid.
  2203. */
  2204. #define DDSD_CKDESTOVERLAY 0x00002000l
  2205. /*
  2206. * ddckCKDestBlt is valid.
  2207. */
  2208. #define DDSD_CKDESTBLT 0x00004000l
  2209. /*
  2210. * ddckCKSrcOverlay is valid.
  2211. */
  2212. #define DDSD_CKSRCOVERLAY 0x00008000l
  2213. /*
  2214. * ddckCKSrcBlt is valid.
  2215. */
  2216. #define DDSD_CKSRCBLT 0x00010000l
  2217. /*
  2218. * dwMipMapCount is valid.
  2219. */
  2220. #define DDSD_MIPMAPCOUNT 0x00020000l
  2221. /*
  2222. * dwRefreshRate is valid
  2223. */
  2224. #define DDSD_REFRESHRATE 0x00040000l
  2225. /*
  2226. * dwLinearSize is valid
  2227. */
  2228. #define DDSD_LINEARSIZE 0x00080000l
  2229. /*
  2230. * dwTextureStage is valid
  2231. */
  2232. #define DDSD_TEXTURESTAGE 0x00100000l
  2233. /*
  2234. * dwFVF is valid
  2235. */
  2236. #define DDSD_FVF 0x00200000l
  2237. /*
  2238. * dwSrcVBHandle is valid
  2239. */
  2240. #define DDSD_SRCVBHANDLE 0x00400000l
  2241. /*
  2242. * dwDepth is valid
  2243. */
  2244. #define DDSD_DEPTH 0x00800000l
  2245. /*
  2246. * All input fields are valid.
  2247. */
  2248. #define DDSD_ALL 0x00fff9eel
  2249. /*
  2250. * DDOPTSURFACEDESC
  2251. */
  2252. typedef struct _DDOPTSURFACEDESC
  2253. {
  2254. DWORD dwSize; // size of the DDOPTSURFACEDESC structure
  2255. DWORD dwFlags; // determines what fields are valid
  2256. DDSCAPS2 ddSCaps; // Common caps like: Memory type
  2257. DDOSCAPS ddOSCaps; // Common caps like: Memory type
  2258. GUID guid; // Compression technique GUID
  2259. DWORD dwCompressionRatio; // Compression ratio
  2260. } DDOPTSURFACEDESC;
  2261. /*
  2262. * guid field is valid.
  2263. */
  2264. #define DDOSD_GUID 0x00000001l
  2265. /*
  2266. * dwCompressionRatio field is valid.
  2267. */
  2268. #define DDOSD_COMPRESSION_RATIO 0x00000002l
  2269. /*
  2270. * ddSCaps field is valid.
  2271. */
  2272. #define DDOSD_SCAPS 0x00000004l
  2273. /*
  2274. * ddOSCaps field is valid.
  2275. */
  2276. #define DDOSD_OSCAPS 0x00000008l
  2277. /*
  2278. * All input fields are valid.
  2279. */
  2280. #define DDOSD_ALL 0x0000000fl
  2281. /*
  2282. * The surface's optimized pixelformat is compressed
  2283. */
  2284. #define DDOSDCAPS_OPTCOMPRESSED 0x00000001l
  2285. /*
  2286. * The surface's optimized pixelformat is reordered
  2287. */
  2288. #define DDOSDCAPS_OPTREORDERED 0x00000002l
  2289. /*
  2290. * The opt surface is a monolithic mipmap
  2291. */
  2292. #define DDOSDCAPS_MONOLITHICMIPMAP 0x00000004l
  2293. /*
  2294. * The valid Surf caps:
  2295. * #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  2296. * #define DDSCAPS_VIDEOMEMORY 0x00004000l
  2297. * #define DDSCAPS_LOCALVIDMEM 0x10000000l
  2298. * #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
  2299. */
  2300. #define DDOSDCAPS_VALIDSCAPS 0x30004800l
  2301. /*
  2302. * The valid OptSurf caps
  2303. */
  2304. #define DDOSDCAPS_VALIDOSCAPS 0x00000007l
  2305. /*
  2306. * DDCOLORCONTROL
  2307. */
  2308. typedef struct _DDCOLORCONTROL
  2309. {
  2310. DWORD dwSize;
  2311. DWORD dwFlags;
  2312. LONG lBrightness;
  2313. LONG lContrast;
  2314. LONG lHue;
  2315. LONG lSaturation;
  2316. LONG lSharpness;
  2317. LONG lGamma;
  2318. LONG lColorEnable;
  2319. DWORD dwReserved1;
  2320. } DDCOLORCONTROL;
  2321. /*
  2322. * lBrightness field is valid.
  2323. */
  2324. #define DDCOLOR_BRIGHTNESS 0x00000001l
  2325. /*
  2326. * lContrast field is valid.
  2327. */
  2328. #define DDCOLOR_CONTRAST 0x00000002l
  2329. /*
  2330. * lHue field is valid.
  2331. */
  2332. #define DDCOLOR_HUE 0x00000004l
  2333. /*
  2334. * lSaturation field is valid.
  2335. */
  2336. #define DDCOLOR_SATURATION 0x00000008l
  2337. /*
  2338. * lSharpness field is valid.
  2339. */
  2340. #define DDCOLOR_SHARPNESS 0x00000010l
  2341. /*
  2342. * lGamma field is valid.
  2343. */
  2344. #define DDCOLOR_GAMMA 0x00000020l
  2345. /*
  2346. * lColorEnable field is valid.
  2347. */
  2348. #define DDCOLOR_COLORENABLE 0x00000040l
  2349. /*============================================================================
  2350. *
  2351. * Direct Draw Capability Flags
  2352. *
  2353. * These flags are used to describe the capabilities of a given Surface.
  2354. * All flags are bit flags.
  2355. *
  2356. *==========================================================================*/
  2357. /****************************************************************************
  2358. *
  2359. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  2360. *
  2361. ****************************************************************************/
  2362. /*
  2363. * This bit is reserved. It should not be specified.
  2364. */
  2365. #define DDSCAPS_RESERVED1 0x00000001l
  2366. /*
  2367. * Indicates that this surface contains alpha-only information.
  2368. * (To determine if a surface is RGBA/YUVA, the pixel format must be
  2369. * interrogated.)
  2370. */
  2371. #define DDSCAPS_ALPHA 0x00000002l
  2372. /*
  2373. * Indicates that this surface is a backbuffer. It is generally
  2374. * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  2375. * It indicates that this surface is THE back buffer of a surface
  2376. * flipping structure. DirectDraw supports N surfaces in a
  2377. * surface flipping structure. Only the surface that immediately
  2378. * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  2379. * The other surfaces are identified as back buffers by the presence
  2380. * of the DDSCAPS_FLIP capability, their attachment order, and the
  2381. * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  2382. * capabilities. The bit is sent to CreateSurface when a standalone
  2383. * back buffer is being created. This surface could be attached to
  2384. * a front buffer and/or back buffers to form a flipping surface
  2385. * structure after the CreateSurface call. See AddAttachments for
  2386. * a detailed description of the behaviors in this case.
  2387. */
  2388. #define DDSCAPS_BACKBUFFER 0x00000004l
  2389. /*
  2390. * Indicates a complex surface structure is being described. A
  2391. * complex surface structure results in the creation of more than
  2392. * one surface. The additional surfaces are attached to the root
  2393. * surface. The complex structure can only be destroyed by
  2394. * destroying the root.
  2395. */
  2396. #define DDSCAPS_COMPLEX 0x00000008l
  2397. /*
  2398. * Indicates that this surface is a part of a surface flipping structure.
  2399. * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  2400. * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
  2401. * on the resulting creations. The dwBackBufferCount field in the
  2402. * DDSURFACEDESC structure must be set to at least 1 in order for
  2403. * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
  2404. * must always be set with creating multiple surfaces through CreateSurface.
  2405. */
  2406. #define DDSCAPS_FLIP 0x00000010l
  2407. /*
  2408. * Indicates that this surface is THE front buffer of a surface flipping
  2409. * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
  2410. * capability bit is set.
  2411. * If this capability is sent to CreateSurface then a standalonw front buffer
  2412. * is created. This surface will not have the DDSCAPS_FLIP capability.
  2413. * It can be attached to other back buffers to form a flipping structure.
  2414. * See AddAttachments for a detailed description of the behaviors in this
  2415. * case.
  2416. */
  2417. #define DDSCAPS_FRONTBUFFER 0x00000020l
  2418. /*
  2419. * Indicates that this surface is any offscreen surface that is not an overlay,
  2420. * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
  2421. * to identify plain vanilla surfaces.
  2422. */
  2423. #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
  2424. /*
  2425. * Indicates that this surface is an overlay. It may or may not be directly visible
  2426. * depending on whether or not it is currently being overlayed onto the primary
  2427. * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
  2428. * overlayed at the moment.
  2429. */
  2430. #define DDSCAPS_OVERLAY 0x00000080l
  2431. /*
  2432. * Indicates that unique DirectDrawPalette objects can be created and
  2433. * attached to this surface.
  2434. */
  2435. #define DDSCAPS_PALETTE 0x00000100l
  2436. /*
  2437. * Indicates that this surface is the primary surface. The primary
  2438. * surface represents what the user is seeing at the moment.
  2439. */
  2440. #define DDSCAPS_PRIMARYSURFACE 0x00000200l
  2441. /*
  2442. * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
  2443. * obsolete.
  2444. */
  2445. #define DDSCAPS_RESERVED3 0x00000400l
  2446. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000000l
  2447. /*
  2448. * Indicates that this surface memory was allocated in system memory
  2449. */
  2450. #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  2451. /*
  2452. * Indicates that this surface can be used as a 3D texture. It does not
  2453. * indicate whether or not the surface is being used for that purpose.
  2454. */
  2455. #define DDSCAPS_TEXTURE 0x00001000l
  2456. /*
  2457. * Indicates that a surface may be a destination for 3D rendering. This
  2458. * bit must be set in order to query for a Direct3D Device Interface
  2459. * from this surface.
  2460. */
  2461. #define DDSCAPS_3DDEVICE 0x00002000l
  2462. /*
  2463. * Indicates that this surface exists in video memory.
  2464. */
  2465. #define DDSCAPS_VIDEOMEMORY 0x00004000l
  2466. /*
  2467. * Indicates that changes made to this surface are immediately visible.
  2468. * It is always set for the primary surface and is set for overlays while
  2469. * they are being overlayed and texture maps while they are being textured.
  2470. */
  2471. #define DDSCAPS_VISIBLE 0x00008000l
  2472. /*
  2473. * Indicates that only writes are permitted to the surface. Read accesses
  2474. * from the surface may or may not generate a protection fault, but the
  2475. * results of a read from this surface will not be meaningful. READ ONLY.
  2476. */
  2477. #define DDSCAPS_WRITEONLY 0x00010000l
  2478. /*
  2479. * Indicates that this surface is a z buffer. A z buffer does not contain
  2480. * displayable information. Instead it contains bit depth information that is
  2481. * used to determine which pixels are visible and which are obscured.
  2482. */
  2483. #define DDSCAPS_ZBUFFER 0x00020000l
  2484. /*
  2485. * Indicates surface will have a DC associated long term
  2486. */
  2487. #define DDSCAPS_OWNDC 0x00040000l
  2488. /*
  2489. * Indicates surface should be able to receive live video
  2490. */
  2491. #define DDSCAPS_LIVEVIDEO 0x00080000l
  2492. /*
  2493. * Indicates surface should be able to have a stream decompressed
  2494. * to it by the hardware.
  2495. */
  2496. #define DDSCAPS_HWCODEC 0x00100000l
  2497. /*
  2498. * Surface is a ModeX surface.
  2499. *
  2500. */
  2501. #define DDSCAPS_MODEX 0x00200000l
  2502. /*
  2503. * Indicates surface is one level of a mip-map. This surface will
  2504. * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  2505. * This can be done explicitly, by creating a number of surfaces and
  2506. * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  2507. * If this bit is set then DDSCAPS_TEXTURE must also be set.
  2508. */
  2509. #define DDSCAPS_MIPMAP 0x00400000l
  2510. /*
  2511. * This bit is reserved. It should not be specified.
  2512. */
  2513. #define DDSCAPS_RESERVED2 0x00800000l
  2514. /*
  2515. * Indicates that memory for the surface is not allocated until the surface
  2516. * is loaded (via the Direct3D texture Load() function).
  2517. */
  2518. #define DDSCAPS_ALLOCONLOAD 0x04000000l
  2519. /*
  2520. * Indicates that the surface will recieve data from a video port.
  2521. */
  2522. #define DDSCAPS_VIDEOPORT 0x08000000l
  2523. /*
  2524. * Indicates that a video memory surface is resident in true, local video
  2525. * memory rather than non-local video memory. If this flag is specified then
  2526. * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  2527. * DDSCAPS_NONLOCALVIDMEM.
  2528. */
  2529. #define DDSCAPS_LOCALVIDMEM 0x10000000l
  2530. /*
  2531. * Indicates that a video memory surface is resident in non-local video
  2532. * memory rather than true, local video memory. If this flag is specified
  2533. * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  2534. * DDSCAPS_LOCALVIDMEM.
  2535. */
  2536. #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
  2537. /*
  2538. * Indicates that this surface is a standard VGA mode surface, and not a
  2539. * ModeX surface. (This flag will never be set in combination with the
  2540. * DDSCAPS_MODEX flag).
  2541. */
  2542. #define DDSCAPS_STANDARDVGAMODE 0x40000000l
  2543. /*
  2544. * Indicates that this surface will be an optimized surface. This flag is
  2545. * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
  2546. * will be created without any underlying video memory until loaded.
  2547. */
  2548. #define DDSCAPS_OPTIMIZED 0x80000000l
  2549. /*
  2550. * This bit is reserved
  2551. */
  2552. #define DDSCAPS2_RESERVED4 0x00000002L
  2553. #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000000L
  2554. /*
  2555. * Indicates to the driver that this surface will be locked very frequently
  2556. * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
  2557. * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  2558. * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
  2559. */
  2560. #define DDSCAPS2_HINTDYNAMIC 0x00000004L
  2561. /*
  2562. * Indicates to the driver that this surface can be re-ordered/retiled on
  2563. * load. This operation will not change the size of the texture. It is
  2564. * relatively fast and symmetrical, since the application may lock these
  2565. * bits (although it will take a performance hit when doing so). Surfaces
  2566. * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
  2567. * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
  2568. */
  2569. #define DDSCAPS2_HINTSTATIC 0x00000008L
  2570. /*
  2571. * Indicates that the client would like this texture surface to be managed by the
  2572. * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
  2573. * DDSCAPS_TEXTURE set.
  2574. */
  2575. #define DDSCAPS2_TEXTUREMANAGE 0x00000010L
  2576. /*
  2577. * These bits are reserved for internal use */
  2578. #define DDSCAPS2_RESERVED1 0x00000020L
  2579. #define DDSCAPS2_RESERVED2 0x00000040L
  2580. /*
  2581. * Indicates to the driver that this surface will never be locked again.
  2582. * The driver is free to optimize this surface via retiling and actual compression.
  2583. * All calls to Lock() or Blts from this surface will fail. Surfaces with this
  2584. * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  2585. * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
  2586. */
  2587. #define DDSCAPS2_OPAQUE 0x00000080L
  2588. /*
  2589. * Applications should set this bit at CreateSurface time to indicate that they
  2590. * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
  2591. */
  2592. #define DDSCAPS2_HINTANTIALIASING 0x00000100L
  2593. /*
  2594. * This flag is used at CreateSurface time to indicate that this set of
  2595. * surfaces is a cubic environment map
  2596. */
  2597. #define DDSCAPS2_CUBEMAP 0x00000200L
  2598. /*
  2599. * These flags preform two functions:
  2600. * - At CreateSurface time, they define which of the six cube faces are
  2601. * required by the application.
  2602. * - After creation, each face in the cubemap will have exactly one of these
  2603. * bits set.
  2604. */
  2605. #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400L
  2606. #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800L
  2607. #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000L
  2608. #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000L
  2609. #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000L
  2610. #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000L
  2611. /*
  2612. * This macro may be used to specify all faces of a cube map at CreateSurface time
  2613. */
  2614. #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
  2615. DDSCAPS2_CUBEMAP_NEGATIVEX |\
  2616. DDSCAPS2_CUBEMAP_POSITIVEY |\
  2617. DDSCAPS2_CUBEMAP_NEGATIVEY |\
  2618. DDSCAPS2_CUBEMAP_POSITIVEZ |\
  2619. DDSCAPS2_CUBEMAP_NEGATIVEZ )
  2620. /*
  2621. * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
  2622. * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
  2623. * constructs such as Cube Maps, wherein there are more than one mipmap surface attached
  2624. * to the root surface.
  2625. * This caps bit is ignored by CreateSurface
  2626. */
  2627. #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000L
  2628. /* This flag indicates that the texture should be managed by D3D only */
  2629. #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000L
  2630. /* This flag indicates that the managed surface can be safely lost */
  2631. #define DDSCAPS2_DONOTPERSIST 0x00040000L
  2632. /* indicates that this surface is part of a stereo flipping chain */
  2633. #define DDSCAPS2_STEREOSURFACELEFT 0x00080000L
  2634. /*
  2635. * Indicates that the surface is a volume.
  2636. * Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume
  2637. */
  2638. #define DDSCAPS2_VOLUME 0x00200000L
  2639. /*
  2640. * Indicates that the surface may be locked multiple times by the application.
  2641. * This cap cannot be used with DDSCAPS2_OPAQUE.
  2642. */
  2643. #define DDSCAPS2_NOTUSERLOCKABLE 0x00400000L
  2644. /*
  2645. * Indicates that the vertex buffer data can be used to render points and
  2646. * point sprites.
  2647. */
  2648. #define DDSCAPS2_POINTS 0x00800000L
  2649. /*
  2650. * Indicates that the vertex buffer data can be used to render rt pactches.
  2651. */
  2652. #define DDSCAPS2_RTPATCHES 0x01000000L
  2653. /*
  2654. * Indicates that the vertex buffer data can be used to render n patches.
  2655. */
  2656. #define DDSCAPS2_NPATCHES 0x02000000L
  2657. /*
  2658. * This bit is reserved for internal use
  2659. */
  2660. #define DDSCAPS2_RESERVED3 0x04000000L
  2661. /*
  2662. * Indicates that the contents of the backbuffer do not have to be preserved
  2663. * the contents of the backbuffer after they are presented.
  2664. */
  2665. #define DDSCAPS2_DISCARDBACKBUFFER 0x10000000L
  2666. /*
  2667. * Indicates that all surfaces in this creation chain should be given an alpha channel.
  2668. * This flag will be set on primary surface chains that may have no explicit pixel format
  2669. * (and thus take on the format of the current display mode).
  2670. * The driver should infer that all these surfaces have a format having an alpha channel.
  2671. * (e.g. assume D3DFMT_A8R8G8B8 if the display mode is x888.)
  2672. */
  2673. #define DDSCAPS2_ENABLEALPHACHANNEL 0x20000000L
  2674. /*
  2675. * This is a mask that indicates the set of bits that may be set
  2676. * at createsurface time to indicate number of samples per pixel
  2677. * when multisampling
  2678. */
  2679. #define DDSCAPS3_MULTISAMPLE_MASK 0x0000001FL
  2680. /****************************************************************************
  2681. *
  2682. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  2683. *
  2684. ****************************************************************************/
  2685. /*
  2686. * Display hardware has 3D acceleration.
  2687. */
  2688. #define DDCAPS_3D 0x00000001l
  2689. /*
  2690. * Indicates that DirectDraw will support only dest rectangles that are aligned
  2691. * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  2692. * READ ONLY.
  2693. */
  2694. #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
  2695. /*
  2696. * Indicates that DirectDraw will support only source rectangles whose sizes in
  2697. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
  2698. */
  2699. #define DDCAPS_ALIGNSIZEDEST 0x00000004l
  2700. /*
  2701. * Indicates that DirectDraw will support only source rectangles that are aligned
  2702. * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  2703. * READ ONLY.
  2704. */
  2705. #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
  2706. /*
  2707. * Indicates that DirectDraw will support only source rectangles whose sizes in
  2708. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
  2709. */
  2710. #define DDCAPS_ALIGNSIZESRC 0x00000010l
  2711. /*
  2712. * Indicates that DirectDraw will create video memory surfaces that have a stride
  2713. * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
  2714. */
  2715. #define DDCAPS_ALIGNSTRIDE 0x00000020l
  2716. /*
  2717. * Display hardware is capable of blt operations.
  2718. */
  2719. #define DDCAPS_BLT 0x00000040l
  2720. /*
  2721. * Display hardware is capable of asynchronous blt operations.
  2722. */
  2723. #define DDCAPS_BLTQUEUE 0x00000080l
  2724. /*
  2725. * Display hardware is capable of color space conversions during the blt operation.
  2726. */
  2727. #define DDCAPS_BLTFOURCC 0x00000100l
  2728. /*
  2729. * Display hardware is capable of stretching during blt operations.
  2730. */
  2731. #define DDCAPS_BLTSTRETCH 0x00000200l
  2732. /*
  2733. * Display hardware is shared with GDI.
  2734. */
  2735. #define DDCAPS_GDI 0x00000400l
  2736. /*
  2737. * Display hardware can overlay.
  2738. */
  2739. #define DDCAPS_OVERLAY 0x00000800l
  2740. /*
  2741. * Set if display hardware supports overlays but can not clip them.
  2742. */
  2743. #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
  2744. /*
  2745. * Indicates that overlay hardware is capable of color space conversions during
  2746. * the overlay operation.
  2747. */
  2748. #define DDCAPS_OVERLAYFOURCC 0x00002000l
  2749. /*
  2750. * Indicates that stretching can be done by the overlay hardware.
  2751. */
  2752. #define DDCAPS_OVERLAYSTRETCH 0x00004000l
  2753. /*
  2754. * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  2755. * other than the primary surface.
  2756. */
  2757. #define DDCAPS_PALETTE 0x00008000l
  2758. /*
  2759. * Indicates that palette changes can be syncd with the veritcal refresh.
  2760. */
  2761. #define DDCAPS_PALETTEVSYNC 0x00010000l
  2762. /*
  2763. * Display hardware can return the current scan line.
  2764. */
  2765. #define DDCAPS_READSCANLINE 0x00020000l
  2766. /*
  2767. * This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete
  2768. */
  2769. #define DDCAPS_RESERVED1 0x00040000l
  2770. /*
  2771. * Display hardware is capable of generating a vertical blank interrupt.
  2772. */
  2773. #define DDCAPS_VBI 0x00080000l
  2774. /*
  2775. * Supports the use of z buffers with blt operations.
  2776. */
  2777. #define DDCAPS_ZBLTS 0x00100000l
  2778. /*
  2779. * Supports Z Ordering of overlays.
  2780. */
  2781. #define DDCAPS_ZOVERLAYS 0x00200000l
  2782. /*
  2783. * Supports color key
  2784. */
  2785. #define DDCAPS_COLORKEY 0x00400000l
  2786. /*
  2787. * Supports alpha surfaces
  2788. */
  2789. #define DDCAPS_ALPHA 0x00800000l
  2790. /*
  2791. * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  2792. */
  2793. #define DDCAPS_COLORKEYHWASSIST 0x01000000l
  2794. /*
  2795. * no hardware support at all
  2796. */
  2797. #define DDCAPS_NOHARDWARE 0x02000000l
  2798. /*
  2799. * Display hardware is capable of color fill with bltter
  2800. */
  2801. #define DDCAPS_BLTCOLORFILL 0x04000000l
  2802. /*
  2803. * Display hardware is bank switched, and potentially very slow at
  2804. * random access to VRAM.
  2805. */
  2806. #define DDCAPS_BANKSWITCHED 0x08000000l
  2807. /*
  2808. * Display hardware is capable of depth filling Z-buffers with bltter
  2809. */
  2810. #define DDCAPS_BLTDEPTHFILL 0x10000000l
  2811. /*
  2812. * Display hardware is capable of clipping while bltting.
  2813. */
  2814. #define DDCAPS_CANCLIP 0x20000000l
  2815. /*
  2816. * Display hardware is capable of clipping while stretch bltting.
  2817. */
  2818. #define DDCAPS_CANCLIPSTRETCHED 0x40000000l
  2819. /*
  2820. * Display hardware is capable of bltting to or from system memory
  2821. */
  2822. #define DDCAPS_CANBLTSYSMEM 0x80000000l
  2823. /****************************************************************************
  2824. *
  2825. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  2826. *
  2827. ****************************************************************************/
  2828. /*
  2829. * Display hardware is certified
  2830. */
  2831. #define DDCAPS2_CERTIFIED 0x00000001l
  2832. /*
  2833. * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  2834. * Direct3D rendering operations between calls to BeginScene() and EndScene()
  2835. */
  2836. #define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
  2837. /*
  2838. * Display hardware contains a video port
  2839. */
  2840. #define DDCAPS2_VIDEOPORT 0x00000004l
  2841. /*
  2842. * The overlay can be automatically flipped according to the video port
  2843. * VSYNCs, providing automatic doubled buffered display of video port
  2844. * data using an overlay
  2845. */
  2846. #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l
  2847. /*
  2848. * Overlay can display each field of interlaced data individually while
  2849. * it is interleaved in memory without causing jittery artifacts.
  2850. */
  2851. #define DDCAPS2_CANBOBINTERLEAVED 0x00000010l
  2852. /*
  2853. * Overlay can display each field of interlaced data individually while
  2854. * it is not interleaved in memory without causing jittery artifacts.
  2855. */
  2856. #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l
  2857. /*
  2858. * The overlay surface contains color controls (brightness, sharpness, etc.)
  2859. */
  2860. #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l
  2861. /*
  2862. * The primary surface contains color controls (gamma, etc.)
  2863. */
  2864. #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l
  2865. /*
  2866. * RGBZ -> RGB supported for 16:16 RGB:Z
  2867. */
  2868. #define DDCAPS2_CANDROPZ16BIT 0x00000100l
  2869. /*
  2870. * Driver supports non-local video memory.
  2871. */
  2872. #define DDCAPS2_NONLOCALVIDMEM 0x00000200l
  2873. /*
  2874. * Dirver supports non-local video memory but has different capabilities for
  2875. * non-local video memory surfaces. If this bit is set then so must
  2876. * DDCAPS2_NONLOCALVIDMEM.
  2877. */
  2878. #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l
  2879. /*
  2880. * Driver neither requires nor prefers surfaces to be pagelocked when performing
  2881. * blts involving system memory surfaces
  2882. */
  2883. #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l
  2884. /*
  2885. * Driver can create surfaces which are wider than the primary surface
  2886. */
  2887. #define DDCAPS2_WIDESURFACES 0x00001000l
  2888. /*
  2889. * Driver supports bob without using a video port by handling the
  2890. * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
  2891. */
  2892. #define DDCAPS2_CANFLIPODDEVEN 0x00002000l
  2893. /*
  2894. * Driver supports bob using hardware
  2895. */
  2896. #define DDCAPS2_CANBOBHARDWARE 0x00004000l
  2897. /*
  2898. * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
  2899. */
  2900. #define DDCAPS2_COPYFOURCC 0x00008000l
  2901. /*
  2902. * Driver supports loadable gamma ramps for the primary surface
  2903. */
  2904. #define DDCAPS2_PRIMARYGAMMA 0x00020000l
  2905. /*
  2906. * Driver can render in windowed mode.
  2907. */
  2908. #define DDCAPS2_CANRENDERWINDOWED 0x00080000l
  2909. /*
  2910. * A calibrator is available to adjust the gamma ramp according to the
  2911. * physical display properties so that the result will be identical on
  2912. * all calibrated systems.
  2913. */
  2914. #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000l
  2915. /*
  2916. * Indicates that the driver will respond to DDFLIP_INTERVALn flags
  2917. */
  2918. #define DDCAPS2_FLIPINTERVAL 0x00200000l
  2919. /*
  2920. * Indicates that the driver will respond to DDFLIP_NOVSYNC
  2921. */
  2922. #define DDCAPS2_FLIPNOVSYNC 0x00400000l
  2923. /*
  2924. * Driver supports management of video memory, if this flag is ON,
  2925. * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on
  2926. * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
  2927. */
  2928. #define DDCAPS2_CANMANAGETEXTURE 0x00800000l
  2929. /*
  2930. * The Direct3D texture manager uses this cap to decide whether to put managed
  2931. * surfaces in non-local video memory. If the cap is set, the texture manager will
  2932. * put managed surfaces in non-local vidmem. Drivers that cannot texture from
  2933. * local vidmem SHOULD NOT set this cap.
  2934. */
  2935. #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000l
  2936. /*
  2937. * Indicates that the driver supports DX7 type of stereo in at least one mode (which may
  2938. * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher)
  2939. * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of
  2940. * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application
  2941. * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode.
  2942. */
  2943. #define DDCAPS2_STEREO 0x02000000L
  2944. /*
  2945. * This caps bit is intended for internal DirectDraw use.
  2946. * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set.
  2947. * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and
  2948. * all the assoicated system memory blt caps must be correct).
  2949. * -It implies that the system->video blt caps in DDCAPS also apply to system to
  2950. * nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops
  2951. * members of DDCAPS (DDCORECAPS) are filled in correctly.
  2952. * -Any blt from system to nonlocal memory that matches these caps bits will
  2953. * be passed to the driver.
  2954. *
  2955. * NOTE: This is intended to enable the driver itself to do efficient reordering
  2956. * of textures. This is NOT meant to imply that hardware can write into AGP memory.
  2957. * This operation is not currently supported.
  2958. */
  2959. #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000L
  2960. /*
  2961. * was DDCAPS2_PUREHAL
  2962. */
  2963. #define DDCAPS2_RESERVED1 0x08000000L
  2964. /*
  2965. * Driver supports management of video memory, if this flag is ON,
  2966. * driver manages the resource if requested with DDSCAPS2_TEXTUREMANAGE on
  2967. * DirectX manages the resource if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
  2968. */
  2969. #define DDCAPS2_CANMANAGERESOURCE 0x10000000L
  2970. /*
  2971. * Driver supports dynamic textures. This will allow the application to set
  2972. * D3DUSAGE_DYNAMIC (DDSCAPS2_HINTDYNAMIC for drivers) at texture create time.
  2973. * Video memory dynamic textures WILL be lockable by applications. It is
  2974. * expected that these locks will be very efficient (which implies that the
  2975. * driver should always maintain a linear copy, a pointer to which can be
  2976. * quickly handed out to the application).
  2977. */
  2978. #define DDCAPS2_DYNAMICTEXTURES 0x20000000L
  2979. /****************************************************************************
  2980. *
  2981. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  2982. *
  2983. ****************************************************************************/
  2984. /*
  2985. * Supports alpha blending around the edge of a source color keyed surface.
  2986. * For Blt.
  2987. */
  2988. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
  2989. /*
  2990. * Supports alpha information in the pixel format. The bit depth of alpha
  2991. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  2992. * more opaque as the alpha value increases. (0 is transparent.)
  2993. * For Blt.
  2994. */
  2995. #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
  2996. /*
  2997. * Supports alpha information in the pixel format. The bit depth of alpha
  2998. * information in the pixel format can be 1,2,4, or 8. The alpha value
  2999. * becomes more transparent as the alpha value increases. (0 is opaque.)
  3000. * This flag can only be set if DDCAPS_ALPHA is set.
  3001. * For Blt.
  3002. */
  3003. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
  3004. /*
  3005. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  3006. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  3007. * (0 is transparent.)
  3008. * For Blt.
  3009. */
  3010. #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
  3011. /*
  3012. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  3013. * The NEG suffix indicates that this alpha channel becomes more transparent
  3014. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  3015. * DDCAPS_ALPHA is set.
  3016. * For Blt.
  3017. */
  3018. #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
  3019. /*
  3020. * Supports alpha blending around the edge of a source color keyed surface.
  3021. * For Overlays.
  3022. */
  3023. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
  3024. /*
  3025. * Supports alpha information in the pixel format. The bit depth of alpha
  3026. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  3027. * more opaque as the alpha value increases. (0 is transparent.)
  3028. * For Overlays.
  3029. */
  3030. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
  3031. /*
  3032. * Supports alpha information in the pixel format. The bit depth of alpha
  3033. * information in the pixel format can be 1,2,4, or 8. The alpha value
  3034. * becomes more transparent as the alpha value increases. (0 is opaque.)
  3035. * This flag can only be set if DDCAPS_ALPHA is set.
  3036. * For Overlays.
  3037. */
  3038. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
  3039. /*
  3040. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  3041. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  3042. * (0 is transparent.)
  3043. * For Overlays.
  3044. */
  3045. #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
  3046. /*
  3047. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  3048. * The NEG suffix indicates that this alpha channel becomes more transparent
  3049. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  3050. * DDCAPS_ALPHA is set.
  3051. * For Overlays.
  3052. */
  3053. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
  3054. #if DIRECTDRAW_VERSION < 0x0600
  3055. #endif //DIRECTDRAW_VERSION
  3056. /****************************************************************************
  3057. *
  3058. * DIRECTDRAW FX CAPABILITY FLAGS
  3059. *
  3060. ****************************************************************************/
  3061. /*
  3062. * Uses arithmetic operations to stretch and shrink surfaces during blt
  3063. * rather than pixel doubling techniques. Along the Y axis.
  3064. */
  3065. #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
  3066. /*
  3067. * Uses arithmetic operations to stretch during blt
  3068. * rather than pixel doubling techniques. Along the Y axis. Only
  3069. * works for x1, x2, etc.
  3070. */
  3071. #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
  3072. /*
  3073. * Supports mirroring left to right in blt.
  3074. */
  3075. #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
  3076. /*
  3077. * Supports mirroring top to bottom in blt.
  3078. */
  3079. #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
  3080. /*
  3081. * Supports arbitrary rotation for blts.
  3082. */
  3083. #define DDFXCAPS_BLTROTATION 0x00000100l
  3084. /*
  3085. * Supports 90 degree rotations for blts.
  3086. */
  3087. #define DDFXCAPS_BLTROTATION90 0x00000200l
  3088. /*
  3089. * DirectDraw supports arbitrary shrinking of a surface along the
  3090. * x axis (horizontal direction) for blts.
  3091. */
  3092. #define DDFXCAPS_BLTSHRINKX 0x00000400l
  3093. /*
  3094. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3095. * along the x axis (horizontal direction) for blts.
  3096. */
  3097. #define DDFXCAPS_BLTSHRINKXN 0x00000800l
  3098. /*
  3099. * DirectDraw supports arbitrary shrinking of a surface along the
  3100. * y axis (horizontal direction) for blts.
  3101. */
  3102. #define DDFXCAPS_BLTSHRINKY 0x00001000l
  3103. /*
  3104. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3105. * along the y axis (vertical direction) for blts.
  3106. */
  3107. #define DDFXCAPS_BLTSHRINKYN 0x00002000l
  3108. /*
  3109. * DirectDraw supports arbitrary stretching of a surface along the
  3110. * x axis (horizontal direction) for blts.
  3111. */
  3112. #define DDFXCAPS_BLTSTRETCHX 0x00004000l
  3113. /*
  3114. * DirectDraw supports integer stretching (1x,2x,) of a surface
  3115. * along the x axis (horizontal direction) for blts.
  3116. */
  3117. #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
  3118. /*
  3119. * DirectDraw supports arbitrary stretching of a surface along the
  3120. * y axis (horizontal direction) for blts.
  3121. */
  3122. #define DDFXCAPS_BLTSTRETCHY 0x00010000l
  3123. /*
  3124. * DirectDraw supports integer stretching (1x,2x,) of a surface
  3125. * along the y axis (vertical direction) for blts.
  3126. */
  3127. #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
  3128. /*
  3129. * Uses arithmetic operations to stretch and shrink surfaces during
  3130. * overlay rather than pixel doubling techniques. Along the Y axis
  3131. * for overlays.
  3132. */
  3133. #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
  3134. /*
  3135. * Uses arithmetic operations to stretch surfaces during
  3136. * overlay rather than pixel doubling techniques. Along the Y axis
  3137. * for overlays. Only works for x1, x2, etc.
  3138. */
  3139. #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
  3140. /*
  3141. * DirectDraw supports arbitrary shrinking of a surface along the
  3142. * x axis (horizontal direction) for overlays.
  3143. */
  3144. #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
  3145. /*
  3146. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3147. * along the x axis (horizontal direction) for overlays.
  3148. */
  3149. #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
  3150. /*
  3151. * DirectDraw supports arbitrary shrinking of a surface along the
  3152. * y axis (horizontal direction) for overlays.
  3153. */
  3154. #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
  3155. /*
  3156. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3157. * along the y axis (vertical direction) for overlays.
  3158. */
  3159. #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
  3160. /*
  3161. * DirectDraw supports arbitrary stretching of a surface along the
  3162. * x axis (horizontal direction) for overlays.
  3163. */
  3164. #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
  3165. /*
  3166. * DirectDraw supports integer stretching (1x,2x,) of a surface
  3167. * along the x axis (horizontal direction) for overlays.
  3168. */
  3169. #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
  3170. /*
  3171. * DirectDraw supports arbitrary stretching of a surface along the
  3172. * y axis (horizontal direction) for overlays.
  3173. */
  3174. #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
  3175. /*
  3176. * DirectDraw supports integer stretching (1x,2x,) of a surface
  3177. * along the y axis (vertical direction) for overlays.
  3178. */
  3179. #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
  3180. /*
  3181. * DirectDraw supports mirroring of overlays across the vertical axis
  3182. */
  3183. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  3184. /*
  3185. * DirectDraw supports mirroring of overlays across the horizontal axis
  3186. */
  3187. #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
  3188. /*
  3189. * DirectDraw supports deinterlacing of overlay surfaces
  3190. */
  3191. #define DDFXCAPS_OVERLAYDEINTERLACE 0x20000000l
  3192. /*
  3193. * Driver can do alpha blending for blits.
  3194. */
  3195. #define DDFXCAPS_BLTALPHA 0x00000001l
  3196. /*
  3197. * Driver can do surface-reconstruction filtering for warped blits.
  3198. */
  3199. #define DDFXCAPS_BLTFILTER DDFXCAPS_BLTARITHSTRETCHY
  3200. /*
  3201. * Driver can do alpha blending for overlays.
  3202. */
  3203. #define DDFXCAPS_OVERLAYALPHA 0x00000004l
  3204. /*
  3205. * Driver can do surface-reconstruction filtering for warped overlays.
  3206. */
  3207. #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
  3208. /****************************************************************************
  3209. *
  3210. * DIRECTDRAW STEREO VIEW CAPABILITIES
  3211. *
  3212. ****************************************************************************/
  3213. /*
  3214. * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete
  3215. */
  3216. #define DDSVCAPS_RESERVED1 0x00000001l
  3217. /*
  3218. * This flag used to be DDSVCAPS_FLICKER, which is now obsolete
  3219. */
  3220. #define DDSVCAPS_RESERVED2 0x00000002l
  3221. /*
  3222. * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete
  3223. */
  3224. #define DDSVCAPS_RESERVED3 0x00000004l
  3225. /*
  3226. * This flag used to be DDSVCAPS_SPLIT, which is now obsolete
  3227. */
  3228. #define DDSVCAPS_RESERVED4 0x00000008l
  3229. /*
  3230. * The stereo view is accomplished with switching technology
  3231. */
  3232. #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010L
  3233. /****************************************************************************
  3234. *
  3235. * DIRECTDRAWPALETTE CAPABILITIES
  3236. *
  3237. ****************************************************************************/
  3238. /*
  3239. * Index is 4 bits. There are sixteen color entries in the palette table.
  3240. */
  3241. #define DDPCAPS_4BIT 0x00000001l
  3242. /*
  3243. * Index is onto a 8 bit color index. This field is only valid with the
  3244. * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  3245. * surface is in 8bpp. Each color entry is one byte long and is an index
  3246. * into destination surface's 8bpp palette.
  3247. */
  3248. #define DDPCAPS_8BITENTRIES 0x00000002l
  3249. /*
  3250. * Index is 8 bits. There are 256 color entries in the palette table.
  3251. */
  3252. #define DDPCAPS_8BIT 0x00000004l
  3253. /*
  3254. * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  3255. * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  3256. * object.
  3257. * This flag is obsolete. DirectDraw always initializes the color array from
  3258. * the lpDDColorArray parameter. The definition remains for source-level
  3259. * compatibility.
  3260. */
  3261. #define DDPCAPS_INITIALIZE 0x00000000l
  3262. /*
  3263. * This palette is the one attached to the primary surface. Changing this
  3264. * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  3265. * and supported.
  3266. */
  3267. #define DDPCAPS_PRIMARYSURFACE 0x00000010l
  3268. /*
  3269. * This palette is the one attached to the primary surface left. Changing
  3270. * this table has immediate effect on the display for the left eye unless
  3271. * DDPSETPAL_VSYNC is specified and supported.
  3272. */
  3273. #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
  3274. /*
  3275. * This palette can have all 256 entries defined
  3276. */
  3277. #define DDPCAPS_ALLOW256 0x00000040l
  3278. /*
  3279. * This palette can have modifications to it synced with the monitors
  3280. * refresh rate.
  3281. */
  3282. #define DDPCAPS_VSYNC 0x00000080l
  3283. /*
  3284. * Index is 1 bit. There are two color entries in the palette table.
  3285. */
  3286. #define DDPCAPS_1BIT 0x00000100l
  3287. /*
  3288. * Index is 2 bit. There are four color entries in the palette table.
  3289. */
  3290. #define DDPCAPS_2BIT 0x00000200l
  3291. /*
  3292. * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
  3293. */
  3294. #define DDPCAPS_ALPHA 0x00000400l
  3295. /****************************************************************************
  3296. *
  3297. * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  3298. *
  3299. ****************************************************************************/
  3300. /****************************************************************************
  3301. *
  3302. * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  3303. *
  3304. ****************************************************************************/
  3305. /* 0 is the only legal value */
  3306. /****************************************************************************
  3307. *
  3308. * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
  3309. *
  3310. ****************************************************************************/
  3311. /*
  3312. * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
  3313. * must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this
  3314. * pointer and Release when the private data is destroyed. This includes when
  3315. * the surface or palette is destroyed before such priovate data is destroyed.
  3316. */
  3317. #define DDSPD_IUNKNOWNPOINTER 0x00000001L
  3318. /*
  3319. * Private data is only valid for the current state of the object,
  3320. * as determined by the uniqueness value.
  3321. */
  3322. #define DDSPD_VOLATILE 0x00000002L
  3323. /****************************************************************************
  3324. *
  3325. * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  3326. *
  3327. ****************************************************************************/
  3328. /****************************************************************************
  3329. *
  3330. * DIRECTDRAW BITDEPTH CONSTANTS
  3331. *
  3332. * NOTE: These are only used to indicate supported bit depths. These
  3333. * are flags only, they are not to be used as an actual bit depth. The
  3334. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  3335. * bit depths in a surface or for changing the display mode.
  3336. *
  3337. ****************************************************************************/
  3338. /*
  3339. * 1 bit per pixel.
  3340. */
  3341. #define DDBD_1 0x00004000l
  3342. /*
  3343. * 2 bits per pixel.
  3344. */
  3345. #define DDBD_2 0x00002000l
  3346. /*
  3347. * 4 bits per pixel.
  3348. */
  3349. #define DDBD_4 0x00001000l
  3350. /*
  3351. * 8 bits per pixel.
  3352. */
  3353. #define DDBD_8 0x00000800l
  3354. /*
  3355. * 16 bits per pixel.
  3356. */
  3357. #define DDBD_16 0x00000400l
  3358. /*
  3359. * 24 bits per pixel.
  3360. */
  3361. #define DDBD_24 0X00000200l
  3362. /*
  3363. * 32 bits per pixel.
  3364. */
  3365. #define DDBD_32 0x00000100l
  3366. /****************************************************************************
  3367. *
  3368. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  3369. *
  3370. ****************************************************************************/
  3371. /*
  3372. * Set if the structure contains a color space. Not set if the structure
  3373. * contains a single color key.
  3374. */
  3375. #define DDCKEY_COLORSPACE 0x00000001l
  3376. /*
  3377. * Set if the structure specifies a color key or color space which is to be
  3378. * used as a destination color key for blt operations.
  3379. */
  3380. #define DDCKEY_DESTBLT 0x00000002l
  3381. /*
  3382. * Set if the structure specifies a color key or color space which is to be
  3383. * used as a destination color key for overlay operations.
  3384. */
  3385. #define DDCKEY_DESTOVERLAY 0x00000004l
  3386. /*
  3387. * Set if the structure specifies a color key or color space which is to be
  3388. * used as a source color key for blt operations.
  3389. */
  3390. #define DDCKEY_SRCBLT 0x00000008l
  3391. /*
  3392. * Set if the structure specifies a color key or color space which is to be
  3393. * used as a source color key for overlay operations.
  3394. */
  3395. #define DDCKEY_SRCOVERLAY 0x00000010l
  3396. /****************************************************************************
  3397. *
  3398. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  3399. *
  3400. ****************************************************************************/
  3401. /*
  3402. * Supports transparent blting using a color key to identify the replaceable
  3403. * bits of the destination surface for RGB colors.
  3404. */
  3405. #define DDCKEYCAPS_DESTBLT 0x00000001l
  3406. /*
  3407. * Supports transparent blting using a color space to identify the replaceable
  3408. * bits of the destination surface for RGB colors.
  3409. */
  3410. #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
  3411. /*
  3412. * Supports transparent blting using a color space to identify the replaceable
  3413. * bits of the destination surface for YUV colors.
  3414. */
  3415. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
  3416. /*
  3417. * Supports transparent blting using a color key to identify the replaceable
  3418. * bits of the destination surface for YUV colors.
  3419. */
  3420. #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
  3421. /*
  3422. * Supports overlaying using colorkeying of the replaceable bits of the surface
  3423. * being overlayed for RGB colors.
  3424. */
  3425. #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
  3426. /*
  3427. * Supports a color space as the color key for the destination for RGB colors.
  3428. */
  3429. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
  3430. /*
  3431. * Supports a color space as the color key for the destination for YUV colors.
  3432. */
  3433. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
  3434. /*
  3435. * Supports only one active destination color key value for visible overlay
  3436. * surfaces.
  3437. */
  3438. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
  3439. /*
  3440. * Supports overlaying using colorkeying of the replaceable bits of the
  3441. * surface being overlayed for YUV colors.
  3442. */
  3443. #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
  3444. /*
  3445. * Supports transparent blting using the color key for the source with
  3446. * this surface for RGB colors.
  3447. */
  3448. #define DDCKEYCAPS_SRCBLT 0x00000200l
  3449. /*
  3450. * Supports transparent blting using a color space for the source with
  3451. * this surface for RGB colors.
  3452. */
  3453. #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
  3454. /*
  3455. * Supports transparent blting using a color space for the source with
  3456. * this surface for YUV colors.
  3457. */
  3458. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
  3459. /*
  3460. * Supports transparent blting using the color key for the source with
  3461. * this surface for YUV colors.
  3462. */
  3463. #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
  3464. /*
  3465. * Supports overlays using the color key for the source with this
  3466. * overlay surface for RGB colors.
  3467. */
  3468. #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
  3469. /*
  3470. * Supports overlays using a color space as the source color key for
  3471. * the overlay surface for RGB colors.
  3472. */
  3473. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
  3474. /*
  3475. * Supports overlays using a color space as the source color key for
  3476. * the overlay surface for YUV colors.
  3477. */
  3478. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
  3479. /*
  3480. * Supports only one active source color key value for visible
  3481. * overlay surfaces.
  3482. */
  3483. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
  3484. /*
  3485. * Supports overlays using the color key for the source with this
  3486. * overlay surface for YUV colors.
  3487. */
  3488. #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
  3489. /*
  3490. * there are no bandwidth trade-offs for using colorkey with an overlay
  3491. */
  3492. #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
  3493. /****************************************************************************
  3494. *
  3495. * DIRECTDRAW PIXELFORMAT FLAGS
  3496. *
  3497. ****************************************************************************/
  3498. /*
  3499. * The surface has alpha channel information in the pixel format.
  3500. */
  3501. #define DDPF_ALPHAPIXELS 0x00000001l
  3502. /*
  3503. * The pixel format contains alpha only information
  3504. */
  3505. #define DDPF_ALPHA 0x00000002l
  3506. /*
  3507. * The FourCC code is valid.
  3508. */
  3509. #define DDPF_FOURCC 0x00000004l
  3510. /*
  3511. * The surface is 4-bit color indexed.
  3512. */
  3513. #define DDPF_PALETTEINDEXED4 0x00000008l
  3514. /*
  3515. * The surface is indexed into a palette which stores indices
  3516. * into the destination surface's 8-bit palette.
  3517. */
  3518. #define DDPF_PALETTEINDEXEDTO8 0x00000010l
  3519. /*
  3520. * The surface is 8-bit color indexed.
  3521. */
  3522. #define DDPF_PALETTEINDEXED8 0x00000020l
  3523. /*
  3524. * The RGB data in the pixel format structure is valid.
  3525. */
  3526. #define DDPF_RGB 0x00000040l
  3527. /*
  3528. * The surface will accept pixel data in the format specified
  3529. * and compress it during the write.
  3530. */
  3531. #define DDPF_COMPRESSED 0x00000080l
  3532. /*
  3533. * The surface will accept RGB data and translate it during
  3534. * the write to YUV data. The format of the data to be written
  3535. * will be contained in the pixel format structure. The DDPF_RGB
  3536. * flag will be set.
  3537. */
  3538. #define DDPF_RGBTOYUV 0x00000100l
  3539. /*
  3540. * pixel format is YUV - YUV data in pixel format struct is valid
  3541. */
  3542. #define DDPF_YUV 0x00000200l
  3543. /*
  3544. * pixel format is a z buffer only surface
  3545. */
  3546. #define DDPF_ZBUFFER 0x00000400l
  3547. /*
  3548. * The surface is 1-bit color indexed.
  3549. */
  3550. #define DDPF_PALETTEINDEXED1 0x00000800l
  3551. /*
  3552. * The surface is 2-bit color indexed.
  3553. */
  3554. #define DDPF_PALETTEINDEXED2 0x00001000l
  3555. /*
  3556. * The surface contains Z information in the pixels
  3557. */
  3558. #define DDPF_ZPIXELS 0x00002000l
  3559. /*
  3560. * The surface contains stencil information along with Z
  3561. */
  3562. #define DDPF_STENCILBUFFER 0x00004000l
  3563. /*
  3564. * Premultiplied alpha format -- the color components have been
  3565. * premultiplied by the alpha component.
  3566. */
  3567. #define DDPF_ALPHAPREMULT 0x00008000l
  3568. /*
  3569. * Luminance data in the pixel format is valid.
  3570. * Use this flag for luminance-only or luminance+alpha surfaces,
  3571. * the bit depth is then ddpf.dwLuminanceBitCount.
  3572. */
  3573. #define DDPF_LUMINANCE 0x00020000l
  3574. /*
  3575. * Luminance data in the pixel format is valid.
  3576. * Use this flag when hanging luminance off bumpmap surfaces,
  3577. * the bit mask for the luminance portion of the pixel is then
  3578. * ddpf.dwBumpLuminanceBitMask
  3579. */
  3580. #define DDPF_BUMPLUMINANCE 0x00040000l
  3581. /*
  3582. * Bump map dUdV data in the pixel format is valid.
  3583. */
  3584. #define DDPF_BUMPDUDV 0x00080000l
  3585. /*===========================================================================
  3586. *
  3587. *
  3588. * DIRECTDRAW CALLBACK FLAGS
  3589. *
  3590. *
  3591. *==========================================================================*/
  3592. /****************************************************************************
  3593. *
  3594. * DIRECTDRAW ENUMSURFACES FLAGS
  3595. *
  3596. ****************************************************************************/
  3597. /*
  3598. * Enumerate all of the surfaces that meet the search criterion.
  3599. */
  3600. #define DDENUMSURFACES_ALL 0x00000001l
  3601. /*
  3602. * A search hit is a surface that matches the surface description.
  3603. */
  3604. #define DDENUMSURFACES_MATCH 0x00000002l
  3605. /*
  3606. * A search hit is a surface that does not match the surface description.
  3607. */
  3608. #define DDENUMSURFACES_NOMATCH 0x00000004l
  3609. /*
  3610. * Enumerate the first surface that can be created which meets the search criterion.
  3611. */
  3612. #define DDENUMSURFACES_CANBECREATED 0x00000008l
  3613. /*
  3614. * Enumerate the surfaces that already exist that meet the search criterion.
  3615. */
  3616. #define DDENUMSURFACES_DOESEXIST 0x00000010l
  3617. /****************************************************************************
  3618. *
  3619. * DIRECTDRAW SETDISPLAYMODE FLAGS
  3620. *
  3621. ****************************************************************************/
  3622. /*
  3623. * The desired mode is a standard VGA mode
  3624. */
  3625. #define DDSDM_STANDARDVGAMODE 0x00000001l
  3626. /****************************************************************************
  3627. *
  3628. * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  3629. *
  3630. ****************************************************************************/
  3631. /*
  3632. * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
  3633. * that a particular mode will be enumerated only once. This flag specifies whether
  3634. * the refresh rate is taken into account when determining if a mode is unique.
  3635. */
  3636. #define DDEDM_REFRESHRATES 0x00000001l
  3637. /*
  3638. * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
  3639. * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
  3640. * enumerated if the application has previously called SetCooperativeLevel with the
  3641. * DDSCL_ALLOWMODEX flag set).
  3642. */
  3643. #define DDEDM_STANDARDVGAMODES 0x00000002L
  3644. /****************************************************************************
  3645. *
  3646. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  3647. *
  3648. ****************************************************************************/
  3649. /*
  3650. * Exclusive mode owner will be responsible for the entire primary surface.
  3651. * GDI can be ignored. used with DD
  3652. */
  3653. #define DDSCL_FULLSCREEN 0x00000001l
  3654. /*
  3655. * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  3656. */
  3657. #define DDSCL_ALLOWREBOOT 0x00000002l
  3658. /*
  3659. * prevents DDRAW from modifying the application window.
  3660. * prevents DDRAW from minimize/restore the application window on activation.
  3661. */
  3662. #define DDSCL_NOWINDOWCHANGES 0x00000004l
  3663. /*
  3664. * app wants to work as a regular Windows application
  3665. */
  3666. #define DDSCL_NORMAL 0x00000008l
  3667. /*
  3668. * app wants exclusive access
  3669. */
  3670. #define DDSCL_EXCLUSIVE 0x00000010l
  3671. /*
  3672. * app can deal with non-windows display modes
  3673. */
  3674. #define DDSCL_ALLOWMODEX 0x00000040l
  3675. /*
  3676. * this window will receive the focus messages
  3677. */
  3678. #define DDSCL_SETFOCUSWINDOW 0x00000080l
  3679. /*
  3680. * this window is associated with the DDRAW object and will
  3681. * cover the screen in fullscreen mode
  3682. */
  3683. #define DDSCL_SETDEVICEWINDOW 0x00000100l
  3684. /*
  3685. * app wants DDRAW to create a window to be associated with the
  3686. * DDRAW object
  3687. */
  3688. #define DDSCL_CREATEDEVICEWINDOW 0x00000200l
  3689. /*
  3690. * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
  3691. * take the global crtisec more frequently.
  3692. */
  3693. #define DDSCL_MULTITHREADED 0x00000400l
  3694. /*
  3695. * App specifies that it would like to keep the FPU set up for optimal Direct3D
  3696. * performance (single precision and exceptions disabled) so Direct3D
  3697. * does not need to explicitly set the FPU each time. This is assumed by
  3698. * default in DirectX 7. See also DDSCL_FPUPRESERVE
  3699. */
  3700. #define DDSCL_FPUSETUP 0x00000800l
  3701. /*
  3702. * App specifies that it needs either double precision FPU or FPU exceptions
  3703. * enabled. This makes Direct3D explicitly set the FPU state eah time it is
  3704. * called. Setting the flag will reduce Direct3D performance. The flag is
  3705. * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP
  3706. */
  3707. #define DDSCL_FPUPRESERVE 0x00001000l
  3708. /****************************************************************************
  3709. *
  3710. * DIRECTDRAW BLT FLAGS
  3711. *
  3712. ****************************************************************************/
  3713. /*
  3714. * Use the alpha information in the pixel format or the alpha channel surface
  3715. * attached to the destination surface as the alpha channel for this blt.
  3716. */
  3717. #define DDBLT_ALPHADEST 0x00000001l
  3718. /*
  3719. * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  3720. * for the destination surface for this blt.
  3721. */
  3722. #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
  3723. /*
  3724. * The NEG suffix indicates that the destination surface becomes more
  3725. * transparent as the alpha value increases. (0 is opaque)
  3726. */
  3727. #define DDBLT_ALPHADESTNEG 0x00000004l
  3728. /*
  3729. * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  3730. * channel for the destination for this blt.
  3731. */
  3732. #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
  3733. /*
  3734. * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  3735. * for the edges of the image that border the color key colors.
  3736. */
  3737. #define DDBLT_ALPHAEDGEBLEND 0x00000010l
  3738. /*
  3739. * Use the alpha information in the pixel format or the alpha channel surface
  3740. * attached to the source surface as the alpha channel for this blt.
  3741. */
  3742. #define DDBLT_ALPHASRC 0x00000020l
  3743. /*
  3744. * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  3745. * for the source for this blt.
  3746. */
  3747. #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
  3748. /*
  3749. * The NEG suffix indicates that the source surface becomes more transparent
  3750. * as the alpha value increases. (0 is opaque)
  3751. */
  3752. #define DDBLT_ALPHASRCNEG 0x00000080l
  3753. /*
  3754. * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  3755. * for the source for this blt.
  3756. */
  3757. #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
  3758. /*
  3759. * Do this blt asynchronously through the FIFO in the order received. If
  3760. * there is no room in the hardware FIFO fail the call.
  3761. */
  3762. #define DDBLT_ASYNC 0x00000200l
  3763. /*
  3764. * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  3765. * to fill the destination rectangle on the destination surface with.
  3766. */
  3767. #define DDBLT_COLORFILL 0x00000400l
  3768. /*
  3769. * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  3770. * to use for the blt.
  3771. */
  3772. #define DDBLT_DDFX 0x00000800l
  3773. /*
  3774. * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  3775. * that are not part of the Win32 API.
  3776. */
  3777. #define DDBLT_DDROPS 0x00001000l
  3778. /*
  3779. * Use the color key associated with the destination surface.
  3780. */
  3781. #define DDBLT_KEYDEST 0x00002000l
  3782. /*
  3783. * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  3784. * for the destination surface.
  3785. */
  3786. #define DDBLT_KEYDESTOVERRIDE 0x00004000l
  3787. /*
  3788. * Use the color key associated with the source surface.
  3789. */
  3790. #define DDBLT_KEYSRC 0x00008000l
  3791. /*
  3792. * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  3793. * for the source surface.
  3794. */
  3795. #define DDBLT_KEYSRCOVERRIDE 0x00010000l
  3796. /*
  3797. * Use the dwROP field in the DDBLTFX structure for the raster operation
  3798. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  3799. */
  3800. #define DDBLT_ROP 0x00020000l
  3801. /*
  3802. * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  3803. * (specified in 1/100th of a degree) to rotate the surface.
  3804. */
  3805. #define DDBLT_ROTATIONANGLE 0x00040000l
  3806. /*
  3807. * Z-buffered blt using the z-buffers attached to the source and destination
  3808. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  3809. * z-buffer opcode.
  3810. */
  3811. #define DDBLT_ZBUFFER 0x00080000l
  3812. /*
  3813. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  3814. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  3815. * for the destination.
  3816. */
  3817. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
  3818. /*
  3819. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  3820. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  3821. * respectively for the destination.
  3822. */
  3823. #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
  3824. /*
  3825. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  3826. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  3827. * for the source.
  3828. */
  3829. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
  3830. /*
  3831. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  3832. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  3833. * respectively for the source.
  3834. */
  3835. #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
  3836. /*
  3837. * wait until the device is ready to handle the blt
  3838. * this will cause blt to not return DDERR_WASSTILLDRAWING
  3839. */
  3840. #define DDBLT_WAIT 0x01000000l
  3841. /*
  3842. * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  3843. * to fill the destination rectangle on the destination Z-buffer surface
  3844. * with.
  3845. */
  3846. #define DDBLT_DEPTHFILL 0x02000000l
  3847. /*
  3848. * wait until the device is ready to handle the blt
  3849. * this will cause blt to not return DDERR_WASSTILLDRAWING
  3850. */
  3851. #define DDBLT_DONOTWAIT 0x08000000l
  3852. /*
  3853. * These flags indicate a presentation blt (i.e. a blt
  3854. * that moves surface contents from an offscreen back buffer to the primary
  3855. * surface). The driver is not allowed to "queue" more than three such blts.
  3856. * The "end" of the presentation blt is indicated, since the
  3857. * blt may be clipped, in which case the runtime will call the driver with
  3858. * several blts. All blts (even if not clipped) are tagged with DDBLT_PRESENTATION
  3859. * and the last (even if not clipped) additionally with DDBLT_LAST_PRESENTATION.
  3860. * Thus the true rule is that the driver must not schedule a DDBLT_PRESENTATION
  3861. * blt if there are 3 or more DDBLT_PRESENTLAST blts in the hardware pipe.
  3862. * If there are such blts in the pipe, the driver should return DDERR_WASSTILLDRAWING
  3863. * until the oldest queued DDBLT_LAST_PRESENTATION blts has been retired (i.e. the
  3864. * pixels have been actually written to the primary surface). Once the oldest blt
  3865. * has been retired, the driver is free to schedule the current blt.
  3866. * The goal is to provide a mechanism whereby the device's hardware queue never
  3867. * gets more than 3 frames ahead of the frames being generated by the application.
  3868. * When excessive queueing occurs, applications become unusable because the application
  3869. * visibly lags user input, and such problems make windowed interactive applications impossible.
  3870. * Some drivers may not have sufficient knowledge of their hardware's FIFO to know
  3871. * when a certain blt has been retired. Such drivers should code cautiously, and
  3872. * simply not allow any frames to be queued at all. DDBLT_LAST_PRESENTATION should cause
  3873. * such drivers to return DDERR_WASSTILLDRAWING until the accelerator is completely
  3874. * finished- exactly as if the application had called Lock on the source surface
  3875. * before calling Blt.
  3876. * In other words, the driver is allowed and encouraged to
  3877. * generate as much latency as it can, but never more than 3 frames worth.
  3878. * Implementation detail: Drivers should count blts against the SOURCE surface, not
  3879. * against the primary surface. This enables multiple parallel windowed application
  3880. * to function more optimally.
  3881. * This flag is passed only to DX8 or higher drivers.
  3882. *
  3883. * APPLICATIONS DO NOT SET THESE FLAGS. THEY ARE SET BY THE DIRECTDRAW RUNTIME.
  3884. *
  3885. */
  3886. #define DDBLT_PRESENTATION 0x10000000l
  3887. #define DDBLT_LAST_PRESENTATION 0x20000000l
  3888. /****************************************************************************
  3889. *
  3890. * BLTFAST FLAGS
  3891. *
  3892. ****************************************************************************/
  3893. #define DDBLTFAST_NOCOLORKEY 0x00000000
  3894. #define DDBLTFAST_SRCCOLORKEY 0x00000001
  3895. #define DDBLTFAST_DESTCOLORKEY 0x00000002
  3896. #define DDBLTFAST_WAIT 0x00000010
  3897. #define DDBLTFAST_DONOTWAIT 0x00000020
  3898. /****************************************************************************
  3899. *
  3900. * FLIP FLAGS
  3901. *
  3902. ****************************************************************************/
  3903. #define DDFLIP_WAIT 0x00000001L
  3904. /*
  3905. * Indicates that the target surface contains the even field of video data.
  3906. * This flag is only valid with an overlay surface.
  3907. */
  3908. #define DDFLIP_EVEN 0x00000002L
  3909. /*
  3910. * Indicates that the target surface contains the odd field of video data.
  3911. * This flag is only valid with an overlay surface.
  3912. */
  3913. #define DDFLIP_ODD 0x00000004L
  3914. /*
  3915. * Causes DirectDraw to perform the physical flip immediately and return
  3916. * to the application. Typically, what was the front buffer but is now the back
  3917. * buffer will still be visible (depending on timing) until the next vertical
  3918. * retrace. Subsequent operations involving the two flipped surfaces will
  3919. * not check to see if the physical flip has finished (i.e. will not return
  3920. * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
  3921. * This allows an application to perform Flips at a higher frequency than the
  3922. * monitor refresh rate, but may introduce visible artifacts.
  3923. * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set,
  3924. * DDFLIP_NOVSYNC has no effect.
  3925. */
  3926. #define DDFLIP_NOVSYNC 0x00000008L
  3927. /*
  3928. * Flip Interval Flags. These flags indicate how many vertical retraces to wait between
  3929. * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
  3930. * surface involved in the flip until the specified number of vertical retraces has
  3931. * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set,
  3932. * DDFLIP_INTERVALn has no effect.
  3933. */
  3934. /*
  3935. * DirectDraw will flip on every other vertical sync
  3936. */
  3937. #define DDFLIP_INTERVAL2 0x02000000L
  3938. /*
  3939. * DirectDraw will flip on every third vertical sync
  3940. */
  3941. #define DDFLIP_INTERVAL3 0x03000000L
  3942. /*
  3943. * DirectDraw will flip on every fourth vertical sync
  3944. */
  3945. #define DDFLIP_INTERVAL4 0x04000000L
  3946. /*
  3947. * DirectDraw will flip and display a main stereo surface
  3948. */
  3949. #define DDFLIP_STEREO 0x00000010L
  3950. /*
  3951. * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish
  3952. * to override the default and use time when the accelerator is busy (as denoted by
  3953. * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT.
  3954. */
  3955. #define DDFLIP_DONOTWAIT 0x00000020L
  3956. /****************************************************************************
  3957. *
  3958. * DIRECTDRAW SURFACE OVERLAY FLAGS
  3959. *
  3960. ****************************************************************************/
  3961. /*
  3962. * Use the alpha information in the pixel format or the alpha channel surface
  3963. * attached to the destination surface as the alpha channel for the
  3964. * destination overlay.
  3965. */
  3966. #define DDOVER_ALPHADEST 0x00000001l
  3967. /*
  3968. * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  3969. * destination alpha channel for this overlay.
  3970. */
  3971. #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
  3972. /*
  3973. * The NEG suffix indicates that the destination surface becomes more
  3974. * transparent as the alpha value increases.
  3975. */
  3976. #define DDOVER_ALPHADESTNEG 0x00000004l
  3977. /*
  3978. * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  3979. * channel destination for this overlay.
  3980. */
  3981. #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
  3982. /*
  3983. * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  3984. * channel for the edges of the image that border the color key colors.
  3985. */
  3986. #define DDOVER_ALPHAEDGEBLEND 0x00000010l
  3987. /*
  3988. * Use the alpha information in the pixel format or the alpha channel surface
  3989. * attached to the source surface as the source alpha channel for this overlay.
  3990. */
  3991. #define DDOVER_ALPHASRC 0x00000020l
  3992. /*
  3993. * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  3994. * alpha channel for this overlay.
  3995. */
  3996. #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
  3997. /*
  3998. * The NEG suffix indicates that the source surface becomes more transparent
  3999. * as the alpha value increases.
  4000. */
  4001. #define DDOVER_ALPHASRCNEG 0x00000080l
  4002. /*
  4003. * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  4004. * source for this overlay.
  4005. */
  4006. #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
  4007. /*
  4008. * Turn this overlay off.
  4009. */
  4010. #define DDOVER_HIDE 0x00000200l
  4011. /*
  4012. * Use the color key associated with the destination surface.
  4013. */
  4014. #define DDOVER_KEYDEST 0x00000400l
  4015. /*
  4016. * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  4017. * for the destination surface
  4018. */
  4019. #define DDOVER_KEYDESTOVERRIDE 0x00000800l
  4020. /*
  4021. * Use the color key associated with the source surface.
  4022. */
  4023. #define DDOVER_KEYSRC 0x00001000l
  4024. /*
  4025. * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  4026. * for the source surface.
  4027. */
  4028. #define DDOVER_KEYSRCOVERRIDE 0x00002000l
  4029. /*
  4030. * Turn this overlay on.
  4031. */
  4032. #define DDOVER_SHOW 0x00004000l
  4033. /*
  4034. * Add a dirty rect to an emulated overlayed surface.
  4035. */
  4036. #define DDOVER_ADDDIRTYRECT 0x00008000l
  4037. /*
  4038. * Redraw all dirty rects on an emulated overlayed surface.
  4039. */
  4040. #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
  4041. /*
  4042. * Redraw the entire surface on an emulated overlayed surface.
  4043. */
  4044. #define DDOVER_REFRESHALL 0x00020000l
  4045. /*
  4046. * Use the overlay FX flags to define special overlay FX
  4047. */
  4048. #define DDOVER_DDFX 0x00080000l
  4049. /*
  4050. * Autoflip the overlay when ever the video port autoflips
  4051. */
  4052. #define DDOVER_AUTOFLIP 0x00100000l
  4053. /*
  4054. * Display each field of video port data individually without
  4055. * causing any jittery artifacts
  4056. */
  4057. #define DDOVER_BOB 0x00200000l
  4058. /*
  4059. * Indicates that bob/weave decisions should not be overridden by other
  4060. * interfaces.
  4061. */
  4062. #define DDOVER_OVERRIDEBOBWEAVE 0x00400000l
  4063. /*
  4064. * Indicates that the surface memory is composed of interleaved fields.
  4065. */
  4066. #define DDOVER_INTERLEAVED 0x00800000l
  4067. /*
  4068. * Indicates that bob will be performed using hardware rather than
  4069. * software or emulated.
  4070. */
  4071. #define DDOVER_BOBHARDWARE 0x01000000l
  4072. /*
  4073. * Indicates that overlay FX structure contains valid ARGB scaling factors.
  4074. */
  4075. #define DDOVER_ARGBSCALEFACTORS 0x02000000l
  4076. /*
  4077. * Indicates that ARGB scaling factors can be degraded to fit driver capabilities.
  4078. */
  4079. #define DDOVER_DEGRADEARGBSCALING 0x04000000l
  4080. /****************************************************************************
  4081. *
  4082. * DIRECTDRAWSURFACE LOCK FLAGS
  4083. *
  4084. ****************************************************************************/
  4085. /*
  4086. * The default. Set to indicate that Lock should return a valid memory pointer
  4087. * to the top of the specified rectangle. If no rectangle is specified then a
  4088. * pointer to the top of the surface is returned.
  4089. */
  4090. #define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
  4091. /*
  4092. * Set to indicate that Lock should wait until it can obtain a valid memory
  4093. * pointer before returning. If this bit is set, Lock will never return
  4094. * DDERR_WASSTILLDRAWING.
  4095. */
  4096. #define DDLOCK_WAIT 0x00000001L
  4097. /*
  4098. * Set if an event handle is being passed to Lock. Lock will trigger the event
  4099. * when it can return the surface memory pointer requested.
  4100. */
  4101. #define DDLOCK_EVENT 0x00000002L
  4102. /*
  4103. * Indicates that the surface being locked will only be read from.
  4104. */
  4105. #define DDLOCK_READONLY 0x00000010L
  4106. /*
  4107. * Indicates that the surface being locked will only be written to
  4108. */
  4109. #define DDLOCK_WRITEONLY 0x00000020L
  4110. /*
  4111. * Indicates that a system wide lock should not be taken when this surface
  4112. * is locked. This has several advantages (cursor responsiveness, ability
  4113. * to call more Windows functions, easier debugging) when locking video
  4114. * memory surfaces. However, an application specifying this flag must
  4115. * comply with a number of conditions documented in the help file.
  4116. * Furthermore, this flag cannot be specified when locking the primary.
  4117. */
  4118. #define DDLOCK_NOSYSLOCK 0x00000800L
  4119. /*
  4120. * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices
  4121. * that were referred to in Draw*PrimtiveVB calls since the start of the
  4122. * frame (or the last lock without this flag) will be modified during the
  4123. * lock. This can be useful when one is only appending data to the vertex
  4124. * buffer
  4125. */
  4126. #define DDLOCK_NOOVERWRITE 0x00001000L
  4127. /*
  4128. * Indicates that no assumptions will be made about the contents of the
  4129. * surface or vertex buffer during this lock.
  4130. * This enables two things:
  4131. * - Direct3D or the driver may provide an alternative memory
  4132. * area as the vertex buffer. This is useful when one plans to clear the
  4133. * contents of the vertex buffer and fill in new data.
  4134. * - Drivers sometimes store surface data in a re-ordered format.
  4135. * When the application locks the surface, the driver is forced to un-re-order
  4136. * the surface data before allowing the application to see the surface contents.
  4137. * This flag is a hint to the driver that it can skip the un-re-ordering process
  4138. * since the application plans to overwrite every single pixel in the surface
  4139. * or locked rectangle (and so erase any un-re-ordered pixels anyway).
  4140. * Applications should always set this flag when they intend to overwrite the entire
  4141. * surface or locked rectangle.
  4142. */
  4143. #define DDLOCK_DISCARDCONTENTS 0x00002000L
  4144. /*
  4145. * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS
  4146. */
  4147. #define DDLOCK_OKTOSWAP 0x00002000L
  4148. /*
  4149. * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish
  4150. * to override the default and use time when the accelerator is busy (as denoted by
  4151. * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT.
  4152. */
  4153. #define DDLOCK_DONOTWAIT 0x00004000L
  4154. /*
  4155. * This indicates volume texture lock with front and back specified.
  4156. */
  4157. #define DDLOCK_HASVOLUMETEXTUREBOXRECT 0x00008000L
  4158. /*
  4159. * This indicates that the driver should not update dirty rect information for this lock.
  4160. */
  4161. #define DDLOCK_NODIRTYUPDATE 0x00010000L
  4162. /****************************************************************************
  4163. *
  4164. * DIRECTDRAWSURFACE PAGELOCK FLAGS
  4165. *
  4166. ****************************************************************************/
  4167. /*
  4168. * No flags defined at present
  4169. */
  4170. /****************************************************************************
  4171. *
  4172. * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  4173. *
  4174. ****************************************************************************/
  4175. /*
  4176. * No flags defined at present
  4177. */
  4178. /****************************************************************************
  4179. *
  4180. * DIRECTDRAWSURFACE BLT FX FLAGS
  4181. *
  4182. ****************************************************************************/
  4183. /*
  4184. * If stretching, use arithmetic stretching along the Y axis for this blt.
  4185. */
  4186. #define DDBLTFX_ARITHSTRETCHY 0x00000001l
  4187. /*
  4188. * Do this blt mirroring the surface left to right. Spin the
  4189. * surface around its y-axis.
  4190. */
  4191. #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
  4192. /*
  4193. * Do this blt mirroring the surface up and down. Spin the surface
  4194. * around its x-axis.
  4195. */
  4196. #define DDBLTFX_MIRRORUPDOWN 0x00000004l
  4197. /*
  4198. * Schedule this blt to avoid tearing.
  4199. */
  4200. #define DDBLTFX_NOTEARING 0x00000008l
  4201. /*
  4202. * Do this blt rotating the surface one hundred and eighty degrees.
  4203. */
  4204. #define DDBLTFX_ROTATE180 0x00000010l
  4205. /*
  4206. * Do this blt rotating the surface two hundred and seventy degrees.
  4207. */
  4208. #define DDBLTFX_ROTATE270 0x00000020l
  4209. /*
  4210. * Do this blt rotating the surface ninety degrees.
  4211. */
  4212. #define DDBLTFX_ROTATE90 0x00000040l
  4213. /*
  4214. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  4215. * specified to limit the bits copied from the source surface.
  4216. */
  4217. #define DDBLTFX_ZBUFFERRANGE 0x00000080l
  4218. /*
  4219. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  4220. * before comparing it with the desting z values.
  4221. */
  4222. #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
  4223. /****************************************************************************
  4224. *
  4225. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  4226. *
  4227. ****************************************************************************/
  4228. /*
  4229. * If stretching, use arithmetic stretching along the Y axis for this overlay.
  4230. */
  4231. #define DDOVERFX_ARITHSTRETCHY 0x00000001l
  4232. /*
  4233. * Mirror the overlay across the vertical axis
  4234. */
  4235. #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
  4236. /*
  4237. * Mirror the overlay across the horizontal axis
  4238. */
  4239. #define DDOVERFX_MIRRORUPDOWN 0x00000004l
  4240. /*
  4241. * Deinterlace the overlay, if possible
  4242. */
  4243. #define DDOVERFX_DEINTERLACE 0x00000008l
  4244. /****************************************************************************
  4245. *
  4246. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  4247. *
  4248. ****************************************************************************/
  4249. /*
  4250. * return when the vertical blank interval begins
  4251. */
  4252. #define DDWAITVB_BLOCKBEGIN 0x00000001l
  4253. /*
  4254. * set up an event to trigger when the vertical blank begins
  4255. */
  4256. #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
  4257. /*
  4258. * return when the vertical blank interval ends and display begins
  4259. */
  4260. #define DDWAITVB_BLOCKEND 0x00000004l
  4261. /****************************************************************************
  4262. *
  4263. * DIRECTDRAW GETFLIPSTATUS FLAGS
  4264. *
  4265. ****************************************************************************/
  4266. /*
  4267. * is it OK to flip now?
  4268. */
  4269. #define DDGFS_CANFLIP 0x00000001l
  4270. /*
  4271. * is the last flip finished?
  4272. */
  4273. #define DDGFS_ISFLIPDONE 0x00000002l
  4274. /****************************************************************************
  4275. *
  4276. * DIRECTDRAW GETBLTSTATUS FLAGS
  4277. *
  4278. ****************************************************************************/
  4279. /*
  4280. * is it OK to blt now?
  4281. */
  4282. #define DDGBS_CANBLT 0x00000001l
  4283. /*
  4284. * is the blt to the surface finished?
  4285. */
  4286. #define DDGBS_ISBLTDONE 0x00000002l
  4287. /****************************************************************************
  4288. *
  4289. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  4290. *
  4291. ****************************************************************************/
  4292. /*
  4293. * Enumerate overlays back to front.
  4294. */
  4295. #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
  4296. /*
  4297. * Enumerate overlays front to back
  4298. */
  4299. #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
  4300. /****************************************************************************
  4301. *
  4302. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  4303. *
  4304. ****************************************************************************/
  4305. /*
  4306. * Send overlay to front
  4307. */
  4308. #define DDOVERZ_SENDTOFRONT 0x00000000l
  4309. /*
  4310. * Send overlay to back
  4311. */
  4312. #define DDOVERZ_SENDTOBACK 0x00000001l
  4313. /*
  4314. * Move Overlay forward
  4315. */
  4316. #define DDOVERZ_MOVEFORWARD 0x00000002l
  4317. /*
  4318. * Move Overlay backward
  4319. */
  4320. #define DDOVERZ_MOVEBACKWARD 0x00000003l
  4321. /*
  4322. * Move Overlay in front of relative surface
  4323. */
  4324. #define DDOVERZ_INSERTINFRONTOF 0x00000004l
  4325. /*
  4326. * Move Overlay in back of relative surface
  4327. */
  4328. #define DDOVERZ_INSERTINBACKOF 0x00000005l
  4329. /****************************************************************************
  4330. *
  4331. * DIRECTDRAW SETGAMMARAMP FLAGS
  4332. *
  4333. ****************************************************************************/
  4334. /*
  4335. * Request calibrator to adjust the gamma ramp according to the physical
  4336. * properties of the display so that the result should appear identical
  4337. * on all systems.
  4338. */
  4339. #define DDSGR_CALIBRATE 0x00000001L
  4340. /****************************************************************************
  4341. *
  4342. * DIRECTDRAW STARTMODETEST FLAGS
  4343. *
  4344. ****************************************************************************/
  4345. /*
  4346. * Indicates that the mode being tested has passed
  4347. */
  4348. #define DDSMT_ISTESTREQUIRED 0x00000001L
  4349. /****************************************************************************
  4350. *
  4351. * DIRECTDRAW EVALUATEMODE FLAGS
  4352. *
  4353. ****************************************************************************/
  4354. /*
  4355. * Indicates that the mode being tested has passed
  4356. */
  4357. #define DDEM_MODEPASSED 0x00000001L
  4358. /*
  4359. * Indicates that the mode being tested has failed
  4360. */
  4361. #define DDEM_MODEFAILED 0x00000002L
  4362. /*===========================================================================
  4363. *
  4364. *
  4365. * DIRECTDRAW RETURN CODES
  4366. *
  4367. * The return values from DirectDraw Commands and Surface that return an HRESULT
  4368. * are codes from DirectDraw concerning the results of the action
  4369. * requested by DirectDraw.
  4370. *
  4371. *==========================================================================*/
  4372. /*
  4373. * Status is OK
  4374. *
  4375. * Issued by: DirectDraw Commands and all callbacks
  4376. */
  4377. #define DD_OK S_OK
  4378. #define DD_FALSE S_FALSE
  4379. /****************************************************************************
  4380. *
  4381. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  4382. *
  4383. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  4384. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  4385. * enumeration callback routines.
  4386. *
  4387. ****************************************************************************/
  4388. /*
  4389. * stop the enumeration
  4390. */
  4391. #define DDENUMRET_CANCEL 0
  4392. /*
  4393. * continue the enumeration
  4394. */
  4395. #define DDENUMRET_OK 1
  4396. /****************************************************************************
  4397. *
  4398. * DIRECTDRAW ERRORS
  4399. *
  4400. * Errors are represented by negative values and cannot be combined.
  4401. *
  4402. ****************************************************************************/
  4403. /*
  4404. * This object is already initialized
  4405. */
  4406. #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
  4407. /*
  4408. * This surface can not be attached to the requested surface.
  4409. */
  4410. #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
  4411. /*
  4412. * This surface can not be detached from the requested surface.
  4413. */
  4414. #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
  4415. /*
  4416. * Support is currently not available.
  4417. */
  4418. #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
  4419. /*
  4420. * An exception was encountered while performing the requested operation
  4421. */
  4422. #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
  4423. /*
  4424. * Generic failure.
  4425. */
  4426. #define DDERR_GENERIC E_FAIL
  4427. /*
  4428. * Height of rectangle provided is not a multiple of reqd alignment
  4429. */
  4430. #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
  4431. /*
  4432. * Unable to match primary surface creation request with existing
  4433. * primary surface.
  4434. */
  4435. #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
  4436. /*
  4437. * One or more of the caps bits passed to the callback are incorrect.
  4438. */
  4439. #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
  4440. /*
  4441. * DirectDraw does not support provided Cliplist.
  4442. */
  4443. #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
  4444. /*
  4445. * DirectDraw does not support the requested mode
  4446. */
  4447. #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
  4448. /*
  4449. * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  4450. */
  4451. #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
  4452. /*
  4453. * One or more of the parameters passed to the callback function are
  4454. * incorrect.
  4455. */
  4456. #define DDERR_INVALIDPARAMS E_INVALIDARG
  4457. /*
  4458. * pixel format was invalid as specified
  4459. */
  4460. #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
  4461. /*
  4462. * Rectangle provided was invalid.
  4463. */
  4464. #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
  4465. /*
  4466. * Operation could not be carried out because one or more surfaces are locked
  4467. */
  4468. #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
  4469. /*
  4470. * There is no 3D present.
  4471. */
  4472. #define DDERR_NO3D MAKE_DDHRESULT( 170 )
  4473. /*
  4474. * Operation could not be carried out because there is no alpha accleration
  4475. * hardware present or available.
  4476. */
  4477. #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
  4478. /*
  4479. * Operation could not be carried out because there is no stereo
  4480. * hardware present or available.
  4481. */
  4482. #define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
  4483. /*
  4484. * Operation could not be carried out because there is no hardware
  4485. * present which supports stereo surfaces
  4486. */
  4487. #define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
  4488. /*
  4489. * no clip list available
  4490. */
  4491. #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
  4492. /*
  4493. * Operation could not be carried out because there is no color conversion
  4494. * hardware present or available.
  4495. */
  4496. #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
  4497. /*
  4498. * Create function called without DirectDraw object method SetCooperativeLevel
  4499. * being called.
  4500. */
  4501. #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
  4502. /*
  4503. * Surface doesn't currently have a color key
  4504. */
  4505. #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
  4506. /*
  4507. * Operation could not be carried out because there is no hardware support
  4508. * of the dest color key.
  4509. */
  4510. #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
  4511. /*
  4512. * No DirectDraw support possible with current display driver
  4513. */
  4514. #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
  4515. /*
  4516. * Operation requires the application to have exclusive mode but the
  4517. * application does not have exclusive mode.
  4518. */
  4519. #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
  4520. /*
  4521. * Flipping visible surfaces is not supported.
  4522. */
  4523. #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
  4524. /*
  4525. * There is no GDI present.
  4526. */
  4527. #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
  4528. /*
  4529. * Operation could not be carried out because there is no hardware present
  4530. * or available.
  4531. */
  4532. #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
  4533. /*
  4534. * Requested item was not found
  4535. */
  4536. #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
  4537. /*
  4538. * Operation could not be carried out because there is no overlay hardware
  4539. * present or available.
  4540. */
  4541. #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
  4542. /*
  4543. * Operation could not be carried out because the source and destination
  4544. * rectangles are on the same surface and overlap each other.
  4545. */
  4546. #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
  4547. /*
  4548. * Operation could not be carried out because there is no appropriate raster
  4549. * op hardware present or available.
  4550. */
  4551. #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
  4552. /*
  4553. * Operation could not be carried out because there is no rotation hardware
  4554. * present or available.
  4555. */
  4556. #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
  4557. /*
  4558. * Operation could not be carried out because there is no hardware support
  4559. * for stretching
  4560. */
  4561. #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
  4562. /*
  4563. * DirectDrawSurface is not in 4 bit color palette and the requested operation
  4564. * requires 4 bit color palette.
  4565. */
  4566. #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
  4567. /*
  4568. * DirectDrawSurface is not in 4 bit color index palette and the requested
  4569. * operation requires 4 bit color index palette.
  4570. */
  4571. #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
  4572. /*
  4573. * DirectDraw Surface is not in 8 bit color mode and the requested operation
  4574. * requires 8 bit color.
  4575. */
  4576. #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
  4577. /*
  4578. * Operation could not be carried out because there is no texture mapping
  4579. * hardware present or available.
  4580. */
  4581. #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
  4582. /*
  4583. * Operation could not be carried out because there is no hardware support
  4584. * for vertical blank synchronized operations.
  4585. */
  4586. #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
  4587. /*
  4588. * Operation could not be carried out because there is no hardware support
  4589. * for zbuffer blting.
  4590. */
  4591. #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
  4592. /*
  4593. * Overlay surfaces could not be z layered based on their BltOrder because
  4594. * the hardware does not support z layering of overlays.
  4595. */
  4596. #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
  4597. /*
  4598. * The hardware needed for the requested operation has already been
  4599. * allocated.
  4600. */
  4601. #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
  4602. /*
  4603. * DirectDraw does not have enough memory to perform the operation.
  4604. */
  4605. #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
  4606. /*
  4607. * DirectDraw does not have enough memory to perform the operation.
  4608. */
  4609. #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
  4610. /*
  4611. * hardware does not support clipped overlays
  4612. */
  4613. #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
  4614. /*
  4615. * Can only have ony color key active at one time for overlays
  4616. */
  4617. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
  4618. /*
  4619. * Access to this palette is being refused because the palette is already
  4620. * locked by another thread.
  4621. */
  4622. #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
  4623. /*
  4624. * No src color key specified for this operation.
  4625. */
  4626. #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
  4627. /*
  4628. * This surface is already attached to the surface it is being attached to.
  4629. */
  4630. #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
  4631. /*
  4632. * This surface is already a dependency of the surface it is being made a
  4633. * dependency of.
  4634. */
  4635. #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
  4636. /*
  4637. * Access to this surface is being refused because the surface is already
  4638. * locked by another thread.
  4639. */
  4640. #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
  4641. /*
  4642. * Access to this surface is being refused because no driver exists
  4643. * which can supply a pointer to the surface.
  4644. * This is most likely to happen when attempting to lock the primary
  4645. * surface when no DCI provider is present.
  4646. * Will also happen on attempts to lock an optimized surface.
  4647. */
  4648. #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
  4649. /*
  4650. * Access to Surface refused because Surface is obscured.
  4651. */
  4652. #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
  4653. /*
  4654. * Access to this surface is being refused because the surface is gone.
  4655. * The DIRECTDRAWSURFACE object representing this surface should
  4656. * have Restore called on it.
  4657. */
  4658. #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
  4659. /*
  4660. * The requested surface is not attached.
  4661. */
  4662. #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
  4663. /*
  4664. * Height requested by DirectDraw is too large.
  4665. */
  4666. #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
  4667. /*
  4668. * Size requested by DirectDraw is too large -- The individual height and
  4669. * width are OK.
  4670. */
  4671. #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
  4672. /*
  4673. * Width requested by DirectDraw is too large.
  4674. */
  4675. #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
  4676. /*
  4677. * Action not supported.
  4678. */
  4679. #define DDERR_UNSUPPORTED E_NOTIMPL
  4680. /*
  4681. * Pixel format requested is unsupported by DirectDraw
  4682. */
  4683. #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
  4684. /*
  4685. * Bitmask in the pixel format requested is unsupported by DirectDraw
  4686. */
  4687. #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
  4688. /*
  4689. * The specified stream contains invalid data
  4690. */
  4691. #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
  4692. /*
  4693. * vertical blank is in progress
  4694. */
  4695. #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
  4696. /*
  4697. * Informs DirectDraw that the previous Blt which is transfering information
  4698. * to or from this Surface is incomplete.
  4699. */
  4700. #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
  4701. /*
  4702. * The specified surface type requires specification of the COMPLEX flag
  4703. */
  4704. #define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
  4705. /*
  4706. * Rectangle provided was not horizontally aligned on reqd. boundary
  4707. */
  4708. #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
  4709. /*
  4710. * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  4711. * identifier.
  4712. */
  4713. #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
  4714. /*
  4715. * A DirectDraw object representing this driver has already been created
  4716. * for this process.
  4717. */
  4718. #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
  4719. /*
  4720. * A hardware only DirectDraw object creation was attempted but the driver
  4721. * did not support any hardware.
  4722. */
  4723. #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
  4724. /*
  4725. * this process already has created a primary surface
  4726. */
  4727. #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
  4728. /*
  4729. * software emulation not available.
  4730. */
  4731. #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
  4732. /*
  4733. * region passed to Clipper::GetClipList is too small.
  4734. */
  4735. #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
  4736. /*
  4737. * an attempt was made to set a clip list for a clipper objec that
  4738. * is already monitoring an hwnd.
  4739. */
  4740. #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
  4741. /*
  4742. * No clipper object attached to surface object
  4743. */
  4744. #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
  4745. /*
  4746. * Clipper notification requires an HWND or
  4747. * no HWND has previously been set as the CooperativeLevel HWND.
  4748. */
  4749. #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
  4750. /*
  4751. * HWND used by DirectDraw CooperativeLevel has been subclassed,
  4752. * this prevents DirectDraw from restoring state.
  4753. */
  4754. #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
  4755. /*
  4756. * The CooperativeLevel HWND has already been set.
  4757. * It can not be reset while the process has surfaces or palettes created.
  4758. */
  4759. #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
  4760. /*
  4761. * No palette object attached to this surface.
  4762. */
  4763. #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
  4764. /*
  4765. * No hardware support for 16 or 256 color palettes.
  4766. */
  4767. #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
  4768. /*
  4769. * If a clipper object is attached to the source surface passed into a
  4770. * BltFast call.
  4771. */
  4772. #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
  4773. /*
  4774. * No blter.
  4775. */
  4776. #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
  4777. /*
  4778. * No DirectDraw ROP hardware.
  4779. */
  4780. #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
  4781. /*
  4782. * returned when GetOverlayPosition is called on a hidden overlay
  4783. */
  4784. #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
  4785. /*
  4786. * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  4787. * has never been called on to establish a destionation.
  4788. */
  4789. #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
  4790. /*
  4791. * returned when the position of the overlay on the destionation is no longer
  4792. * legal for that destionation.
  4793. */
  4794. #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
  4795. /*
  4796. * returned when an overlay member is called for a non-overlay surface
  4797. */
  4798. #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
  4799. /*
  4800. * An attempt was made to set the cooperative level when it was already
  4801. * set to exclusive.
  4802. */
  4803. #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
  4804. /*
  4805. * An attempt has been made to flip a surface that is not flippable.
  4806. */
  4807. #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
  4808. /*
  4809. * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  4810. * created.
  4811. */
  4812. #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
  4813. /*
  4814. * Surface was not locked. An attempt to unlock a surface that was not
  4815. * locked at all, or by this process, has been attempted.
  4816. */
  4817. #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
  4818. /*
  4819. * Windows can not create any more DCs, or a DC was requested for a paltte-indexed
  4820. * surface when the surface had no palette AND the display mode was not palette-indexed
  4821. * (in this case DirectDraw cannot select a proper palette into the DC)
  4822. */
  4823. #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
  4824. /*
  4825. * No DC was ever created for this surface.
  4826. */
  4827. #define DDERR_NODC MAKE_DDHRESULT( 586 )
  4828. /*
  4829. * This surface can not be restored because it was created in a different
  4830. * mode.
  4831. */
  4832. #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
  4833. /*
  4834. * This surface can not be restored because it is an implicitly created
  4835. * surface.
  4836. */
  4837. #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
  4838. /*
  4839. * The surface being used is not a palette-based surface
  4840. */
  4841. #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
  4842. /*
  4843. * The display is currently in an unsupported mode
  4844. */
  4845. #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
  4846. /*
  4847. * Operation could not be carried out because there is no mip-map
  4848. * texture mapping hardware present or available.
  4849. */
  4850. #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
  4851. /*
  4852. * The requested action could not be performed because the surface was of
  4853. * the wrong type.
  4854. */
  4855. #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
  4856. /*
  4857. * Device does not support optimized surfaces, therefore no video memory optimized surfaces
  4858. */
  4859. #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
  4860. /*
  4861. * Surface is an optimized surface, but has not yet been allocated any memory
  4862. */
  4863. #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
  4864. /*
  4865. * Attempt was made to create or set a device window without first setting
  4866. * the focus window
  4867. */
  4868. #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
  4869. /*
  4870. * Attempt was made to set a palette on a mipmap sublevel
  4871. */
  4872. #define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
  4873. /*
  4874. * A DC has already been returned for this surface. Only one DC can be
  4875. * retrieved per surface.
  4876. */
  4877. #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
  4878. /*
  4879. * An attempt was made to allocate non-local video memory from a device
  4880. * that does not support non-local video memory.
  4881. */
  4882. #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
  4883. /*
  4884. * The attempt to page lock a surface failed.
  4885. */
  4886. #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
  4887. /*
  4888. * The attempt to page unlock a surface failed.
  4889. */
  4890. #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
  4891. /*
  4892. * An attempt was made to page unlock a surface with no outstanding page locks.
  4893. */
  4894. #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
  4895. /*
  4896. * There is more data available than the specified buffer size could hold
  4897. */
  4898. #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
  4899. /*
  4900. * The data has expired and is therefore no longer valid.
  4901. */
  4902. #define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
  4903. /*
  4904. * The mode test has finished executing.
  4905. */
  4906. #define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
  4907. /*
  4908. * The mode test has switched to a new mode.
  4909. */
  4910. #define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
  4911. /*
  4912. * D3D has not yet been initialized.
  4913. */
  4914. #define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
  4915. /*
  4916. * The video port is not active
  4917. */
  4918. #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
  4919. /*
  4920. * The monitor does not have EDID data.
  4921. */
  4922. #define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
  4923. /*
  4924. * The driver does not enumerate display mode refresh rates.
  4925. */
  4926. #define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
  4927. /*
  4928. * Surfaces created by one direct draw device cannot be used directly by
  4929. * another direct draw device.
  4930. */
  4931. #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
  4932. /*
  4933. * An attempt was made to invoke an interface member of a DirectDraw object
  4934. * created by CoCreateInstance() before it was initialized.
  4935. */
  4936. #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
  4937. /* Alpha bit depth constants */
  4938. #ifdef __cplusplus
  4939. };
  4940. #endif
  4941. #ifdef ENABLE_NAMELESS_UNION_PRAGMA
  4942. #pragma warning(default:4201)
  4943. #endif
  4944. #endif //__DDRAW_INCLUDED__