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.

3967 lines
125 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1994-1996 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddraw.h
  6. * Content: DirectDraw include file
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 24-dec-94 craige initial implementation
  12. * 13-jan-95 craige updated
  13. * 31-jan-95 craige and even more ongoing work...
  14. * 01-mar-95 craige flags with Get/SetExclusiveMode
  15. * 07-mar-95 craige FourCC code stuff
  16. * 08-mar-95 craige blt/overlay stretch distinction, bunch of new APIs
  17. * 11-mar-95 craige palette stuff
  18. * 17-mar-95 craige COM interface
  19. * 20-mar-95 craige Get/SetExclusiveMode->Get/SetExclusiveModeOwner,
  20. * flags with CreateSurface and DuplicateSurface
  21. * 28-mar-95 craige removed Get/SetColorKey, added FlipToGDISurface to
  22. * IDirectDraw; switched to PALETTEENTRY from RGBQUAD
  23. * 01-apr-95 craige happy fun joy updated header file THANK YOU ERIC
  24. * 06-apr-95 craige added dwVidMemTotal, dwVidMemFree to DDCAPS
  25. * 13-apr-95 craige EricEng's little contribution to our being late
  26. * 15-apr-95 craige GetBltStatus, added flag to GetFlipStatus
  27. * 12-may-95 craige added GUIDS;DirectDrawEnumerate
  28. * 19-may-95 craige added DDSEMO_ALLOWREBOOT
  29. * 23-may-95 craige have driver GetCaps return HEL caps; added Flush,
  30. * GetBatchLimit, SetBatchLimit to IDirectDraw
  31. * 24-may-95 kylej removed obsolete ZOrder variables
  32. * 24-may-95 craige added Restore
  33. * 28-may-95 craige added DDCAPS_COLORKEY_HWASSIST; Unicode support
  34. * 04-jun-95 craige added IsLost
  35. * 05-jun-95 craige removed GetVersion, FreeAllSurfaces, DefWindowProc;
  36. * change GarbageCollect to Compact
  37. * 06-jun-95 craige removed GetExclusiveModeOwner; added parm to
  38. * SetExclusiveMode
  39. * 15-jun-95 craige new surface interfaces: IDirectDrawSurfaceNotification,
  40. * IDirectDrawSurfaceComposition
  41. * 19-jun-95 craige rationalized INVALIDxxx to DDERR_INVALIDOBJECT
  42. * 20-jun-95 kylej added DDERR_CANNOTDETACHSURFACE
  43. * 21-jun-95 craige added DirectDrawClipper object; removed clipping
  44. * info from surface object
  45. * 24-jun-95 craige added DDBLTFAST_xxx flags
  46. * 27-jun-95 craige removed Flush,Set/GetBatchLimit; added BltBatch
  47. * 30-jun-95 kylej added DDERR_INCOMPATIBLEPRIMARY
  48. * 30-jun-95 craige added dest align as well as src
  49. * 01-jul-95 craige hide composition & streaming stuff; added DDERR_EXCEPTION
  50. * 02-jul-95 craige hide clipper notification stuff; futzed with DDSCAPS
  51. * position in structures
  52. * 03-jul-95 kylej changed EnumSurfaces declaration
  53. * 03-jul-95 craige added pUnkOuter to all Create fns; added object ptr
  54. * to CreateSurface, removed lpClipList and lpDDSurface
  55. * from surface desc.
  56. * 05-jul-95 craige added Initialize members to all interfaces to allow
  57. * for full COM integration
  58. * 09-jul-95 craige added DDERR_LOCKEDSURFACES; changed SetExclusiveMode
  59. * to SetCooperativeLevel
  60. * 10-jul-95 kylej added mirroring caps and overlay FX flags
  61. * 12-jul-95 craige added DDSCAPS_OWNDC
  62. * 13-jul-95 craige changed Get/SetOverlayPosition to take LONGs
  63. * 14-jul-95 craige added dwFlags to DDOVERLAYFX
  64. * 15-jul-95 craige set DDCAPS_NOHARDWARE
  65. * 15-jul-95 ericeng changed EnumSurface callback param order, BltBatch
  66. * params, moved all Const var references to a consistent
  67. * location, removed failure mode for height alignment
  68. * 18-jul-95 craige removed Flush from surface object
  69. * 27-jul-95 craige added DDCAPS_BLTCOLORFILL
  70. * 31-jul-95 craige added DDCAPS_BANKSWITCHED, validation flags
  71. * 02-aug-95 craige added dwMinOverlayStretch/dwMaxOverlayStretch to DDCAPS
  72. * 10-aug-95 toddla added DDBLT_WAIT, DDBLTFAST_WAIT, DDLOCK_WAIT, DDFLIP_WAIT
  73. * 13-aug-95 craige added dwCaps2 and reserved fields to DDCAPS; added
  74. * DDCAPS2_CERTIFIED; named alpha caps properly;
  75. * flags parm for Flip
  76. * 13-aug-95 toddla added DDSCL_DONTHOOKHWND
  77. * 19-aug-95 ericeng added DDCAPS2_LIVEVIDEO and DDCAPS2_HWCODEC
  78. * 21-aug-95 craige mode X support
  79. * 27-aug-95 craige bug 742: added DDPCAPS_256
  80. * bug 738: use GUID instead of IID
  81. * 22-sep-95 craige bug 1268,1269: getbltstatus/getflipstatus flags wrong
  82. * 09-nov-95 colinmc added support for 1, 2 and 4 bit RGB and indexed
  83. * palettes
  84. * 27-nov-95 colinmc new member to return available vram of a given type
  85. * (determined by DDSCAPS).
  86. * 05-dec-95 colinmc changed DDSCAPS_TEXTUREMAP => DDSCAPS_TEXTURE for
  87. * consistency with Direct3D
  88. * 05-dec-95 colinmc added mip-map support
  89. * 09-dec-95 colinmc added execute buffer support
  90. * 13-dec-95 colinmc added shared back and z-buffer support
  91. * 18-dec-95 colinmc added valid caps mask for surface caps
  92. * 25-dec-95 craige changed IDirectDrawV2 to IDirectDraw2
  93. * 31-dec-95 craige added CLSID_DirectDraw
  94. * 04-jan-96 colinmc added explicit support for z-buffer clears
  95. * 12-feb-96 kylej added Interface
  96. * 23-feb-96 kylej added IDirectDrawSurface2 Interface
  97. * 01-mar-96 kylej new ddcaps structure
  98. * 06-mar-96 kylej changed HANDLEs to DWORDs
  99. * 13-mar-96 kylej added DD_Surface_GetDDInterface in IDirectDrawSurface2
  100. * 14-mar-96 colinmc added CLSID_DirectDrawClipper and added the clipper
  101. * creation API function back in
  102. * 21-mar-96 colinmc Bug 13316: Unitialized interfaces
  103. * 24-mar-96 colinmc Bug 14321: Structure change to allow flippable mip
  104. * map chains with a single call
  105. * 26-mar-96 colinmc Bug 14470: Compressed surface support
  106. * 15-apr-96 colinmc Bug 16855: Can't pass NULL to Initialize in C++
  107. * 19-apr-96 colinmc Bug 18059: News caps bit to flag that you can't do
  108. * 2D during 3D.
  109. * 01-may-96 colinmc Bug 20005: InternalLock does not check for lost
  110. * surfaces
  111. * 28-jun-96 colinmc Bug 2122: Misleading bit depth comments in
  112. * DDPIXELFORMAT
  113. *@@END_MSINTERNAL
  114. *
  115. ***************************************************************************/
  116. #ifndef __DDRAW_INCLUDED__
  117. #define __DDRAW_INCLUDED__
  118. #if defined( _WIN32 ) && !defined( _NO_COM )
  119. #define COM_NO_WINDOWS_H
  120. #include <objbase.h>
  121. #else
  122. #define IUnknown void
  123. #define CO_E_NOTINITIALIZED 0x800401F0L
  124. #endif
  125. #define _FACDD 0x876
  126. #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  127. #ifdef __cplusplus
  128. extern "C" {
  129. #endif
  130. /*
  131. * GUIDS used by DirectDraw objects
  132. */
  133. #if defined( _WIN32 ) && !defined( _NO_COM )
  134. DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  135. DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  136. DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  137. DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  138. DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  139. DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  140. //@@BEGIN_MSINTERNAL
  141. #ifdef STREAMING
  142. DEFINE_GUID( IID_IDirectDrawSurfaceStreaming, 0x6C14DB82,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  143. #endif
  144. #ifdef COMPOSITION
  145. DEFINE_GUID( IID_IDirectDrawSurfaceComposition, 0x6C14DB83,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  146. #endif
  147. //@@END_MSINTERNAL
  148. DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  149. DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  150. #endif
  151. /*============================================================================
  152. *
  153. * DirectDraw Structures
  154. *
  155. * Various structures used to invoke DirectDraw.
  156. *
  157. *==========================================================================*/
  158. struct IDirectDraw;
  159. struct IDirectDrawSurface;
  160. //@@BEGIN_MSINTERNAL
  161. #ifdef COMPOSITION
  162. struct IDirectDrawSurfaceComposition;
  163. #endif
  164. #ifdef STREAMING
  165. struct IDirectDrawSurfaceStreaming;
  166. #endif
  167. //@@END_MSINTERNAL
  168. struct IDirectDrawPalette;
  169. struct IDirectDrawClipper;
  170. typedef struct IDirectDraw FAR *LPDIRECTDRAW;
  171. typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
  172. typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
  173. typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
  174. //@@BEGIN_MSINTERNAL
  175. #ifdef COMPOSITION
  176. typedef struct IDirectDrawSurfaceComposition FAR *LPDIRECTDRAWSURFACECOMPOSITION;
  177. #endif
  178. #ifdef STREAMING
  179. typedef struct IDirectDrawSurfaceStreaming FAR *LPDIRECTDRAWSURFACESTREAMING;
  180. #endif
  181. //@@END_MSINTERNAL
  182. typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
  183. typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
  184. typedef struct _DDFXROP FAR *LPDDFXROP;
  185. typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
  186. /*
  187. * API's
  188. */
  189. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  190. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  191. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  192. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  193. extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  194. extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  195. #ifdef UNICODE
  196. typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
  197. #define DirectDrawEnumerate DirectDrawEnumerateW
  198. #else
  199. typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
  200. #define DirectDrawEnumerate DirectDrawEnumerateA
  201. #endif
  202. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  203. extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  204. #ifdef WINNT
  205. //This is the user-mode entry stub to the kernel mode procedure.
  206. extern HRESULT NtDirectDrawCreate( GUID FAR *lpGUID, HANDLE *lplpDD, IUnknown FAR *pUnkOuter );
  207. #endif
  208. #endif
  209. #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
  210. #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
  211. #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
  212. #define DDCREATE_HARDWAREONLY 0x00000001l
  213. #define DDCREATE_EMULATIONONLY 0x00000002l
  214. #if defined (WINNT) || !defined(WIN32)
  215. typedef long HRESULT;
  216. #endif
  217. //#ifndef WINNT
  218. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  219. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  220. //#endif
  221. /*
  222. * DDCOLORKEY
  223. */
  224. typedef struct _DDCOLORKEY
  225. {
  226. DWORD dwColorSpaceLowValue; // low boundary of color space that is to
  227. // be treated as Color Key, inclusive
  228. DWORD dwColorSpaceHighValue; // high boundary of color space that is
  229. // to be treated as Color Key, inclusive
  230. } DDCOLORKEY;
  231. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  232. /*
  233. * DDBLTFX
  234. * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  235. */
  236. typedef struct _DDBLTFX
  237. {
  238. DWORD dwSize; // size of structure
  239. DWORD dwDDFX; // FX operations
  240. DWORD dwROP; // Win32 raster operations
  241. DWORD dwDDROP; // Raster operations new for DirectDraw
  242. DWORD dwRotationAngle; // Rotation angle for blt
  243. DWORD dwZBufferOpCode; // ZBuffer compares
  244. DWORD dwZBufferLow; // Low limit of Z buffer
  245. DWORD dwZBufferHigh; // High limit of Z buffer
  246. DWORD dwZBufferBaseDest; // Destination base value
  247. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  248. union
  249. {
  250. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  251. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  252. };
  253. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  254. union
  255. {
  256. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  257. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  258. };
  259. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  260. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  261. DWORD dwReserved;
  262. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  263. union
  264. {
  265. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  266. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  267. };
  268. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  269. union
  270. {
  271. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  272. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  273. };
  274. union
  275. {
  276. DWORD dwFillColor; // color in RGB or Palettized
  277. DWORD dwFillDepth; // depth value for z-buffer
  278. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  279. };
  280. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  281. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  282. } DDBLTFX;
  283. typedef DDBLTFX FAR* LPDDBLTFX;
  284. //@@BEGIN_MSINTERNAL
  285. #ifdef COMPOSITION
  286. /*
  287. * DDCOMPOSEFX
  288. * Used to pass override information to the DIRECTDRAWSURFACE callback Compose.
  289. */
  290. typedef DWORD (FAR PASCAL *LPCOMPOSECALLBACK)(DWORD);
  291. typedef struct _DDCOMPOSEFX
  292. {
  293. DWORD dwSize; // size of structure
  294. DWORD dwDDFX; // FX operations
  295. DWORD dwROP; // Win32 raster operations
  296. DWORD dwDDROP; // Raster operations new for DirectDraw
  297. DWORD dwRotationAngle; // Rotation angle for blt
  298. DWORD dwZBufferOpCode; // ZBuffer compares
  299. DWORD dwZBufferLow; // Low limit of Z buffer
  300. DWORD dwZBufferHigh; // High limit of Z buffer
  301. DWORD dwZBufferBaseDest; // Destination base value
  302. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  303. union
  304. {
  305. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  306. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  307. };
  308. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  309. union
  310. {
  311. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  312. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  313. };
  314. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  315. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  316. DWORD dwReserved;
  317. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  318. union
  319. {
  320. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  321. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  322. };
  323. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  324. union
  325. {
  326. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  327. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  328. };
  329. union
  330. {
  331. DWORD dwFillColor; // color in RGB or Palettized
  332. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  333. };
  334. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  335. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  336. DWORD dwRepeat; // how many times to repeat the composition command
  337. LPCOMPOSECALLBACK lpfnCallback; // function to call prior to execution of each compose command
  338. } DDCOMPOSEFX;
  339. typedef DDCOMPOSEFX FAR* LPDDCOMPOSEFX;
  340. #endif
  341. //@@END_MSINTERNAL
  342. /*
  343. * DDSCAPS
  344. */
  345. typedef struct _DDSCAPS
  346. {
  347. DWORD dwCaps; // capabilities of surface wanted
  348. } DDSCAPS;
  349. typedef DDSCAPS FAR* LPDDSCAPS;
  350. /*
  351. * DDCAPS
  352. */
  353. #define DD_ROP_SPACE (256/32) // space required to store ROP array
  354. //@@BEGIN_MSINTERNAL
  355. /*
  356. * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally
  357. * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0.
  358. * New applications should use the DDCAPS structure defined below.
  359. */
  360. typedef struct _DDCAPS_V1
  361. {
  362. DWORD dwSize; // size of the DDDRIVERCAPS structure
  363. DWORD dwCaps; // driver specific capabilities
  364. DWORD dwCaps2; // more driver specific capabilites
  365. DWORD dwCKeyCaps; // color key capabilities of the surface
  366. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  367. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  368. DWORD dwPalCaps; // palette capabilities
  369. DWORD dwSVCaps; // stereo vision capabilities
  370. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  371. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  372. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  373. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  374. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  375. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  376. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  377. DWORD dwVidMemTotal; // total amount of video memory
  378. DWORD dwVidMemFree; // amount of free video memory
  379. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  380. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  381. DWORD dwNumFourCCCodes; // number of four cc codes
  382. DWORD dwAlignBoundarySrc; // source rectangle alignment
  383. DWORD dwAlignSizeSrc; // source rectangle byte size
  384. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  385. DWORD dwAlignSizeDest; // dest rectangle byte size
  386. DWORD dwAlignStrideAlign; // stride alignment
  387. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  388. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  389. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  390. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  391. DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  392. DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  393. DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  394. DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  395. DWORD dwReserved1; // reserved
  396. DWORD dwReserved2; // reserved
  397. DWORD dwReserved3; // reserved
  398. } DDCAPS_V1;
  399. typedef DDCAPS_V1 FAR* LPDDCAPS_V1;
  400. //@@END_MSINTERNAL
  401. typedef struct _DDCAPS
  402. {
  403. DWORD dwSize; // size of the DDDRIVERCAPS structure
  404. DWORD dwCaps; // driver specific capabilities
  405. DWORD dwCaps2; // more driver specific capabilites
  406. DWORD dwCKeyCaps; // color key capabilities of the surface
  407. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  408. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  409. DWORD dwPalCaps; // palette capabilities
  410. DWORD dwSVCaps; // stereo vision capabilities
  411. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  412. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  413. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  414. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  415. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  416. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  417. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  418. DWORD dwVidMemTotal; // total amount of video memory
  419. DWORD dwVidMemFree; // amount of free video memory
  420. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  421. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  422. DWORD dwNumFourCCCodes; // number of four cc codes
  423. DWORD dwAlignBoundarySrc; // source rectangle alignment
  424. DWORD dwAlignSizeSrc; // source rectangle byte size
  425. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  426. DWORD dwAlignSizeDest; // dest rectangle byte size
  427. DWORD dwAlignStrideAlign; // stride alignment
  428. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  429. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  430. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  431. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  432. DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  433. DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  434. DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  435. DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  436. DWORD dwReserved1; // reserved
  437. DWORD dwReserved2; // reserved
  438. DWORD dwReserved3; // reserved
  439. DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  440. DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  441. DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  442. DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  443. DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  444. DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  445. DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  446. DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  447. DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  448. DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  449. DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  450. DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  451. DWORD dwReserved4; // reserved
  452. DWORD dwReserved5; // reserved
  453. DWORD dwReserved6; // reserved
  454. } DDCAPS;
  455. typedef DDCAPS FAR* LPDDCAPS;
  456. /*
  457. * DDPIXELFORMAT
  458. */
  459. typedef struct _DDPIXELFORMAT
  460. {
  461. DWORD dwSize; // size of structure
  462. DWORD dwFlags; // pixel format flags
  463. DWORD dwFourCC; // (FOURCC code)
  464. union
  465. {
  466. DWORD dwRGBBitCount; // how many bits per pixel
  467. DWORD dwYUVBitCount; // how many bits per pixel
  468. DWORD dwZBufferBitDepth; // how many bits for z buffers
  469. DWORD dwAlphaBitDepth; // how many bits for alpha channels
  470. };
  471. union
  472. {
  473. DWORD dwRBitMask; // mask for red bit
  474. DWORD dwYBitMask; // mask for Y bits
  475. };
  476. union
  477. {
  478. DWORD dwGBitMask; // mask for green bits
  479. DWORD dwUBitMask; // mask for U bits
  480. };
  481. union
  482. {
  483. DWORD dwBBitMask; // mask for blue bits
  484. DWORD dwVBitMask; // mask for V bits
  485. };
  486. union
  487. {
  488. DWORD dwRGBAlphaBitMask; // mask for alpha channel
  489. DWORD dwYUVAlphaBitMask; // mask for alpha channel
  490. };
  491. } DDPIXELFORMAT;
  492. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  493. /*
  494. * DDOVERLAYFX
  495. */
  496. typedef struct _DDOVERLAYFX
  497. {
  498. DWORD dwSize; // size of structure
  499. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  500. DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
  501. DWORD dwReserved;
  502. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  503. union
  504. {
  505. DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
  506. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
  507. };
  508. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  509. union
  510. {
  511. DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
  512. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
  513. };
  514. DDCOLORKEY dckDestColorkey; // DestColorkey override
  515. DDCOLORKEY dckSrcColorkey; // DestColorkey override
  516. DWORD dwDDFX; // Overlay FX
  517. DWORD dwFlags; // flags
  518. } DDOVERLAYFX;
  519. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  520. /*
  521. * DDBLTBATCH: BltBatch entry structure
  522. */
  523. typedef struct _DDBLTBATCH
  524. {
  525. LPRECT lprDest;
  526. LPDIRECTDRAWSURFACE lpDDSSrc;
  527. LPRECT lprSrc;
  528. DWORD dwFlags;
  529. LPDDBLTFX lpDDBltFx;
  530. } DDBLTBATCH;
  531. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  532. /*
  533. * callbacks
  534. */
  535. typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  536. #ifdef STREAMING
  537. typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  538. #endif
  539. //@@BEGIN_MSINTERNAL
  540. #ifdef CLIPPER_NOTIFY
  541. /*
  542. * values passed into the clipper callback
  543. */
  544. #ifndef WINWATCHNOTIFY_START
  545. #define WINWATCHNOTIFY_START 0
  546. #define WINWATCHNOTIFY_STOP 1
  547. #define WINWATCHNOTIFY_DESTROY 2
  548. #define WINWATCHNOTIFY_CHANGING 3
  549. #define WINWATCHNOTIFY_CHANGED 4
  550. #endif
  551. #endif
  552. //@@END_MSINTERNAL
  553. /*
  554. * INTERACES FOLLOW:
  555. * IDirectDraw
  556. * IDirectDrawClipper
  557. * IDirectDrawPalette
  558. * IDirectDrawSurface
  559. *@@BEGIN_MSINTERNAL
  560. * IDirectDrawSurfaceStreaming
  561. * IDirectDrawSurfaceComposition
  562. * IDirectDrawSurfaceClipperEx
  563. * // this would allow multiple clipper objects to be attached
  564. * // to the same destination
  565. *@@END_MSINTERNAL
  566. */
  567. /*
  568. * IDirectDraw
  569. */
  570. #if defined( _WIN32 ) && !defined( _NO_COM )
  571. #undef INTERFACE
  572. #define INTERFACE IDirectDraw
  573. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  574. {
  575. /*** IUnknown methods ***/
  576. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  577. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  578. STDMETHOD_(ULONG,Release) (THIS) PURE;
  579. /*** IDirectDraw methods ***/
  580. STDMETHOD(Compact)(THIS) PURE;
  581. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  582. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  583. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  584. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  585. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  586. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  587. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  588. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  589. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  590. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  591. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  592. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  593. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  594. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  595. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  596. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  597. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  598. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  599. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  600. };
  601. #if !defined(__cplusplus) || defined(CINTERFACE)
  602. #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  603. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  604. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  605. #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
  606. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  607. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  608. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  609. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  610. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  611. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  612. #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  613. #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  614. #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  615. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  616. #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  617. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  618. #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  619. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  620. #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  621. #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  622. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  623. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  624. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  625. #endif
  626. #endif
  627. #if defined( _WIN32 ) && !defined( _NO_COM )
  628. #undef INTERFACE
  629. #define INTERFACE IDirectDraw2
  630. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  631. {
  632. /*** IUnknown methods ***/
  633. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  634. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  635. STDMETHOD_(ULONG,Release) (THIS) PURE;
  636. /*** IDirectDraw methods ***/
  637. STDMETHOD(Compact)(THIS) PURE;
  638. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  639. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  640. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  641. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  642. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  643. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  644. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  645. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  646. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  647. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  648. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  649. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  650. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  651. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  652. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  653. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  654. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  655. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  656. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  657. /*** Added in the v2 interface ***/
  658. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  659. };
  660. #if !defined(__cplusplus) || defined(CINTERFACE)
  661. #define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  662. #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
  663. #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
  664. #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
  665. #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  666. #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  667. #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  668. #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  669. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  670. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  671. #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  672. #define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  673. #define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  674. #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  675. #define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  676. #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  677. #define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  678. #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  679. #define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  680. #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  681. #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  682. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  683. #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  684. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  685. #endif
  686. #endif
  687. /*
  688. * IDirectDrawPalette
  689. */
  690. #if defined( _WIN32 ) && !defined( _NO_COM )
  691. #undef INTERFACE
  692. #define INTERFACE IDirectDrawPalette
  693. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  694. {
  695. /*** IUnknown methods ***/
  696. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  697. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  698. STDMETHOD_(ULONG,Release) (THIS) PURE;
  699. /*** IDirectDrawPalette methods ***/
  700. STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  701. STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  702. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  703. STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  704. };
  705. #if !defined(__cplusplus) || defined(CINTERFACE)
  706. #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  707. #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
  708. #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
  709. #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  710. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
  711. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  712. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
  713. #endif
  714. #endif
  715. /*
  716. * IDirectDrawClipper
  717. */
  718. #if defined( _WIN32 ) && !defined( _NO_COM )
  719. #undef INTERFACE
  720. #define INTERFACE IDirectDrawClipper
  721. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  722. {
  723. /*** IUnknown methods ***/
  724. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  725. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  726. STDMETHOD_(ULONG,Release) (THIS) PURE;
  727. /*** IDirectDrawClipper methods ***/
  728. STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  729. STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  730. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  731. STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  732. STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  733. STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  734. };
  735. #if !defined(__cplusplus) || defined(CINTERFACE)
  736. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  737. #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
  738. #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
  739. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
  740. #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
  741. #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  742. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
  743. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
  744. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
  745. #endif
  746. #endif
  747. /*
  748. * IDirectDrawSurface and related interfaces
  749. */
  750. #if defined( _WIN32 ) && !defined( _NO_COM )
  751. #undef INTERFACE
  752. #define INTERFACE IDirectDrawSurface
  753. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  754. {
  755. /*** IUnknown methods ***/
  756. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  757. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  758. STDMETHOD_(ULONG,Release) (THIS) PURE;
  759. /*** IDirectDrawSurface methods ***/
  760. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  761. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  762. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  763. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  764. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  765. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  766. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  767. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  768. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  769. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  770. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  771. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  772. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  773. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  774. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  775. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  776. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  777. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  778. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  779. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  780. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  781. STDMETHOD(IsLost)(THIS) PURE;
  782. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  783. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  784. STDMETHOD(Restore)(THIS) PURE;
  785. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  786. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  787. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  788. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  789. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  790. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  791. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  792. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  793. };
  794. #if !defined(__cplusplus) || defined(CINTERFACE)
  795. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  796. #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  797. #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
  798. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  799. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  800. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  801. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  802. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  803. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  804. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  805. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  806. #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  807. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  808. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  809. #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  810. #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  811. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  812. #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  813. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  814. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  815. #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  816. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  817. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  818. #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  819. #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
  820. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  821. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  822. #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
  823. #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  824. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  825. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  826. #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  827. #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  828. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  829. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  830. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  831. #endif
  832. /*
  833. * IDirectDrawSurface2 and related interfaces
  834. */
  835. #undef INTERFACE
  836. #define INTERFACE IDirectDrawSurface2
  837. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  838. {
  839. /*** IUnknown methods ***/
  840. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  841. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  842. STDMETHOD_(ULONG,Release) (THIS) PURE;
  843. /*** IDirectDrawSurface methods ***/
  844. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  845. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  846. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  847. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  848. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  849. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  850. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  851. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  852. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  853. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  854. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  855. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  856. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  857. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  858. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  859. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  860. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  861. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  862. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  863. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  864. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  865. STDMETHOD(IsLost)(THIS) PURE;
  866. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  867. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  868. STDMETHOD(Restore)(THIS) PURE;
  869. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  870. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  871. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  872. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  873. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  874. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  875. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  876. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  877. /*** Added in the v2 interface ***/
  878. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  879. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  880. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  881. };
  882. #if !defined(__cplusplus) || defined(CINTERFACE)
  883. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  884. #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
  885. #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
  886. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  887. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  888. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  889. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  890. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  891. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  892. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  893. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  894. #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  895. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  896. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  897. #define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  898. #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  899. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  900. #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  901. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  902. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  903. #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  904. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  905. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  906. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  907. #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
  908. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  909. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  910. #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
  911. #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  912. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  913. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  914. #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  915. #define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  916. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  917. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  918. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  919. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  920. #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  921. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  922. #endif
  923. //@@BEGIN_MSINTERNAL
  924. #ifdef COMPOSITION
  925. #undef INTERFACE
  926. #define INTERFACE IDirectDrawSurfaceComposition
  927. DECLARE_INTERFACE_( IDirectDrawSurfaceComposition, IUnknown )
  928. {
  929. /*** IUnknown methods ***/
  930. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  931. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  932. STDMETHOD_(ULONG,Release) (THIS) PURE;
  933. /*** IDirectDrawSurfaceComposition methods ***/
  934. STDMETHOD(AddSurfaceDependency)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  935. STDMETHOD(Compose)(THIS_ LPRECT,LPDIRECTDRAWSURFACE,LPRECT,DWORD,LPDDCOMPOSEFX) PURE;
  936. STDMETHOD(DeleteSurfaceDependency)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  937. STDMETHOD(DestLock)(THIS) PURE;
  938. STDMETHOD(DestUnlock)(THIS) PURE;
  939. STDMETHOD(EnumSurfaceDependencies)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  940. STDMETHOD(GetCompositionOrder)(THIS_ LPDWORD) PURE;
  941. STDMETHOD(SetCompositionOrder)(THIS_ DWORD) PURE;
  942. };
  943. #endif
  944. #ifdef STREAMING
  945. #undef INTERFACE
  946. #define INTERFACE IDirectDrawSurfaceStreaming
  947. DECLARE_INTERFACE_( IDirectDrawSurfaceStreaming, IUnknown )
  948. {
  949. /*** IUnknown methods ***/
  950. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  951. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  952. STDMETHOD_(ULONG,Release) (THIS) PURE;
  953. /*** IDirectDrawSurfaceStreaming methods ***/
  954. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  955. STDMETHOD(SetNotificationCallback)(THIS_ DWORD,LPSURFACESTREAMINGCALLBACK) PURE;
  956. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  957. };
  958. #endif
  959. //@@END_MSINTERNAL
  960. #endif
  961. //@@BEGIN_MSINTERNAL
  962. #ifdef CLIPPER_NOTIFY
  963. /*
  964. * DIRECTDRAWCLIPPER FLAGS
  965. */
  966. #define DDCLIPPER_WATCHWINDOW 0x00000001l
  967. #endif
  968. //@@END_MSINTERNAL
  969. /*
  970. * DDSURFACEDESC
  971. */
  972. typedef struct _DDSURFACEDESC
  973. {
  974. DWORD dwSize; // size of the DDSURFACEDESC structure
  975. DWORD dwFlags; // determines what fields are valid
  976. DWORD dwHeight; // height of surface to be created
  977. DWORD dwWidth; // width of input surface
  978. LONG lPitch; // distance to start of next line (return value only)
  979. DWORD dwBackBufferCount; // number of back buffers requested
  980. union
  981. {
  982. DWORD dwMipMapCount; // number of mip-map levels requested
  983. DWORD dwZBufferBitDepth; // depth of Z buffer requested
  984. DWORD dwRefreshRate; // refresh rate (used when display mode is described)
  985. };
  986. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  987. //@@BEGIN_MSINTERNAL
  988. #ifdef COMPOSITION
  989. DWORD dwCompositionOrder; // blt order for the surface, 0 is background
  990. #else
  991. //@@END_MSINTERNAL
  992. DWORD dwReserved; // reserved
  993. //@@BEGIN_MSINTERNAL
  994. #endif
  995. //@@END_MSINTERNAL
  996. LPVOID lpSurface; // pointer to the associated surface memory
  997. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  998. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  999. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  1000. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  1001. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  1002. DDSCAPS ddsCaps; // direct draw surface capabilities
  1003. } DDSURFACEDESC;
  1004. /*
  1005. * ddsCaps field is valid.
  1006. */
  1007. #define DDSD_CAPS 0x00000001l // default
  1008. /*
  1009. * dwHeight field is valid.
  1010. */
  1011. #define DDSD_HEIGHT 0x00000002l
  1012. /*
  1013. * dwWidth field is valid.
  1014. */
  1015. #define DDSD_WIDTH 0x00000004l
  1016. /*
  1017. * lPitch is valid.
  1018. */
  1019. #define DDSD_PITCH 0x00000008l
  1020. /*
  1021. * dwBackBufferCount is valid.
  1022. */
  1023. #define DDSD_BACKBUFFERCOUNT 0x00000020l
  1024. /*
  1025. * dwZBufferBitDepth is valid.
  1026. */
  1027. #define DDSD_ZBUFFERBITDEPTH 0x00000040l
  1028. /*
  1029. * dwAlphaBitDepth is valid.
  1030. */
  1031. #define DDSD_ALPHABITDEPTH 0x00000080l
  1032. //@@BEGIN_MSINTERNAL
  1033. #ifdef COMPOSITION
  1034. /*
  1035. * dwCompositionOrder is valid.
  1036. */
  1037. #define DDSD_COMPOSITIONORDER 0x00000100l
  1038. #endif
  1039. //@@END_MSINTERNAL
  1040. //@@BEGIN_MSINTERNAL
  1041. /*
  1042. * lpSurface is valid.
  1043. */
  1044. #define DDSD_LPSURFACE 0x00000800l
  1045. //@@END_MSINTERNAL
  1046. /*
  1047. * ddpfPixelFormat is valid.
  1048. */
  1049. #define DDSD_PIXELFORMAT 0x00001000l
  1050. /*
  1051. * ddckCKDestOverlay is valid.
  1052. */
  1053. #define DDSD_CKDESTOVERLAY 0x00002000l
  1054. /*
  1055. * ddckCKDestBlt is valid.
  1056. */
  1057. #define DDSD_CKDESTBLT 0x00004000l
  1058. /*
  1059. * ddckCKSrcOverlay is valid.
  1060. */
  1061. #define DDSD_CKSRCOVERLAY 0x00008000l
  1062. /*
  1063. * ddckCKSrcBlt is valid.
  1064. */
  1065. #define DDSD_CKSRCBLT 0x00010000l
  1066. /*
  1067. * dwMipMapCount is valid.
  1068. */
  1069. #define DDSD_MIPMAPCOUNT 0x00020000l
  1070. /*
  1071. * dwRefreshRate is valid
  1072. */
  1073. #define DDSD_REFRESHRATE 0x00040000l
  1074. /*
  1075. * All input fields are valid.
  1076. */
  1077. #define DDSD_ALL 0x0007f9eel
  1078. //@@BEGIN_MSINTERNAL
  1079. /*
  1080. * DDMODEDESC
  1081. */
  1082. typedef struct _DDMODEDESC
  1083. {
  1084. DWORD dwSize; // size of structure
  1085. DWORD dwFlags; // enumeration flags
  1086. DWORD dwMonitorFrequency; // frequency of monitor in mode
  1087. DDSURFACEDESC ddsdSurfaceDesc; // surface being enumerated
  1088. } DDMODEDESC;
  1089. typedef DDMODEDESC FAR* LPDDMODEDESC;
  1090. //@@END_MSINTERNAL
  1091. /*============================================================================
  1092. *
  1093. * Direct Draw Capability Flags
  1094. *
  1095. * These flags are used to describe the capabilities of a given Surface.
  1096. * All flags are bit flags.
  1097. *
  1098. *==========================================================================*/
  1099. /****************************************************************************
  1100. *
  1101. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  1102. *
  1103. ****************************************************************************/
  1104. /*
  1105. * This bit currently has no meaning.
  1106. */
  1107. #define DDSCAPS_3D 0x00000001l
  1108. /*
  1109. * Indicates that this surface contains alpha information. The pixel
  1110. * format must be interrogated to determine whether this surface
  1111. * contains only alpha information or alpha information interlaced
  1112. * with pixel color data (e.g. RGBA or YUVA).
  1113. */
  1114. #define DDSCAPS_ALPHA 0x00000002l
  1115. /*
  1116. * Indicates that this surface is a backbuffer. It is generally
  1117. * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  1118. * It indicates that this surface is THE back buffer of a surface
  1119. * flipping structure. DirectDraw supports N surfaces in a
  1120. * surface flipping structure. Only the surface that immediately
  1121. * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  1122. * The other surfaces are identified as back buffers by the presence
  1123. * of the DDSCAPS_FLIP capability, their attachment order, and the
  1124. * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  1125. * capabilities. The bit is sent to CreateSurface when a standalone
  1126. * back buffer is being created. This surface could be attached to
  1127. * a front buffer and/or back buffers to form a flipping surface
  1128. * structure after the CreateSurface call. See AddAttachments for
  1129. * a detailed description of the behaviors in this case.
  1130. */
  1131. #define DDSCAPS_BACKBUFFER 0x00000004l
  1132. /*
  1133. * Indicates a complex surface structure is being described. A
  1134. * complex surface structure results in the creation of more than
  1135. * one surface. The additional surfaces are attached to the root
  1136. * surface. The complex structure can only be destroyed by
  1137. * destroying the root.
  1138. */
  1139. #define DDSCAPS_COMPLEX 0x00000008l
  1140. /*
  1141. * Indicates that this surface is a part of a surface flipping structure.
  1142. * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  1143. * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
  1144. * on the resulting creations. The dwBackBufferCount field in the
  1145. * DDSURFACEDESC structure must be set to at least 1 in order for
  1146. * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
  1147. * must always be set with creating multiple surfaces through CreateSurface.
  1148. */
  1149. #define DDSCAPS_FLIP 0x00000010l
  1150. /*
  1151. * Indicates that this surface is THE front buffer of a surface flipping
  1152. * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
  1153. * capability bit is set.
  1154. * If this capability is sent to CreateSurface then a standalonw front buffer
  1155. * is created. This surface will not have the DDSCAPS_FLIP capability.
  1156. * It can be attached to other back buffers to form a flipping structure.
  1157. * See AddAttachments for a detailed description of the behaviors in this
  1158. * case.
  1159. */
  1160. #define DDSCAPS_FRONTBUFFER 0x00000020l
  1161. /*
  1162. * Indicates that this surface is any offscreen surface that is not an overlay,
  1163. * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
  1164. * to identify plain vanilla surfaces.
  1165. */
  1166. #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
  1167. /*
  1168. * Indicates that this surface is an overlay. It may or may not be directly visible
  1169. * depending on whether or not it is currently being overlayed onto the primary
  1170. * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
  1171. * overlayed at the moment.
  1172. */
  1173. #define DDSCAPS_OVERLAY 0x00000080l
  1174. /*
  1175. * Indicates that unique DirectDrawPalette objects can be created and
  1176. * attached to this surface.
  1177. */
  1178. #define DDSCAPS_PALETTE 0x00000100l
  1179. /*
  1180. * Indicates that this surface is the primary surface. The primary
  1181. * surface represents what the user is seeing at the moment.
  1182. */
  1183. #define DDSCAPS_PRIMARYSURFACE 0x00000200l
  1184. /*
  1185. * Indicates that this surface is the primary surface for the left eye.
  1186. * The primary surface for the left eye represents what the user is seeing
  1187. * at the moment with the users left eye. When this surface is created the
  1188. * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  1189. * right eye.
  1190. */
  1191. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
  1192. /*
  1193. * Indicates that this surface memory was allocated in system memory
  1194. */
  1195. #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  1196. /*
  1197. * Indicates that this surface can be used as a 3D texture. It does not
  1198. * indicate whether or not the surface is being used for that purpose.
  1199. */
  1200. #define DDSCAPS_TEXTURE 0x00001000l
  1201. /*
  1202. * Indicates that a surface may be a destination for 3D rendering. This
  1203. * bit must be set in order to query for a Direct3D Device Interface
  1204. * from this surface.
  1205. */
  1206. #define DDSCAPS_3DDEVICE 0x00002000l
  1207. /*
  1208. * Indicates that this surface exists in video memory.
  1209. */
  1210. #define DDSCAPS_VIDEOMEMORY 0x00004000l
  1211. /*
  1212. * Indicates that changes made to this surface are immediately visible.
  1213. * It is always set for the primary surface and is set for overlays while
  1214. * they are being overlayed and texture maps while they are being textured.
  1215. */
  1216. #define DDSCAPS_VISIBLE 0x00008000l
  1217. /*
  1218. * Indicates that only writes are permitted to the surface. Read accesses
  1219. * from the surface may or may not generate a protection fault, but the
  1220. * results of a read from this surface will not be meaningful. READ ONLY.
  1221. */
  1222. #define DDSCAPS_WRITEONLY 0x00010000l
  1223. /*
  1224. * Indicates that this surface is a z buffer. A z buffer does not contain
  1225. * displayable information. Instead it contains bit depth information that is
  1226. * used to determine which pixels are visible and which are obscured.
  1227. */
  1228. #define DDSCAPS_ZBUFFER 0x00020000l
  1229. /*
  1230. * Indicates surface will have a DC associated long term
  1231. */
  1232. #define DDSCAPS_OWNDC 0x00040000l
  1233. /*
  1234. * Indicates surface should be able to receive live video
  1235. */
  1236. #define DDSCAPS_LIVEVIDEO 0x00080000l
  1237. /*
  1238. * Indicates surface should be able to have a stream decompressed
  1239. * to it by the hardware.
  1240. */
  1241. #define DDSCAPS_HWCODEC 0x00100000l
  1242. /*
  1243. * Surface is a 320x200 or 320x240 ModeX surface
  1244. */
  1245. #define DDSCAPS_MODEX 0x00200000l
  1246. /*
  1247. * Indicates surface is one level of a mip-map. This surface will
  1248. * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  1249. * This can be done explicitly, by creating a number of surfaces and
  1250. * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  1251. * If this bit is set then DDSCAPS_TEXTURE must also be set.
  1252. */
  1253. #define DDSCAPS_MIPMAP 0x00400000l
  1254. //@@BEGIN_MSINTERNAL
  1255. /*
  1256. * Indicates the surface is an execute buffer, i.e., a linear chunk of system
  1257. * or video memory that holds a Direct3D display list. This cap. is MS internal
  1258. * only as Direct3D will use it to create surfaces but it is not externally
  1259. * visible via the DirectDraw API.
  1260. */
  1261. #define DDSCAPS_EXECUTEBUFFER 0x00800000l
  1262. //@@END_MSINTERNAL
  1263. //@@BEGIN_MSINTERNAL
  1264. #ifdef SHAREDZ
  1265. /*
  1266. * Indicates that this Z buffer surface can be shared with other DirectDraw
  1267. * applications. This does not necessarily mean that this surface is
  1268. * currently being shared with other processes but only that it can be. If
  1269. * this bit is set then DDSCAPS_ZBUFFER must also be set.
  1270. */
  1271. #define DDSCAPS_SHAREDZBUFFER 0x01000000l
  1272. /*
  1273. * Indicates that this backbuffer surface can be shared with other DirectDraw
  1274. * applications. This does not necessarily mean that this surface is
  1275. * currently being shared with other processes but only that it can be. If
  1276. * this bit is set than DDSCAPS_BACKBUFFER must also be set (it may also be
  1277. * set if a backbuffer is being created implicitly with as past of a complex
  1278. * flippable chain).
  1279. */
  1280. #define DDSCAPS_SHAREDBACKBUFFER 0x02000000l
  1281. #endif
  1282. //@@END_MSINTERNAL
  1283. /*
  1284. * Indicates that memory for the surface is not allocated until the surface
  1285. * is loaded (via the Direct3D texture Load() function).
  1286. */
  1287. #define DDSCAPS_ALLOCONLOAD 0x04000000l
  1288. //@@BEGIN_MSINTERNAL
  1289. #ifdef SHAREDZ
  1290. #define DDSCAPS_VALID 0x07ffffffl
  1291. #else
  1292. #define DDSCAPS_VALID 0x04ffffffl
  1293. #endif
  1294. //@@END_MSINTERNAL
  1295. /****************************************************************************
  1296. *
  1297. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  1298. *
  1299. ****************************************************************************/
  1300. /*
  1301. * Display hardware has 3D acceleration.
  1302. */
  1303. #define DDCAPS_3D 0x00000001l
  1304. /*
  1305. * Indicates that DirectDraw will support only dest rectangles that are aligned
  1306. * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  1307. * READ ONLY.
  1308. */
  1309. #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
  1310. /*
  1311. * Indicates that DirectDraw will support only source rectangles whose sizes in
  1312. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
  1313. */
  1314. #define DDCAPS_ALIGNSIZEDEST 0x00000004l
  1315. /*
  1316. * Indicates that DirectDraw will support only source rectangles that are aligned
  1317. * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  1318. * READ ONLY.
  1319. */
  1320. #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
  1321. /*
  1322. * Indicates that DirectDraw will support only source rectangles whose sizes in
  1323. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
  1324. */
  1325. #define DDCAPS_ALIGNSIZESRC 0x00000010l
  1326. /*
  1327. * Indicates that DirectDraw will create video memory surfaces that have a stride
  1328. * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
  1329. */
  1330. #define DDCAPS_ALIGNSTRIDE 0x00000020l
  1331. /*
  1332. * Display hardware is capable of blt operations.
  1333. */
  1334. #define DDCAPS_BLT 0x00000040l
  1335. /*
  1336. * Display hardware is capable of asynchronous blt operations.
  1337. */
  1338. #define DDCAPS_BLTQUEUE 0x00000080l
  1339. /*
  1340. * Display hardware is capable of color space conversions during the blt operation.
  1341. */
  1342. #define DDCAPS_BLTFOURCC 0x00000100l
  1343. /*
  1344. * Display hardware is capable of stretching during blt operations.
  1345. */
  1346. #define DDCAPS_BLTSTRETCH 0x00000200l
  1347. /*
  1348. * Display hardware is shared with GDI.
  1349. */
  1350. #define DDCAPS_GDI 0x00000400l
  1351. /*
  1352. * Display hardware can overlay.
  1353. */
  1354. #define DDCAPS_OVERLAY 0x00000800l
  1355. /*
  1356. * Set if display hardware supports overlays but can not clip them.
  1357. */
  1358. #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
  1359. /*
  1360. * Indicates that overlay hardware is capable of color space conversions during
  1361. * the overlay operation.
  1362. */
  1363. #define DDCAPS_OVERLAYFOURCC 0x00002000l
  1364. /*
  1365. * Indicates that stretching can be done by the overlay hardware.
  1366. */
  1367. #define DDCAPS_OVERLAYSTRETCH 0x00004000l
  1368. /*
  1369. * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  1370. * other than the primary surface.
  1371. */
  1372. #define DDCAPS_PALETTE 0x00008000l
  1373. /*
  1374. * Indicates that palette changes can be syncd with the veritcal refresh.
  1375. */
  1376. #define DDCAPS_PALETTEVSYNC 0x00010000l
  1377. /*
  1378. * Display hardware can return the current scan line.
  1379. */
  1380. #define DDCAPS_READSCANLINE 0x00020000l
  1381. /*
  1382. * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
  1383. * can be created.
  1384. */
  1385. #define DDCAPS_STEREOVIEW 0x00040000l
  1386. /*
  1387. * Display hardware is capable of generating a vertical blank interrupt.
  1388. */
  1389. #define DDCAPS_VBI 0x00080000l
  1390. /*
  1391. * Supports the use of z buffers with blt operations.
  1392. */
  1393. #define DDCAPS_ZBLTS 0x00100000l
  1394. /*
  1395. * Supports Z Ordering of overlays.
  1396. */
  1397. #define DDCAPS_ZOVERLAYS 0x00200000l
  1398. /*
  1399. * Supports color key
  1400. */
  1401. #define DDCAPS_COLORKEY 0x00400000l
  1402. /*
  1403. * Supports alpha surfaces
  1404. */
  1405. #define DDCAPS_ALPHA 0x00800000l
  1406. /*
  1407. * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  1408. */
  1409. #define DDCAPS_COLORKEYHWASSIST 0x01000000l
  1410. /*
  1411. * no hardware support at all
  1412. */
  1413. #define DDCAPS_NOHARDWARE 0x02000000l
  1414. /*
  1415. * Display hardware is capable of color fill with bltter
  1416. */
  1417. #define DDCAPS_BLTCOLORFILL 0x04000000l
  1418. /*
  1419. * Display hardware is bank switched, and potentially very slow at
  1420. * random access to VRAM.
  1421. */
  1422. #define DDCAPS_BANKSWITCHED 0x08000000l
  1423. /*
  1424. * Display hardware is capable of depth filling Z-buffers with bltter
  1425. */
  1426. #define DDCAPS_BLTDEPTHFILL 0x10000000l
  1427. /*
  1428. * Display hardware is capable of clipping while bltting.
  1429. */
  1430. #define DDCAPS_CANCLIP 0x20000000l
  1431. /*
  1432. * Display hardware is capable of clipping while stretch bltting.
  1433. */
  1434. #define DDCAPS_CANCLIPSTRETCHED 0x40000000l
  1435. /*
  1436. * Display hardware is capable of bltting to or from system memory
  1437. */
  1438. #define DDCAPS_CANBLTSYSMEM 0x80000000l
  1439. /****************************************************************************
  1440. *
  1441. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  1442. *
  1443. ****************************************************************************/
  1444. /*
  1445. * Display hardware is certified
  1446. */
  1447. #define DDCAPS2_CERTIFIED 0x00000001l
  1448. /*
  1449. * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  1450. * Direct3D rendering operations between calls to BeginScene() and EndScene()
  1451. */
  1452. #define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
  1453. /****************************************************************************
  1454. *
  1455. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  1456. *
  1457. ****************************************************************************/
  1458. /*
  1459. * Supports alpha blending around the edge of a source color keyed surface.
  1460. * For Blt.
  1461. */
  1462. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
  1463. /*
  1464. * Supports alpha information in the pixel format. The bit depth of alpha
  1465. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  1466. * more opaque as the alpha value increases. (0 is transparent.)
  1467. * For Blt.
  1468. */
  1469. #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
  1470. /*
  1471. * Supports alpha information in the pixel format. The bit depth of alpha
  1472. * information in the pixel format can be 1,2,4, or 8. The alpha value
  1473. * becomes more transparent as the alpha value increases. (0 is opaque.)
  1474. * This flag can only be set if DDCAPS_ALPHA is set.
  1475. * For Blt.
  1476. */
  1477. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
  1478. /*
  1479. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1480. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1481. * (0 is transparent.)
  1482. * For Blt.
  1483. */
  1484. #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
  1485. /*
  1486. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1487. * The NEG suffix indicates that this alpha channel becomes more transparent
  1488. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1489. * DDCAPS_ALPHA is set.
  1490. * For Blt.
  1491. */
  1492. #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
  1493. /*
  1494. * Supports alpha blending around the edge of a source color keyed surface.
  1495. * For Overlays.
  1496. */
  1497. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
  1498. /*
  1499. * Supports alpha information in the pixel format. The bit depth of alpha
  1500. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  1501. * more opaque as the alpha value increases. (0 is transparent.)
  1502. * For Overlays.
  1503. */
  1504. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
  1505. /*
  1506. * Supports alpha information in the pixel format. The bit depth of alpha
  1507. * information in the pixel format can be 1,2,4, or 8. The alpha value
  1508. * becomes more transparent as the alpha value increases. (0 is opaque.)
  1509. * This flag can only be set if DDCAPS_ALPHA is set.
  1510. * For Overlays.
  1511. */
  1512. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
  1513. /*
  1514. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1515. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1516. * (0 is transparent.)
  1517. * For Overlays.
  1518. */
  1519. #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
  1520. /*
  1521. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1522. * The NEG suffix indicates that this alpha channel becomes more transparent
  1523. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1524. * DDCAPS_ALPHA is set.
  1525. * For Overlays.
  1526. */
  1527. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
  1528. /****************************************************************************
  1529. *
  1530. * DIRECTDRAW FX CAPABILITY FLAGS
  1531. *
  1532. ****************************************************************************/
  1533. /*
  1534. * Uses arithmetic operations to stretch and shrink surfaces during blt
  1535. * rather than pixel doubling techniques. Along the Y axis.
  1536. */
  1537. #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
  1538. /*
  1539. * Uses arithmetic operations to stretch during blt
  1540. * rather than pixel doubling techniques. Along the Y axis. Only
  1541. * works for x1, x2, etc.
  1542. */
  1543. #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
  1544. /*
  1545. * Supports mirroring left to right in blt.
  1546. */
  1547. #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
  1548. /*
  1549. * Supports mirroring top to bottom in blt.
  1550. */
  1551. #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
  1552. /*
  1553. * Supports arbitrary rotation for blts.
  1554. */
  1555. #define DDFXCAPS_BLTROTATION 0x00000100l
  1556. /*
  1557. * Supports 90 degree rotations for blts.
  1558. */
  1559. #define DDFXCAPS_BLTROTATION90 0x00000200l
  1560. /*
  1561. * DirectDraw supports arbitrary shrinking of a surface along the
  1562. * x axis (horizontal direction) for blts.
  1563. */
  1564. #define DDFXCAPS_BLTSHRINKX 0x00000400l
  1565. /*
  1566. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1567. * along the x axis (horizontal direction) for blts.
  1568. */
  1569. #define DDFXCAPS_BLTSHRINKXN 0x00000800l
  1570. /*
  1571. * DirectDraw supports arbitrary shrinking of a surface along the
  1572. * y axis (horizontal direction) for blts.
  1573. */
  1574. #define DDFXCAPS_BLTSHRINKY 0x00001000l
  1575. /*
  1576. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1577. * along the y axis (vertical direction) for blts.
  1578. */
  1579. #define DDFXCAPS_BLTSHRINKYN 0x00002000l
  1580. /*
  1581. * DirectDraw supports arbitrary stretching of a surface along the
  1582. * x axis (horizontal direction) for blts.
  1583. */
  1584. #define DDFXCAPS_BLTSTRETCHX 0x00004000l
  1585. /*
  1586. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1587. * along the x axis (horizontal direction) for blts.
  1588. */
  1589. #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
  1590. /*
  1591. * DirectDraw supports arbitrary stretching of a surface along the
  1592. * y axis (horizontal direction) for blts.
  1593. */
  1594. #define DDFXCAPS_BLTSTRETCHY 0x00010000l
  1595. /*
  1596. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1597. * along the y axis (vertical direction) for blts.
  1598. */
  1599. #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
  1600. /*
  1601. * Uses arithmetic operations to stretch and shrink surfaces during
  1602. * overlay rather than pixel doubling techniques. Along the Y axis
  1603. * for overlays.
  1604. */
  1605. #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
  1606. /*
  1607. * Uses arithmetic operations to stretch surfaces during
  1608. * overlay rather than pixel doubling techniques. Along the Y axis
  1609. * for overlays. Only works for x1, x2, etc.
  1610. */
  1611. #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
  1612. /*
  1613. * DirectDraw supports arbitrary shrinking of a surface along the
  1614. * x axis (horizontal direction) for overlays.
  1615. */
  1616. #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
  1617. /*
  1618. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1619. * along the x axis (horizontal direction) for overlays.
  1620. */
  1621. #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
  1622. /*
  1623. * DirectDraw supports arbitrary shrinking of a surface along the
  1624. * y axis (horizontal direction) for overlays.
  1625. */
  1626. #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
  1627. /*
  1628. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1629. * along the y axis (vertical direction) for overlays.
  1630. */
  1631. #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
  1632. /*
  1633. * DirectDraw supports arbitrary stretching of a surface along the
  1634. * x axis (horizontal direction) for overlays.
  1635. */
  1636. #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
  1637. /*
  1638. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1639. * along the x axis (horizontal direction) for overlays.
  1640. */
  1641. #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
  1642. /*
  1643. * DirectDraw supports arbitrary stretching of a surface along the
  1644. * y axis (horizontal direction) for overlays.
  1645. */
  1646. #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
  1647. /*
  1648. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1649. * along the y axis (vertical direction) for overlays.
  1650. */
  1651. #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
  1652. /*
  1653. * DirectDraw supports mirroring of overlays across the vertical axis
  1654. */
  1655. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  1656. /*
  1657. * DirectDraw supports mirroring of overlays across the horizontal axis
  1658. */
  1659. #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
  1660. /****************************************************************************
  1661. *
  1662. * DIRECTDRAW STEREO VIEW CAPABILITIES
  1663. *
  1664. ****************************************************************************/
  1665. /*
  1666. * The stereo view is accomplished via enigma encoding.
  1667. */
  1668. #define DDSVCAPS_ENIGMA 0x00000001l
  1669. /*
  1670. * The stereo view is accomplished via high frequency flickering.
  1671. */
  1672. #define DDSVCAPS_FLICKER 0x00000002l
  1673. /*
  1674. * The stereo view is accomplished via red and blue filters applied
  1675. * to the left and right eyes. All images must adapt their colorspaces
  1676. * for this process.
  1677. */
  1678. #define DDSVCAPS_REDBLUE 0x00000004l
  1679. /*
  1680. * The stereo view is accomplished with split screen technology.
  1681. */
  1682. #define DDSVCAPS_SPLIT 0x00000008l
  1683. /****************************************************************************
  1684. *
  1685. * DIRECTDRAWPALETTE CAPABILITIES
  1686. *
  1687. ****************************************************************************/
  1688. /*
  1689. * Index is 4 bits. There are sixteen color entries in the palette table.
  1690. */
  1691. #define DDPCAPS_4BIT 0x00000001l
  1692. /*
  1693. * Index is onto a 8 bit color index. This field is only valid with the
  1694. * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  1695. * surface is in 8bpp. Each color entry is one byte long and is an index
  1696. * into destination surface's 8bpp palette.
  1697. */
  1698. #define DDPCAPS_8BITENTRIES 0x00000002l
  1699. /*
  1700. * Index is 8 bits. There are 256 color entries in the palette table.
  1701. */
  1702. #define DDPCAPS_8BIT 0x00000004l
  1703. /*
  1704. * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  1705. * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  1706. * object.
  1707. */
  1708. #define DDPCAPS_INITIALIZE 0x00000008l
  1709. /*
  1710. * This palette is the one attached to the primary surface. Changing this
  1711. * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  1712. * and supported.
  1713. */
  1714. #define DDPCAPS_PRIMARYSURFACE 0x00000010l
  1715. /*
  1716. * This palette is the one attached to the primary surface left. Changing
  1717. * this table has immediate effect on the display for the left eye unless
  1718. * DDPSETPAL_VSYNC is specified and supported.
  1719. */
  1720. #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
  1721. /*
  1722. * This palette can have all 256 entries defined
  1723. */
  1724. #define DDPCAPS_ALLOW256 0x00000040l
  1725. /*
  1726. * This palette can have modifications to it synced with the monitors
  1727. * refresh rate.
  1728. */
  1729. #define DDPCAPS_VSYNC 0x00000080l
  1730. /*
  1731. * Index is 1 bit. There are two color entries in the palette table.
  1732. */
  1733. #define DDPCAPS_1BIT 0x00000100l
  1734. /*
  1735. * Index is 2 bit. There are four color entries in the palette table.
  1736. */
  1737. #define DDPCAPS_2BIT 0x00000200l
  1738. //@@BEGIN_MSINTERNAL
  1739. #define DDPCAPS_VALID 0x000003ffl
  1740. //@@END_MSINTERNAL
  1741. /****************************************************************************
  1742. *
  1743. * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  1744. *
  1745. ****************************************************************************/
  1746. //@@BEGIN_MSINTERNAL
  1747. /*
  1748. * Palette changes take effect immediately.
  1749. */
  1750. #define DDPSETPAL_IMMEDIATE 0x00000000l // default
  1751. /*
  1752. * Palette changes should take effect during the vertical blank to avoid
  1753. * palette tearing.
  1754. */
  1755. #define DDPSETPAL_VSYNC 0x00000002l
  1756. //@@END_MSINTERNAL
  1757. /****************************************************************************
  1758. *
  1759. * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  1760. *
  1761. ****************************************************************************/
  1762. /* 0 is the only legal value */
  1763. /****************************************************************************
  1764. *
  1765. * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  1766. *
  1767. ****************************************************************************/
  1768. //@@BEGIN_MSINTERNAL
  1769. /*
  1770. * Palette change takes effect immediately.
  1771. */
  1772. #define DDSETPAL_IMMEDIATE 0x00000000l // default
  1773. /*
  1774. * Palette change should take effect during the vertical blank to avoid
  1775. * palette tearing.
  1776. */
  1777. #define DDSETPAL_VSYNC 0x00000002l
  1778. //@@END_MSINTERNAL
  1779. /****************************************************************************
  1780. *
  1781. * DIRECTDRAW BITDEPTH CONSTANTS
  1782. *
  1783. * NOTE: These are only used to indicate supported bit depths. These
  1784. * are flags only, they are not to be used as an actual bit depth. The
  1785. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  1786. * bit depths in a surface or for changing the display mode.
  1787. *
  1788. ****************************************************************************/
  1789. /*
  1790. * 1 bit per pixel.
  1791. */
  1792. #define DDBD_1 0x00004000l
  1793. /*
  1794. * 2 bits per pixel.
  1795. */
  1796. #define DDBD_2 0x00002000l
  1797. /*
  1798. * 4 bits per pixel.
  1799. */
  1800. #define DDBD_4 0x00001000l
  1801. /*
  1802. * 8 bits per pixel.
  1803. */
  1804. #define DDBD_8 0x00000800l
  1805. /*
  1806. * 16 bits per pixel.
  1807. */
  1808. #define DDBD_16 0x00000400l
  1809. /*
  1810. * 24 bits per pixel.
  1811. */
  1812. #define DDBD_24 0X00000200l
  1813. /*
  1814. * 32 bits per pixel.
  1815. */
  1816. #define DDBD_32 0x00000100l
  1817. /****************************************************************************
  1818. *
  1819. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  1820. *
  1821. ****************************************************************************/
  1822. /*
  1823. * Set if the structure contains a color space. Not set if the structure
  1824. * contains a single color key.
  1825. */
  1826. #define DDCKEY_COLORSPACE 0x00000001l
  1827. /*
  1828. * Set if the structure specifies a color key or color space which is to be
  1829. * used as a destination color key for blt operations.
  1830. */
  1831. #define DDCKEY_DESTBLT 0x00000002l
  1832. /*
  1833. * Set if the structure specifies a color key or color space which is to be
  1834. * used as a destination color key for overlay operations.
  1835. */
  1836. #define DDCKEY_DESTOVERLAY 0x00000004l
  1837. /*
  1838. * Set if the structure specifies a color key or color space which is to be
  1839. * used as a source color key for blt operations.
  1840. */
  1841. #define DDCKEY_SRCBLT 0x00000008l
  1842. /*
  1843. * Set if the structure specifies a color key or color space which is to be
  1844. * used as a source color key for overlay operations.
  1845. */
  1846. #define DDCKEY_SRCOVERLAY 0x00000010l
  1847. //@@BEGIN_MSINTERNAL
  1848. #define DDCKEY_VALID 0x0000001fl
  1849. //@@END_MSINTERNAL
  1850. /****************************************************************************
  1851. *
  1852. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  1853. *
  1854. ****************************************************************************/
  1855. /*
  1856. * Supports transparent blting using a color key to identify the replaceable
  1857. * bits of the destination surface for RGB colors.
  1858. */
  1859. #define DDCKEYCAPS_DESTBLT 0x00000001l
  1860. /*
  1861. * Supports transparent blting using a color space to identify the replaceable
  1862. * bits of the destination surface for RGB colors.
  1863. */
  1864. #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
  1865. /*
  1866. * Supports transparent blting using a color space to identify the replaceable
  1867. * bits of the destination surface for YUV colors.
  1868. */
  1869. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
  1870. /*
  1871. * Supports transparent blting using a color key to identify the replaceable
  1872. * bits of the destination surface for YUV colors.
  1873. */
  1874. #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
  1875. /*
  1876. * Supports overlaying using colorkeying of the replaceable bits of the surface
  1877. * being overlayed for RGB colors.
  1878. */
  1879. #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
  1880. /*
  1881. * Supports a color space as the color key for the destination for RGB colors.
  1882. */
  1883. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
  1884. /*
  1885. * Supports a color space as the color key for the destination for YUV colors.
  1886. */
  1887. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
  1888. /*
  1889. * Supports only one active destination color key value for visible overlay
  1890. * surfaces.
  1891. */
  1892. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
  1893. /*
  1894. * Supports overlaying using colorkeying of the replaceable bits of the
  1895. * surface being overlayed for YUV colors.
  1896. */
  1897. #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
  1898. /*
  1899. * Supports transparent blting using the color key for the source with
  1900. * this surface for RGB colors.
  1901. */
  1902. #define DDCKEYCAPS_SRCBLT 0x00000200l
  1903. /*
  1904. * Supports transparent blting using a color space for the source with
  1905. * this surface for RGB colors.
  1906. */
  1907. #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
  1908. /*
  1909. * Supports transparent blting using a color space for the source with
  1910. * this surface for YUV colors.
  1911. */
  1912. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
  1913. /*
  1914. * Supports transparent blting using the color key for the source with
  1915. * this surface for YUV colors.
  1916. */
  1917. #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
  1918. /*
  1919. * Supports overlays using the color key for the source with this
  1920. * overlay surface for RGB colors.
  1921. */
  1922. #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
  1923. /*
  1924. * Supports overlays using a color space as the source color key for
  1925. * the overlay surface for RGB colors.
  1926. */
  1927. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
  1928. /*
  1929. * Supports overlays using a color space as the source color key for
  1930. * the overlay surface for YUV colors.
  1931. */
  1932. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
  1933. /*
  1934. * Supports only one active source color key value for visible
  1935. * overlay surfaces.
  1936. */
  1937. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
  1938. /*
  1939. * Supports overlays using the color key for the source with this
  1940. * overlay surface for YUV colors.
  1941. */
  1942. #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
  1943. /*
  1944. * there are no bandwidth trade-offs for using colorkey with an overlay
  1945. */
  1946. #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
  1947. /****************************************************************************
  1948. *
  1949. * DIRECTDRAW PIXELFORMAT FLAGS
  1950. *
  1951. ****************************************************************************/
  1952. /*
  1953. * The surface has alpha channel information in the pixel format.
  1954. */
  1955. #define DDPF_ALPHAPIXELS 0x00000001l
  1956. /*
  1957. * The pixel format contains alpha only information
  1958. */
  1959. #define DDPF_ALPHA 0x00000002l
  1960. /*
  1961. * The FourCC code is valid.
  1962. */
  1963. #define DDPF_FOURCC 0x00000004l
  1964. /*
  1965. * The surface is 4-bit color indexed.
  1966. */
  1967. #define DDPF_PALETTEINDEXED4 0x00000008l
  1968. /*
  1969. * The surface is indexed into a palette which stores indices
  1970. * into the destination surface's 8-bit palette.
  1971. */
  1972. #define DDPF_PALETTEINDEXEDTO8 0x00000010l
  1973. /*
  1974. * The surface is 8-bit color indexed.
  1975. */
  1976. #define DDPF_PALETTEINDEXED8 0x00000020l
  1977. /*
  1978. * The RGB data in the pixel format structure is valid.
  1979. */
  1980. #define DDPF_RGB 0x00000040l
  1981. /*
  1982. * The surface will accept pixel data in the format specified
  1983. * and compress it during the write.
  1984. */
  1985. #define DDPF_COMPRESSED 0x00000080l
  1986. /*
  1987. * The surface will accept RGB data and translate it during
  1988. * the write to YUV data. The format of the data to be written
  1989. * will be contained in the pixel format structure. The DDPF_RGB
  1990. * flag will be set.
  1991. */
  1992. #define DDPF_RGBTOYUV 0x00000100l
  1993. /*
  1994. * pixel format is YUV - YUV data in pixel format struct is valid
  1995. */
  1996. #define DDPF_YUV 0x00000200l
  1997. /*
  1998. * pixel format is a z buffer only surface
  1999. */
  2000. #define DDPF_ZBUFFER 0x00000400l
  2001. /*
  2002. * The surface is 1-bit color indexed.
  2003. */
  2004. #define DDPF_PALETTEINDEXED1 0x00000800l
  2005. /*
  2006. * The surface is 2-bit color indexed.
  2007. */
  2008. #define DDPF_PALETTEINDEXED2 0x00001000l
  2009. /*===========================================================================
  2010. *
  2011. *
  2012. * DIRECTDRAW CALLBACK FLAGS
  2013. *
  2014. *
  2015. *==========================================================================*/
  2016. /****************************************************************************
  2017. *
  2018. * DIRECTDRAW ENUMSURFACES FLAGS
  2019. *
  2020. ****************************************************************************/
  2021. /*
  2022. * Enumerate all of the surfaces that meet the search criterion.
  2023. */
  2024. #define DDENUMSURFACES_ALL 0x00000001l
  2025. /*
  2026. * A search hit is a surface that matches the surface description.
  2027. */
  2028. #define DDENUMSURFACES_MATCH 0x00000002l
  2029. /*
  2030. * A search hit is a surface that does not match the surface description.
  2031. */
  2032. #define DDENUMSURFACES_NOMATCH 0x00000004l
  2033. /*
  2034. * Enumerate the first surface that can be created which meets the search criterion.
  2035. */
  2036. #define DDENUMSURFACES_CANBECREATED 0x00000008l
  2037. /*
  2038. * Enumerate the surfaces that already exist that meet the search criterion.
  2039. */
  2040. #define DDENUMSURFACES_DOESEXIST 0x00000010l
  2041. //@@BEGIN_MSINTERNAL
  2042. #define DDENUMSURFACES_VALID 0x0000001fl
  2043. //@@END_MSINTERNAL
  2044. /****************************************************************************
  2045. *
  2046. * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  2047. *
  2048. ****************************************************************************/
  2049. /*
  2050. * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
  2051. * that a particular mode will be enumerated only once. This flag specifies whether
  2052. * the refresh rate is taken into account when determining if a mode is unique.
  2053. */
  2054. #define DDEDM_REFRESHRATES 0x00000001l
  2055. //@@BEGIN_MSINTERNAL
  2056. #define DDEDM_VALID 0x00000001l
  2057. //@@END_MSINTERNAL
  2058. /****************************************************************************
  2059. *
  2060. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  2061. *
  2062. ****************************************************************************/
  2063. /*
  2064. * Exclusive mode owner will be responsible for the entire primary surface.
  2065. * GDI can be ignored. used with DD
  2066. */
  2067. #define DDSCL_FULLSCREEN 0x00000001l
  2068. /*
  2069. * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  2070. */
  2071. #define DDSCL_ALLOWREBOOT 0x00000002l
  2072. /*
  2073. * prevents DDRAW from modifying the application window.
  2074. * prevents DDRAW from minimize/restore the application window on activation.
  2075. */
  2076. #define DDSCL_NOWINDOWCHANGES 0x00000004l
  2077. /*
  2078. * app wants to work as a regular Windows application
  2079. */
  2080. #define DDSCL_NORMAL 0x00000008l
  2081. /*
  2082. * app wants exclusive access
  2083. */
  2084. #define DDSCL_EXCLUSIVE 0x00000010l
  2085. //@@BEGIN_MSINTERNAL
  2086. /*
  2087. * dont hook window proc, only valid for non-exclusive
  2088. */
  2089. #define DDSCL_DONTHOOKHWND 0x00000020l
  2090. //@@END_MSINTERNAL
  2091. /*
  2092. * app can deal with non-windows display modes
  2093. */
  2094. #define DDSCL_ALLOWMODEX 0x00000040l
  2095. //@@BEGIN_MSINTERNAL
  2096. #define DDSCL_VALID 0x0000007Fl
  2097. //@@END_MSINTERNAL
  2098. /****************************************************************************
  2099. *
  2100. * DIRECTDRAW BLT FLAGS
  2101. *
  2102. ****************************************************************************/
  2103. /*
  2104. * Use the alpha information in the pixel format or the alpha channel surface
  2105. * attached to the destination surface as the alpha channel for this blt.
  2106. */
  2107. #define DDBLT_ALPHADEST 0x00000001l
  2108. /*
  2109. * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  2110. * for the destination surface for this blt.
  2111. */
  2112. #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
  2113. /*
  2114. * The NEG suffix indicates that the destination surface becomes more
  2115. * transparent as the alpha value increases. (0 is opaque)
  2116. */
  2117. #define DDBLT_ALPHADESTNEG 0x00000004l
  2118. /*
  2119. * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  2120. * channel for the destination for this blt.
  2121. */
  2122. #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
  2123. /*
  2124. * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  2125. * for the edges of the image that border the color key colors.
  2126. */
  2127. #define DDBLT_ALPHAEDGEBLEND 0x00000010l
  2128. /*
  2129. * Use the alpha information in the pixel format or the alpha channel surface
  2130. * attached to the source surface as the alpha channel for this blt.
  2131. */
  2132. #define DDBLT_ALPHASRC 0x00000020l
  2133. /*
  2134. * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  2135. * for the source for this blt.
  2136. */
  2137. #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
  2138. /*
  2139. * The NEG suffix indicates that the source surface becomes more transparent
  2140. * as the alpha value increases. (0 is opaque)
  2141. */
  2142. #define DDBLT_ALPHASRCNEG 0x00000080l
  2143. /*
  2144. * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  2145. * for the source for this blt.
  2146. */
  2147. #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
  2148. /*
  2149. * Do this blt asynchronously through the FIFO in the order received. If
  2150. * there is no room in the hardware FIFO fail the call.
  2151. */
  2152. #define DDBLT_ASYNC 0x00000200l
  2153. /*
  2154. * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  2155. * to fill the destination rectangle on the destination surface with.
  2156. */
  2157. #define DDBLT_COLORFILL 0x00000400l
  2158. /*
  2159. * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  2160. * to use for the blt.
  2161. */
  2162. #define DDBLT_DDFX 0x00000800l
  2163. /*
  2164. * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  2165. * that are not part of the Win32 API.
  2166. */
  2167. #define DDBLT_DDROPS 0x00001000l
  2168. /*
  2169. * Use the color key associated with the destination surface.
  2170. */
  2171. #define DDBLT_KEYDEST 0x00002000l
  2172. /*
  2173. * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  2174. * for the destination surface.
  2175. */
  2176. #define DDBLT_KEYDESTOVERRIDE 0x00004000l
  2177. /*
  2178. * Use the color key associated with the source surface.
  2179. */
  2180. #define DDBLT_KEYSRC 0x00008000l
  2181. /*
  2182. * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  2183. * for the source surface.
  2184. */
  2185. #define DDBLT_KEYSRCOVERRIDE 0x00010000l
  2186. /*
  2187. * Use the dwROP field in the DDBLTFX structure for the raster operation
  2188. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  2189. */
  2190. #define DDBLT_ROP 0x00020000l
  2191. /*
  2192. * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  2193. * (specified in 1/100th of a degree) to rotate the surface.
  2194. */
  2195. #define DDBLT_ROTATIONANGLE 0x00040000l
  2196. /*
  2197. * Z-buffered blt using the z-buffers attached to the source and destination
  2198. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  2199. * z-buffer opcode.
  2200. */
  2201. #define DDBLT_ZBUFFER 0x00080000l
  2202. /*
  2203. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  2204. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  2205. * for the destination.
  2206. */
  2207. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
  2208. /*
  2209. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  2210. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  2211. * respectively for the destination.
  2212. */
  2213. #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
  2214. /*
  2215. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  2216. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  2217. * for the source.
  2218. */
  2219. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
  2220. /*
  2221. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  2222. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  2223. * respectively for the source.
  2224. */
  2225. #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
  2226. /*
  2227. * wait until the device is ready to handle the blt
  2228. * this will cause blt to not return DDERR_WASSTILLDRAWING
  2229. */
  2230. #define DDBLT_WAIT 0x01000000l
  2231. /*
  2232. * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  2233. * to fill the destination rectangle on the destination Z-buffer surface
  2234. * with.
  2235. */
  2236. #define DDBLT_DEPTHFILL 0x02000000l
  2237. //@@BEGIN_MSINTERNAL
  2238. #define DDBLT_VALID 0x03ffffffl
  2239. //@@END_MSINTERNAL
  2240. /****************************************************************************
  2241. *
  2242. * BLTFAST FLAGS
  2243. *
  2244. ****************************************************************************/
  2245. #define DDBLTFAST_NOCOLORKEY 0x00000000
  2246. #define DDBLTFAST_SRCCOLORKEY 0x00000001
  2247. #define DDBLTFAST_DESTCOLORKEY 0x00000002
  2248. #define DDBLTFAST_WAIT 0x00000010
  2249. //@@BEGIN_MSINTERNAL
  2250. #define DDBLTFAST_COLORKEY_MASK 0x0000000F
  2251. #define DDBLTFAST_VALID 0x00000013
  2252. //@@END_MSINTERNAL
  2253. /****************************************************************************
  2254. *
  2255. * FLIP FLAGS
  2256. *
  2257. ****************************************************************************/
  2258. #define DDFLIP_WAIT 0x00000001l
  2259. //@@BEGIN_MSINTERNAL
  2260. #define DDFLIP_VALID 0x00000001l
  2261. //@@END_MSINTERNAL
  2262. //@@BEGIN_MSINTERNAL
  2263. #ifdef COMPOSITION
  2264. /****************************************************************************
  2265. *
  2266. * DIRECTDRAW COMP FLAGS
  2267. *
  2268. ****************************************************************************/
  2269. /*
  2270. * Use the alpha information in the pixel format or the alpha channel surface
  2271. * attached to the destination surface as the alpha channel for this blt.
  2272. */
  2273. #define DDCOMP_ALPHADEST 0x00000001l
  2274. /*
  2275. * Use the dwConstAlphaDest field in the DDCOMPOSEFX structure as the alpha channel
  2276. * for the destination surface for this blt.
  2277. */
  2278. #define DDCOMP_ALPHADESTCONSTOVERRIDE 0x00000002l
  2279. /*
  2280. * The NEG suffix indicates that the destination surface becomes more
  2281. * transparent as the alpha value increases. (0 is opaque)
  2282. */
  2283. #define DDCOMP_ALPHADESTNEG 0x00000004l
  2284. /*
  2285. * Use the lpDDSAlphaDest field in the DDCOMPOSEFX structure as the alpha
  2286. * channel for the destination for this blt.
  2287. */
  2288. #define DDCOMP_ALPHADESTSURFACEOVERRIDE 0x00000008l
  2289. /*
  2290. * Use the dwAlphaEdgeBlend field in the DDCOMPOSEFX structure as the alpha channel
  2291. * for the edges of the image that border the color key colors.
  2292. */
  2293. #define DDCOMP_ALPHAEDGEBLEND 0x00000010l
  2294. /*
  2295. * Use the alpha information in the pixel format or the alpha channel surface
  2296. * attached to the source surface as the alpha channel for this blt.
  2297. */
  2298. #define DDCOMP_ALPHASRC 0x00000020l
  2299. /*
  2300. * Use the dwConstAlphaSrc field in the DDCOMPOSEFX structure as the alpha channel
  2301. * for the source for this blt.
  2302. */
  2303. #define DDCOMP_ALPHASRCCONSTOVERRIDE 0x00000040l
  2304. /*
  2305. * The NEG suffix indicates that the source surface becomes more transparent
  2306. * as the alpha value increases. (0 is opaque)
  2307. */
  2308. #define DDCOMP_ALPHASRCNEG 0x00000080l
  2309. /*
  2310. * Use the lpDDSAlphaSrc field in the DDCOMPOSEFX structure as the alpha channel
  2311. * for the source for this blt.
  2312. */
  2313. #define DDCOMP_ALPHASRCSURFACEOVERRIDE 0x00000100l
  2314. /*
  2315. * Before performing this blt invoke the callback specified by the lpfnCallback
  2316. * field in the DDCOMPOSEFX structure.
  2317. */
  2318. #define DDCOMP_CALLBACK 0x00000200l
  2319. /*
  2320. * Uses the dwFillColor field in the DDCOMPOSEFX structure as the RGB color
  2321. * to fill the destination rectangle on the destination surface with.
  2322. */
  2323. #define DDCOMP_COLORFILL 0x00000400l
  2324. /*
  2325. * Uses the dwDDFX field in the DDCOMPOSEFX structure to specify the effects
  2326. * to use for the blt.
  2327. */
  2328. #define DDCOMP_DDFX 0x00000800l
  2329. /*
  2330. * Uses the dwDDROPS field in the DDCOMPOSEFX structure to specify the ROPS
  2331. * that are not part of the Win32 API.
  2332. */
  2333. #define DDCOMP_DDROPS 0x00001000l
  2334. /*
  2335. * Use the color key associated with the destination surface.
  2336. */
  2337. #define DDCOMP_KEYDEST 0x00002000l
  2338. /*
  2339. * Use the dckDestColorkey field in the DDCOMPOSEFX structure as the color key
  2340. * for the destination surface.
  2341. */
  2342. #define DDCOMP_KEYDESTOVERRIDE 0x00004000l
  2343. /*
  2344. * Use the color key associated with the source surface.
  2345. */
  2346. #define DDCOMP_KEYSRC 0x00008000l
  2347. /*
  2348. * Use the dckSrcColorkey field in the DDCOMPOSEFX structure as the color key
  2349. * for the source surface.
  2350. */
  2351. #define DDCOMP_KEYSRCOVERRIDE 0x00010000l
  2352. /*
  2353. * Do this blt when DestUnlock is called for the last time on the source surface.
  2354. */
  2355. #define DDCOMP_ONDESTUNLOCK 0x00020000l
  2356. /*
  2357. * Do this blt when Flip is called on the source surface.
  2358. */
  2359. #define DDCOMP_ONFLIP 0x00040000l
  2360. /*
  2361. * Do this blt when Unlock is called for the last time on the source surface.
  2362. */
  2363. #define DDCOMP_ONUNLOCK 0x00080000l
  2364. /*
  2365. * Repeat this composition blt the number of times specified in the dwRepeat
  2366. * field of the DDCOMPOSEFX structure
  2367. */
  2368. #define DDCOMP_REPEAT 0x00100000l
  2369. /*
  2370. * Use the dwROP field in the DDCOMPOSEFX structure for the raster operation
  2371. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  2372. */
  2373. #define DDCOMP_ROP 0x00200000l
  2374. /*
  2375. * Use the dwRotationAngle field in the DDCOMPOSEFX structure as the angle
  2376. * (specified in 1/100th of a degree) to rotate the surface.
  2377. */
  2378. #define DDCOMP_ROTATIONANGLE 0x00400000l
  2379. /*
  2380. * Z-buffered blt using the z-buffers attached to the source and destination
  2381. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  2382. * z-buffer opcode.
  2383. */
  2384. #define DDCOMP_ZBUFFER 0x00800000l
  2385. /*
  2386. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  2387. * in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode respectively
  2388. * for the destination.
  2389. */
  2390. #define DDCOMP_ZBUFFERDESTCONSTOVERRIDE 0x01000000l
  2391. /*
  2392. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  2393. * field in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode
  2394. * respectively for the destination.
  2395. */
  2396. #define DDCOMP_ZBUFFERDESTOVERRIDE 0x02000000l
  2397. /*
  2398. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  2399. * in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode respectively
  2400. * for the source.
  2401. */
  2402. #define DDCOMP_ZBUFFERSRCCONSTOVERRIDE 0x04000000l
  2403. /*
  2404. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  2405. * field in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode
  2406. * respectively for the source.
  2407. */
  2408. #define DDCOMP_ZBUFFERSRCOVERRIDE 0x08000000l
  2409. #endif
  2410. //@@END_MSINTERNAL
  2411. /****************************************************************************
  2412. *
  2413. * DIRECTDRAW SURFACE OVERLAY FLAGS
  2414. *
  2415. ****************************************************************************/
  2416. /*
  2417. * Use the alpha information in the pixel format or the alpha channel surface
  2418. * attached to the destination surface as the alpha channel for the
  2419. * destination overlay.
  2420. */
  2421. #define DDOVER_ALPHADEST 0x00000001l
  2422. /*
  2423. * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  2424. * destination alpha channel for this overlay.
  2425. */
  2426. #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
  2427. /*
  2428. * The NEG suffix indicates that the destination surface becomes more
  2429. * transparent as the alpha value increases.
  2430. */
  2431. #define DDOVER_ALPHADESTNEG 0x00000004l
  2432. /*
  2433. * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  2434. * channel destination for this overlay.
  2435. */
  2436. #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
  2437. /*
  2438. * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  2439. * channel for the edges of the image that border the color key colors.
  2440. */
  2441. #define DDOVER_ALPHAEDGEBLEND 0x00000010l
  2442. /*
  2443. * Use the alpha information in the pixel format or the alpha channel surface
  2444. * attached to the source surface as the source alpha channel for this overlay.
  2445. */
  2446. #define DDOVER_ALPHASRC 0x00000020l
  2447. /*
  2448. * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  2449. * alpha channel for this overlay.
  2450. */
  2451. #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
  2452. /*
  2453. * The NEG suffix indicates that the source surface becomes more transparent
  2454. * as the alpha value increases.
  2455. */
  2456. #define DDOVER_ALPHASRCNEG 0x00000080l
  2457. /*
  2458. * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  2459. * source for this overlay.
  2460. */
  2461. #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
  2462. /*
  2463. * Turn this overlay off.
  2464. */
  2465. #define DDOVER_HIDE 0x00000200l
  2466. /*
  2467. * Use the color key associated with the destination surface.
  2468. */
  2469. #define DDOVER_KEYDEST 0x00000400l
  2470. /*
  2471. * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  2472. * for the destination surface
  2473. */
  2474. #define DDOVER_KEYDESTOVERRIDE 0x00000800l
  2475. /*
  2476. * Use the color key associated with the source surface.
  2477. */
  2478. #define DDOVER_KEYSRC 0x00001000l
  2479. /*
  2480. * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  2481. * for the source surface.
  2482. */
  2483. #define DDOVER_KEYSRCOVERRIDE 0x00002000l
  2484. /*
  2485. * Turn this overlay on.
  2486. */
  2487. #define DDOVER_SHOW 0x00004000l
  2488. /*
  2489. * Add a dirty rect to an emulated overlayed surface.
  2490. */
  2491. #define DDOVER_ADDDIRTYRECT 0x00008000l
  2492. /*
  2493. * Redraw all dirty rects on an emulated overlayed surface.
  2494. */
  2495. #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
  2496. /*
  2497. * Redraw the entire surface on an emulated overlayed surface.
  2498. */
  2499. #define DDOVER_REFRESHALL 0x00020000l
  2500. //@@BEGIN_MSINTERNAL
  2501. /*
  2502. * Force redrawing onto the destination surface without regard for the background
  2503. */
  2504. #define DDOVER_REFRESHPOUND 0x00040000l
  2505. //@@END_MSINTERNAL
  2506. /*
  2507. * Use the overlay FX flags to define special overlay FX
  2508. */
  2509. #define DDOVER_DDFX 0x00080000l
  2510. //@@BEGIN_MSINTERNAL
  2511. #define DDOVER_VALID 0x000fffffl
  2512. //@@END_MSINTERNAL
  2513. /****************************************************************************
  2514. *
  2515. * DIRECTDRAWSURFACE LOCK FLAGS
  2516. *
  2517. ****************************************************************************/
  2518. /*
  2519. * The default. Set to indicate that Lock should return a valid memory pointer
  2520. * to the top of the specified rectangle. If no rectangle is specified then a
  2521. * pointer to the top of the surface is returned.
  2522. */
  2523. #define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
  2524. /*
  2525. * Set to indicate that Lock should wait until it can obtain a valid memory
  2526. * pointer before returning. If this bit is set, Lock will never return
  2527. * DDERR_WASSTILLDRAWING.
  2528. */
  2529. #define DDLOCK_WAIT 0x00000001L
  2530. /*
  2531. * Set if an event handle is being passed to Lock. Lock will trigger the event
  2532. * when it can return the surface memory pointer requested.
  2533. */
  2534. #define DDLOCK_EVENT 0x00000002L
  2535. /*
  2536. * Indicates that the surface being locked will only be read from.
  2537. */
  2538. #define DDLOCK_READONLY 0x00000010L
  2539. /*
  2540. * Indicates that the surface being locked will only be written to
  2541. */
  2542. #define DDLOCK_WRITEONLY 0x00000020L
  2543. //@@BEGIN_MSINTERNAL
  2544. /*
  2545. * Indicates that InternalLock should set the busy bit and Win16 lock
  2546. * for surfaces not explicitly in system memory.
  2547. */
  2548. #define DDLOCK_TAKE_WIN16 0x00000040L
  2549. /*
  2550. * Indicates that InternalLock should set the busy bit and Win16 lock
  2551. * for surfaces in video memory only
  2552. */
  2553. #define DDLOCK_TAKE_WIN16_VRAM 0x00000080L
  2554. /*
  2555. * Indicates that InternalLock should check for lost surfaces. By
  2556. * default it does not.
  2557. */
  2558. #define DDLOCK_FAILLOSTSURFACES 0x00000100L
  2559. /*
  2560. * An aggregate of all the valid flags
  2561. */
  2562. #define DDLOCK_VALID 0x00000031L
  2563. //@@END_MSINTERNAL
  2564. /****************************************************************************
  2565. *
  2566. * DIRECTDRAWSURFACE PAGELOCK FLAGS
  2567. *
  2568. ****************************************************************************/
  2569. /*
  2570. * No flags defined at present
  2571. */
  2572. //@@BEGIN_MSINTERNAL
  2573. #define DDPAGELOCK_VALID 0x00000000L
  2574. //@@END_MSINTERNAL
  2575. /****************************************************************************
  2576. *
  2577. * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  2578. *
  2579. ****************************************************************************/
  2580. /*
  2581. * No flags defined at present
  2582. */
  2583. //@@BEGIN_MSINTERNAL
  2584. #define DDPAGEUNLOCK_VALID 0x00000000L
  2585. //@@END_MSINTERNAL
  2586. /****************************************************************************
  2587. *
  2588. * DIRECTDRAWSURFACE BLT FX FLAGS
  2589. *
  2590. ****************************************************************************/
  2591. /*
  2592. * If stretching, use arithmetic stretching along the Y axis for this blt.
  2593. */
  2594. #define DDBLTFX_ARITHSTRETCHY 0x00000001l
  2595. /*
  2596. * Do this blt mirroring the surface left to right. Spin the
  2597. * surface around its y-axis.
  2598. */
  2599. #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
  2600. /*
  2601. * Do this blt mirroring the surface up and down. Spin the surface
  2602. * around its x-axis.
  2603. */
  2604. #define DDBLTFX_MIRRORUPDOWN 0x00000004l
  2605. /*
  2606. * Schedule this blt to avoid tearing.
  2607. */
  2608. #define DDBLTFX_NOTEARING 0x00000008l
  2609. /*
  2610. * Do this blt rotating the surface one hundred and eighty degrees.
  2611. */
  2612. #define DDBLTFX_ROTATE180 0x00000010l
  2613. /*
  2614. * Do this blt rotating the surface two hundred and seventy degrees.
  2615. */
  2616. #define DDBLTFX_ROTATE270 0x00000020l
  2617. /*
  2618. * Do this blt rotating the surface ninety degrees.
  2619. */
  2620. #define DDBLTFX_ROTATE90 0x00000040l
  2621. /*
  2622. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  2623. * specified to limit the bits copied from the source surface.
  2624. */
  2625. #define DDBLTFX_ZBUFFERRANGE 0x00000080l
  2626. /*
  2627. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  2628. * before comparing it with the desting z values.
  2629. */
  2630. #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
  2631. //@@BEGIN_MSINTERNAL
  2632. /****************************************************************************
  2633. *
  2634. * DIRECTDRAWSURFACE COMP FX FLAGS
  2635. *
  2636. ****************************************************************************/
  2637. /*
  2638. * If stretching, use arithmetic stretching along the Y axis for this blt.
  2639. */
  2640. #define DDCOMPFX_ARITHSTRETCHY 0x00000001l
  2641. /*
  2642. * Do this blt mirroring the surface left to right. Spin the
  2643. * surface around its y-axis.
  2644. */
  2645. #define DDCOMPFX_MIRRORLEFTRIGHT 0x00000002l
  2646. /*
  2647. * Do this blt mirroring the surface up and down. Spin the surface
  2648. * around its x-axis.
  2649. */
  2650. #define DDCOMPFX_MIRRORUPDOWN 0x00000004l
  2651. /*
  2652. * Schedule this blt to avoid tearing.
  2653. */
  2654. #define DDCOMPFX_NOTEARING 0x00000008l
  2655. /*
  2656. * Do this blt rotating the surface one hundred and eighty degrees.
  2657. */
  2658. #define DDCOMPFX_ROTATE180 0x00000010l
  2659. /*
  2660. * Do this blt rotating the surface two hundred and seventy degrees.
  2661. */
  2662. #define DDCOMPFX_ROTATE270 0x00000020l
  2663. /*
  2664. * Do this blt rotating the surface ninety degrees.
  2665. */
  2666. #define DDCOMPFX_ROTATE90 0x00000040l
  2667. /*
  2668. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  2669. * specified to limit the bits copied from the source surface.
  2670. */
  2671. #define DDCOMPFX_ZBUFFERRANGE 0x00000080l
  2672. /*
  2673. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  2674. * before comparing it with the desting z values.
  2675. */
  2676. #define DDCOMPFX_ZBUFFERBASEDEST 0x00000100l
  2677. //@@END_MSINTERNAL
  2678. /****************************************************************************
  2679. *
  2680. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  2681. *
  2682. ****************************************************************************/
  2683. /*
  2684. * If stretching, use arithmetic stretching along the Y axis for this overlay.
  2685. */
  2686. #define DDOVERFX_ARITHSTRETCHY 0x00000001l
  2687. /*
  2688. * Mirror the overlay across the vertical axis
  2689. */
  2690. #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
  2691. /*
  2692. * Mirror the overlay across the horizontal axis
  2693. */
  2694. #define DDOVERFX_MIRRORUPDOWN 0x00000004l
  2695. /****************************************************************************
  2696. *
  2697. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  2698. *
  2699. ****************************************************************************/
  2700. /*
  2701. * return when the vertical blank interval begins
  2702. */
  2703. #define DDWAITVB_BLOCKBEGIN 0x00000001l
  2704. /*
  2705. * set up an event to trigger when the vertical blank begins
  2706. */
  2707. #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
  2708. /*
  2709. * return when the vertical blank interval ends and display begins
  2710. */
  2711. #define DDWAITVB_BLOCKEND 0x00000004l
  2712. /****************************************************************************
  2713. *
  2714. * DIRECTDRAW GETFLIPSTATUS FLAGS
  2715. *
  2716. ****************************************************************************/
  2717. /*
  2718. * is it OK to flip now?
  2719. */
  2720. #define DDGFS_CANFLIP 0x00000001l
  2721. /*
  2722. * is the last flip finished?
  2723. */
  2724. #define DDGFS_ISFLIPDONE 0x00000002l
  2725. // @@BEGIN_MSINTERNAL
  2726. #define DDGFS_VALID 0x00000003l
  2727. // @@END_MSINTERNAL
  2728. /****************************************************************************
  2729. *
  2730. * DIRECTDRAW GETBLTSTATUS FLAGS
  2731. *
  2732. ****************************************************************************/
  2733. /*
  2734. * is it OK to blt now?
  2735. */
  2736. #define DDGBS_CANBLT 0x00000001l
  2737. /*
  2738. * is the blt to the surface finished?
  2739. */
  2740. #define DDGBS_ISBLTDONE 0x00000002l
  2741. // @@BEGIN_MSINTERNAL
  2742. #define DDGBS_VALID 0x00000003l
  2743. // @@END_MSINTERNAL
  2744. /****************************************************************************
  2745. *
  2746. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  2747. *
  2748. ****************************************************************************/
  2749. /*
  2750. * Enumerate overlays back to front.
  2751. */
  2752. #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
  2753. /*
  2754. * Enumerate overlays front to back
  2755. */
  2756. #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
  2757. /****************************************************************************
  2758. *
  2759. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  2760. *
  2761. ****************************************************************************/
  2762. /*
  2763. * Send overlay to front
  2764. */
  2765. #define DDOVERZ_SENDTOFRONT 0x00000000l
  2766. /*
  2767. * Send overlay to back
  2768. */
  2769. #define DDOVERZ_SENDTOBACK 0x00000001l
  2770. /*
  2771. * Move Overlay forward
  2772. */
  2773. #define DDOVERZ_MOVEFORWARD 0x00000002l
  2774. /*
  2775. * Move Overlay backward
  2776. */
  2777. #define DDOVERZ_MOVEBACKWARD 0x00000003l
  2778. /*
  2779. * Move Overlay in front of relative surface
  2780. */
  2781. #define DDOVERZ_INSERTINFRONTOF 0x00000004l
  2782. /*
  2783. * Move Overlay in back of relative surface
  2784. */
  2785. #define DDOVERZ_INSERTINBACKOF 0x00000005l
  2786. /*===========================================================================
  2787. *
  2788. *
  2789. * DIRECTDRAW RETURN CODES
  2790. *
  2791. * The return values from DirectDraw Commands and Surface that return an HRESULT
  2792. * are codes from DirectDraw concerning the results of the action
  2793. * requested by DirectDraw.
  2794. *
  2795. *==========================================================================*/
  2796. /*
  2797. * Status is OK
  2798. *
  2799. * Issued by: DirectDraw Commands and all callbacks
  2800. */
  2801. //@@BEGIN_MSINTERNAL
  2802. #define DD_OK_HANDLED 1
  2803. #define DD_OK_NOTHANDLED 0
  2804. //@@END_MSINTERNAL
  2805. #define DD_OK 0
  2806. /****************************************************************************
  2807. *
  2808. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  2809. *
  2810. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  2811. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  2812. * enumeration callback routines.
  2813. *
  2814. ****************************************************************************/
  2815. /*
  2816. * stop the enumeration
  2817. */
  2818. #define DDENUMRET_CANCEL 0
  2819. /*
  2820. * continue the enumeration
  2821. */
  2822. #define DDENUMRET_OK 1
  2823. /****************************************************************************
  2824. *
  2825. * DIRECTDRAW ERRORS
  2826. *
  2827. * Errors are represented by negative values and cannot be combined.
  2828. *
  2829. ****************************************************************************/
  2830. /*
  2831. * This object is already initialized
  2832. */
  2833. #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
  2834. /*
  2835. * This surface can not be attached to the requested surface.
  2836. */
  2837. #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
  2838. /*
  2839. * This surface can not be detached from the requested surface.
  2840. */
  2841. #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
  2842. /*
  2843. * Support is currently not available.
  2844. */
  2845. #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
  2846. /*
  2847. * An exception was encountered while performing the requested operation
  2848. */
  2849. #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
  2850. /*
  2851. * Generic failure.
  2852. */
  2853. #define DDERR_GENERIC E_FAIL
  2854. /*
  2855. * Height of rectangle provided is not a multiple of reqd alignment
  2856. */
  2857. #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
  2858. /*
  2859. * Unable to match primary surface creation request with existing
  2860. * primary surface.
  2861. */
  2862. #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
  2863. /*
  2864. * One or more of the caps bits passed to the callback are incorrect.
  2865. */
  2866. #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
  2867. /*
  2868. * DirectDraw does not support provided Cliplist.
  2869. */
  2870. #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
  2871. /*
  2872. * DirectDraw does not support the requested mode
  2873. */
  2874. #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
  2875. /*
  2876. * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  2877. */
  2878. #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
  2879. /*
  2880. * One or more of the parameters passed to the callback function are
  2881. * incorrect.
  2882. */
  2883. #define DDERR_INVALIDPARAMS E_INVALIDARG
  2884. /*
  2885. * pixel format was invalid as specified
  2886. */
  2887. #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
  2888. /*
  2889. * Rectangle provided was invalid.
  2890. */
  2891. #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
  2892. /*
  2893. * Operation could not be carried out because one or more surfaces are locked
  2894. */
  2895. #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
  2896. /*
  2897. * There is no 3D present.
  2898. */
  2899. #define DDERR_NO3D MAKE_DDHRESULT( 170 )
  2900. /*
  2901. * Operation could not be carried out because there is no alpha accleration
  2902. * hardware present or available.
  2903. */
  2904. #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
  2905. // @@BEGIN_MSINTERNAL
  2906. /*
  2907. * Operation could not be carried out because there is no hardware support
  2908. * for synchronizing blts to avoid tearing.
  2909. */
  2910. #define DDERR_NOANTITEARHW MAKE_DDHRESULT( 190 )
  2911. /*
  2912. * Operation could not be carried out because there is no hardware support
  2913. * for asynchronous blting.
  2914. */
  2915. #define DDERR_NOBLTQUEUEHW MAKE_DDHRESULT( 200 )
  2916. // @@END_MSINTERNAL
  2917. /*
  2918. * no clip list available
  2919. */
  2920. #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
  2921. /*
  2922. * Operation could not be carried out because there is no color conversion
  2923. * hardware present or available.
  2924. */
  2925. #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
  2926. /*
  2927. * Create function called without DirectDraw object method SetCooperativeLevel
  2928. * being called.
  2929. */
  2930. #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
  2931. /*
  2932. * Surface doesn't currently have a color key
  2933. */
  2934. #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
  2935. /*
  2936. * Operation could not be carried out because there is no hardware support
  2937. * of the dest color key.
  2938. */
  2939. #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
  2940. /*
  2941. * No DirectDraw support possible with current display driver
  2942. */
  2943. #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
  2944. /*
  2945. * Operation requires the application to have exclusive mode but the
  2946. * application does not have exclusive mode.
  2947. */
  2948. #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
  2949. /*
  2950. * Flipping visible surfaces is not supported.
  2951. */
  2952. #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
  2953. /*
  2954. * There is no GDI present.
  2955. */
  2956. #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
  2957. /*
  2958. * Operation could not be carried out because there is no hardware present
  2959. * or available.
  2960. */
  2961. #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
  2962. /*
  2963. * Requested item was not found
  2964. */
  2965. #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
  2966. /*
  2967. * Operation could not be carried out because there is no overlay hardware
  2968. * present or available.
  2969. */
  2970. #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
  2971. /*
  2972. * Operation could not be carried out because there is no appropriate raster
  2973. * op hardware present or available.
  2974. */
  2975. #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
  2976. /*
  2977. * Operation could not be carried out because there is no rotation hardware
  2978. * present or available.
  2979. */
  2980. #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
  2981. /*
  2982. * Operation could not be carried out because there is no hardware support
  2983. * for stretching
  2984. */
  2985. #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
  2986. /*
  2987. * DirectDrawSurface is not in 4 bit color palette and the requested operation
  2988. * requires 4 bit color palette.
  2989. */
  2990. #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
  2991. /*
  2992. * DirectDrawSurface is not in 4 bit color index palette and the requested
  2993. * operation requires 4 bit color index palette.
  2994. */
  2995. #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
  2996. /*
  2997. * DirectDraw Surface is not in 8 bit color mode and the requested operation
  2998. * requires 8 bit color.
  2999. */
  3000. #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
  3001. /*
  3002. * Operation could not be carried out because there is no texture mapping
  3003. * hardware present or available.
  3004. */
  3005. #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
  3006. /*
  3007. * Operation could not be carried out because there is no hardware support
  3008. * for vertical blank synchronized operations.
  3009. */
  3010. #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
  3011. /*
  3012. * Operation could not be carried out because there is no hardware support
  3013. * for zbuffer blting.
  3014. */
  3015. #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
  3016. /*
  3017. * Overlay surfaces could not be z layered based on their BltOrder because
  3018. * the hardware does not support z layering of overlays.
  3019. */
  3020. #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
  3021. /*
  3022. * The hardware needed for the requested operation has already been
  3023. * allocated.
  3024. */
  3025. #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
  3026. /*
  3027. * DirectDraw does not have enough memory to perform the operation.
  3028. */
  3029. #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
  3030. /*
  3031. * DirectDraw does not have enough memory to perform the operation.
  3032. */
  3033. #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
  3034. /*
  3035. * hardware does not support clipped overlays
  3036. */
  3037. #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
  3038. /*
  3039. * Can only have ony color key active at one time for overlays
  3040. */
  3041. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
  3042. /*
  3043. * Access to this palette is being refused because the palette is already
  3044. * locked by another thread.
  3045. */
  3046. #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
  3047. /*
  3048. * No src color key specified for this operation.
  3049. */
  3050. #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
  3051. /*
  3052. * This surface is already attached to the surface it is being attached to.
  3053. */
  3054. #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
  3055. /*
  3056. * This surface is already a dependency of the surface it is being made a
  3057. * dependency of.
  3058. */
  3059. #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
  3060. /*
  3061. * Access to this surface is being refused because the surface is already
  3062. * locked by another thread.
  3063. */
  3064. #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
  3065. /*
  3066. * Access to this surface is being refused because no driver exists
  3067. * which can supply a pointer to the surface.
  3068. * This is most likely to happen when attempting to lock the primary
  3069. * surface when no DCI provider is present.
  3070. */
  3071. #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
  3072. /*
  3073. * Access to Surface refused because Surface is obscured.
  3074. */
  3075. #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
  3076. /*
  3077. * Access to this surface is being refused because the surface is gone.
  3078. * The DIRECTDRAWSURFACE object representing this surface should
  3079. * have Restore called on it.
  3080. */
  3081. #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
  3082. /*
  3083. * The requested surface is not attached.
  3084. */
  3085. #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
  3086. /*
  3087. * Height requested by DirectDraw is too large.
  3088. */
  3089. #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
  3090. /*
  3091. * Size requested by DirectDraw is too large -- The individual height and
  3092. * width are OK.
  3093. */
  3094. #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
  3095. /*
  3096. * Width requested by DirectDraw is too large.
  3097. */
  3098. #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
  3099. /*
  3100. * Action not supported.
  3101. */
  3102. #define DDERR_UNSUPPORTED E_NOTIMPL
  3103. /*
  3104. * FOURCC format requested is unsupported by DirectDraw
  3105. */
  3106. #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
  3107. /*
  3108. * Bitmask in the pixel format requested is unsupported by DirectDraw
  3109. */
  3110. #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
  3111. /*
  3112. * vertical blank is in progress
  3113. */
  3114. #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
  3115. /*
  3116. * Informs DirectDraw that the previous Blt which is transfering information
  3117. * to or from this Surface is incomplete.
  3118. */
  3119. #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
  3120. /*
  3121. * Rectangle provided was not horizontally aligned on reqd. boundary
  3122. */
  3123. #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
  3124. /*
  3125. * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  3126. * identifier.
  3127. */
  3128. #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
  3129. /*
  3130. * A DirectDraw object representing this driver has already been created
  3131. * for this process.
  3132. */
  3133. #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
  3134. /*
  3135. * A hardware only DirectDraw object creation was attempted but the driver
  3136. * did not support any hardware.
  3137. */
  3138. #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
  3139. /*
  3140. * this process already has created a primary surface
  3141. */
  3142. #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
  3143. /*
  3144. * software emulation not available.
  3145. */
  3146. #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
  3147. /*
  3148. * region passed to Clipper::GetClipList is too small.
  3149. */
  3150. #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
  3151. /*
  3152. * an attempt was made to set a clip list for a clipper objec that
  3153. * is already monitoring an hwnd.
  3154. */
  3155. #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
  3156. /*
  3157. * No clipper object attached to surface object
  3158. */
  3159. #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
  3160. /*
  3161. * Clipper notification requires an HWND or
  3162. * no HWND has previously been set as the CooperativeLevel HWND.
  3163. */
  3164. #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
  3165. /*
  3166. * HWND used by DirectDraw CooperativeLevel has been subclassed,
  3167. * this prevents DirectDraw from restoring state.
  3168. */
  3169. #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
  3170. /*
  3171. * The CooperativeLevel HWND has already been set.
  3172. * It can not be reset while the process has surfaces or palettes created.
  3173. */
  3174. #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
  3175. /*
  3176. * No palette object attached to this surface.
  3177. */
  3178. #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
  3179. /*
  3180. * No hardware support for 16 or 256 color palettes.
  3181. */
  3182. #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
  3183. /*
  3184. * If a clipper object is attached to the source surface passed into a
  3185. * BltFast call.
  3186. */
  3187. #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
  3188. /*
  3189. * No blter.
  3190. */
  3191. #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
  3192. /*
  3193. * No DirectDraw ROP hardware.
  3194. */
  3195. #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
  3196. /*
  3197. * returned when GetOverlayPosition is called on a hidden overlay
  3198. */
  3199. #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
  3200. /*
  3201. * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  3202. * has never been called on to establish a destionation.
  3203. */
  3204. #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
  3205. /*
  3206. * returned when the position of the overlay on the destionation is no longer
  3207. * legal for that destionation.
  3208. */
  3209. #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
  3210. /*
  3211. * returned when an overlay member is called for a non-overlay surface
  3212. */
  3213. #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
  3214. /*
  3215. * An attempt was made to set the cooperative level when it was already
  3216. * set to exclusive.
  3217. */
  3218. #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
  3219. /*
  3220. * An attempt has been made to flip a surface that is not flippable.
  3221. */
  3222. #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
  3223. /*
  3224. * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  3225. * created.
  3226. */
  3227. #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
  3228. /*
  3229. * Surface was not locked. An attempt to unlock a surface that was not
  3230. * locked at all, or by this process, has been attempted.
  3231. */
  3232. #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
  3233. /*
  3234. * Windows can not create any more DCs
  3235. */
  3236. #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
  3237. /*
  3238. * No DC was ever created for this surface.
  3239. */
  3240. #define DDERR_NODC MAKE_DDHRESULT( 586 )
  3241. /*
  3242. * This surface can not be restored because it was created in a different
  3243. * mode.
  3244. */
  3245. #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
  3246. /*
  3247. * This surface can not be restored because it is an implicitly created
  3248. * surface.
  3249. */
  3250. #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
  3251. /*
  3252. * The surface being used is not a palette-based surface
  3253. */
  3254. #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
  3255. /*
  3256. * The display is currently in an unsupported mode
  3257. */
  3258. #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
  3259. /*
  3260. * Operation could not be carried out because there is no mip-map
  3261. * texture mapping hardware present or available.
  3262. */
  3263. #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
  3264. /*
  3265. * The requested action could not be performed because the surface was of
  3266. * the wrong type.
  3267. */
  3268. #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
  3269. // @@BEGIN_MSINTERNAL
  3270. /*
  3271. * Operation could not be carried out because there is no hardware support
  3272. * for execute buffers.
  3273. */
  3274. #define DDERR_NOEXECUTEBUFFERHW MAKE_DDHRESULT( 593 )
  3275. // @@END_MSINTERNAL
  3276. // @@BEGIN_MSINTERNAL
  3277. #ifdef SHAREDZ
  3278. /*
  3279. * This process has already created a shared Z buffer
  3280. */
  3281. #define DDERR_SHAREDZBUFFERALREADYEXISTS MAKE_DDHRESULT( 594 )
  3282. /*
  3283. * Unable to match shared Z buffer creation request with existing
  3284. * shared Z buffer.
  3285. */
  3286. #define DDERR_INCOMPATIBLESHAREDZBUFFER MAKE_DDHRESULT( 595 )
  3287. /*
  3288. * This process has already created a shared backbuffer
  3289. */
  3290. #define DDERR_SHAREDBACKBUFFERALREADYEXISTS MAKE_DDHRESULT( 596 )
  3291. /*
  3292. * Unable to match shared backbuffer creation request with existing
  3293. * shared backbuffer.
  3294. */
  3295. #define DDERR_INCOMPATIBLESHAREDBACKBUFFER MAKE_DDHRESULT( 597 )
  3296. /*
  3297. * Operation could not be carried out because there is no hardware support
  3298. * for shared Z buffers.
  3299. */
  3300. #define DDERR_NOSHAREDZBUFFERHW MAKE_DDHRESULT( 598 )
  3301. /*
  3302. * Operation could not be carried out because there is no hardware support
  3303. * for shared backbuffers.
  3304. */
  3305. #define DDERR_NOSHAREDBACKBUFFERHW MAKE_DDHRESULT( 599 )
  3306. #endif
  3307. // @@END_MSINTERNAL
  3308. /*
  3309. * A DC has already been returned for this surface. Only one DC can be
  3310. * retrieved per surface.
  3311. */
  3312. #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
  3313. /*
  3314. * The attempt to page lock a surface failed.
  3315. */
  3316. #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
  3317. /*
  3318. * The attempt to page unlock a surface failed.
  3319. */
  3320. #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
  3321. /*
  3322. * An attempt was made to page unlock a surface with no outstanding page locks.
  3323. */
  3324. #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
  3325. /*
  3326. * An attempt was made to invoke an interface member of a DirectDraw object
  3327. * created by CoCreateInstance() before it was initialized.
  3328. */
  3329. #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
  3330. /* Alpha bit depth constants */
  3331. //@@BEGIN_MSINTERNAL
  3332. /*
  3333. * 1 bit alpha constants
  3334. */
  3335. /*
  3336. * Completely transparent. Colors being blended with this constant do not affect
  3337. * the final result.
  3338. */
  3339. #define DDALPHA1_TRANSPARENT 0
  3340. /*
  3341. * Completely opaque. Colors being blended with this constant are the final result.
  3342. */
  3343. #define DDALPHA1_OPAQUE 1
  3344. /*
  3345. * 2 bit alpha constants
  3346. */
  3347. /*
  3348. * Completely transparent. Colors being blended with this constant do not effect
  3349. * the final result.
  3350. */
  3351. #define DDALPHA2_TRANSPARENT 0
  3352. /*
  3353. * 50-50 blend. Colors being blended with this constant effect the final result
  3354. * with 50% of their color.
  3355. */
  3356. #define DDALPHA2_50 2
  3357. /*
  3358. * Completely opaque. Colors being blended with this constant are the final result.
  3359. */
  3360. #define DDALPHA2_OPAQUE 3
  3361. /*
  3362. * 4 bit alpha constants
  3363. */
  3364. /*
  3365. * Completely transparent. Colors being blended with this constant do not effect
  3366. * the final result.
  3367. */
  3368. #define DDALPHA4_TRANSPARENT 0
  3369. /*
  3370. * Opaque modifier is multiplied by any value between 0 and _OPAQUE to
  3371. * establish gradients of alpha blending.
  3372. */
  3373. #define DDALPHA4_OPAQUEMOD 1
  3374. /*
  3375. * 50-50 blend. Colors being blended with this constant effect the final result
  3376. * with 50% of their color.
  3377. */
  3378. #define DDALPHA4_50 8
  3379. /*
  3380. * Completely opaque. Colors being blended with this constant are the final result.
  3381. */
  3382. #define DDALPHA4_OPAQUE 15
  3383. /*
  3384. * 8 bit alpha constants
  3385. */
  3386. /*
  3387. * Completely transparent. Colors being blended with this constant do not effect
  3388. * the final result.
  3389. */
  3390. #define DDALPHA8_TRANSPARENT 0
  3391. /*
  3392. * Opaque modifier is multiplied by any value between 0 and _OPAQUE to
  3393. * establish gradients of alpha blending.
  3394. */
  3395. #define DDALPHA8_OPAQUEMOD 1
  3396. /*
  3397. * 50-50 blend. Colors being blended with this constant effect the final result
  3398. * with 50% of their color.
  3399. */
  3400. #define DDALPHA8_50 128
  3401. /*
  3402. * Completely opaque. Colors being blended with this constant are the final result.
  3403. */
  3404. #define DDALPHA8_OPAQUE 255
  3405. //@@END_MSINTERNAL
  3406. #ifdef __cplusplus
  3407. };
  3408. #endif
  3409. #endif