Counter Strike : Global Offensive Source Code
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.

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