Source code of Windows XP (NT5)
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.

4709 lines
170 KiB

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