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.

3101 lines
104 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1994-1996 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. #if defined( _WIN32 ) && !defined( _NO_COM )
  12. #define COM_NO_WINDOWS_H
  13. #include <objbase.h>
  14. #else
  15. #define IUnknown void
  16. #define CO_E_NOTINITIALIZED 0x800401F0L
  17. #endif
  18. #define _FACDD 0x876
  19. #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /*
  24. * GUIDS used by DirectDraw objects
  25. */
  26. #if defined( _WIN32 ) && !defined( _NO_COM )
  27. DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  28. DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  29. DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  30. DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  31. DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  32. DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  33. DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  34. DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  35. #endif
  36. /*============================================================================
  37. *
  38. * DirectDraw Structures
  39. *
  40. * Various structures used to invoke DirectDraw.
  41. *
  42. *==========================================================================*/
  43. struct IDirectDraw;
  44. struct IDirectDrawSurface;
  45. struct IDirectDrawPalette;
  46. struct IDirectDrawClipper;
  47. typedef struct IDirectDraw FAR *LPDIRECTDRAW;
  48. typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
  49. typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
  50. typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
  51. typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
  52. typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
  53. typedef struct _DDFXROP FAR *LPDDFXROP;
  54. typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
  55. /*
  56. * API's
  57. */
  58. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  59. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  60. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  61. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  62. extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  63. extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  64. #ifdef UNICODE
  65. typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
  66. #define DirectDrawEnumerate DirectDrawEnumerateW
  67. #else
  68. typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
  69. #define DirectDrawEnumerate DirectDrawEnumerateA
  70. #endif
  71. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  72. extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  73. #ifdef WINNT
  74. //This is the user-mode entry stub to the kernel mode procedure.
  75. extern HRESULT NtDirectDrawCreate( GUID FAR *lpGUID, HANDLE *lplpDD, IUnknown FAR *pUnkOuter );
  76. #endif
  77. #endif
  78. #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
  79. #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
  80. #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
  81. #define DDCREATE_HARDWAREONLY 0x00000001l
  82. #define DDCREATE_EMULATIONONLY 0x00000002l
  83. #ifdef WINNT
  84. typedef long HRESULT;
  85. #endif
  86. //#ifndef WINNT
  87. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  88. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  89. //#endif
  90. /*
  91. * DDCOLORKEY
  92. */
  93. typedef struct _DDCOLORKEY
  94. {
  95. DWORD dwColorSpaceLowValue; // low boundary of color space that is to
  96. // be treated as Color Key, inclusive
  97. DWORD dwColorSpaceHighValue; // high boundary of color space that is
  98. // to be treated as Color Key, inclusive
  99. } DDCOLORKEY;
  100. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  101. /*
  102. * DDBLTFX
  103. * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  104. */
  105. typedef struct _DDBLTFX
  106. {
  107. DWORD dwSize; // size of structure
  108. DWORD dwDDFX; // FX operations
  109. DWORD dwROP; // Win32 raster operations
  110. DWORD dwDDROP; // Raster operations new for DirectDraw
  111. DWORD dwRotationAngle; // Rotation angle for blt
  112. DWORD dwZBufferOpCode; // ZBuffer compares
  113. DWORD dwZBufferLow; // Low limit of Z buffer
  114. DWORD dwZBufferHigh; // High limit of Z buffer
  115. DWORD dwZBufferBaseDest; // Destination base value
  116. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  117. union
  118. {
  119. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  120. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  121. };
  122. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  123. union
  124. {
  125. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  126. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  127. };
  128. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  129. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  130. DWORD dwReserved;
  131. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  132. union
  133. {
  134. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  135. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  136. };
  137. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  138. union
  139. {
  140. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  141. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  142. };
  143. union
  144. {
  145. DWORD dwFillColor; // color in RGB or Palettized
  146. DWORD dwFillDepth; // depth value for z-buffer
  147. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  148. };
  149. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  150. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  151. } DDBLTFX;
  152. typedef DDBLTFX FAR* LPDDBLTFX;
  153. /*
  154. * DDSCAPS
  155. */
  156. typedef struct _DDSCAPS
  157. {
  158. DWORD dwCaps; // capabilities of surface wanted
  159. } DDSCAPS;
  160. typedef DDSCAPS FAR* LPDDSCAPS;
  161. /*
  162. * DDCAPS
  163. */
  164. #define DD_ROP_SPACE (256/32) // space required to store ROP array
  165. typedef struct _DDCAPS
  166. {
  167. DWORD dwSize; // size of the DDDRIVERCAPS structure
  168. DWORD dwCaps; // driver specific capabilities
  169. DWORD dwCaps2; // more driver specific capabilites
  170. DWORD dwCKeyCaps; // color key capabilities of the surface
  171. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  172. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  173. DWORD dwPalCaps; // palette capabilities
  174. DWORD dwSVCaps; // stereo vision capabilities
  175. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  176. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  177. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  178. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  179. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  180. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  181. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  182. DWORD dwVidMemTotal; // total amount of video memory
  183. DWORD dwVidMemFree; // amount of free video memory
  184. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  185. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  186. DWORD dwNumFourCCCodes; // number of four cc codes
  187. DWORD dwAlignBoundarySrc; // source rectangle alignment
  188. DWORD dwAlignSizeSrc; // source rectangle byte size
  189. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  190. DWORD dwAlignSizeDest; // dest rectangle byte size
  191. DWORD dwAlignStrideAlign; // stride alignment
  192. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  193. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  194. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  195. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  196. DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  197. DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  198. DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  199. DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  200. DWORD dwReserved1; // reserved
  201. DWORD dwReserved2; // reserved
  202. DWORD dwReserved3; // reserved
  203. DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  204. DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  205. DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  206. DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  207. DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  208. DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  209. DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  210. DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  211. DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  212. DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  213. DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  214. DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  215. DWORD dwReserved4; // reserved
  216. DWORD dwReserved5; // reserved
  217. DWORD dwReserved6; // reserved
  218. } DDCAPS;
  219. typedef DDCAPS FAR* LPDDCAPS;
  220. /*
  221. * DDPIXELFORMAT
  222. */
  223. typedef struct _DDPIXELFORMAT
  224. {
  225. DWORD dwSize; // size of structure
  226. DWORD dwFlags; // pixel format flags
  227. DWORD dwFourCC; // (FOURCC code)
  228. union
  229. {
  230. DWORD dwRGBBitCount; // how many bits per pixel
  231. DWORD dwYUVBitCount; // how many bits per pixel
  232. DWORD dwZBufferBitDepth; // how many bits for z buffers
  233. DWORD dwAlphaBitDepth; // how many bits for alpha channels
  234. };
  235. union
  236. {
  237. DWORD dwRBitMask; // mask for red bit
  238. DWORD dwYBitMask; // mask for Y bits
  239. };
  240. union
  241. {
  242. DWORD dwGBitMask; // mask for green bits
  243. DWORD dwUBitMask; // mask for U bits
  244. };
  245. union
  246. {
  247. DWORD dwBBitMask; // mask for blue bits
  248. DWORD dwVBitMask; // mask for V bits
  249. };
  250. union
  251. {
  252. DWORD dwRGBAlphaBitMask; // mask for alpha channel
  253. DWORD dwYUVAlphaBitMask; // mask for alpha channel
  254. };
  255. } DDPIXELFORMAT;
  256. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  257. /*
  258. * DDOVERLAYFX
  259. */
  260. typedef struct _DDOVERLAYFX
  261. {
  262. DWORD dwSize; // size of structure
  263. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  264. DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
  265. DWORD dwReserved;
  266. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  267. union
  268. {
  269. DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
  270. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
  271. };
  272. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  273. union
  274. {
  275. DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
  276. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
  277. };
  278. DDCOLORKEY dckDestColorkey; // DestColorkey override
  279. DDCOLORKEY dckSrcColorkey; // DestColorkey override
  280. DWORD dwDDFX; // Overlay FX
  281. DWORD dwFlags; // flags
  282. } DDOVERLAYFX;
  283. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  284. /*
  285. * DDBLTBATCH: BltBatch entry structure
  286. */
  287. typedef struct _DDBLTBATCH
  288. {
  289. LPRECT lprDest;
  290. LPDIRECTDRAWSURFACE lpDDSSrc;
  291. LPRECT lprSrc;
  292. DWORD dwFlags;
  293. LPDDBLTFX lpDDBltFx;
  294. } DDBLTBATCH;
  295. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  296. /*
  297. * callbacks
  298. */
  299. typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  300. #ifdef STREAMING
  301. typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  302. #endif
  303. /*
  304. * INTERACES FOLLOW:
  305. * IDirectDraw
  306. * IDirectDrawClipper
  307. * IDirectDrawPalette
  308. * IDirectDrawSurface
  309. */
  310. /*
  311. * IDirectDraw
  312. */
  313. #if defined( _WIN32 ) && !defined( _NO_COM )
  314. #undef INTERFACE
  315. #define INTERFACE IDirectDraw
  316. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  317. {
  318. /*** IUnknown methods ***/
  319. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  320. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  321. STDMETHOD_(ULONG,Release) (THIS) PURE;
  322. /*** IDirectDraw methods ***/
  323. STDMETHOD(Compact)(THIS) PURE;
  324. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  325. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  326. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  327. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  328. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  329. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  330. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  331. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  332. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  333. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  334. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  335. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  336. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  337. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  338. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  339. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  340. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  341. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  342. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  343. };
  344. #if !defined(__cplusplus) || defined(CINTERFACE)
  345. #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  346. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  347. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  348. #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
  349. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  350. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  351. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  352. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  353. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  354. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  355. #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  356. #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  357. #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  358. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  359. #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  360. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  361. #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  362. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  363. #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  364. #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  365. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  366. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  367. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  368. #endif
  369. #endif
  370. #if defined( _WIN32 ) && !defined( _NO_COM )
  371. #undef INTERFACE
  372. #define INTERFACE IDirectDraw2
  373. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  374. {
  375. /*** IUnknown methods ***/
  376. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  377. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  378. STDMETHOD_(ULONG,Release) (THIS) PURE;
  379. /*** IDirectDraw methods ***/
  380. STDMETHOD(Compact)(THIS) PURE;
  381. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  382. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  383. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  384. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  385. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  386. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  387. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  388. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  389. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  390. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  391. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  392. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  393. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  394. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  395. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  396. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  397. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  398. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  399. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  400. /*** Added in the v2 interface ***/
  401. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  402. };
  403. #if !defined(__cplusplus) || defined(CINTERFACE)
  404. #define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  405. #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
  406. #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
  407. #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
  408. #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  409. #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  410. #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  411. #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  412. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  413. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  414. #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  415. #define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  416. #define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  417. #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  418. #define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  419. #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  420. #define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  421. #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  422. #define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  423. #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  424. #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  425. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  426. #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  427. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  428. #endif
  429. #endif
  430. /*
  431. * IDirectDrawPalette
  432. */
  433. #if defined( _WIN32 ) && !defined( _NO_COM )
  434. #undef INTERFACE
  435. #define INTERFACE IDirectDrawPalette
  436. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  437. {
  438. /*** IUnknown methods ***/
  439. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  440. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  441. STDMETHOD_(ULONG,Release) (THIS) PURE;
  442. /*** IDirectDrawPalette methods ***/
  443. STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  444. STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  445. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  446. STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  447. };
  448. #if !defined(__cplusplus) || defined(CINTERFACE)
  449. #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  450. #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
  451. #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
  452. #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  453. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
  454. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  455. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
  456. #endif
  457. #endif
  458. /*
  459. * IDirectDrawClipper
  460. */
  461. #if defined( _WIN32 ) && !defined( _NO_COM )
  462. #undef INTERFACE
  463. #define INTERFACE IDirectDrawClipper
  464. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  465. {
  466. /*** IUnknown methods ***/
  467. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  468. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  469. STDMETHOD_(ULONG,Release) (THIS) PURE;
  470. /*** IDirectDrawClipper methods ***/
  471. STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  472. STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  473. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  474. STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  475. STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  476. STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  477. };
  478. #if !defined(__cplusplus) || defined(CINTERFACE)
  479. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  480. #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
  481. #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
  482. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
  483. #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
  484. #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  485. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
  486. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
  487. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
  488. #endif
  489. #endif
  490. /*
  491. * IDirectDrawSurface and related interfaces
  492. */
  493. #if defined( _WIN32 ) && !defined( _NO_COM )
  494. #undef INTERFACE
  495. #define INTERFACE IDirectDrawSurface
  496. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  497. {
  498. /*** IUnknown methods ***/
  499. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  500. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  501. STDMETHOD_(ULONG,Release) (THIS) PURE;
  502. /*** IDirectDrawSurface methods ***/
  503. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  504. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  505. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  506. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  507. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  508. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  509. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  510. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  511. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  512. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  513. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  514. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  515. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  516. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  517. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  518. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  519. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  520. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  521. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  522. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  523. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  524. STDMETHOD(IsLost)(THIS) PURE;
  525. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  526. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  527. STDMETHOD(Restore)(THIS) PURE;
  528. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  529. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  530. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  531. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  532. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  533. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  534. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  535. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  536. };
  537. #if !defined(__cplusplus) || defined(CINTERFACE)
  538. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  539. #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  540. #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
  541. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  542. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  543. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  544. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  545. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  546. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  547. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  548. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  549. #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  550. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  551. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  552. #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  553. #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  554. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  555. #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  556. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  557. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  558. #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  559. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  560. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  561. #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  562. #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
  563. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  564. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  565. #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
  566. #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  567. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  568. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  569. #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  570. #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  571. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  572. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  573. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  574. #endif
  575. /*
  576. * IDirectDrawSurface2 and related interfaces
  577. */
  578. #undef INTERFACE
  579. #define INTERFACE IDirectDrawSurface2
  580. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  581. {
  582. /*** IUnknown methods ***/
  583. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  584. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  585. STDMETHOD_(ULONG,Release) (THIS) PURE;
  586. /*** IDirectDrawSurface methods ***/
  587. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  588. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  589. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  590. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  591. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  592. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  593. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  594. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  595. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  596. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  597. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  598. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  599. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  600. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  601. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  602. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  603. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  604. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  605. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  606. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  607. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  608. STDMETHOD(IsLost)(THIS) PURE;
  609. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  610. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  611. STDMETHOD(Restore)(THIS) PURE;
  612. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  613. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  614. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  615. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  616. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  617. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  618. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  619. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  620. /*** Added in the v2 interface ***/
  621. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  622. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  623. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  624. };
  625. #if !defined(__cplusplus) || defined(CINTERFACE)
  626. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  627. #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
  628. #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
  629. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  630. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  631. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  632. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  633. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  634. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  635. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  636. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  637. #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  638. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  639. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  640. #define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  641. #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  642. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  643. #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  644. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  645. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  646. #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  647. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  648. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  649. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  650. #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
  651. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  652. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  653. #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
  654. #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  655. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  656. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  657. #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  658. #define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  659. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  660. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  661. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  662. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  663. #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  664. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  665. #endif
  666. #endif
  667. /*
  668. * DDSURFACEDESC
  669. */
  670. typedef struct _DDSURFACEDESC
  671. {
  672. DWORD dwSize; // size of the DDSURFACEDESC structure
  673. DWORD dwFlags; // determines what fields are valid
  674. DWORD dwHeight; // height of surface to be created
  675. DWORD dwWidth; // width of input surface
  676. LONG lPitch; // distance to start of next line (return value only)
  677. DWORD dwBackBufferCount; // number of back buffers requested
  678. union
  679. {
  680. DWORD dwMipMapCount; // number of mip-map levels requested
  681. DWORD dwZBufferBitDepth; // depth of Z buffer requested
  682. DWORD dwRefreshRate; // refresh rate (used when display mode is described)
  683. };
  684. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  685. DWORD dwReserved; // reserved
  686. LPVOID lpSurface; // pointer to the associated surface memory
  687. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  688. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  689. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  690. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  691. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  692. DDSCAPS ddsCaps; // direct draw surface capabilities
  693. } DDSURFACEDESC;
  694. /*
  695. * ddsCaps field is valid.
  696. */
  697. #define DDSD_CAPS 0x00000001l // default
  698. /*
  699. * dwHeight field is valid.
  700. */
  701. #define DDSD_HEIGHT 0x00000002l
  702. /*
  703. * dwWidth field is valid.
  704. */
  705. #define DDSD_WIDTH 0x00000004l
  706. /*
  707. * lPitch is valid.
  708. */
  709. #define DDSD_PITCH 0x00000008l
  710. /*
  711. * dwBackBufferCount is valid.
  712. */
  713. #define DDSD_BACKBUFFERCOUNT 0x00000020l
  714. /*
  715. * dwZBufferBitDepth is valid.
  716. */
  717. #define DDSD_ZBUFFERBITDEPTH 0x00000040l
  718. /*
  719. * dwAlphaBitDepth is valid.
  720. */
  721. #define DDSD_ALPHABITDEPTH 0x00000080l
  722. /*
  723. * ddpfPixelFormat is valid.
  724. */
  725. #define DDSD_PIXELFORMAT 0x00001000l
  726. /*
  727. * ddckCKDestOverlay is valid.
  728. */
  729. #define DDSD_CKDESTOVERLAY 0x00002000l
  730. /*
  731. * ddckCKDestBlt is valid.
  732. */
  733. #define DDSD_CKDESTBLT 0x00004000l
  734. /*
  735. * ddckCKSrcOverlay is valid.
  736. */
  737. #define DDSD_CKSRCOVERLAY 0x00008000l
  738. /*
  739. * ddckCKSrcBlt is valid.
  740. */
  741. #define DDSD_CKSRCBLT 0x00010000l
  742. /*
  743. * dwMipMapCount is valid.
  744. */
  745. #define DDSD_MIPMAPCOUNT 0x00020000l
  746. /*
  747. * dwRefreshRate is valid
  748. */
  749. #define DDSD_REFRESHRATE 0x00040000l
  750. /*
  751. * All input fields are valid.
  752. */
  753. #define DDSD_ALL 0x0007f9eel
  754. /*============================================================================
  755. *
  756. * Direct Draw Capability Flags
  757. *
  758. * These flags are used to describe the capabilities of a given Surface.
  759. * All flags are bit flags.
  760. *
  761. *==========================================================================*/
  762. /****************************************************************************
  763. *
  764. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  765. *
  766. ****************************************************************************/
  767. /*
  768. * This bit currently has no meaning.
  769. */
  770. #define DDSCAPS_3D 0x00000001l
  771. /*
  772. * Indicates that this surface contains alpha information. The pixel
  773. * format must be interrogated to determine whether this surface
  774. * contains only alpha information or alpha information interlaced
  775. * with pixel color data (e.g. RGBA or YUVA).
  776. */
  777. #define DDSCAPS_ALPHA 0x00000002l
  778. /*
  779. * Indicates that this surface is a backbuffer. It is generally
  780. * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  781. * It indicates that this surface is THE back buffer of a surface
  782. * flipping structure. DirectDraw supports N surfaces in a
  783. * surface flipping structure. Only the surface that immediately
  784. * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  785. * The other surfaces are identified as back buffers by the presence
  786. * of the DDSCAPS_FLIP capability, their attachment order, and the
  787. * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  788. * capabilities. The bit is sent to CreateSurface when a standalone
  789. * back buffer is being created. This surface could be attached to
  790. * a front buffer and/or back buffers to form a flipping surface
  791. * structure after the CreateSurface call. See AddAttachments for
  792. * a detailed description of the behaviors in this case.
  793. */
  794. #define DDSCAPS_BACKBUFFER 0x00000004l
  795. /*
  796. * Indicates a complex surface structure is being described. A
  797. * complex surface structure results in the creation of more than
  798. * one surface. The additional surfaces are attached to the root
  799. * surface. The complex structure can only be destroyed by
  800. * destroying the root.
  801. */
  802. #define DDSCAPS_COMPLEX 0x00000008l
  803. /*
  804. * Indicates that this surface is a part of a surface flipping structure.
  805. * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  806. * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
  807. * on the resulting creations. The dwBackBufferCount field in the
  808. * DDSURFACEDESC structure must be set to at least 1 in order for
  809. * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
  810. * must always be set with creating multiple surfaces through CreateSurface.
  811. */
  812. #define DDSCAPS_FLIP 0x00000010l
  813. /*
  814. * Indicates that this surface is THE front buffer of a surface flipping
  815. * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
  816. * capability bit is set.
  817. * If this capability is sent to CreateSurface then a standalonw front buffer
  818. * is created. This surface will not have the DDSCAPS_FLIP capability.
  819. * It can be attached to other back buffers to form a flipping structure.
  820. * See AddAttachments for a detailed description of the behaviors in this
  821. * case.
  822. */
  823. #define DDSCAPS_FRONTBUFFER 0x00000020l
  824. /*
  825. * Indicates that this surface is any offscreen surface that is not an overlay,
  826. * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
  827. * to identify plain vanilla surfaces.
  828. */
  829. #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
  830. /*
  831. * Indicates that this surface is an overlay. It may or may not be directly visible
  832. * depending on whether or not it is currently being overlayed onto the primary
  833. * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
  834. * overlayed at the moment.
  835. */
  836. #define DDSCAPS_OVERLAY 0x00000080l
  837. /*
  838. * Indicates that unique DirectDrawPalette objects can be created and
  839. * attached to this surface.
  840. */
  841. #define DDSCAPS_PALETTE 0x00000100l
  842. /*
  843. * Indicates that this surface is the primary surface. The primary
  844. * surface represents what the user is seeing at the moment.
  845. */
  846. #define DDSCAPS_PRIMARYSURFACE 0x00000200l
  847. /*
  848. * Indicates that this surface is the primary surface for the left eye.
  849. * The primary surface for the left eye represents what the user is seeing
  850. * at the moment with the users left eye. When this surface is created the
  851. * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  852. * right eye.
  853. */
  854. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
  855. /*
  856. * Indicates that this surface memory was allocated in system memory
  857. */
  858. #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  859. /*
  860. * Indicates that this surface can be used as a 3D texture. It does not
  861. * indicate whether or not the surface is being used for that purpose.
  862. */
  863. #define DDSCAPS_TEXTURE 0x00001000l
  864. /*
  865. * Indicates that a surface may be a destination for 3D rendering. This
  866. * bit must be set in order to query for a Direct3D Device Interface
  867. * from this surface.
  868. */
  869. #define DDSCAPS_3DDEVICE 0x00002000l
  870. /*
  871. * Indicates that this surface exists in video memory.
  872. */
  873. #define DDSCAPS_VIDEOMEMORY 0x00004000l
  874. /*
  875. * Indicates that changes made to this surface are immediately visible.
  876. * It is always set for the primary surface and is set for overlays while
  877. * they are being overlayed and texture maps while they are being textured.
  878. */
  879. #define DDSCAPS_VISIBLE 0x00008000l
  880. /*
  881. * Indicates that only writes are permitted to the surface. Read accesses
  882. * from the surface may or may not generate a protection fault, but the
  883. * results of a read from this surface will not be meaningful. READ ONLY.
  884. */
  885. #define DDSCAPS_WRITEONLY 0x00010000l
  886. /*
  887. * Indicates that this surface is a z buffer. A z buffer does not contain
  888. * displayable information. Instead it contains bit depth information that is
  889. * used to determine which pixels are visible and which are obscured.
  890. */
  891. #define DDSCAPS_ZBUFFER 0x00020000l
  892. /*
  893. * Indicates surface will have a DC associated long term
  894. */
  895. #define DDSCAPS_OWNDC 0x00040000l
  896. /*
  897. * Indicates surface should be able to receive live video
  898. */
  899. #define DDSCAPS_LIVEVIDEO 0x00080000l
  900. /*
  901. * Indicates surface should be able to have a stream decompressed
  902. * to it by the hardware.
  903. */
  904. #define DDSCAPS_HWCODEC 0x00100000l
  905. /*
  906. * Surface is a 320x200 or 320x240 ModeX surface
  907. */
  908. #define DDSCAPS_MODEX 0x00200000l
  909. /*
  910. * Indicates surface is one level of a mip-map. This surface will
  911. * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  912. * This can be done explicitly, by creating a number of surfaces and
  913. * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  914. * If this bit is set then DDSCAPS_TEXTURE must also be set.
  915. */
  916. #define DDSCAPS_MIPMAP 0x00400000l
  917. /*
  918. * Indicates that memory for the surface is not allocated until the surface
  919. * is loaded (via the Direct3D texture Load() function).
  920. */
  921. #define DDSCAPS_ALLOCONLOAD 0x04000000l
  922. /****************************************************************************
  923. *
  924. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  925. *
  926. ****************************************************************************/
  927. /*
  928. * Display hardware has 3D acceleration.
  929. */
  930. #define DDCAPS_3D 0x00000001l
  931. /*
  932. * Indicates that DirectDraw will support only dest rectangles that are aligned
  933. * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  934. * READ ONLY.
  935. */
  936. #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
  937. /*
  938. * Indicates that DirectDraw will support only source rectangles whose sizes in
  939. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
  940. */
  941. #define DDCAPS_ALIGNSIZEDEST 0x00000004l
  942. /*
  943. * Indicates that DirectDraw will support only source rectangles that are aligned
  944. * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  945. * READ ONLY.
  946. */
  947. #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
  948. /*
  949. * Indicates that DirectDraw will support only source rectangles whose sizes in
  950. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
  951. */
  952. #define DDCAPS_ALIGNSIZESRC 0x00000010l
  953. /*
  954. * Indicates that DirectDraw will create video memory surfaces that have a stride
  955. * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
  956. */
  957. #define DDCAPS_ALIGNSTRIDE 0x00000020l
  958. /*
  959. * Display hardware is capable of blt operations.
  960. */
  961. #define DDCAPS_BLT 0x00000040l
  962. /*
  963. * Display hardware is capable of asynchronous blt operations.
  964. */
  965. #define DDCAPS_BLTQUEUE 0x00000080l
  966. /*
  967. * Display hardware is capable of color space conversions during the blt operation.
  968. */
  969. #define DDCAPS_BLTFOURCC 0x00000100l
  970. /*
  971. * Display hardware is capable of stretching during blt operations.
  972. */
  973. #define DDCAPS_BLTSTRETCH 0x00000200l
  974. /*
  975. * Display hardware is shared with GDI.
  976. */
  977. #define DDCAPS_GDI 0x00000400l
  978. /*
  979. * Display hardware can overlay.
  980. */
  981. #define DDCAPS_OVERLAY 0x00000800l
  982. /*
  983. * Set if display hardware supports overlays but can not clip them.
  984. */
  985. #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
  986. /*
  987. * Indicates that overlay hardware is capable of color space conversions during
  988. * the overlay operation.
  989. */
  990. #define DDCAPS_OVERLAYFOURCC 0x00002000l
  991. /*
  992. * Indicates that stretching can be done by the overlay hardware.
  993. */
  994. #define DDCAPS_OVERLAYSTRETCH 0x00004000l
  995. /*
  996. * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  997. * other than the primary surface.
  998. */
  999. #define DDCAPS_PALETTE 0x00008000l
  1000. /*
  1001. * Indicates that palette changes can be syncd with the veritcal refresh.
  1002. */
  1003. #define DDCAPS_PALETTEVSYNC 0x00010000l
  1004. /*
  1005. * Display hardware can return the current scan line.
  1006. */
  1007. #define DDCAPS_READSCANLINE 0x00020000l
  1008. /*
  1009. * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
  1010. * can be created.
  1011. */
  1012. #define DDCAPS_STEREOVIEW 0x00040000l
  1013. /*
  1014. * Display hardware is capable of generating a vertical blank interrupt.
  1015. */
  1016. #define DDCAPS_VBI 0x00080000l
  1017. /*
  1018. * Supports the use of z buffers with blt operations.
  1019. */
  1020. #define DDCAPS_ZBLTS 0x00100000l
  1021. /*
  1022. * Supports Z Ordering of overlays.
  1023. */
  1024. #define DDCAPS_ZOVERLAYS 0x00200000l
  1025. /*
  1026. * Supports color key
  1027. */
  1028. #define DDCAPS_COLORKEY 0x00400000l
  1029. /*
  1030. * Supports alpha surfaces
  1031. */
  1032. #define DDCAPS_ALPHA 0x00800000l
  1033. /*
  1034. * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  1035. */
  1036. #define DDCAPS_COLORKEYHWASSIST 0x01000000l
  1037. /*
  1038. * no hardware support at all
  1039. */
  1040. #define DDCAPS_NOHARDWARE 0x02000000l
  1041. /*
  1042. * Display hardware is capable of color fill with bltter
  1043. */
  1044. #define DDCAPS_BLTCOLORFILL 0x04000000l
  1045. /*
  1046. * Display hardware is bank switched, and potentially very slow at
  1047. * random access to VRAM.
  1048. */
  1049. #define DDCAPS_BANKSWITCHED 0x08000000l
  1050. /*
  1051. * Display hardware is capable of depth filling Z-buffers with bltter
  1052. */
  1053. #define DDCAPS_BLTDEPTHFILL 0x10000000l
  1054. /*
  1055. * Display hardware is capable of clipping while bltting.
  1056. */
  1057. #define DDCAPS_CANCLIP 0x20000000l
  1058. /*
  1059. * Display hardware is capable of clipping while stretch bltting.
  1060. */
  1061. #define DDCAPS_CANCLIPSTRETCHED 0x40000000l
  1062. /*
  1063. * Display hardware is capable of bltting to or from system memory
  1064. */
  1065. #define DDCAPS_CANBLTSYSMEM 0x80000000l
  1066. /****************************************************************************
  1067. *
  1068. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  1069. *
  1070. ****************************************************************************/
  1071. /*
  1072. * Display hardware is certified
  1073. */
  1074. #define DDCAPS2_CERTIFIED 0x00000001l
  1075. /*
  1076. * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  1077. * Direct3D rendering operations between calls to BeginScene() and EndScene()
  1078. */
  1079. #define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
  1080. /****************************************************************************
  1081. *
  1082. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  1083. *
  1084. ****************************************************************************/
  1085. /*
  1086. * Supports alpha blending around the edge of a source color keyed surface.
  1087. * For Blt.
  1088. */
  1089. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
  1090. /*
  1091. * Supports alpha information in the pixel format. The bit depth of alpha
  1092. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  1093. * more opaque as the alpha value increases. (0 is transparent.)
  1094. * For Blt.
  1095. */
  1096. #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
  1097. /*
  1098. * Supports alpha information in the pixel format. The bit depth of alpha
  1099. * information in the pixel format can be 1,2,4, or 8. The alpha value
  1100. * becomes more transparent as the alpha value increases. (0 is opaque.)
  1101. * This flag can only be set if DDCAPS_ALPHA is set.
  1102. * For Blt.
  1103. */
  1104. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
  1105. /*
  1106. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1107. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1108. * (0 is transparent.)
  1109. * For Blt.
  1110. */
  1111. #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
  1112. /*
  1113. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1114. * The NEG suffix indicates that this alpha channel becomes more transparent
  1115. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1116. * DDCAPS_ALPHA is set.
  1117. * For Blt.
  1118. */
  1119. #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
  1120. /*
  1121. * Supports alpha blending around the edge of a source color keyed surface.
  1122. * For Overlays.
  1123. */
  1124. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
  1125. /*
  1126. * Supports alpha information in the pixel format. The bit depth of alpha
  1127. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  1128. * more opaque as the alpha value increases. (0 is transparent.)
  1129. * For Overlays.
  1130. */
  1131. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
  1132. /*
  1133. * Supports alpha information in the pixel format. The bit depth of alpha
  1134. * information in the pixel format can be 1,2,4, or 8. The alpha value
  1135. * becomes more transparent as the alpha value increases. (0 is opaque.)
  1136. * This flag can only be set if DDCAPS_ALPHA is set.
  1137. * For Overlays.
  1138. */
  1139. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
  1140. /*
  1141. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1142. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1143. * (0 is transparent.)
  1144. * For Overlays.
  1145. */
  1146. #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
  1147. /*
  1148. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1149. * The NEG suffix indicates that this alpha channel becomes more transparent
  1150. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1151. * DDCAPS_ALPHA is set.
  1152. * For Overlays.
  1153. */
  1154. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
  1155. /****************************************************************************
  1156. *
  1157. * DIRECTDRAW FX CAPABILITY FLAGS
  1158. *
  1159. ****************************************************************************/
  1160. /*
  1161. * Uses arithmetic operations to stretch and shrink surfaces during blt
  1162. * rather than pixel doubling techniques. Along the Y axis.
  1163. */
  1164. #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
  1165. /*
  1166. * Uses arithmetic operations to stretch during blt
  1167. * rather than pixel doubling techniques. Along the Y axis. Only
  1168. * works for x1, x2, etc.
  1169. */
  1170. #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
  1171. /*
  1172. * Supports mirroring left to right in blt.
  1173. */
  1174. #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
  1175. /*
  1176. * Supports mirroring top to bottom in blt.
  1177. */
  1178. #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
  1179. /*
  1180. * Supports arbitrary rotation for blts.
  1181. */
  1182. #define DDFXCAPS_BLTROTATION 0x00000100l
  1183. /*
  1184. * Supports 90 degree rotations for blts.
  1185. */
  1186. #define DDFXCAPS_BLTROTATION90 0x00000200l
  1187. /*
  1188. * DirectDraw supports arbitrary shrinking of a surface along the
  1189. * x axis (horizontal direction) for blts.
  1190. */
  1191. #define DDFXCAPS_BLTSHRINKX 0x00000400l
  1192. /*
  1193. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1194. * along the x axis (horizontal direction) for blts.
  1195. */
  1196. #define DDFXCAPS_BLTSHRINKXN 0x00000800l
  1197. /*
  1198. * DirectDraw supports arbitrary shrinking of a surface along the
  1199. * y axis (horizontal direction) for blts.
  1200. */
  1201. #define DDFXCAPS_BLTSHRINKY 0x00001000l
  1202. /*
  1203. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1204. * along the y axis (vertical direction) for blts.
  1205. */
  1206. #define DDFXCAPS_BLTSHRINKYN 0x00002000l
  1207. /*
  1208. * DirectDraw supports arbitrary stretching of a surface along the
  1209. * x axis (horizontal direction) for blts.
  1210. */
  1211. #define DDFXCAPS_BLTSTRETCHX 0x00004000l
  1212. /*
  1213. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1214. * along the x axis (horizontal direction) for blts.
  1215. */
  1216. #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
  1217. /*
  1218. * DirectDraw supports arbitrary stretching of a surface along the
  1219. * y axis (horizontal direction) for blts.
  1220. */
  1221. #define DDFXCAPS_BLTSTRETCHY 0x00010000l
  1222. /*
  1223. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1224. * along the y axis (vertical direction) for blts.
  1225. */
  1226. #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
  1227. /*
  1228. * Uses arithmetic operations to stretch and shrink surfaces during
  1229. * overlay rather than pixel doubling techniques. Along the Y axis
  1230. * for overlays.
  1231. */
  1232. #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
  1233. /*
  1234. * Uses arithmetic operations to stretch surfaces during
  1235. * overlay rather than pixel doubling techniques. Along the Y axis
  1236. * for overlays. Only works for x1, x2, etc.
  1237. */
  1238. #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
  1239. /*
  1240. * DirectDraw supports arbitrary shrinking of a surface along the
  1241. * x axis (horizontal direction) for overlays.
  1242. */
  1243. #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
  1244. /*
  1245. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1246. * along the x axis (horizontal direction) for overlays.
  1247. */
  1248. #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
  1249. /*
  1250. * DirectDraw supports arbitrary shrinking of a surface along the
  1251. * y axis (horizontal direction) for overlays.
  1252. */
  1253. #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
  1254. /*
  1255. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1256. * along the y axis (vertical direction) for overlays.
  1257. */
  1258. #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
  1259. /*
  1260. * DirectDraw supports arbitrary stretching of a surface along the
  1261. * x axis (horizontal direction) for overlays.
  1262. */
  1263. #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
  1264. /*
  1265. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1266. * along the x axis (horizontal direction) for overlays.
  1267. */
  1268. #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
  1269. /*
  1270. * DirectDraw supports arbitrary stretching of a surface along the
  1271. * y axis (horizontal direction) for overlays.
  1272. */
  1273. #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
  1274. /*
  1275. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1276. * along the y axis (vertical direction) for overlays.
  1277. */
  1278. #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
  1279. /*
  1280. * DirectDraw supports mirroring of overlays across the vertical axis
  1281. */
  1282. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  1283. /*
  1284. * DirectDraw supports mirroring of overlays across the horizontal axis
  1285. */
  1286. #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
  1287. /****************************************************************************
  1288. *
  1289. * DIRECTDRAW STEREO VIEW CAPABILITIES
  1290. *
  1291. ****************************************************************************/
  1292. /*
  1293. * The stereo view is accomplished via enigma encoding.
  1294. */
  1295. #define DDSVCAPS_ENIGMA 0x00000001l
  1296. /*
  1297. * The stereo view is accomplished via high frequency flickering.
  1298. */
  1299. #define DDSVCAPS_FLICKER 0x00000002l
  1300. /*
  1301. * The stereo view is accomplished via red and blue filters applied
  1302. * to the left and right eyes. All images must adapt their colorspaces
  1303. * for this process.
  1304. */
  1305. #define DDSVCAPS_REDBLUE 0x00000004l
  1306. /*
  1307. * The stereo view is accomplished with split screen technology.
  1308. */
  1309. #define DDSVCAPS_SPLIT 0x00000008l
  1310. /****************************************************************************
  1311. *
  1312. * DIRECTDRAWPALETTE CAPABILITIES
  1313. *
  1314. ****************************************************************************/
  1315. /*
  1316. * Index is 4 bits. There are sixteen color entries in the palette table.
  1317. */
  1318. #define DDPCAPS_4BIT 0x00000001l
  1319. /*
  1320. * Index is onto a 8 bit color index. This field is only valid with the
  1321. * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  1322. * surface is in 8bpp. Each color entry is one byte long and is an index
  1323. * into destination surface's 8bpp palette.
  1324. */
  1325. #define DDPCAPS_8BITENTRIES 0x00000002l
  1326. /*
  1327. * Index is 8 bits. There are 256 color entries in the palette table.
  1328. */
  1329. #define DDPCAPS_8BIT 0x00000004l
  1330. /*
  1331. * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  1332. * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  1333. * object.
  1334. */
  1335. #define DDPCAPS_INITIALIZE 0x00000008l
  1336. /*
  1337. * This palette is the one attached to the primary surface. Changing this
  1338. * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  1339. * and supported.
  1340. */
  1341. #define DDPCAPS_PRIMARYSURFACE 0x00000010l
  1342. /*
  1343. * This palette is the one attached to the primary surface left. Changing
  1344. * this table has immediate effect on the display for the left eye unless
  1345. * DDPSETPAL_VSYNC is specified and supported.
  1346. */
  1347. #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
  1348. /*
  1349. * This palette can have all 256 entries defined
  1350. */
  1351. #define DDPCAPS_ALLOW256 0x00000040l
  1352. /*
  1353. * This palette can have modifications to it synced with the monitors
  1354. * refresh rate.
  1355. */
  1356. #define DDPCAPS_VSYNC 0x00000080l
  1357. /*
  1358. * Index is 1 bit. There are two color entries in the palette table.
  1359. */
  1360. #define DDPCAPS_1BIT 0x00000100l
  1361. /*
  1362. * Index is 2 bit. There are four color entries in the palette table.
  1363. */
  1364. #define DDPCAPS_2BIT 0x00000200l
  1365. /****************************************************************************
  1366. *
  1367. * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  1368. *
  1369. ****************************************************************************/
  1370. /****************************************************************************
  1371. *
  1372. * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  1373. *
  1374. ****************************************************************************/
  1375. /* 0 is the only legal value */
  1376. /****************************************************************************
  1377. *
  1378. * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  1379. *
  1380. ****************************************************************************/
  1381. /****************************************************************************
  1382. *
  1383. * DIRECTDRAW BITDEPTH CONSTANTS
  1384. *
  1385. * NOTE: These are only used to indicate supported bit depths. These
  1386. * are flags only, they are not to be used as an actual bit depth. The
  1387. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  1388. * bit depths in a surface or for changing the display mode.
  1389. *
  1390. ****************************************************************************/
  1391. /*
  1392. * 1 bit per pixel.
  1393. */
  1394. #define DDBD_1 0x00004000l
  1395. /*
  1396. * 2 bits per pixel.
  1397. */
  1398. #define DDBD_2 0x00002000l
  1399. /*
  1400. * 4 bits per pixel.
  1401. */
  1402. #define DDBD_4 0x00001000l
  1403. /*
  1404. * 8 bits per pixel.
  1405. */
  1406. #define DDBD_8 0x00000800l
  1407. /*
  1408. * 16 bits per pixel.
  1409. */
  1410. #define DDBD_16 0x00000400l
  1411. /*
  1412. * 24 bits per pixel.
  1413. */
  1414. #define DDBD_24 0X00000200l
  1415. /*
  1416. * 32 bits per pixel.
  1417. */
  1418. #define DDBD_32 0x00000100l
  1419. /****************************************************************************
  1420. *
  1421. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  1422. *
  1423. ****************************************************************************/
  1424. /*
  1425. * Set if the structure contains a color space. Not set if the structure
  1426. * contains a single color key.
  1427. */
  1428. #define DDCKEY_COLORSPACE 0x00000001l
  1429. /*
  1430. * Set if the structure specifies a color key or color space which is to be
  1431. * used as a destination color key for blt operations.
  1432. */
  1433. #define DDCKEY_DESTBLT 0x00000002l
  1434. /*
  1435. * Set if the structure specifies a color key or color space which is to be
  1436. * used as a destination color key for overlay operations.
  1437. */
  1438. #define DDCKEY_DESTOVERLAY 0x00000004l
  1439. /*
  1440. * Set if the structure specifies a color key or color space which is to be
  1441. * used as a source color key for blt operations.
  1442. */
  1443. #define DDCKEY_SRCBLT 0x00000008l
  1444. /*
  1445. * Set if the structure specifies a color key or color space which is to be
  1446. * used as a source color key for overlay operations.
  1447. */
  1448. #define DDCKEY_SRCOVERLAY 0x00000010l
  1449. /****************************************************************************
  1450. *
  1451. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  1452. *
  1453. ****************************************************************************/
  1454. /*
  1455. * Supports transparent blting using a color key to identify the replaceable
  1456. * bits of the destination surface for RGB colors.
  1457. */
  1458. #define DDCKEYCAPS_DESTBLT 0x00000001l
  1459. /*
  1460. * Supports transparent blting using a color space to identify the replaceable
  1461. * bits of the destination surface for RGB colors.
  1462. */
  1463. #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
  1464. /*
  1465. * Supports transparent blting using a color space to identify the replaceable
  1466. * bits of the destination surface for YUV colors.
  1467. */
  1468. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
  1469. /*
  1470. * Supports transparent blting using a color key to identify the replaceable
  1471. * bits of the destination surface for YUV colors.
  1472. */
  1473. #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
  1474. /*
  1475. * Supports overlaying using colorkeying of the replaceable bits of the surface
  1476. * being overlayed for RGB colors.
  1477. */
  1478. #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
  1479. /*
  1480. * Supports a color space as the color key for the destination for RGB colors.
  1481. */
  1482. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
  1483. /*
  1484. * Supports a color space as the color key for the destination for YUV colors.
  1485. */
  1486. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
  1487. /*
  1488. * Supports only one active destination color key value for visible overlay
  1489. * surfaces.
  1490. */
  1491. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
  1492. /*
  1493. * Supports overlaying using colorkeying of the replaceable bits of the
  1494. * surface being overlayed for YUV colors.
  1495. */
  1496. #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
  1497. /*
  1498. * Supports transparent blting using the color key for the source with
  1499. * this surface for RGB colors.
  1500. */
  1501. #define DDCKEYCAPS_SRCBLT 0x00000200l
  1502. /*
  1503. * Supports transparent blting using a color space for the source with
  1504. * this surface for RGB colors.
  1505. */
  1506. #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
  1507. /*
  1508. * Supports transparent blting using a color space for the source with
  1509. * this surface for YUV colors.
  1510. */
  1511. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
  1512. /*
  1513. * Supports transparent blting using the color key for the source with
  1514. * this surface for YUV colors.
  1515. */
  1516. #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
  1517. /*
  1518. * Supports overlays using the color key for the source with this
  1519. * overlay surface for RGB colors.
  1520. */
  1521. #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
  1522. /*
  1523. * Supports overlays using a color space as the source color key for
  1524. * the overlay surface for RGB colors.
  1525. */
  1526. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
  1527. /*
  1528. * Supports overlays using a color space as the source color key for
  1529. * the overlay surface for YUV colors.
  1530. */
  1531. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
  1532. /*
  1533. * Supports only one active source color key value for visible
  1534. * overlay surfaces.
  1535. */
  1536. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
  1537. /*
  1538. * Supports overlays using the color key for the source with this
  1539. * overlay surface for YUV colors.
  1540. */
  1541. #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
  1542. /*
  1543. * there are no bandwidth trade-offs for using colorkey with an overlay
  1544. */
  1545. #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
  1546. /****************************************************************************
  1547. *
  1548. * DIRECTDRAW PIXELFORMAT FLAGS
  1549. *
  1550. ****************************************************************************/
  1551. /*
  1552. * The surface has alpha channel information in the pixel format.
  1553. */
  1554. #define DDPF_ALPHAPIXELS 0x00000001l
  1555. /*
  1556. * The pixel format contains alpha only information
  1557. */
  1558. #define DDPF_ALPHA 0x00000002l
  1559. /*
  1560. * The FourCC code is valid.
  1561. */
  1562. #define DDPF_FOURCC 0x00000004l
  1563. /*
  1564. * The surface is 4-bit color indexed.
  1565. */
  1566. #define DDPF_PALETTEINDEXED4 0x00000008l
  1567. /*
  1568. * The surface is indexed into a palette which stores indices
  1569. * into the destination surface's 8-bit palette.
  1570. */
  1571. #define DDPF_PALETTEINDEXEDTO8 0x00000010l
  1572. /*
  1573. * The surface is 8-bit color indexed.
  1574. */
  1575. #define DDPF_PALETTEINDEXED8 0x00000020l
  1576. /*
  1577. * The RGB data in the pixel format structure is valid.
  1578. */
  1579. #define DDPF_RGB 0x00000040l
  1580. /*
  1581. * The surface will accept pixel data in the format specified
  1582. * and compress it during the write.
  1583. */
  1584. #define DDPF_COMPRESSED 0x00000080l
  1585. /*
  1586. * The surface will accept RGB data and translate it during
  1587. * the write to YUV data. The format of the data to be written
  1588. * will be contained in the pixel format structure. The DDPF_RGB
  1589. * flag will be set.
  1590. */
  1591. #define DDPF_RGBTOYUV 0x00000100l
  1592. /*
  1593. * pixel format is YUV - YUV data in pixel format struct is valid
  1594. */
  1595. #define DDPF_YUV 0x00000200l
  1596. /*
  1597. * pixel format is a z buffer only surface
  1598. */
  1599. #define DDPF_ZBUFFER 0x00000400l
  1600. /*
  1601. * The surface is 1-bit color indexed.
  1602. */
  1603. #define DDPF_PALETTEINDEXED1 0x00000800l
  1604. /*
  1605. * The surface is 2-bit color indexed.
  1606. */
  1607. #define DDPF_PALETTEINDEXED2 0x00001000l
  1608. /*===========================================================================
  1609. *
  1610. *
  1611. * DIRECTDRAW CALLBACK FLAGS
  1612. *
  1613. *
  1614. *==========================================================================*/
  1615. /****************************************************************************
  1616. *
  1617. * DIRECTDRAW ENUMSURFACES FLAGS
  1618. *
  1619. ****************************************************************************/
  1620. /*
  1621. * Enumerate all of the surfaces that meet the search criterion.
  1622. */
  1623. #define DDENUMSURFACES_ALL 0x00000001l
  1624. /*
  1625. * A search hit is a surface that matches the surface description.
  1626. */
  1627. #define DDENUMSURFACES_MATCH 0x00000002l
  1628. /*
  1629. * A search hit is a surface that does not match the surface description.
  1630. */
  1631. #define DDENUMSURFACES_NOMATCH 0x00000004l
  1632. /*
  1633. * Enumerate the first surface that can be created which meets the search criterion.
  1634. */
  1635. #define DDENUMSURFACES_CANBECREATED 0x00000008l
  1636. /*
  1637. * Enumerate the surfaces that already exist that meet the search criterion.
  1638. */
  1639. #define DDENUMSURFACES_DOESEXIST 0x00000010l
  1640. /****************************************************************************
  1641. *
  1642. * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  1643. *
  1644. ****************************************************************************/
  1645. /*
  1646. * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
  1647. * that a particular mode will be enumerated only once. This flag specifies whether
  1648. * the refresh rate is taken into account when determining if a mode is unique.
  1649. */
  1650. #define DDEDM_REFRESHRATES 0x00000001l
  1651. /****************************************************************************
  1652. *
  1653. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  1654. *
  1655. ****************************************************************************/
  1656. /*
  1657. * Exclusive mode owner will be responsible for the entire primary surface.
  1658. * GDI can be ignored. used with DD
  1659. */
  1660. #define DDSCL_FULLSCREEN 0x00000001l
  1661. /*
  1662. * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  1663. */
  1664. #define DDSCL_ALLOWREBOOT 0x00000002l
  1665. /*
  1666. * prevents DDRAW from modifying the application window.
  1667. * prevents DDRAW from minimize/restore the application window on activation.
  1668. */
  1669. #define DDSCL_NOWINDOWCHANGES 0x00000004l
  1670. /*
  1671. * app wants to work as a regular Windows application
  1672. */
  1673. #define DDSCL_NORMAL 0x00000008l
  1674. /*
  1675. * app wants exclusive access
  1676. */
  1677. #define DDSCL_EXCLUSIVE 0x00000010l
  1678. /*
  1679. * app can deal with non-windows display modes
  1680. */
  1681. #define DDSCL_ALLOWMODEX 0x00000040l
  1682. /****************************************************************************
  1683. *
  1684. * DIRECTDRAW BLT FLAGS
  1685. *
  1686. ****************************************************************************/
  1687. /*
  1688. * Use the alpha information in the pixel format or the alpha channel surface
  1689. * attached to the destination surface as the alpha channel for this blt.
  1690. */
  1691. #define DDBLT_ALPHADEST 0x00000001l
  1692. /*
  1693. * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  1694. * for the destination surface for this blt.
  1695. */
  1696. #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
  1697. /*
  1698. * The NEG suffix indicates that the destination surface becomes more
  1699. * transparent as the alpha value increases. (0 is opaque)
  1700. */
  1701. #define DDBLT_ALPHADESTNEG 0x00000004l
  1702. /*
  1703. * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  1704. * channel for the destination for this blt.
  1705. */
  1706. #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
  1707. /*
  1708. * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  1709. * for the edges of the image that border the color key colors.
  1710. */
  1711. #define DDBLT_ALPHAEDGEBLEND 0x00000010l
  1712. /*
  1713. * Use the alpha information in the pixel format or the alpha channel surface
  1714. * attached to the source surface as the alpha channel for this blt.
  1715. */
  1716. #define DDBLT_ALPHASRC 0x00000020l
  1717. /*
  1718. * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  1719. * for the source for this blt.
  1720. */
  1721. #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
  1722. /*
  1723. * The NEG suffix indicates that the source surface becomes more transparent
  1724. * as the alpha value increases. (0 is opaque)
  1725. */
  1726. #define DDBLT_ALPHASRCNEG 0x00000080l
  1727. /*
  1728. * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  1729. * for the source for this blt.
  1730. */
  1731. #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
  1732. /*
  1733. * Do this blt asynchronously through the FIFO in the order received. If
  1734. * there is no room in the hardware FIFO fail the call.
  1735. */
  1736. #define DDBLT_ASYNC 0x00000200l
  1737. /*
  1738. * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  1739. * to fill the destination rectangle on the destination surface with.
  1740. */
  1741. #define DDBLT_COLORFILL 0x00000400l
  1742. /*
  1743. * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  1744. * to use for the blt.
  1745. */
  1746. #define DDBLT_DDFX 0x00000800l
  1747. /*
  1748. * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  1749. * that are not part of the Win32 API.
  1750. */
  1751. #define DDBLT_DDROPS 0x00001000l
  1752. /*
  1753. * Use the color key associated with the destination surface.
  1754. */
  1755. #define DDBLT_KEYDEST 0x00002000l
  1756. /*
  1757. * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  1758. * for the destination surface.
  1759. */
  1760. #define DDBLT_KEYDESTOVERRIDE 0x00004000l
  1761. /*
  1762. * Use the color key associated with the source surface.
  1763. */
  1764. #define DDBLT_KEYSRC 0x00008000l
  1765. /*
  1766. * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  1767. * for the source surface.
  1768. */
  1769. #define DDBLT_KEYSRCOVERRIDE 0x00010000l
  1770. /*
  1771. * Use the dwROP field in the DDBLTFX structure for the raster operation
  1772. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  1773. */
  1774. #define DDBLT_ROP 0x00020000l
  1775. /*
  1776. * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  1777. * (specified in 1/100th of a degree) to rotate the surface.
  1778. */
  1779. #define DDBLT_ROTATIONANGLE 0x00040000l
  1780. /*
  1781. * Z-buffered blt using the z-buffers attached to the source and destination
  1782. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  1783. * z-buffer opcode.
  1784. */
  1785. #define DDBLT_ZBUFFER 0x00080000l
  1786. /*
  1787. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  1788. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  1789. * for the destination.
  1790. */
  1791. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
  1792. /*
  1793. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  1794. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  1795. * respectively for the destination.
  1796. */
  1797. #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
  1798. /*
  1799. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  1800. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  1801. * for the source.
  1802. */
  1803. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
  1804. /*
  1805. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  1806. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  1807. * respectively for the source.
  1808. */
  1809. #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
  1810. /*
  1811. * wait until the device is ready to handle the blt
  1812. * this will cause blt to not return DDERR_WASSTILLDRAWING
  1813. */
  1814. #define DDBLT_WAIT 0x01000000l
  1815. /*
  1816. * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  1817. * to fill the destination rectangle on the destination Z-buffer surface
  1818. * with.
  1819. */
  1820. #define DDBLT_DEPTHFILL 0x02000000l
  1821. /****************************************************************************
  1822. *
  1823. * BLTFAST FLAGS
  1824. *
  1825. ****************************************************************************/
  1826. #define DDBLTFAST_NOCOLORKEY 0x00000000
  1827. #define DDBLTFAST_SRCCOLORKEY 0x00000001
  1828. #define DDBLTFAST_DESTCOLORKEY 0x00000002
  1829. #define DDBLTFAST_WAIT 0x00000010
  1830. /****************************************************************************
  1831. *
  1832. * FLIP FLAGS
  1833. *
  1834. ****************************************************************************/
  1835. #define DDFLIP_WAIT 0x00000001l
  1836. /****************************************************************************
  1837. *
  1838. * DIRECTDRAW SURFACE OVERLAY FLAGS
  1839. *
  1840. ****************************************************************************/
  1841. /*
  1842. * Use the alpha information in the pixel format or the alpha channel surface
  1843. * attached to the destination surface as the alpha channel for the
  1844. * destination overlay.
  1845. */
  1846. #define DDOVER_ALPHADEST 0x00000001l
  1847. /*
  1848. * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  1849. * destination alpha channel for this overlay.
  1850. */
  1851. #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
  1852. /*
  1853. * The NEG suffix indicates that the destination surface becomes more
  1854. * transparent as the alpha value increases.
  1855. */
  1856. #define DDOVER_ALPHADESTNEG 0x00000004l
  1857. /*
  1858. * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  1859. * channel destination for this overlay.
  1860. */
  1861. #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
  1862. /*
  1863. * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  1864. * channel for the edges of the image that border the color key colors.
  1865. */
  1866. #define DDOVER_ALPHAEDGEBLEND 0x00000010l
  1867. /*
  1868. * Use the alpha information in the pixel format or the alpha channel surface
  1869. * attached to the source surface as the source alpha channel for this overlay.
  1870. */
  1871. #define DDOVER_ALPHASRC 0x00000020l
  1872. /*
  1873. * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  1874. * alpha channel for this overlay.
  1875. */
  1876. #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
  1877. /*
  1878. * The NEG suffix indicates that the source surface becomes more transparent
  1879. * as the alpha value increases.
  1880. */
  1881. #define DDOVER_ALPHASRCNEG 0x00000080l
  1882. /*
  1883. * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  1884. * source for this overlay.
  1885. */
  1886. #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
  1887. /*
  1888. * Turn this overlay off.
  1889. */
  1890. #define DDOVER_HIDE 0x00000200l
  1891. /*
  1892. * Use the color key associated with the destination surface.
  1893. */
  1894. #define DDOVER_KEYDEST 0x00000400l
  1895. /*
  1896. * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  1897. * for the destination surface
  1898. */
  1899. #define DDOVER_KEYDESTOVERRIDE 0x00000800l
  1900. /*
  1901. * Use the color key associated with the source surface.
  1902. */
  1903. #define DDOVER_KEYSRC 0x00001000l
  1904. /*
  1905. * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  1906. * for the source surface.
  1907. */
  1908. #define DDOVER_KEYSRCOVERRIDE 0x00002000l
  1909. /*
  1910. * Turn this overlay on.
  1911. */
  1912. #define DDOVER_SHOW 0x00004000l
  1913. /*
  1914. * Add a dirty rect to an emulated overlayed surface.
  1915. */
  1916. #define DDOVER_ADDDIRTYRECT 0x00008000l
  1917. /*
  1918. * Redraw all dirty rects on an emulated overlayed surface.
  1919. */
  1920. #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
  1921. /*
  1922. * Redraw the entire surface on an emulated overlayed surface.
  1923. */
  1924. #define DDOVER_REFRESHALL 0x00020000l
  1925. /*
  1926. * Use the overlay FX flags to define special overlay FX
  1927. */
  1928. #define DDOVER_DDFX 0x00080000l
  1929. /****************************************************************************
  1930. *
  1931. * DIRECTDRAWSURFACE LOCK FLAGS
  1932. *
  1933. ****************************************************************************/
  1934. /*
  1935. * The default. Set to indicate that Lock should return a valid memory pointer
  1936. * to the top of the specified rectangle. If no rectangle is specified then a
  1937. * pointer to the top of the surface is returned.
  1938. */
  1939. #define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
  1940. /*
  1941. * Set to indicate that Lock should wait until it can obtain a valid memory
  1942. * pointer before returning. If this bit is set, Lock will never return
  1943. * DDERR_WASSTILLDRAWING.
  1944. */
  1945. #define DDLOCK_WAIT 0x00000001L
  1946. /*
  1947. * Set if an event handle is being passed to Lock. Lock will trigger the event
  1948. * when it can return the surface memory pointer requested.
  1949. */
  1950. #define DDLOCK_EVENT 0x00000002L
  1951. /*
  1952. * Indicates that the surface being locked will only be read from.
  1953. */
  1954. #define DDLOCK_READONLY 0x00000010L
  1955. /*
  1956. * Indicates that the surface being locked will only be written to
  1957. */
  1958. #define DDLOCK_WRITEONLY 0x00000020L
  1959. /****************************************************************************
  1960. *
  1961. * DIRECTDRAWSURFACE PAGELOCK FLAGS
  1962. *
  1963. ****************************************************************************/
  1964. /*
  1965. * No flags defined at present
  1966. */
  1967. /****************************************************************************
  1968. *
  1969. * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  1970. *
  1971. ****************************************************************************/
  1972. /*
  1973. * No flags defined at present
  1974. */
  1975. /****************************************************************************
  1976. *
  1977. * DIRECTDRAWSURFACE BLT FX FLAGS
  1978. *
  1979. ****************************************************************************/
  1980. /*
  1981. * If stretching, use arithmetic stretching along the Y axis for this blt.
  1982. */
  1983. #define DDBLTFX_ARITHSTRETCHY 0x00000001l
  1984. /*
  1985. * Do this blt mirroring the surface left to right. Spin the
  1986. * surface around its y-axis.
  1987. */
  1988. #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
  1989. /*
  1990. * Do this blt mirroring the surface up and down. Spin the surface
  1991. * around its x-axis.
  1992. */
  1993. #define DDBLTFX_MIRRORUPDOWN 0x00000004l
  1994. /*
  1995. * Schedule this blt to avoid tearing.
  1996. */
  1997. #define DDBLTFX_NOTEARING 0x00000008l
  1998. /*
  1999. * Do this blt rotating the surface one hundred and eighty degrees.
  2000. */
  2001. #define DDBLTFX_ROTATE180 0x00000010l
  2002. /*
  2003. * Do this blt rotating the surface two hundred and seventy degrees.
  2004. */
  2005. #define DDBLTFX_ROTATE270 0x00000020l
  2006. /*
  2007. * Do this blt rotating the surface ninety degrees.
  2008. */
  2009. #define DDBLTFX_ROTATE90 0x00000040l
  2010. /*
  2011. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  2012. * specified to limit the bits copied from the source surface.
  2013. */
  2014. #define DDBLTFX_ZBUFFERRANGE 0x00000080l
  2015. /*
  2016. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  2017. * before comparing it with the desting z values.
  2018. */
  2019. #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
  2020. /****************************************************************************
  2021. *
  2022. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  2023. *
  2024. ****************************************************************************/
  2025. /*
  2026. * If stretching, use arithmetic stretching along the Y axis for this overlay.
  2027. */
  2028. #define DDOVERFX_ARITHSTRETCHY 0x00000001l
  2029. /*
  2030. * Mirror the overlay across the vertical axis
  2031. */
  2032. #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
  2033. /*
  2034. * Mirror the overlay across the horizontal axis
  2035. */
  2036. #define DDOVERFX_MIRRORUPDOWN 0x00000004l
  2037. /****************************************************************************
  2038. *
  2039. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  2040. *
  2041. ****************************************************************************/
  2042. /*
  2043. * return when the vertical blank interval begins
  2044. */
  2045. #define DDWAITVB_BLOCKBEGIN 0x00000001l
  2046. /*
  2047. * set up an event to trigger when the vertical blank begins
  2048. */
  2049. #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
  2050. /*
  2051. * return when the vertical blank interval ends and display begins
  2052. */
  2053. #define DDWAITVB_BLOCKEND 0x00000004l
  2054. /****************************************************************************
  2055. *
  2056. * DIRECTDRAW GETFLIPSTATUS FLAGS
  2057. *
  2058. ****************************************************************************/
  2059. /*
  2060. * is it OK to flip now?
  2061. */
  2062. #define DDGFS_CANFLIP 0x00000001l
  2063. /*
  2064. * is the last flip finished?
  2065. */
  2066. #define DDGFS_ISFLIPDONE 0x00000002l
  2067. /****************************************************************************
  2068. *
  2069. * DIRECTDRAW GETBLTSTATUS FLAGS
  2070. *
  2071. ****************************************************************************/
  2072. /*
  2073. * is it OK to blt now?
  2074. */
  2075. #define DDGBS_CANBLT 0x00000001l
  2076. /*
  2077. * is the blt to the surface finished?
  2078. */
  2079. #define DDGBS_ISBLTDONE 0x00000002l
  2080. /****************************************************************************
  2081. *
  2082. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  2083. *
  2084. ****************************************************************************/
  2085. /*
  2086. * Enumerate overlays back to front.
  2087. */
  2088. #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
  2089. /*
  2090. * Enumerate overlays front to back
  2091. */
  2092. #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
  2093. /****************************************************************************
  2094. *
  2095. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  2096. *
  2097. ****************************************************************************/
  2098. /*
  2099. * Send overlay to front
  2100. */
  2101. #define DDOVERZ_SENDTOFRONT 0x00000000l
  2102. /*
  2103. * Send overlay to back
  2104. */
  2105. #define DDOVERZ_SENDTOBACK 0x00000001l
  2106. /*
  2107. * Move Overlay forward
  2108. */
  2109. #define DDOVERZ_MOVEFORWARD 0x00000002l
  2110. /*
  2111. * Move Overlay backward
  2112. */
  2113. #define DDOVERZ_MOVEBACKWARD 0x00000003l
  2114. /*
  2115. * Move Overlay in front of relative surface
  2116. */
  2117. #define DDOVERZ_INSERTINFRONTOF 0x00000004l
  2118. /*
  2119. * Move Overlay in back of relative surface
  2120. */
  2121. #define DDOVERZ_INSERTINBACKOF 0x00000005l
  2122. /*===========================================================================
  2123. *
  2124. *
  2125. * DIRECTDRAW RETURN CODES
  2126. *
  2127. * The return values from DirectDraw Commands and Surface that return an HRESULT
  2128. * are codes from DirectDraw concerning the results of the action
  2129. * requested by DirectDraw.
  2130. *
  2131. *==========================================================================*/
  2132. /*
  2133. * Status is OK
  2134. *
  2135. * Issued by: DirectDraw Commands and all callbacks
  2136. */
  2137. #define DD_OK 0
  2138. /****************************************************************************
  2139. *
  2140. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  2141. *
  2142. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  2143. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  2144. * enumeration callback routines.
  2145. *
  2146. ****************************************************************************/
  2147. /*
  2148. * stop the enumeration
  2149. */
  2150. #define DDENUMRET_CANCEL 0
  2151. /*
  2152. * continue the enumeration
  2153. */
  2154. #define DDENUMRET_OK 1
  2155. /****************************************************************************
  2156. *
  2157. * DIRECTDRAW ERRORS
  2158. *
  2159. * Errors are represented by negative values and cannot be combined.
  2160. *
  2161. ****************************************************************************/
  2162. /*
  2163. * This object is already initialized
  2164. */
  2165. #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
  2166. /*
  2167. * This surface can not be attached to the requested surface.
  2168. */
  2169. #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
  2170. /*
  2171. * This surface can not be detached from the requested surface.
  2172. */
  2173. #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
  2174. /*
  2175. * Support is currently not available.
  2176. */
  2177. #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
  2178. /*
  2179. * An exception was encountered while performing the requested operation
  2180. */
  2181. #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
  2182. /*
  2183. * Generic failure.
  2184. */
  2185. #define DDERR_GENERIC E_FAIL
  2186. /*
  2187. * Height of rectangle provided is not a multiple of reqd alignment
  2188. */
  2189. #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
  2190. /*
  2191. * Unable to match primary surface creation request with existing
  2192. * primary surface.
  2193. */
  2194. #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
  2195. /*
  2196. * One or more of the caps bits passed to the callback are incorrect.
  2197. */
  2198. #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
  2199. /*
  2200. * DirectDraw does not support provided Cliplist.
  2201. */
  2202. #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
  2203. /*
  2204. * DirectDraw does not support the requested mode
  2205. */
  2206. #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
  2207. /*
  2208. * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  2209. */
  2210. #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
  2211. /*
  2212. * One or more of the parameters passed to the callback function are
  2213. * incorrect.
  2214. */
  2215. #define DDERR_INVALIDPARAMS E_INVALIDARG
  2216. /*
  2217. * pixel format was invalid as specified
  2218. */
  2219. #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
  2220. /*
  2221. * Rectangle provided was invalid.
  2222. */
  2223. #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
  2224. /*
  2225. * Operation could not be carried out because one or more surfaces are locked
  2226. */
  2227. #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
  2228. /*
  2229. * There is no 3D present.
  2230. */
  2231. #define DDERR_NO3D MAKE_DDHRESULT( 170 )
  2232. /*
  2233. * Operation could not be carried out because there is no alpha accleration
  2234. * hardware present or available.
  2235. */
  2236. #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
  2237. /*
  2238. * no clip list available
  2239. */
  2240. #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
  2241. /*
  2242. * Operation could not be carried out because there is no color conversion
  2243. * hardware present or available.
  2244. */
  2245. #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
  2246. /*
  2247. * Create function called without DirectDraw object method SetCooperativeLevel
  2248. * being called.
  2249. */
  2250. #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
  2251. /*
  2252. * Surface doesn't currently have a color key
  2253. */
  2254. #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
  2255. /*
  2256. * Operation could not be carried out because there is no hardware support
  2257. * of the dest color key.
  2258. */
  2259. #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
  2260. /*
  2261. * No DirectDraw support possible with current display driver
  2262. */
  2263. #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
  2264. /*
  2265. * Operation requires the application to have exclusive mode but the
  2266. * application does not have exclusive mode.
  2267. */
  2268. #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
  2269. /*
  2270. * Flipping visible surfaces is not supported.
  2271. */
  2272. #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
  2273. /*
  2274. * There is no GDI present.
  2275. */
  2276. #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
  2277. /*
  2278. * Operation could not be carried out because there is no hardware present
  2279. * or available.
  2280. */
  2281. #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
  2282. /*
  2283. * Requested item was not found
  2284. */
  2285. #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
  2286. /*
  2287. * Operation could not be carried out because there is no overlay hardware
  2288. * present or available.
  2289. */
  2290. #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
  2291. /*
  2292. * Operation could not be carried out because there is no appropriate raster
  2293. * op hardware present or available.
  2294. */
  2295. #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
  2296. /*
  2297. * Operation could not be carried out because there is no rotation hardware
  2298. * present or available.
  2299. */
  2300. #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
  2301. /*
  2302. * Operation could not be carried out because there is no hardware support
  2303. * for stretching
  2304. */
  2305. #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
  2306. /*
  2307. * DirectDrawSurface is not in 4 bit color palette and the requested operation
  2308. * requires 4 bit color palette.
  2309. */
  2310. #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
  2311. /*
  2312. * DirectDrawSurface is not in 4 bit color index palette and the requested
  2313. * operation requires 4 bit color index palette.
  2314. */
  2315. #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
  2316. /*
  2317. * DirectDraw Surface is not in 8 bit color mode and the requested operation
  2318. * requires 8 bit color.
  2319. */
  2320. #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
  2321. /*
  2322. * Operation could not be carried out because there is no texture mapping
  2323. * hardware present or available.
  2324. */
  2325. #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
  2326. /*
  2327. * Operation could not be carried out because there is no hardware support
  2328. * for vertical blank synchronized operations.
  2329. */
  2330. #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
  2331. /*
  2332. * Operation could not be carried out because there is no hardware support
  2333. * for zbuffer blting.
  2334. */
  2335. #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
  2336. /*
  2337. * Overlay surfaces could not be z layered based on their BltOrder because
  2338. * the hardware does not support z layering of overlays.
  2339. */
  2340. #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
  2341. /*
  2342. * The hardware needed for the requested operation has already been
  2343. * allocated.
  2344. */
  2345. #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
  2346. /*
  2347. * DirectDraw does not have enough memory to perform the operation.
  2348. */
  2349. #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
  2350. /*
  2351. * DirectDraw does not have enough memory to perform the operation.
  2352. */
  2353. #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
  2354. /*
  2355. * hardware does not support clipped overlays
  2356. */
  2357. #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
  2358. /*
  2359. * Can only have ony color key active at one time for overlays
  2360. */
  2361. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
  2362. /*
  2363. * Access to this palette is being refused because the palette is already
  2364. * locked by another thread.
  2365. */
  2366. #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
  2367. /*
  2368. * No src color key specified for this operation.
  2369. */
  2370. #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
  2371. /*
  2372. * This surface is already attached to the surface it is being attached to.
  2373. */
  2374. #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
  2375. /*
  2376. * This surface is already a dependency of the surface it is being made a
  2377. * dependency of.
  2378. */
  2379. #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
  2380. /*
  2381. * Access to this surface is being refused because the surface is already
  2382. * locked by another thread.
  2383. */
  2384. #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
  2385. /*
  2386. * Access to this surface is being refused because no driver exists
  2387. * which can supply a pointer to the surface.
  2388. * This is most likely to happen when attempting to lock the primary
  2389. * surface when no DCI provider is present.
  2390. */
  2391. #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
  2392. /*
  2393. * Access to Surface refused because Surface is obscured.
  2394. */
  2395. #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
  2396. /*
  2397. * Access to this surface is being refused because the surface is gone.
  2398. * The DIRECTDRAWSURFACE object representing this surface should
  2399. * have Restore called on it.
  2400. */
  2401. #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
  2402. /*
  2403. * The requested surface is not attached.
  2404. */
  2405. #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
  2406. /*
  2407. * Height requested by DirectDraw is too large.
  2408. */
  2409. #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
  2410. /*
  2411. * Size requested by DirectDraw is too large -- The individual height and
  2412. * width are OK.
  2413. */
  2414. #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
  2415. /*
  2416. * Width requested by DirectDraw is too large.
  2417. */
  2418. #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
  2419. /*
  2420. * Action not supported.
  2421. */
  2422. #define DDERR_UNSUPPORTED E_NOTIMPL
  2423. /*
  2424. * FOURCC format requested is unsupported by DirectDraw
  2425. */
  2426. #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
  2427. /*
  2428. * Bitmask in the pixel format requested is unsupported by DirectDraw
  2429. */
  2430. #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
  2431. /*
  2432. * vertical blank is in progress
  2433. */
  2434. #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
  2435. /*
  2436. * Informs DirectDraw that the previous Blt which is transfering information
  2437. * to or from this Surface is incomplete.
  2438. */
  2439. #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
  2440. /*
  2441. * Rectangle provided was not horizontally aligned on reqd. boundary
  2442. */
  2443. #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
  2444. /*
  2445. * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  2446. * identifier.
  2447. */
  2448. #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
  2449. /*
  2450. * A DirectDraw object representing this driver has already been created
  2451. * for this process.
  2452. */
  2453. #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
  2454. /*
  2455. * A hardware only DirectDraw object creation was attempted but the driver
  2456. * did not support any hardware.
  2457. */
  2458. #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
  2459. /*
  2460. * this process already has created a primary surface
  2461. */
  2462. #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
  2463. /*
  2464. * software emulation not available.
  2465. */
  2466. #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
  2467. /*
  2468. * region passed to Clipper::GetClipList is too small.
  2469. */
  2470. #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
  2471. /*
  2472. * an attempt was made to set a clip list for a clipper objec that
  2473. * is already monitoring an hwnd.
  2474. */
  2475. #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
  2476. /*
  2477. * No clipper object attached to surface object
  2478. */
  2479. #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
  2480. /*
  2481. * Clipper notification requires an HWND or
  2482. * no HWND has previously been set as the CooperativeLevel HWND.
  2483. */
  2484. #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
  2485. /*
  2486. * HWND used by DirectDraw CooperativeLevel has been subclassed,
  2487. * this prevents DirectDraw from restoring state.
  2488. */
  2489. #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
  2490. /*
  2491. * The CooperativeLevel HWND has already been set.
  2492. * It can not be reset while the process has surfaces or palettes created.
  2493. */
  2494. #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
  2495. /*
  2496. * No palette object attached to this surface.
  2497. */
  2498. #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
  2499. /*
  2500. * No hardware support for 16 or 256 color palettes.
  2501. */
  2502. #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
  2503. /*
  2504. * If a clipper object is attached to the source surface passed into a
  2505. * BltFast call.
  2506. */
  2507. #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
  2508. /*
  2509. * No blter.
  2510. */
  2511. #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
  2512. /*
  2513. * No DirectDraw ROP hardware.
  2514. */
  2515. #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
  2516. /*
  2517. * returned when GetOverlayPosition is called on a hidden overlay
  2518. */
  2519. #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
  2520. /*
  2521. * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  2522. * has never been called on to establish a destionation.
  2523. */
  2524. #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
  2525. /*
  2526. * returned when the position of the overlay on the destionation is no longer
  2527. * legal for that destionation.
  2528. */
  2529. #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
  2530. /*
  2531. * returned when an overlay member is called for a non-overlay surface
  2532. */
  2533. #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
  2534. /*
  2535. * An attempt was made to set the cooperative level when it was already
  2536. * set to exclusive.
  2537. */
  2538. #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
  2539. /*
  2540. * An attempt has been made to flip a surface that is not flippable.
  2541. */
  2542. #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
  2543. /*
  2544. * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  2545. * created.
  2546. */
  2547. #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
  2548. /*
  2549. * Surface was not locked. An attempt to unlock a surface that was not
  2550. * locked at all, or by this process, has been attempted.
  2551. */
  2552. #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
  2553. /*
  2554. * Windows can not create any more DCs
  2555. */
  2556. #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
  2557. /*
  2558. * No DC was ever created for this surface.
  2559. */
  2560. #define DDERR_NODC MAKE_DDHRESULT( 586 )
  2561. /*
  2562. * This surface can not be restored because it was created in a different
  2563. * mode.
  2564. */
  2565. #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
  2566. /*
  2567. * This surface can not be restored because it is an implicitly created
  2568. * surface.
  2569. */
  2570. #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
  2571. /*
  2572. * The surface being used is not a palette-based surface
  2573. */
  2574. #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
  2575. /*
  2576. * The display is currently in an unsupported mode
  2577. */
  2578. #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
  2579. /*
  2580. * Operation could not be carried out because there is no mip-map
  2581. * texture mapping hardware present or available.
  2582. */
  2583. #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
  2584. /*
  2585. * The requested action could not be performed because the surface was of
  2586. * the wrong type.
  2587. */
  2588. #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
  2589. /*
  2590. * A DC has already been returned for this surface. Only one DC can be
  2591. * retrieved per surface.
  2592. */
  2593. #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
  2594. /*
  2595. * The attempt to page lock a surface failed.
  2596. */
  2597. #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
  2598. /*
  2599. * The attempt to page unlock a surface failed.
  2600. */
  2601. #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
  2602. /*
  2603. * An attempt was made to page unlock a surface with no outstanding page locks.
  2604. */
  2605. #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
  2606. /*
  2607. * An attempt was made to invoke an interface member of a DirectDraw object
  2608. * created by CoCreateInstance() before it was initialized.
  2609. */
  2610. #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
  2611. /* Alpha bit depth constants */
  2612. #ifdef __cplusplus
  2613. };
  2614. #endif
  2615. #endif