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.

5792 lines
234 KiB

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