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.

7511 lines
295 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 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. * 25-jul-96 scottm Added DDCAPS2_AUTOFLIPOVERLAY,
  112. * DDCAPS2_CANSMOOTHINTERLEAVED,DDCAPS2_CANSMOOTHNONINTERLEAVED
  113. * 08-oct-96 ketand Added support for Interleaved Z (aka RGBZ surfaces)
  114. * 15-nov-96 colinmc Finally retired DDSCAPS_3D and moved
  115. * DDSCAPS_EXECUTEBUFFER to ddrawi.h so DDK users can
  116. * see it.
  117. * 08-dec-96 colinmc Initial AGP support
  118. * 13-jan-97 jvanaken Basic support for IDirectDrawSurface3 interface
  119. * 12-jan-97 colinmc More Win16 lock work
  120. * 29-jan-97 smac Updated color control structure
  121. * 29-jan-97 jeffno Mode13 support. New surface cap and enum/setmode flags
  122. * 03-mar-97 jeffno Work item: Extended surface memory alignment
  123. * 08-mar-97 colinmc Support for DMA model AGP cards
  124. * 11-mar-97 smac Obsoleted dwMin/MaxLiveVideoStretch and dwMin/MaxHwCodecStretch fields
  125. * 11-mar-97 jeffno Don't allow blts between surfaces from different ddraw gbls
  126. * 22-mar-97 colinmc Bug 6673: Mechanism to let new applications run against
  127. * old runtimes
  128. * 23-mar-97 colinmc Bug 6673: Changed structure numbering scheme for
  129. * consistency's sake
  130. * 24-mar-97 jeffno Optimized Surfaces
  131. * 16-sep-97 jeffno DirectDrawEnumerateEx
  132. * 30-sep-97 jeffno IDirectDraw4
  133. * 03-oct-97 jeffno DDSCAPS2 and DDSURFACEDESC2
  134. * 31-oct-97 johnstep Persistent-content surfaces for Windows 9x
  135. * 05-nov-97 jvanaken Support for AlphaBlt and SetSpriteDisplayList
  136. * 07-nov-97 raymondc Borland compatibility
  137. * 24-nov-97 t-craigs Added IDirectDrawPalette2
  138. * 19-dec-97 jvanaken IDDS4::Unlock now takes a pointer to a rectangle.
  139. *@@END_MSINTERNAL
  140. *
  141. ***************************************************************************/
  142. #ifndef __DDRAW_INCLUDED__
  143. #define __DDRAW_INCLUDED__
  144. //Disable the nameless union warning when building internally
  145. #undef ENABLE_NAMELESS_UNION_PRAGMA
  146. #ifdef DIRECTX_REDIST
  147. #define ENABLE_NAMELESS_UNION_PRAGMA
  148. #endif
  149. #ifdef ENABLE_NAMELESS_UNION_PRAGMA
  150. #pragma warning(disable:4201)
  151. #endif
  152. /*
  153. * If you wish an application built against the newest version of DirectDraw
  154. * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION
  155. * to be the earlies version of DirectDraw you wish to run against. For,
  156. * example if you wish an application to run against a DX 3 runtime define
  157. * DIRECTDRAW_VERSION to be 0x0300.
  158. */
  159. #ifndef DIRECTDRAW_VERSION
  160. #define DIRECTDRAW_VERSION 0x0700
  161. #endif /* DIRECTDRAW_VERSION */
  162. #if defined( _WIN32 ) && !defined( _NO_COM )
  163. #define COM_NO_WINDOWS_H
  164. #include <objbase.h>
  165. #else
  166. #define IUnknown void
  167. #if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
  168. #define CO_E_NOTINITIALIZED 0x800401F0L
  169. #endif
  170. #endif
  171. #define _FACDD 0x876
  172. #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  173. #ifdef __cplusplus
  174. extern "C" {
  175. #endif
  176. //
  177. // For compilers that don't support nameless unions, do a
  178. //
  179. // #define NONAMELESSUNION
  180. //
  181. // before #include <ddraw.h>
  182. //
  183. #ifndef DUMMYUNIONNAMEN
  184. #if defined(__cplusplus) || !defined(NONAMELESSUNION)
  185. #define DUMMYUNIONNAMEN(n)
  186. #else
  187. #define DUMMYUNIONNAMEN(n) u##n
  188. #endif
  189. #endif
  190. #ifndef MAKEFOURCC
  191. #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
  192. ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
  193. ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
  194. #endif //defined(MAKEFOURCC)
  195. /*
  196. * FOURCC codes for DX compressed-texture pixel formats
  197. */
  198. #define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
  199. #define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
  200. #define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
  201. #define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
  202. #define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
  203. /*
  204. * GUIDS used by DirectDraw objects
  205. */
  206. #if defined( _WIN32 ) && !defined( _NO_COM )
  207. DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  208. DEFINE_GUID( CLSID_DirectDraw7, 0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  209. DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  210. DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  211. DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  212. DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  213. DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  214. DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  215. DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  216. DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
  217. DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
  218. DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  219. //@@BEGIN_MSINTERNAL
  220. DEFINE_GUID( IID_IDirectDrawSurfaceNew, 0x1bab8e96,0x9cfe,0x4ce3,0xbc,0x72,0xd7,0xe9,0xe9,0x9a,0x21,0x75 );
  221. DEFINE_GUID( CLSID_DirectDrawFactory2, 0xb9dc4790,0x4af1,0x11d1,0x8c,0x4c,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  222. DEFINE_GUID( IID_IDirectDrawFactory2, 0x89b2c488,0x4af4,0x11d1,0x8c,0x4c,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  223. DEFINE_GUID( GUID_DirectDrawSurfaceStream, 0xe043bc46,0x5317,0x11d1,0x8c,0x4d,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  224. DEFINE_GUID( GUID_DirectDrawPaletteStream, 0x730c7ffc,0x5347,0x11d1,0x8c,0x4d,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  225. DEFINE_GUID(IID_IDirectDrawOptSurface, 0x51191f1e, 0x4f2b, 0x11d1, 0x8c, 0xc3, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  226. DEFINE_GUID( IID_IDirectDrawPalette2, 0xc03c477e,0x6519,0x11d1,0x8c,0x52,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  227. //@@END_MSINTERNAL
  228. //@@BEGIN_MSINTERNAL
  229. #ifdef STREAMING
  230. DEFINE_GUID( IID_IDirectDrawSurfaceStreaming, 0x6C14DB82,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  231. #endif
  232. #ifdef COMPOSITION
  233. DEFINE_GUID( IID_IDirectDrawSurfaceComposition, 0x6C14DB83,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  234. #endif
  235. //@@END_MSINTERNAL
  236. DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  237. DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  238. DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
  239. DEFINE_GUID( IID_IDirectDrawGammaControl, 0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
  240. #endif
  241. /*============================================================================
  242. *
  243. * DirectDraw Structures
  244. *
  245. * Various structures used to invoke DirectDraw.
  246. *
  247. *==========================================================================*/
  248. struct IDirectDraw;
  249. struct IDirectDrawSurface;
  250. //@@BEGIN_MSINTERNAL
  251. #ifdef COMPOSITION
  252. struct IDirectDrawSurfaceComposition;
  253. #endif
  254. #ifdef STREAMING
  255. struct IDirectDrawSurfaceStreaming;
  256. #endif
  257. //@@END_MSINTERNAL
  258. struct IDirectDrawPalette;
  259. struct IDirectDrawClipper;
  260. typedef struct IDirectDraw FAR *LPDIRECTDRAW;
  261. typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
  262. typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4;
  263. typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7;
  264. typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
  265. typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
  266. typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
  267. typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4;
  268. typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7;
  269. //@@BEGIN_MSINTERNAL
  270. typedef struct IDirectDrawFactory2 FAR *LPDIRECTDRAWFACTORY2;
  271. typedef struct IDirectDrawOptSurface FAR *LPDIRECTDRAWOPTSURFACE;
  272. //@@END_MSINTERNAL
  273. //@@BEGIN_MSINTERNAL
  274. #ifdef COMPOSITION
  275. typedef struct IDirectDrawSurfaceComposition FAR *LPDIRECTDRAWSURFACECOMPOSITION;
  276. #endif
  277. #ifdef STREAMING
  278. typedef struct IDirectDrawSurfaceStreaming FAR *LPDIRECTDRAWSURFACESTREAMING;
  279. #endif
  280. typedef struct IDirectDrawPalette2 FAR *LPDIRECTDRAWPALETTE2;
  281. //@@END_MSINTERNAL
  282. typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
  283. typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
  284. typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
  285. typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL;
  286. typedef struct _DDFXROP FAR *LPDDFXROP;
  287. typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
  288. typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2;
  289. //@@BEGIN_MSINTERNAL
  290. typedef struct _DDOPTSURFACEDESC FAR *LPDDOPTSURFACEDESC;
  291. //@@END_MSINTERNAL
  292. typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;
  293. /*
  294. * API's
  295. */
  296. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  297. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  298. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  299. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  300. extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  301. extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  302. /*
  303. * Protect against old SDKs
  304. */
  305. #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
  306. #define HMONITOR_DECLARED
  307. DECLARE_HANDLE(HMONITOR);
  308. #endif
  309. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
  310. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
  311. extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  312. extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  313. typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  314. typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  315. #ifdef UNICODE
  316. typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
  317. #define DirectDrawEnumerate DirectDrawEnumerateW
  318. typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX;
  319. typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX;
  320. #define DirectDrawEnumerateEx DirectDrawEnumerateExW
  321. #else
  322. typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
  323. #define DirectDrawEnumerate DirectDrawEnumerateA
  324. typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX;
  325. typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX;
  326. #define DirectDrawEnumerateEx DirectDrawEnumerateExA
  327. #endif
  328. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  329. extern HRESULT WINAPI DirectDrawCreateEx( GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid,IUnknown FAR *pUnkOuter );
  330. extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  331. #endif
  332. /*
  333. * Flags for DirectDrawEnumerateEx
  334. * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
  335. * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
  336. * By default, only the primary display device is enumerated.
  337. * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
  338. */
  339. /*
  340. * This flag causes enumeration of any GDI display devices which are part of
  341. * the Windows Desktop
  342. */
  343. #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001L
  344. /*
  345. * This flag causes enumeration of any GDI display devices which are not
  346. * part of the Windows Desktop
  347. */
  348. #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002L
  349. /*
  350. * This flag causes enumeration of non-display devices
  351. */
  352. #define DDENUM_NONDISPLAYDEVICES 0x00000004L
  353. //@@BEGIN_MSINTERNAL
  354. #define DDENUM_VALID 0x00000007L
  355. //@@END_MSINTERNAL
  356. #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
  357. #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
  358. #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
  359. #define DDCREATE_HARDWAREONLY 0x00000001l
  360. #define DDCREATE_EMULATIONONLY 0x00000002l
  361. #if defined(WINNT) || !defined(WIN32)
  362. typedef long HRESULT;
  363. #endif
  364. //#ifndef WINNT
  365. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  366. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
  367. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  368. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
  369. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
  370. //#endif
  371. /*
  372. * Generic pixel format with 8-bit RGB and alpha components
  373. */
  374. typedef struct _DDARGB
  375. {
  376. BYTE blue;
  377. BYTE green;
  378. BYTE red;
  379. BYTE alpha;
  380. } DDARGB;
  381. typedef DDARGB FAR *LPDDARGB;
  382. /*
  383. * This version of the structure remains for backwards source compatibility.
  384. * The DDARGB structure is the one that should be used for all DirectDraw APIs.
  385. */
  386. typedef struct _DDRGBA
  387. {
  388. BYTE red;
  389. BYTE green;
  390. BYTE blue;
  391. BYTE alpha;
  392. } DDRGBA;
  393. typedef DDRGBA FAR *LPDDRGBA;
  394. /*
  395. * DDCOLORKEY
  396. */
  397. typedef struct _DDCOLORKEY
  398. {
  399. DWORD dwColorSpaceLowValue; // low boundary of color space that is to
  400. // be treated as Color Key, inclusive
  401. DWORD dwColorSpaceHighValue; // high boundary of color space that is
  402. // to be treated as Color Key, inclusive
  403. } DDCOLORKEY;
  404. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  405. /*
  406. * DDBLTFX
  407. * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  408. */
  409. typedef struct _DDBLTFX
  410. {
  411. DWORD dwSize; // size of structure
  412. DWORD dwDDFX; // FX operations
  413. DWORD dwROP; // Win32 raster operations
  414. DWORD dwDDROP; // Raster operations new for DirectDraw
  415. DWORD dwRotationAngle; // Rotation angle for blt
  416. DWORD dwZBufferOpCode; // ZBuffer compares
  417. DWORD dwZBufferLow; // Low limit of Z buffer
  418. DWORD dwZBufferHigh; // High limit of Z buffer
  419. DWORD dwZBufferBaseDest; // Destination base value
  420. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  421. union
  422. {
  423. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  424. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  425. } DUMMYUNIONNAMEN(1);
  426. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  427. union
  428. {
  429. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  430. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  431. } DUMMYUNIONNAMEN(2);
  432. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  433. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  434. DWORD dwReserved;
  435. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  436. union
  437. {
  438. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  439. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  440. } DUMMYUNIONNAMEN(3);
  441. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  442. union
  443. {
  444. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  445. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  446. } DUMMYUNIONNAMEN(4);
  447. union
  448. {
  449. DWORD dwFillColor; // color in RGB or Palettized
  450. DWORD dwFillDepth; // depth value for z-buffer
  451. DWORD dwFillPixel; // pixel value for RGBA or RGBZ
  452. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  453. } DUMMYUNIONNAMEN(5);
  454. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  455. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  456. } DDBLTFX;
  457. typedef DDBLTFX FAR* LPDDBLTFX;
  458. //@@BEGIN_MSINTERNAL
  459. /*
  460. * Structure used for lpDDAlphaBltFX arg to AlphaBlt API call
  461. */
  462. typedef union _DDALPHABLTFX
  463. {
  464. DDARGB ddargbScaleFactors;
  465. DWORD dwFillValue;
  466. } DDALPHABLTFX;
  467. typedef DDALPHABLTFX FAR* LPDDALPHABLTFX;
  468. #ifdef COMPOSITION
  469. /*
  470. * DDCOMPOSEFX
  471. * Used to pass override information to the DIRECTDRAWSURFACE callback Compose.
  472. */
  473. typedef DWORD (FAR PASCAL *LPCOMPOSECALLBACK)(DWORD);
  474. typedef struct _DDCOMPOSEFX
  475. {
  476. DWORD dwSize; // size of structure
  477. DWORD dwDDFX; // FX operations
  478. DWORD dwROP; // Win32 raster operations
  479. DWORD dwDDROP; // Raster operations new for DirectDraw
  480. DWORD dwRotationAngle; // Rotation angle for blt
  481. DWORD dwZBufferOpCode; // ZBuffer compares
  482. DWORD dwZBufferLow; // Low limit of Z buffer
  483. DWORD dwZBufferHigh; // High limit of Z buffer
  484. DWORD dwZBufferBaseDest; // Destination base value
  485. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  486. union
  487. {
  488. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  489. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  490. } DUMMYUNIONNAMEN(1);
  491. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  492. union
  493. {
  494. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  495. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  496. } DUMMYUNIONNAMEN(2);
  497. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  498. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  499. DWORD dwReserved;
  500. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  501. union
  502. {
  503. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  504. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  505. } DUMMYUNIONNAMEN(3);
  506. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  507. union
  508. {
  509. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  510. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  511. } DUMMYUNIONNAMEN(4);
  512. union
  513. {
  514. DWORD dwFillColor; // color in RGB or Palettized
  515. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  516. } DUMMYUNIONNAMEN(5);
  517. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  518. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  519. DWORD dwRepeat; // how many times to repeat the composition command
  520. LPCOMPOSECALLBACK lpfnCallback; // function to call prior to execution of each compose command
  521. } DDCOMPOSEFX;
  522. typedef DDCOMPOSEFX FAR* LPDDCOMPOSEFX;
  523. #endif
  524. //@@END_MSINTERNAL
  525. /*
  526. * DDSCAPS
  527. */
  528. typedef struct _DDSCAPS
  529. {
  530. DWORD dwCaps; // capabilities of surface wanted
  531. } DDSCAPS;
  532. typedef DDSCAPS FAR* LPDDSCAPS;
  533. /*
  534. * DDOSCAPS
  535. */
  536. typedef struct _DDOSCAPS
  537. {
  538. DWORD dwCaps; // capabilities of surface wanted
  539. } DDOSCAPS;
  540. typedef DDOSCAPS FAR* LPDDOSCAPS;
  541. /*
  542. * This structure is used internally by DirectDraw.
  543. //@@BEGIN_MSINTERNAL
  544. * Don't MSINTERNAL it: it's needed by ddrawi.h and drivers.
  545. //@@END_MSINTERNAL
  546. */
  547. typedef struct _DDSCAPSEX
  548. {
  549. DWORD dwCaps2;
  550. DWORD dwCaps3;
  551. union
  552. {
  553. DWORD dwCaps4;
  554. DWORD dwVolumeDepth;
  555. } DUMMYUNIONNAMEN(1);
  556. } DDSCAPSEX, FAR * LPDDSCAPSEX;
  557. /*
  558. * DDSCAPS2
  559. */
  560. typedef struct _DDSCAPS2
  561. {
  562. DWORD dwCaps; // capabilities of surface wanted
  563. //@@BEGIN_MSINTERNAL
  564. union
  565. {
  566. struct
  567. {
  568. //@@END_MSINTERNAL
  569. DWORD dwCaps2;
  570. DWORD dwCaps3;
  571. union
  572. {
  573. DWORD dwCaps4;
  574. DWORD dwVolumeDepth;
  575. } DUMMYUNIONNAMEN(1);
  576. //@@BEGIN_MSINTERNAL
  577. };
  578. DDSCAPSEX ddsCapsEx;
  579. };
  580. //@@END_MSINTERNAL
  581. } DDSCAPS2;
  582. typedef DDSCAPS2 FAR* LPDDSCAPS2;
  583. /*
  584. * DDCAPS
  585. */
  586. #define DD_ROP_SPACE (256/32) // space required to store ROP array
  587. /*
  588. * NOTE: Our choosen structure number scheme is to append a single digit to
  589. * the end of the structure giving the version that structure is associated
  590. * with.
  591. */
  592. /*
  593. * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally
  594. * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0.
  595. * New applications should use the DDCAPS structure defined below.
  596. */
  597. typedef struct _DDCAPS_DX1
  598. {
  599. DWORD dwSize; // size of the DDDRIVERCAPS structure
  600. DWORD dwCaps; // driver specific capabilities
  601. DWORD dwCaps2; // more driver specific capabilites
  602. DWORD dwCKeyCaps; // color key capabilities of the surface
  603. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  604. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  605. DWORD dwPalCaps; // palette capabilities
  606. DWORD dwSVCaps; // stereo vision capabilities
  607. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  608. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  609. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  610. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  611. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  612. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  613. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  614. DWORD dwVidMemTotal; // total amount of video memory
  615. DWORD dwVidMemFree; // amount of free video memory
  616. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  617. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  618. DWORD dwNumFourCCCodes; // number of four cc codes
  619. DWORD dwAlignBoundarySrc; // source rectangle alignment
  620. DWORD dwAlignSizeSrc; // source rectangle byte size
  621. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  622. DWORD dwAlignSizeDest; // dest rectangle byte size
  623. DWORD dwAlignStrideAlign; // stride alignment
  624. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  625. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  626. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  627. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  628. DWORD dwMinLiveVideoStretch; // OBSOLETE! This field remains for compatability reasons only
  629. DWORD dwMaxLiveVideoStretch; // OBSOLETE! This field remains for compatability reasons only
  630. DWORD dwMinHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only
  631. DWORD dwMaxHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only
  632. DWORD dwReserved1; // reserved
  633. DWORD dwReserved2; // reserved
  634. DWORD dwReserved3; // reserved
  635. } DDCAPS_DX1;
  636. typedef DDCAPS_DX1 FAR* LPDDCAPS_DX1;
  637. /*
  638. * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
  639. * It is present for back compatability.
  640. */
  641. typedef struct _DDCAPS_DX3
  642. {
  643. DWORD dwSize; // size of the DDDRIVERCAPS structure
  644. DWORD dwCaps; // driver specific capabilities
  645. DWORD dwCaps2; // more driver specific capabilites
  646. DWORD dwCKeyCaps; // color key capabilities of the surface
  647. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  648. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  649. DWORD dwPalCaps; // palette capabilities
  650. DWORD dwSVCaps; // stereo vision capabilities
  651. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  652. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  653. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  654. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  655. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  656. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  657. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  658. DWORD dwVidMemTotal; // total amount of video memory
  659. DWORD dwVidMemFree; // amount of free video memory
  660. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  661. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  662. DWORD dwNumFourCCCodes; // number of four cc codes
  663. DWORD dwAlignBoundarySrc; // source rectangle alignment
  664. DWORD dwAlignSizeSrc; // source rectangle byte size
  665. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  666. DWORD dwAlignSizeDest; // dest rectangle byte size
  667. DWORD dwAlignStrideAlign; // stride alignment
  668. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  669. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  670. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  671. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  672. DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  673. DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  674. DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  675. DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  676. DWORD dwReserved1; // reserved
  677. DWORD dwReserved2; // reserved
  678. DWORD dwReserved3; // reserved
  679. DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  680. DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  681. DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  682. DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  683. DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  684. DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  685. DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  686. DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  687. DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  688. DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  689. DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  690. DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  691. DWORD dwReserved4; // reserved
  692. DWORD dwReserved5; // reserved
  693. DWORD dwReserved6; // reserved
  694. } DDCAPS_DX3;
  695. typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
  696. /*
  697. * This structure is the DDCAPS structure as it was in version 5 of Direct X.
  698. * It is present for back compatability.
  699. */
  700. typedef struct _DDCAPS_DX5
  701. {
  702. /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
  703. /* 4*/ DWORD dwCaps; // driver specific capabilities
  704. /* 8*/ DWORD dwCaps2; // more driver specific capabilites
  705. /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
  706. /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
  707. /* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  708. /* 18*/ DWORD dwPalCaps; // palette capabilities
  709. /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
  710. /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  711. /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  712. /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  713. /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  714. /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  715. /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  716. /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  717. /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
  718. /* 40*/ DWORD dwVidMemFree; // amount of free video memory
  719. /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  720. /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
  721. /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
  722. /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
  723. /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
  724. /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
  725. /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
  726. /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
  727. /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  728. /* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  729. /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  730. /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  731. /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  732. /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  733. /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  734. /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  735. /* a0*/ DWORD dwReserved1; // reserved
  736. /* a4*/ DWORD dwReserved2; // reserved
  737. /* a8*/ DWORD dwReserved3; // reserved
  738. /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  739. /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  740. /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  741. /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  742. /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  743. /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  744. /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  745. /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  746. /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  747. /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  748. /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  749. /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  750. // Members added for DX5:
  751. /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
  752. /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
  753. /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
  754. /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
  755. /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
  756. /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
  757. /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
  758. /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  759. } DDCAPS_DX5;
  760. typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5;
  761. typedef struct _DDCAPS_DX6
  762. {
  763. /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
  764. /* 4*/ DWORD dwCaps; // driver specific capabilities
  765. /* 8*/ DWORD dwCaps2; // more driver specific capabilites
  766. /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
  767. /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
  768. /* 14*/ DWORD dwFXAlphaCaps; // alpha caps
  769. /* 18*/ DWORD dwPalCaps; // palette capabilities
  770. /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
  771. /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  772. /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  773. /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  774. /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  775. /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  776. /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  777. /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  778. /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
  779. /* 40*/ DWORD dwVidMemFree; // amount of free video memory
  780. /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  781. /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
  782. /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
  783. /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
  784. /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
  785. /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
  786. /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
  787. /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
  788. /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  789. /* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  790. /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  791. /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  792. /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  793. /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  794. /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  795. /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  796. /* a0*/ DWORD dwReserved1; // reserved
  797. /* a4*/ DWORD dwReserved2; // reserved
  798. /* a8*/ DWORD dwReserved3; // reserved
  799. /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  800. /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  801. /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  802. /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  803. /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  804. /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  805. /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  806. /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  807. /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  808. /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  809. /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  810. /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  811. /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
  812. /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
  813. /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
  814. /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
  815. /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
  816. /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
  817. /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
  818. /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  819. // Members added for DX6 release
  820. /*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
  821. } DDCAPS_DX6;
  822. typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
  823. typedef struct _DDCAPS_DX7
  824. {
  825. /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
  826. /* 4*/ DWORD dwCaps; // driver specific capabilities
  827. /* 8*/ DWORD dwCaps2; // more driver specific capabilites
  828. /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
  829. /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
  830. /* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  831. /* 18*/ DWORD dwPalCaps; // palette capabilities
  832. /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
  833. /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  834. /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  835. /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  836. /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  837. /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  838. /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  839. /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  840. /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
  841. /* 40*/ DWORD dwVidMemFree; // amount of free video memory
  842. /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  843. /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
  844. /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
  845. /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
  846. /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
  847. /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
  848. /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
  849. /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
  850. /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  851. /* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  852. /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  853. /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  854. /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  855. /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  856. /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  857. /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  858. /* a0*/ DWORD dwReserved1; // reserved
  859. /* a4*/ DWORD dwReserved2; // reserved
  860. /* a8*/ DWORD dwReserved3; // reserved
  861. /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  862. /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  863. /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  864. /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  865. /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  866. /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  867. /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  868. /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  869. /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  870. /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  871. /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  872. /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  873. /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
  874. /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
  875. /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
  876. /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
  877. /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
  878. /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
  879. /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
  880. /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  881. // Members added for DX6 release
  882. /*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
  883. //@@BEGIN_MSINTERNAL
  884. #ifdef POSTPONED2
  885. /*170*/ DWORD dwAlphaCaps; // driver-specific alpha caps for overlays & Vmem->Vmem blts
  886. /*174*/ DWORD dwSVBAlphaCaps; // driver-specific alpha capabilities for System->Vmem blts
  887. /*178*/ DWORD dwVSBAlphaCaps; // driver-specific alpha capabilities for Vmem->System blts
  888. /*17c*/ DWORD dwSSBAlphaCaps; // driver-specific alpha capabilities for System->System blts
  889. /*180*/ DWORD dwFilterCaps; // driver-specific filter caps for overlays and Vmem->Vmem blts
  890. /*184*/ DWORD dwSVBFilterCaps; // driver-specific filter capabilities for System->Vmem blts
  891. /*188*/ DWORD dwVSBFilterCaps; // driver-specific filter capabilities for Vmem->System blts
  892. /*18c*/ DWORD dwSSBFilterCaps; // driver-specific filter capabilities for System->System blts
  893. /*190*/ DWORD dwTransformCaps; // driver-specific transform caps for overlays & Vmem->Vmem blts
  894. /*194*/ DWORD dwSVBTransformCaps; // driver-specific transform capabilities for System->Vmem blts
  895. /*198*/ DWORD dwVSBTransformCaps; // driver-specific transform capabilities for Vmem->System blts
  896. /*19c*/ DWORD dwSSBTransformCaps; // driver-specific transform capabilities for System->System blts
  897. /*1a0*/ DWORD dwBltAffineMinifyLimit; // minification limit for affine-transformed blts
  898. /*1a4*/ DWORD dwOverlayAffineMinifyLimit; // minification limit for affine-transformed overlays
  899. #endif //POSTPONED2
  900. //@@END_MSINTERNAL
  901. } DDCAPS_DX7;
  902. typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7;
  903. #if DIRECTDRAW_VERSION <= 0x300
  904. typedef DDCAPS_DX3 DDCAPS;
  905. #elif DIRECTDRAW_VERSION <= 0x500
  906. typedef DDCAPS_DX5 DDCAPS;
  907. #elif DIRECTDRAW_VERSION <= 0x600
  908. typedef DDCAPS_DX6 DDCAPS;
  909. #else
  910. typedef DDCAPS_DX7 DDCAPS;
  911. #endif
  912. typedef DDCAPS FAR* LPDDCAPS;
  913. /*
  914. * DDPIXELFORMAT
  915. */
  916. typedef struct _DDPIXELFORMAT
  917. {
  918. DWORD dwSize; // size of structure
  919. DWORD dwFlags; // pixel format flags
  920. DWORD dwFourCC; // (FOURCC code)
  921. union
  922. {
  923. DWORD dwRGBBitCount; // how many bits per pixel
  924. DWORD dwYUVBitCount; // how many bits per pixel
  925. DWORD dwZBufferBitDepth; // how many total bits/pixel in z buffer (including any stencil bits)
  926. DWORD dwAlphaBitDepth; // how many bits for alpha channels
  927. DWORD dwLuminanceBitCount; // how many bits per pixel
  928. DWORD dwBumpBitCount; // how many bits per "buxel", total
  929. DWORD dwPrivateFormatBitCount;// Bits per pixel of private driver formats. Only valid in texture
  930. // format list and if DDPF_D3DFORMAT is set
  931. } DUMMYUNIONNAMEN(1);
  932. union
  933. {
  934. DWORD dwRBitMask; // mask for red bit
  935. DWORD dwYBitMask; // mask for Y bits
  936. DWORD dwStencilBitDepth; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
  937. DWORD dwLuminanceBitMask; // mask for luminance bits
  938. DWORD dwBumpDuBitMask; // mask for bump map U delta bits
  939. DWORD dwOperations; // DDPF_D3DFORMAT Operations
  940. } DUMMYUNIONNAMEN(2);
  941. union
  942. {
  943. DWORD dwGBitMask; // mask for green bits
  944. DWORD dwUBitMask; // mask for U bits
  945. DWORD dwZBitMask; // mask for Z bits
  946. DWORD dwBumpDvBitMask; // mask for bump map V delta bits
  947. struct
  948. {
  949. WORD wFlipMSTypes; // Multisample methods supported via flip for this D3DFORMAT
  950. WORD wBltMSTypes; // Multisample methods supported via blt for this D3DFORMAT
  951. } MultiSampleCaps;
  952. } DUMMYUNIONNAMEN(3);
  953. union
  954. {
  955. DWORD dwBBitMask; // mask for blue bits
  956. DWORD dwVBitMask; // mask for V bits
  957. DWORD dwStencilBitMask; // mask for stencil bits
  958. DWORD dwBumpLuminanceBitMask; // mask for luminance in bump map
  959. } DUMMYUNIONNAMEN(4);
  960. union
  961. {
  962. DWORD dwRGBAlphaBitMask; // mask for alpha channel
  963. DWORD dwYUVAlphaBitMask; // mask for alpha channel
  964. DWORD dwLuminanceAlphaBitMask;// mask for alpha channel
  965. DWORD dwRGBZBitMask; // mask for Z channel
  966. DWORD dwYUVZBitMask; // mask for Z channel
  967. } DUMMYUNIONNAMEN(5);
  968. } DDPIXELFORMAT;
  969. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  970. /*
  971. * DDOVERLAYFX
  972. */
  973. typedef struct _DDOVERLAYFX
  974. {
  975. DWORD dwSize; // size of structure
  976. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  977. DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
  978. DWORD dwReserved;
  979. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  980. union
  981. {
  982. DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
  983. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
  984. } DUMMYUNIONNAMEN(1);
  985. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  986. union
  987. {
  988. DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
  989. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
  990. } DUMMYUNIONNAMEN(2);
  991. DDCOLORKEY dckDestColorkey; // DestColorkey override
  992. DDCOLORKEY dckSrcColorkey; // DestColorkey override
  993. DWORD dwDDFX; // Overlay FX
  994. DWORD dwFlags; // flags
  995. } DDOVERLAYFX;
  996. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  997. //@@BEGIN_MSINTERNAL
  998. #ifdef POSTPONED2
  999. /*
  1000. * DDSPRITEFX
  1001. */
  1002. typedef struct _DDSPRITEFX
  1003. {
  1004. DWORD dwSize; // sizeof(DDSPRITEFX)
  1005. DWORD dwDDFX; // DDSPRITEFX_ (sprite FX) flags
  1006. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  1007. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  1008. DDARGB ddargbScaleFactors; // Four 8-bit ARGB scaling factors
  1009. float fTransform[3][3]; // 3x3 transformation matrix
  1010. } DDSPRITEFX;
  1011. typedef DDSPRITEFX FAR *LPDDSPRITEFX;
  1012. /*
  1013. * Structure that contains the information describing a sprite
  1014. * in the display list that is passed to SetSpriteDisplayList().
  1015. */
  1016. typedef struct _DDSPRITE {
  1017. RECT rcDest; // destination rectangle
  1018. LPDIRECTDRAWSURFACE7 lpDDSSrc; // source surface
  1019. RECT rcSrc; // source rectangle
  1020. DWORD dwFlags; // DDSPRITE_ flags
  1021. DWORD dwReserved[2]; // reserved
  1022. DDSPRITEFX ddSpriteFX; // sprite special FX
  1023. } DDSPRITE;
  1024. typedef DDSPRITE FAR *LPDDSPRITE;
  1025. #endif //POSTPONED2
  1026. //@@END_MSINTERNAL
  1027. /*
  1028. * DDBLTBATCH: BltBatch entry structure
  1029. */
  1030. typedef struct _DDBLTBATCH
  1031. {
  1032. LPRECT lprDest;
  1033. LPDIRECTDRAWSURFACE lpDDSSrc;
  1034. LPRECT lprSrc;
  1035. DWORD dwFlags;
  1036. LPDDBLTFX lpDDBltFx;
  1037. } DDBLTBATCH;
  1038. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  1039. /*
  1040. * DDGAMMARAMP
  1041. */
  1042. typedef struct _DDGAMMARAMP
  1043. {
  1044. WORD red[256];
  1045. WORD green[256];
  1046. WORD blue[256];
  1047. } DDGAMMARAMP;
  1048. typedef DDGAMMARAMP FAR * LPDDGAMMARAMP;
  1049. /*
  1050. * This is the structure within which DirectDraw returns data about the current graphics driver and chipset
  1051. */
  1052. #define MAX_DDDEVICEID_STRING 512
  1053. typedef struct tagDDDEVICEIDENTIFIER
  1054. {
  1055. /*
  1056. * These elements are for presentation to the user only. They should not be used to identify particular
  1057. * drivers, since this is unreliable and many different strings may be associated with the same
  1058. * device, and the same driver from different vendors.
  1059. */
  1060. char szDriver[MAX_DDDEVICEID_STRING];
  1061. char szDescription[MAX_DDDEVICEID_STRING];
  1062. /*
  1063. * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  1064. * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  1065. * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  1066. *
  1067. * This version has the form:
  1068. * wProduct = HIWORD(liDriverVersion.HighPart)
  1069. * wVersion = LOWORD(liDriverVersion.HighPart)
  1070. * wSubVersion = HIWORD(liDriverVersion.LowPart)
  1071. * wBuild = LOWORD(liDriverVersion.LowPart)
  1072. */
  1073. #ifdef _WIN32
  1074. LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
  1075. #else
  1076. DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
  1077. DWORD dwDriverVersionHighPart;
  1078. #endif
  1079. /*
  1080. * These elements can be used to identify particular chipsets. Use with extreme caution.
  1081. * dwVendorId Identifies the manufacturer. May be zero if unknown.
  1082. * dwDeviceId Identifies the type of chipset. May be zero if unknown.
  1083. * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  1084. * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
  1085. */
  1086. DWORD dwVendorId;
  1087. DWORD dwDeviceId;
  1088. DWORD dwSubSysId;
  1089. DWORD dwRevision;
  1090. /*
  1091. * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  1092. * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  1093. * reprofile the graphics subsystem.
  1094. * This element can also be used to identify particular problematic drivers.
  1095. */
  1096. GUID guidDeviceIdentifier;
  1097. } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
  1098. typedef struct tagDDDEVICEIDENTIFIER2
  1099. {
  1100. /*
  1101. * These elements are for presentation to the user only. They should not be used to identify particular
  1102. * drivers, since this is unreliable and many different strings may be associated with the same
  1103. * device, and the same driver from different vendors.
  1104. */
  1105. char szDriver[MAX_DDDEVICEID_STRING];
  1106. char szDescription[MAX_DDDEVICEID_STRING];
  1107. /*
  1108. * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  1109. * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  1110. * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  1111. *
  1112. * This version has the form:
  1113. * wProduct = HIWORD(liDriverVersion.HighPart)
  1114. * wVersion = LOWORD(liDriverVersion.HighPart)
  1115. * wSubVersion = HIWORD(liDriverVersion.LowPart)
  1116. * wBuild = LOWORD(liDriverVersion.LowPart)
  1117. */
  1118. #ifdef _WIN32
  1119. LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
  1120. #else
  1121. DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
  1122. DWORD dwDriverVersionHighPart;
  1123. #endif
  1124. /*
  1125. * These elements can be used to identify particular chipsets. Use with extreme caution.
  1126. * dwVendorId Identifies the manufacturer. May be zero if unknown.
  1127. * dwDeviceId Identifies the type of chipset. May be zero if unknown.
  1128. * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  1129. * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
  1130. */
  1131. DWORD dwVendorId;
  1132. DWORD dwDeviceId;
  1133. DWORD dwSubSysId;
  1134. DWORD dwRevision;
  1135. /*
  1136. * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  1137. * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  1138. * reprofile the graphics subsystem.
  1139. * This element can also be used to identify particular problematic drivers.
  1140. */
  1141. GUID guidDeviceIdentifier;
  1142. /*
  1143. * This element is used to determine the Windows Hardware Quality Lab (WHQL)
  1144. * certification level for this driver/device pair.
  1145. */
  1146. DWORD dwWHQLLevel;
  1147. } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
  1148. /*
  1149. * Flags for the IDirectDraw4::GetDeviceIdentifier method
  1150. */
  1151. /*
  1152. * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
  1153. * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
  1154. * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
  1155. * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
  1156. * of the DirectDraw object involved.
  1157. */
  1158. #define DDGDI_GETHOSTIDENTIFIER 0x00000001L
  1159. //@@BEGIN_MSINTERNAL
  1160. #define DDGDI_VALID 0x00000001L
  1161. //@@END_MSINTERNAL
  1162. /*
  1163. * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel
  1164. */
  1165. #define GET_WHQL_YEAR( dwWHQLLevel ) \
  1166. ( (dwWHQLLevel) / 0x10000 )
  1167. #define GET_WHQL_MONTH( dwWHQLLevel ) \
  1168. ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff )
  1169. #define GET_WHQL_DAY( dwWHQLLevel ) \
  1170. ( (dwWHQLLevel) & 0xff )
  1171. /*
  1172. * callbacks
  1173. */
  1174. typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  1175. #ifdef STREAMING
  1176. typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  1177. #endif
  1178. //@@BEGIN_MSINTERNAL
  1179. #ifdef CLIPPER_NOTIFY
  1180. /*
  1181. * values passed into the clipper callback
  1182. */
  1183. #ifndef WINWATCHNOTIFY_START
  1184. #define WINWATCHNOTIFY_START 0
  1185. #define WINWATCHNOTIFY_STOP 1
  1186. #define WINWATCHNOTIFY_DESTROY 2
  1187. #define WINWATCHNOTIFY_CHANGING 3
  1188. #define WINWATCHNOTIFY_CHANGED 4
  1189. #endif
  1190. #endif
  1191. //@@END_MSINTERNAL
  1192. /*
  1193. * INTERACES FOLLOW:
  1194. * IDirectDraw
  1195. * IDirectDrawClipper
  1196. * IDirectDrawPalette
  1197. * IDirectDrawSurface
  1198. *@@BEGIN_MSINTERNAL
  1199. * IDirectDrawSurfaceStreaming
  1200. * IDirectDrawSurfaceComposition
  1201. * IDirectDrawSurfaceClipperEx
  1202. * // this would allow multiple clipper objects to be attached
  1203. * // to the same destination
  1204. *@@END_MSINTERNAL
  1205. */
  1206. /*
  1207. * IDirectDraw
  1208. */
  1209. #if defined( _WIN32 ) && !defined( _NO_COM )
  1210. #undef INTERFACE
  1211. #define INTERFACE IDirectDraw
  1212. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  1213. {
  1214. /*** IUnknown methods ***/
  1215. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1216. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1217. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1218. /*** IDirectDraw methods ***/
  1219. STDMETHOD(Compact)(THIS) PURE;
  1220. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1221. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1222. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  1223. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  1224. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  1225. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  1226. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1227. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1228. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  1229. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  1230. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  1231. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1232. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1233. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1234. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1235. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1236. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1237. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  1238. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1239. };
  1240. #if !defined(__cplusplus) || defined(CINTERFACE)
  1241. #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1242. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  1243. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  1244. #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
  1245. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  1246. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1247. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  1248. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  1249. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1250. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1251. #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1252. #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  1253. #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  1254. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1255. #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  1256. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  1257. #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  1258. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1259. #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  1260. #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1261. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1262. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  1263. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1264. #else
  1265. #define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1266. #define IDirectDraw_AddRef(p) (p)->AddRef()
  1267. #define IDirectDraw_Release(p) (p)->Release()
  1268. #define IDirectDraw_Compact(p) (p)->Compact()
  1269. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  1270. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  1271. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  1272. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  1273. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1274. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  1275. #define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1276. #define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b)
  1277. #define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  1278. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  1279. #define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a)
  1280. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  1281. #define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a)
  1282. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  1283. #define IDirectDraw_Initialize(p, a) (p)->Initialize(a)
  1284. #define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1285. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  1286. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c)
  1287. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  1288. #endif
  1289. #endif
  1290. #if defined( _WIN32 ) && !defined( _NO_COM )
  1291. #undef INTERFACE
  1292. #define INTERFACE IDirectDraw2
  1293. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  1294. {
  1295. /*** IUnknown methods ***/
  1296. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1297. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1298. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1299. /*** IDirectDraw methods ***/
  1300. STDMETHOD(Compact)(THIS) PURE;
  1301. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1302. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1303. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  1304. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  1305. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  1306. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  1307. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1308. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1309. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  1310. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  1311. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  1312. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1313. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1314. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1315. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1316. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1317. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1318. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1319. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1320. /*** Added in the v2 interface ***/
  1321. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  1322. };
  1323. #if !defined(__cplusplus) || defined(CINTERFACE)
  1324. #define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1325. #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1326. #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
  1327. #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
  1328. #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  1329. #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1330. #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  1331. #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  1332. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1333. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1334. #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1335. #define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  1336. #define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  1337. #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1338. #define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  1339. #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  1340. #define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  1341. #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1342. #define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  1343. #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1344. #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1345. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1346. #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1347. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1348. #else
  1349. #define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1350. #define IDirectDraw2_AddRef(p) (p)->AddRef()
  1351. #define IDirectDraw2_Release(p) (p)->Release()
  1352. #define IDirectDraw2_Compact(p) (p)->Compact()
  1353. #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  1354. #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  1355. #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  1356. #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  1357. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1358. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  1359. #define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1360. #define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b)
  1361. #define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  1362. #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  1363. #define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a)
  1364. #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  1365. #define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a)
  1366. #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  1367. #define IDirectDraw2_Initialize(p, a) (p)->Initialize(a)
  1368. #define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1369. #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  1370. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1371. #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  1372. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
  1373. #endif
  1374. #endif
  1375. #if defined( _WIN32 ) && !defined( _NO_COM )
  1376. #undef INTERFACE
  1377. #define INTERFACE IDirectDraw4
  1378. DECLARE_INTERFACE_( IDirectDraw4, IUnknown )
  1379. {
  1380. /*** IUnknown methods ***/
  1381. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1382. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1383. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1384. /*** IDirectDraw methods ***/
  1385. STDMETHOD(Compact)(THIS) PURE;
  1386. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1387. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1388. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE;
  1389. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE;
  1390. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
  1391. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE;
  1392. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1393. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1394. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
  1395. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  1396. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE;
  1397. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1398. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1399. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1400. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1401. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1402. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1403. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1404. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1405. /*** Added in the v2 interface ***/
  1406. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
  1407. /*** Added in the V4 Interface ***/
  1408. STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE;
  1409. STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1410. STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1411. STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE;
  1412. };
  1413. #if !defined(__cplusplus) || defined(CINTERFACE)
  1414. #define IDirectDraw4_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1415. #define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
  1416. #define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
  1417. #define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
  1418. #define IDirectDraw4_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  1419. #define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1420. #define IDirectDraw4_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  1421. #define IDirectDraw4_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  1422. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1423. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1424. #define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1425. #define IDirectDraw4_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  1426. #define IDirectDraw4_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  1427. #define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1428. #define IDirectDraw4_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  1429. #define IDirectDraw4_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  1430. #define IDirectDraw4_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  1431. #define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1432. #define IDirectDraw4_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  1433. #define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1434. #define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1435. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1436. #define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1437. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1438. #define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
  1439. #define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
  1440. #define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
  1441. #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1442. #else
  1443. #define IDirectDraw4_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1444. #define IDirectDraw4_AddRef(p) (p)->AddRef()
  1445. #define IDirectDraw4_Release(p) (p)->Release()
  1446. #define IDirectDraw4_Compact(p) (p)->Compact()
  1447. #define IDirectDraw4_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  1448. #define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  1449. #define IDirectDraw4_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  1450. #define IDirectDraw4_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  1451. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1452. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  1453. #define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1454. #define IDirectDraw4_GetCaps(p, a, b) (p)->GetCaps(a, b)
  1455. #define IDirectDraw4_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  1456. #define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  1457. #define IDirectDraw4_GetGDISurface(p, a) (p)->GetGDISurface(a)
  1458. #define IDirectDraw4_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  1459. #define IDirectDraw4_GetScanLine(p, a) (p)->GetScanLine(a)
  1460. #define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  1461. #define IDirectDraw4_Initialize(p, a) (p)->Initialize(a)
  1462. #define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1463. #define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  1464. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1465. #define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  1466. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
  1467. #define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b)
  1468. #define IDirectDraw4_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
  1469. #define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
  1470. #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
  1471. #endif
  1472. #endif
  1473. #if defined( _WIN32 ) && !defined( _NO_COM )
  1474. #undef INTERFACE
  1475. #define INTERFACE IDirectDraw7
  1476. DECLARE_INTERFACE_( IDirectDraw7, IUnknown )
  1477. {
  1478. /*** IUnknown methods ***/
  1479. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1480. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1481. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1482. /*** IDirectDraw methods ***/
  1483. STDMETHOD(Compact)(THIS) PURE;
  1484. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1485. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1486. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE7 FAR *, IUnknown FAR *) PURE;
  1487. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE7, LPDIRECTDRAWSURFACE7 FAR * ) PURE;
  1488. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
  1489. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK7 ) PURE;
  1490. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1491. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1492. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
  1493. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  1494. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 FAR *) PURE;
  1495. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1496. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1497. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1498. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1499. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1500. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1501. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1502. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1503. /*** Added in the v2 interface ***/
  1504. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
  1505. /*** Added in the V4 Interface ***/
  1506. STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE7 *) PURE;
  1507. STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1508. STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1509. STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2, DWORD ) PURE;
  1510. STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE;
  1511. STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE;
  1512. //@@BEGIN_MSINTERNAL
  1513. #ifdef POSTPONED
  1514. STDMETHOD(CreateSurfaceFromStream) (THIS_ IStream *, LPDDSURFACEDESC2, DWORD, LPDIRECTDRAWSURFACE7 *, IUnknown *) PURE;
  1515. STDMETHOD(CreateSurfaceFromFile) (THIS_ BSTR , LPDDSURFACEDESC2, DWORD, LPDIRECTDRAWSURFACE7 *, IUnknown *) PURE;
  1516. #endif
  1517. //@@END_MSINTERNAL
  1518. };
  1519. #if !defined(__cplusplus) || defined(CINTERFACE)
  1520. #define IDirectDraw7_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1521. #define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1522. #define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p)
  1523. #define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p)
  1524. #define IDirectDraw7_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  1525. #define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1526. #define IDirectDraw7_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  1527. #define IDirectDraw7_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  1528. #define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1529. #define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1530. #define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1531. #define IDirectDraw7_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  1532. #define IDirectDraw7_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  1533. #define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1534. #define IDirectDraw7_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  1535. #define IDirectDraw7_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  1536. #define IDirectDraw7_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  1537. #define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1538. #define IDirectDraw7_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  1539. #define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1540. #define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1541. #define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1542. #define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1543. #define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1544. #define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
  1545. #define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
  1546. #define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
  1547. #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1548. #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c)
  1549. #define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b)
  1550. //@@BEGIN_MSINTERNAL
  1551. #define IDirectDraw7_CreateSurfaceFromStream(p, a, b, c, d, e) (p)->lpVtbl->CreateSurfaceFromStream(p, a, b, c, d, e)
  1552. #define IDirectDraw7_CreateSurfaceFromFile(p, a, b, c, d, e) (p)->lpVtbl->CreateSurfaceFromFile(p, a, b, c, d, e)
  1553. //@@END_MSINTERNAL
  1554. #else
  1555. #define IDirectDraw7_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1556. #define IDirectDraw7_AddRef(p) (p)->AddRef()
  1557. #define IDirectDraw7_Release(p) (p)->Release()
  1558. #define IDirectDraw7_Compact(p) (p)->Compact()
  1559. #define IDirectDraw7_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
  1560. #define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
  1561. #define IDirectDraw7_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
  1562. #define IDirectDraw7_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
  1563. #define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1564. #define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
  1565. #define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1566. #define IDirectDraw7_GetCaps(p, a, b) (p)->GetCaps(a, b)
  1567. #define IDirectDraw7_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
  1568. #define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
  1569. #define IDirectDraw7_GetGDISurface(p, a) (p)->GetGDISurface(a)
  1570. #define IDirectDraw7_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
  1571. #define IDirectDraw7_GetScanLine(p, a) (p)->GetScanLine(a)
  1572. #define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
  1573. #define IDirectDraw7_Initialize(p, a) (p)->Initialize(a)
  1574. #define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1575. #define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
  1576. #define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1577. #define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
  1578. #define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
  1579. #define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b)
  1580. #define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
  1581. #define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
  1582. #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
  1583. #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(a,b,c)
  1584. #define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(a,b)
  1585. //@@BEGIN_MSINTERNAL
  1586. #define IDirectDraw7_CreateSurfaceFromStream(p, a, b, c, d, e) (p)->CreateSurfaceFromStream(a, b, c, d, e)
  1587. #define IDirectDraw7_CreateSurfaceFromFile(p, a, b, c, d, e) (p)->CreateSurfaceFromFile(a, b, c, d, e)
  1588. //@@END_MSINTERNAL
  1589. #endif
  1590. #endif
  1591. //@@BEGIN_MSINTERNAL
  1592. /*
  1593. * IDirectDrawFactory2
  1594. */
  1595. #if defined( _WIN32 ) && !defined( _NO_COM )
  1596. #undef INTERFACE
  1597. #define INTERFACE IDirectDrawFactory2
  1598. DECLARE_INTERFACE_( IDirectDrawFactory2, IUnknown )
  1599. {
  1600. /*** IUnknown methods ***/
  1601. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1602. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1603. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1604. /*** IDirectDrawFactory2 methods ***/
  1605. STDMETHOD(CreateDirectDraw) (THIS_ GUID * pGUID, HWND hWnd, DWORD dwCoopLevelFlags, DWORD dwReserved, IUnknown *pUnkOuter, struct IDirectDraw4 **ppDirectDraw) PURE;
  1606. #ifdef SM_CMONITORS
  1607. STDMETHOD(DirectDrawEnumerate) (THIS_ LPDDENUMCALLBACKEX , LPVOID , DWORD ) PURE;
  1608. #else
  1609. STDMETHOD(DirectDrawEnumerate) (THIS_ LPDDENUMCALLBACK , LPVOID , DWORD ) PURE;
  1610. #endif
  1611. };
  1612. #if !defined(__cplusplus) || defined(CINTERFACE)
  1613. #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1614. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  1615. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  1616. #define IDirectDraw_CreateDirectDraw(p, a, b, c, d, e, f) (p)->lpVtbl->CreateDirectDraw(p, a, b, c, d, e, f)
  1617. #define IDirectDraw_DirectDrawEnumerate(p, a, b, c) (p)->lpVtbl->DirectDrawEnumerate(p, a, b, c)
  1618. #else
  1619. #define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1620. #define IDirectDraw_AddRef(p) (p)->AddRef()
  1621. #define IDirectDraw_Release(p) (p)->Release()
  1622. #define IDirectDraw_CreateDirectDraw(p, a, b, c, d, e, f) (p)->CreateDirectDraw(a, b, c, d, e, f)
  1623. #define IDirectDraw_DirectDrawEnumerate(p, a, b, c) (p)->DirectDrawEnumerate(a, b, c)
  1624. #endif
  1625. #endif
  1626. //@@END_MSINTERNAL
  1627. /*
  1628. * IDirectDrawPalette
  1629. */
  1630. #if defined( _WIN32 ) && !defined( _NO_COM )
  1631. #undef INTERFACE
  1632. #define INTERFACE IDirectDrawPalette
  1633. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  1634. {
  1635. /*** IUnknown methods ***/
  1636. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1637. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1638. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1639. /*** IDirectDrawPalette methods ***/
  1640. STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  1641. STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1642. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  1643. STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1644. };
  1645. #if !defined(__cplusplus) || defined(CINTERFACE)
  1646. #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1647. #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
  1648. #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
  1649. #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  1650. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
  1651. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  1652. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
  1653. #else
  1654. #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1655. #define IDirectDrawPalette_AddRef(p) (p)->AddRef()
  1656. #define IDirectDrawPalette_Release(p) (p)->Release()
  1657. #define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a)
  1658. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d)
  1659. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
  1660. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d)
  1661. #endif
  1662. #endif
  1663. //@@BEGIN_MSINTERNAL
  1664. /*
  1665. * IDirectDrawPalette2
  1666. */
  1667. #if defined( _WIN32 ) && !defined( _NO_COM )
  1668. #undef INTERFACE
  1669. #define INTERFACE IDirectDrawPalette2
  1670. DECLARE_INTERFACE_( IDirectDrawPalette2, IUnknown )
  1671. {
  1672. /*** IUnknown methods ***/
  1673. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1674. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1675. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1676. /*** IDirectDrawPalette methods ***/
  1677. STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  1678. STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1679. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  1680. STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1681. /*** IDirectDrawPalette2 methods ***/
  1682. STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  1683. STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  1684. STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  1685. STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  1686. STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  1687. STDMETHOD(IsEqual)(THIS_ LPDIRECTDRAWPALETTE2) PURE;
  1688. };
  1689. #if !defined(__cplusplus) || defined(CINTERFACE)
  1690. #define IDirectDrawPalette2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1691. #define IDirectDrawPalette2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1692. #define IDirectDrawPalette2_Release(p) (p)->lpVtbl->Release(p)
  1693. #define IDirectDrawPalette2_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  1694. #define IDirectDrawPalette2_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
  1695. #define IDirectDrawPalette2_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  1696. #define IDirectDrawPalette2_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
  1697. #define IDirectDrawPalette2_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p, a, b, c, d)
  1698. #define IDirectDrawPalette2_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p, a, b, c)
  1699. #define IDirectDrawPalette2_FreePrivateData(p, a) (p)->lpVtbl->FreePrivateData(p, a)
  1700. #define IDirectDrawPalette2_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
  1701. #define IDirectDrawPalette2_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
  1702. #define IDirectDrawPalette2_IsEqual(p, a) (p)->lpVtbl->IsEqual(p, a)
  1703. #else
  1704. #define IDirectDrawPalette2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1705. #define IDirectDrawPalette2_AddRef(p) (p)->AddRef()
  1706. #define IDirectDrawPalette2_Release(p) (p)->Release()
  1707. #define IDirectDrawPalette2_GetCaps(p, a) (p)->GetCaps(a)
  1708. #define IDirectDrawPalette2_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d)
  1709. #define IDirectDrawPalette2_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
  1710. #define IDirectDrawPalette2_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d)
  1711. #define IDirectDrawPalette2_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a, b, c, d)
  1712. #define IDirectDrawPalette2_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a, b, c)
  1713. #define IDirectDrawPalette2_FreePrivateData(p, a) (p)->FreePrivateData(a)
  1714. #define IDirectDrawPalette2_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
  1715. #define IDirectDrawPalette2_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
  1716. #define IDirectDrawPalette2_IsEqual(p, a) (p)->IsEqual(a)
  1717. #endif
  1718. #endif
  1719. //@@END_MSINTERNAL
  1720. /*
  1721. * IDirectDrawClipper
  1722. */
  1723. #if defined( _WIN32 ) && !defined( _NO_COM )
  1724. #undef INTERFACE
  1725. #define INTERFACE IDirectDrawClipper
  1726. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  1727. {
  1728. /*** IUnknown methods ***/
  1729. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1730. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1731. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1732. /*** IDirectDrawClipper methods ***/
  1733. STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  1734. STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  1735. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  1736. STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  1737. STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  1738. STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  1739. };
  1740. #if !defined(__cplusplus) || defined(CINTERFACE)
  1741. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  1742. #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
  1743. #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
  1744. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
  1745. #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
  1746. #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  1747. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
  1748. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
  1749. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
  1750. #else
  1751. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  1752. #define IDirectDrawClipper_AddRef(p) (p)->AddRef()
  1753. #define IDirectDrawClipper_Release(p) (p)->Release()
  1754. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c)
  1755. #define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a)
  1756. #define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b)
  1757. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a)
  1758. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b)
  1759. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b)
  1760. #endif
  1761. #endif
  1762. /*
  1763. * IDirectDrawSurface and related interfaces
  1764. */
  1765. #if defined( _WIN32 ) && !defined( _NO_COM )
  1766. #undef INTERFACE
  1767. #define INTERFACE IDirectDrawSurface
  1768. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  1769. {
  1770. /*** IUnknown methods ***/
  1771. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1772. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1773. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1774. /*** IDirectDrawSurface methods ***/
  1775. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1776. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1777. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  1778. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1779. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  1780. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  1781. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1782. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1783. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  1784. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  1785. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1786. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1787. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1788. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1789. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1790. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1791. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1792. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1793. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1794. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1795. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1796. STDMETHOD(IsLost)(THIS) PURE;
  1797. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1798. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1799. STDMETHOD(Restore)(THIS) PURE;
  1800. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1801. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1802. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1803. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1804. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1805. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1806. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1807. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  1808. };
  1809. #if !defined(__cplusplus) || defined(CINTERFACE)
  1810. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1811. #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  1812. #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
  1813. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1814. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1815. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1816. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1817. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1818. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1819. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1820. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1821. #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1822. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1823. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1824. #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  1825. #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1826. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1827. #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1828. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1829. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1830. #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1831. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1832. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1833. #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1834. #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
  1835. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1836. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1837. #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
  1838. #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1839. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1840. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1841. #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1842. #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  1843. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1844. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1845. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1846. #else
  1847. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1848. #define IDirectDrawSurface_AddRef(p) (p)->AddRef()
  1849. #define IDirectDrawSurface_Release(p) (p)->Release()
  1850. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1851. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1852. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1853. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1854. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1855. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1856. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1857. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1858. #define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
  1859. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1860. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1861. #define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b)
  1862. #define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
  1863. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1864. #define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
  1865. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1866. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1867. #define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
  1868. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1869. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1870. #define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
  1871. #define IDirectDrawSurface_IsLost(p) (p)->IsLost()
  1872. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  1873. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
  1874. #define IDirectDrawSurface_Restore(p) (p)->Restore()
  1875. #define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
  1876. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  1877. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  1878. #define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
  1879. #define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b)
  1880. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  1881. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  1882. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  1883. #endif
  1884. /*
  1885. * IDirectDrawSurface2 and related interfaces
  1886. */
  1887. #undef INTERFACE
  1888. #define INTERFACE IDirectDrawSurface2
  1889. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  1890. {
  1891. /*** IUnknown methods ***/
  1892. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1893. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1894. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1895. /*** IDirectDrawSurface methods ***/
  1896. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  1897. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1898. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  1899. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1900. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  1901. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  1902. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1903. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1904. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  1905. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  1906. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1907. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1908. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1909. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1910. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1911. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1912. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1913. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1914. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1915. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1916. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1917. STDMETHOD(IsLost)(THIS) PURE;
  1918. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1919. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1920. STDMETHOD(Restore)(THIS) PURE;
  1921. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1922. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1923. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1924. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1925. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1926. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1927. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1928. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  1929. /*** Added in the v2 interface ***/
  1930. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1931. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1932. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1933. };
  1934. #if !defined(__cplusplus) || defined(CINTERFACE)
  1935. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1936. #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1937. #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
  1938. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1939. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1940. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1941. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1942. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1943. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1944. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1945. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1946. #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1947. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1948. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1949. #define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  1950. #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1951. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1952. #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1953. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1954. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1955. #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1956. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1957. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1958. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1959. #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
  1960. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1961. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1962. #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
  1963. #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1964. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1965. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1966. #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1967. #define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  1968. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1969. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1970. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1971. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  1972. #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  1973. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  1974. #else
  1975. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1976. #define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
  1977. #define IDirectDrawSurface2_Release(p) (p)->Release()
  1978. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1979. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1980. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1981. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1982. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1983. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1984. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1985. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1986. #define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
  1987. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1988. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1989. #define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b)
  1990. #define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
  1991. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1992. #define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
  1993. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1994. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1995. #define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
  1996. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1997. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1998. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
  1999. #define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
  2000. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2001. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2002. #define IDirectDrawSurface2_Restore(p) (p)->Restore()
  2003. #define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
  2004. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2005. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2006. #define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
  2007. #define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b)
  2008. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2009. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2010. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2011. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2012. #define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
  2013. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
  2014. #endif
  2015. /*
  2016. * IDirectDrawSurface3 and related interfaces
  2017. */
  2018. #undef INTERFACE
  2019. #define INTERFACE IDirectDrawSurface3
  2020. DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
  2021. {
  2022. /*** IUnknown methods ***/
  2023. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2024. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2025. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2026. /*** IDirectDrawSurface methods ***/
  2027. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
  2028. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  2029. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
  2030. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  2031. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
  2032. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
  2033. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  2034. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  2035. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
  2036. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
  2037. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  2038. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  2039. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  2040. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  2041. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  2042. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  2043. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  2044. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  2045. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  2046. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  2047. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  2048. STDMETHOD(IsLost)(THIS) PURE;
  2049. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  2050. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  2051. STDMETHOD(Restore)(THIS) PURE;
  2052. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  2053. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  2054. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  2055. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  2056. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  2057. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  2058. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  2059. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
  2060. /*** Added in the v2 interface ***/
  2061. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  2062. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  2063. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  2064. /*** Added in the V3 interface ***/
  2065. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
  2066. };
  2067. #if !defined(__cplusplus) || defined(CINTERFACE)
  2068. #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2069. #define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
  2070. #define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
  2071. #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  2072. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  2073. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  2074. #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  2075. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  2076. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  2077. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  2078. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  2079. #define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  2080. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  2081. #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  2082. #define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  2083. #define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  2084. #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  2085. #define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  2086. #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  2087. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  2088. #define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  2089. #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  2090. #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  2091. #define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2092. #define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
  2093. #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  2094. #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  2095. #define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
  2096. #define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  2097. #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  2098. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  2099. #define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  2100. #define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  2101. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  2102. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  2103. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  2104. #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  2105. #define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  2106. #define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  2107. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  2108. #else
  2109. #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2110. #define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
  2111. #define IDirectDrawSurface3_Release(p) (p)->Release()
  2112. #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  2113. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  2114. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  2115. #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  2116. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  2117. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  2118. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  2119. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  2120. #define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
  2121. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  2122. #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
  2123. #define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b)
  2124. #define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
  2125. #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  2126. #define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
  2127. #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  2128. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  2129. #define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
  2130. #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  2131. #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  2132. #define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
  2133. #define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
  2134. #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2135. #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2136. #define IDirectDrawSurface3_Restore(p) (p)->Restore()
  2137. #define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
  2138. #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2139. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2140. #define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
  2141. #define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b)
  2142. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2143. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2144. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2145. #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2146. #define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
  2147. #define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
  2148. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  2149. #endif
  2150. /*
  2151. * IDirectDrawSurface4 and related interfaces
  2152. */
  2153. #undef INTERFACE
  2154. #define INTERFACE IDirectDrawSurface4
  2155. DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown )
  2156. {
  2157. /*** IUnknown methods ***/
  2158. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2159. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2160. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2161. /*** IDirectDrawSurface methods ***/
  2162. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  2163. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  2164. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE4, LPRECT,DWORD, LPDDBLTFX) PURE;
  2165. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  2166. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE4, LPRECT,DWORD) PURE;
  2167. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE;
  2168. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  2169. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  2170. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE;
  2171. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE;
  2172. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  2173. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
  2174. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  2175. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  2176. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  2177. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  2178. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  2179. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  2180. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  2181. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
  2182. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
  2183. STDMETHOD(IsLost)(THIS) PURE;
  2184. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
  2185. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  2186. STDMETHOD(Restore)(THIS) PURE;
  2187. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  2188. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  2189. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  2190. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  2191. STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
  2192. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  2193. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  2194. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE;
  2195. /*** Added in the v2 interface ***/
  2196. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  2197. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  2198. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  2199. /*** Added in the v3 interface ***/
  2200. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
  2201. /*** Added in the v4 interface ***/
  2202. STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  2203. STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  2204. STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  2205. STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  2206. STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  2207. };
  2208. #if !defined(__cplusplus) || defined(CINTERFACE)
  2209. #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2210. #define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
  2211. #define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
  2212. #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  2213. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  2214. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  2215. #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  2216. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  2217. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  2218. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  2219. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  2220. #define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  2221. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  2222. #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  2223. #define IDirectDrawSurface4_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  2224. #define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  2225. #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  2226. #define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  2227. #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  2228. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  2229. #define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  2230. #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  2231. #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  2232. #define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2233. #define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
  2234. #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  2235. #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  2236. #define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
  2237. #define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  2238. #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  2239. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  2240. #define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  2241. #define IDirectDrawSurface4_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  2242. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  2243. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  2244. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  2245. #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  2246. #define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  2247. #define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  2248. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  2249. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  2250. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
  2251. #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
  2252. #define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
  2253. #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
  2254. #else
  2255. #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2256. #define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
  2257. #define IDirectDrawSurface4_Release(p) (p)->Release()
  2258. #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  2259. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  2260. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  2261. #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  2262. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  2263. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  2264. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  2265. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  2266. #define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
  2267. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  2268. #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
  2269. #define IDirectDrawSurface4_GetCaps(p,b) (p)->GetCaps(b)
  2270. #define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
  2271. #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  2272. #define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
  2273. #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  2274. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  2275. #define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
  2276. #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  2277. #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  2278. #define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
  2279. #define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
  2280. #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2281. #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2282. #define IDirectDrawSurface4_Restore(p) (p)->Restore()
  2283. #define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
  2284. #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2285. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2286. #define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
  2287. #define IDirectDrawSurface4_Unlock(p,b) (p)->Unlock(b)
  2288. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2289. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2290. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2291. #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2292. #define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
  2293. #define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
  2294. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  2295. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
  2296. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
  2297. #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
  2298. #define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
  2299. #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
  2300. #endif
  2301. /*
  2302. * IDirectDrawSurface7 and related interfaces
  2303. */
  2304. #undef INTERFACE
  2305. #define INTERFACE IDirectDrawSurface7
  2306. DECLARE_INTERFACE_( IDirectDrawSurface7, IUnknown )
  2307. {
  2308. /*** IUnknown methods ***/
  2309. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2310. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2311. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2312. /*** IDirectDrawSurface methods ***/
  2313. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7) PURE;
  2314. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  2315. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE7, LPRECT,DWORD, LPDDBLTFX) PURE;
  2316. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  2317. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE7, LPRECT,DWORD) PURE;
  2318. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE;
  2319. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
  2320. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
  2321. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7, DWORD) PURE;
  2322. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE7 FAR *) PURE;
  2323. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  2324. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
  2325. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  2326. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  2327. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  2328. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  2329. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  2330. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  2331. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  2332. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
  2333. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
  2334. STDMETHOD(IsLost)(THIS) PURE;
  2335. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
  2336. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  2337. STDMETHOD(Restore)(THIS) PURE;
  2338. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  2339. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  2340. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  2341. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  2342. STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
  2343. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE7,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  2344. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  2345. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE7) PURE;
  2346. /*** Added in the v2 interface ***/
  2347. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  2348. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  2349. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  2350. /*** Added in the v3 interface ***/
  2351. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
  2352. /*** Added in the v4 interface ***/
  2353. STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  2354. STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  2355. STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  2356. STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  2357. STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  2358. //@@BEGIN_MSINTERNAL
  2359. #ifdef POSTPONED2
  2360. STDMETHOD(AlphaBlt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE7,LPRECT,DWORD,LPDDALPHABLTFX) PURE;
  2361. STDMETHOD(SetSpriteDisplayList)(THIS_ LPDDSPRITE *,DWORD,DWORD,LPDIRECTDRAWSURFACE7,DWORD) PURE;
  2362. STDMETHOD(Resize)(THIS_ DWORD,DWORD,DWORD) PURE;
  2363. #endif //POSTPONED2
  2364. //@@END_MSINTERNAL
  2365. /*** Moved Texture7 methods here ***/
  2366. STDMETHOD(SetPriority)(THIS_ DWORD) PURE;
  2367. STDMETHOD(GetPriority)(THIS_ LPDWORD) PURE;
  2368. STDMETHOD(SetLOD)(THIS_ DWORD) PURE;
  2369. STDMETHOD(GetLOD)(THIS_ LPDWORD) PURE;
  2370. };
  2371. #if !defined(__cplusplus) || defined(CINTERFACE)
  2372. #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2373. #define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p)
  2374. #define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p)
  2375. #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  2376. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  2377. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  2378. #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  2379. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  2380. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  2381. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  2382. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  2383. #define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  2384. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  2385. #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  2386. #define IDirectDrawSurface7_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  2387. #define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  2388. #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  2389. #define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  2390. #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  2391. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  2392. #define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  2393. #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  2394. #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  2395. #define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2396. #define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p)
  2397. #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  2398. #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  2399. #define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p)
  2400. #define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  2401. #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  2402. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  2403. #define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  2404. #define IDirectDrawSurface7_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  2405. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  2406. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  2407. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  2408. #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  2409. #define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  2410. #define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  2411. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  2412. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  2413. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
  2414. #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
  2415. #define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
  2416. #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
  2417. //@@BEGIN_MSINTERNAL
  2418. #ifdef POSTPONED2
  2419. #define IDirectDrawSurface7_AlphaBlt(p,a,b,c,d,e) (p)->lpVtbl->AlphaBlt(p,a,b,c,d,e)
  2420. #define IDirectDrawSurface7_SetSpriteDisplayList(p,a,b,c,d,e) (p)->lpVtbl->SetSpriteDisplayList(p,a,b,c,d,e)
  2421. #define IDirectDrawSurface7_Resize(p,a,b,c) (p)->lpVtbl->Resize(p,a,b,c)
  2422. #endif //POSTPONED2
  2423. //@@END_MSINTERNAL
  2424. #define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
  2425. #define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
  2426. #define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
  2427. #define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a)
  2428. #else
  2429. #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2430. #define IDirectDrawSurface7_AddRef(p) (p)->AddRef()
  2431. #define IDirectDrawSurface7_Release(p) (p)->Release()
  2432. #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  2433. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  2434. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  2435. #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  2436. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  2437. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  2438. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  2439. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  2440. #define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b)
  2441. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  2442. #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a)
  2443. #define IDirectDrawSurface7_GetCaps(p,b) (p)->GetCaps(b)
  2444. #define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a)
  2445. #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  2446. #define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a)
  2447. #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  2448. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  2449. #define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a)
  2450. #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  2451. #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  2452. #define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b)
  2453. #define IDirectDrawSurface7_IsLost(p) (p)->IsLost()
  2454. #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2455. #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2456. #define IDirectDrawSurface7_Restore(p) (p)->Restore()
  2457. #define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a)
  2458. #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2459. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2460. #define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a)
  2461. #define IDirectDrawSurface7_Unlock(p,b) (p)->Unlock(b)
  2462. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2463. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2464. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2465. #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2466. #define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a)
  2467. #define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a)
  2468. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  2469. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
  2470. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
  2471. #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a)
  2472. #define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
  2473. #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
  2474. //@@BEGIN_MSINTERNAL
  2475. #ifdef POSTPONED2
  2476. #define IDirectDrawSurface7_AlphaBlt(p,a,b,c,d,e) (p)->AlphaBlt(a,b,c,d,e)
  2477. #define IDirectDrawSurface7_SetSpriteDisplayList(p,a,b,c,d,e) (p)->SetSpriteDisplayList(a,b,c,d,e)
  2478. #define IDirectDrawSurface7_Resize(p,a,b,c) (p)->Resize(a,b,c)
  2479. #endif //POSTPONED2
  2480. //@@END_MSINTERNAL
  2481. #define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a)
  2482. #define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a)
  2483. #define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a)
  2484. #define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a)
  2485. #endif
  2486. //@@BEGIN_MSINTERNAL
  2487. /*
  2488. * IDirectDrawOptSurface
  2489. */
  2490. #if defined( _WIN32 ) && !defined( _NO_COM )
  2491. #undef INTERFACE
  2492. #define INTERFACE IDirectDrawOptSurface
  2493. DECLARE_INTERFACE_( IDirectDrawOptSurface, IUnknown )
  2494. {
  2495. /*** IUnknown methods ***/
  2496. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2497. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2498. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2499. /*** IDirectDrawOptSurface methods ***/
  2500. STDMETHOD(GetOptSurfaceDesc)(THIS_ LPDDOPTSURFACEDESC) PURE;
  2501. STDMETHOD(LoadUnoptimizedSurf)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  2502. STDMETHOD(CopyOptimizedSurf)(THIS_ LPDIRECTDRAWOPTSURFACE) PURE;
  2503. STDMETHOD(Unoptimize)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4, IUnknown FAR *) PURE;
  2504. };
  2505. #if !defined(__cplusplus) || defined(CINTERFACE)
  2506. #define IDirectDrawOptSurface_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  2507. #define IDirectDrawOptSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  2508. #define IDirectDrawOptSurface_Release(p) (p)->lpVtbl->Release(p)
  2509. #define IDirectDrawOptSurface_GetOptSurfaceDesc(p,a) (p)->lpVtbl->GetOptSurfaceDesc(p,a)
  2510. #define IDirectDrawOptSurface_LoadUnoptimizedSurf(p,a) (p)->lpVtbl->LoadUnoptimizedSurf(p,a)
  2511. #define IDirectDrawOptSurface_CopyOptimizedSurf(p,a) (p)->lpVtbl->CopyOptimizedSurf(p,a)
  2512. #define IDirectDrawOptSurface_Unoptimize(p,a,b) (p)->lpVtbl->Unoptimize(p,a,b)
  2513. #else //!defined(__cplusplus) || defined(CINTERFACE)
  2514. #define IDirectDrawOptSurface_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  2515. #define IDirectDrawOptSurface_AddRef(p) (p)->AddRef()
  2516. #define IDirectDrawOptSurface_Release(p) (p)->Release()
  2517. #define IDirectDrawOptSurface_GetOptSurfaceDesc(p,a) (p)->GetOptSurfaceDesc(a)
  2518. #define IDirectDrawOptSurface_LoadUnoptimizedSurf(p,a) (p)->LoadUnoptimizedSurf(a)
  2519. #define IDirectDrawOptSurface_CopyOptimizedSurf(p,a) (p)->CopyOptimizedSurf(p,a)
  2520. #define IDirectDrawOptSurface_Unoptimize(p,a,b) (p)->Unoptimize(a,b)
  2521. #endif //!defined(__cplusplus) || defined(CINTERFACE)
  2522. #endif //defined( _WIN32 ) && !defined( _NO_COM )
  2523. //@@END_MSINTERNAL
  2524. /*
  2525. * IDirectDrawColorControl
  2526. */
  2527. #if defined( _WIN32 ) && !defined( _NO_COM )
  2528. #undef INTERFACE
  2529. #define INTERFACE IDirectDrawColorControl
  2530. DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
  2531. {
  2532. /*** IUnknown methods ***/
  2533. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2534. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2535. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2536. /*** IDirectDrawColorControl methods ***/
  2537. STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  2538. STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  2539. };
  2540. #if !defined(__cplusplus) || defined(CINTERFACE)
  2541. #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  2542. #define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
  2543. #define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
  2544. #define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a)
  2545. #define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a)
  2546. #else
  2547. #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  2548. #define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
  2549. #define IDirectDrawColorControl_Release(p) (p)->Release()
  2550. #define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a)
  2551. #define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a)
  2552. #endif
  2553. #endif
  2554. /*
  2555. * IDirectDrawGammaControl
  2556. */
  2557. #if defined( _WIN32 ) && !defined( _NO_COM )
  2558. #undef INTERFACE
  2559. #define INTERFACE IDirectDrawGammaControl
  2560. DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown )
  2561. {
  2562. /*** IUnknown methods ***/
  2563. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2564. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2565. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2566. /*** IDirectDrawGammaControl methods ***/
  2567. STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  2568. STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  2569. };
  2570. #if !defined(__cplusplus) || defined(CINTERFACE)
  2571. #define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  2572. #define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
  2573. #define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
  2574. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->lpVtbl->GetGammaRamp(p, a, b)
  2575. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->lpVtbl->SetGammaRamp(p, a, b)
  2576. #else
  2577. #define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  2578. #define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
  2579. #define IDirectDrawGammaControl_Release(p) (p)->Release()
  2580. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->GetGammaRamp(a, b)
  2581. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->SetGammaRamp(a, b)
  2582. #endif
  2583. #endif
  2584. //@@BEGIN_MSINTERNAL
  2585. #ifdef COMPOSITION
  2586. #undef INTERFACE
  2587. #define INTERFACE IDirectDrawSurfaceComposition
  2588. DECLARE_INTERFACE_( IDirectDrawSurfaceComposition, IUnknown )
  2589. {
  2590. /*** IUnknown methods ***/
  2591. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2592. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2593. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2594. /*** IDirectDrawSurfaceComposition methods ***/
  2595. STDMETHOD(AddSurfaceDependency)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  2596. STDMETHOD(Compose)(THIS_ LPRECT,LPDIRECTDRAWSURFACE,LPRECT,DWORD,LPDDCOMPOSEFX) PURE;
  2597. STDMETHOD(DeleteSurfaceDependency)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  2598. STDMETHOD(DestLock)(THIS) PURE;
  2599. STDMETHOD(DestUnlock)(THIS) PURE;
  2600. STDMETHOD(EnumSurfaceDependencies)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  2601. STDMETHOD(GetCompositionOrder)(THIS_ LPDWORD) PURE;
  2602. STDMETHOD(SetCompositionOrder)(THIS_ DWORD) PURE;
  2603. };
  2604. #endif
  2605. #ifdef STREAMING
  2606. #undef INTERFACE
  2607. #define INTERFACE IDirectDrawSurfaceStreaming
  2608. DECLARE_INTERFACE_( IDirectDrawSurfaceStreaming, IUnknown )
  2609. {
  2610. /*** IUnknown methods ***/
  2611. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2612. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2613. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2614. /*** IDirectDrawSurfaceStreaming methods ***/
  2615. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  2616. STDMETHOD(SetNotificationCallback)(THIS_ DWORD,LPSURFACESTREAMINGCALLBACK) PURE;
  2617. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  2618. };
  2619. #endif
  2620. //@@END_MSINTERNAL
  2621. #endif
  2622. //@@BEGIN_MSINTERNAL
  2623. #ifdef CLIPPER_NOTIFY
  2624. /*
  2625. * DIRECTDRAWCLIPPER FLAGS
  2626. */
  2627. #define DDCLIPPER_WATCHWINDOW 0x00000001l
  2628. #endif
  2629. //@@END_MSINTERNAL
  2630. /*
  2631. * DDSURFACEDESC
  2632. */
  2633. typedef struct _DDSURFACEDESC
  2634. {
  2635. DWORD dwSize; // size of the DDSURFACEDESC structure
  2636. DWORD dwFlags; // determines what fields are valid
  2637. DWORD dwHeight; // height of surface to be created
  2638. DWORD dwWidth; // width of input surface
  2639. union
  2640. {
  2641. LONG lPitch; // distance to start of next line (return value only)
  2642. DWORD dwLinearSize; // Formless late-allocated optimized surface size
  2643. } DUMMYUNIONNAMEN(1);
  2644. DWORD dwBackBufferCount; // number of back buffers requested
  2645. union
  2646. {
  2647. DWORD dwMipMapCount; // number of mip-map levels requested
  2648. DWORD dwZBufferBitDepth; // depth of Z buffer requested
  2649. DWORD dwRefreshRate; // refresh rate (used when display mode is described)
  2650. } DUMMYUNIONNAMEN(2);
  2651. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  2652. //@@BEGIN_MSINTERNAL
  2653. #ifdef COMPOSITION
  2654. DWORD dwCompositionOrder; // blt order for the surface, 0 is background
  2655. #else
  2656. //@@END_MSINTERNAL
  2657. DWORD dwReserved; // reserved
  2658. //@@BEGIN_MSINTERNAL
  2659. #endif
  2660. //@@END_MSINTERNAL
  2661. LPVOID lpSurface; // pointer to the associated surface memory
  2662. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  2663. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  2664. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  2665. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  2666. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  2667. DDSCAPS ddsCaps; // direct draw surface capabilities
  2668. } DDSURFACEDESC;
  2669. /*
  2670. * DDSURFACEDESC2
  2671. */
  2672. typedef struct _DDSURFACEDESC2
  2673. {
  2674. DWORD dwSize; // size of the DDSURFACEDESC structure
  2675. DWORD dwFlags; // determines what fields are valid
  2676. DWORD dwHeight; // height of surface to be created
  2677. DWORD dwWidth; // width of input surface
  2678. union
  2679. {
  2680. LONG lPitch; // distance to start of next line (return value only)
  2681. DWORD dwLinearSize; // Formless late-allocated optimized surface size
  2682. } DUMMYUNIONNAMEN(1);
  2683. union
  2684. {
  2685. DWORD dwBackBufferCount; // number of back buffers requested
  2686. DWORD dwDepth; // the depth if this is a volume texture
  2687. } DUMMYUNIONNAMEN(5);
  2688. union
  2689. {
  2690. DWORD dwMipMapCount; // number of mip-map levels requestde
  2691. // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
  2692. DWORD dwRefreshRate; // refresh rate (used when display mode is described)
  2693. DWORD dwSrcVBHandle; // The source used in VB::Optimize
  2694. } DUMMYUNIONNAMEN(2);
  2695. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  2696. //@@BEGIN_MSINTERNAL
  2697. #ifdef COMPOSITION
  2698. DWORD dwCompositionOrder; // blt order for the surface, 0 is background
  2699. #else
  2700. //@@END_MSINTERNAL
  2701. DWORD dwReserved; // reserved
  2702. //@@BEGIN_MSINTERNAL
  2703. #endif
  2704. //@@END_MSINTERNAL
  2705. LPVOID lpSurface; // pointer to the associated surface memory
  2706. union
  2707. {
  2708. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  2709. DWORD dwEmptyFaceColor; // Physical color for empty cubemap faces
  2710. } DUMMYUNIONNAMEN(3);
  2711. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  2712. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  2713. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  2714. union
  2715. {
  2716. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  2717. DWORD dwFVF; // vertex format description of vertex buffers
  2718. } DUMMYUNIONNAMEN(4);
  2719. DDSCAPS2 ddsCaps; // direct draw surface capabilities
  2720. DWORD dwTextureStage; // stage in multitexture cascade
  2721. } DDSURFACEDESC2;
  2722. /*
  2723. * ddsCaps field is valid.
  2724. */
  2725. #define DDSD_CAPS 0x00000001l // default
  2726. /*
  2727. * dwHeight field is valid.
  2728. */
  2729. #define DDSD_HEIGHT 0x00000002l
  2730. /*
  2731. * dwWidth field is valid.
  2732. */
  2733. #define DDSD_WIDTH 0x00000004l
  2734. /*
  2735. * lPitch is valid.
  2736. */
  2737. #define DDSD_PITCH 0x00000008l
  2738. /*
  2739. * dwBackBufferCount is valid.
  2740. */
  2741. #define DDSD_BACKBUFFERCOUNT 0x00000020l
  2742. /*
  2743. * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2)
  2744. */
  2745. #define DDSD_ZBUFFERBITDEPTH 0x00000040l
  2746. /*
  2747. * dwAlphaBitDepth is valid.
  2748. */
  2749. #define DDSD_ALPHABITDEPTH 0x00000080l
  2750. //@@BEGIN_MSINTERNAL
  2751. #ifdef COMPOSITION
  2752. /*
  2753. * dwCompositionOrder is valid.
  2754. */
  2755. #define DDSD_COMPOSITIONORDER 0x00000100l
  2756. #endif
  2757. //@@END_MSINTERNAL
  2758. /*
  2759. * lpSurface is valid.
  2760. */
  2761. #define DDSD_LPSURFACE 0x00000800l
  2762. /*
  2763. * ddpfPixelFormat is valid.
  2764. */
  2765. #define DDSD_PIXELFORMAT 0x00001000l
  2766. /*
  2767. * ddckCKDestOverlay is valid.
  2768. */
  2769. #define DDSD_CKDESTOVERLAY 0x00002000l
  2770. /*
  2771. * ddckCKDestBlt is valid.
  2772. */
  2773. #define DDSD_CKDESTBLT 0x00004000l
  2774. /*
  2775. * ddckCKSrcOverlay is valid.
  2776. */
  2777. #define DDSD_CKSRCOVERLAY 0x00008000l
  2778. /*
  2779. * ddckCKSrcBlt is valid.
  2780. */
  2781. #define DDSD_CKSRCBLT 0x00010000l
  2782. /*
  2783. * dwMipMapCount is valid.
  2784. */
  2785. #define DDSD_MIPMAPCOUNT 0x00020000l
  2786. /*
  2787. * dwRefreshRate is valid
  2788. */
  2789. #define DDSD_REFRESHRATE 0x00040000l
  2790. /*
  2791. * dwLinearSize is valid
  2792. */
  2793. #define DDSD_LINEARSIZE 0x00080000l
  2794. /*
  2795. * dwTextureStage is valid
  2796. */
  2797. #define DDSD_TEXTURESTAGE 0x00100000l
  2798. /*
  2799. * dwFVF is valid
  2800. */
  2801. #define DDSD_FVF 0x00200000l
  2802. /*
  2803. * dwSrcVBHandle is valid
  2804. */
  2805. #define DDSD_SRCVBHANDLE 0x00400000l
  2806. /*
  2807. * dwDepth is valid
  2808. */
  2809. #define DDSD_DEPTH 0x00800000l
  2810. /*
  2811. * All input fields are valid.
  2812. */
  2813. #define DDSD_ALL 0x00fff9eel
  2814. /*
  2815. * DDOPTSURFACEDESC
  2816. */
  2817. typedef struct _DDOPTSURFACEDESC
  2818. {
  2819. DWORD dwSize; // size of the DDOPTSURFACEDESC structure
  2820. DWORD dwFlags; // determines what fields are valid
  2821. DDSCAPS2 ddSCaps; // Common caps like: Memory type
  2822. DDOSCAPS ddOSCaps; // Common caps like: Memory type
  2823. GUID guid; // Compression technique GUID
  2824. DWORD dwCompressionRatio; // Compression ratio
  2825. } DDOPTSURFACEDESC;
  2826. /*
  2827. * guid field is valid.
  2828. */
  2829. #define DDOSD_GUID 0x00000001l
  2830. /*
  2831. * dwCompressionRatio field is valid.
  2832. */
  2833. #define DDOSD_COMPRESSION_RATIO 0x00000002l
  2834. /*
  2835. * ddSCaps field is valid.
  2836. */
  2837. #define DDOSD_SCAPS 0x00000004l
  2838. /*
  2839. * ddOSCaps field is valid.
  2840. */
  2841. #define DDOSD_OSCAPS 0x00000008l
  2842. /*
  2843. * All input fields are valid.
  2844. */
  2845. #define DDOSD_ALL 0x0000000fl
  2846. /*
  2847. * The surface's optimized pixelformat is compressed
  2848. */
  2849. #define DDOSDCAPS_OPTCOMPRESSED 0x00000001l
  2850. /*
  2851. * The surface's optimized pixelformat is reordered
  2852. */
  2853. #define DDOSDCAPS_OPTREORDERED 0x00000002l
  2854. /*
  2855. * The opt surface is a monolithic mipmap
  2856. */
  2857. #define DDOSDCAPS_MONOLITHICMIPMAP 0x00000004l
  2858. /*
  2859. * The valid Surf caps:
  2860. * #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  2861. * #define DDSCAPS_VIDEOMEMORY 0x00004000l
  2862. * #define DDSCAPS_LOCALVIDMEM 0x10000000l
  2863. * #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
  2864. */
  2865. #define DDOSDCAPS_VALIDSCAPS 0x30004800l
  2866. /*
  2867. * The valid OptSurf caps
  2868. */
  2869. #define DDOSDCAPS_VALIDOSCAPS 0x00000007l
  2870. /*
  2871. * DDCOLORCONTROL
  2872. */
  2873. typedef struct _DDCOLORCONTROL
  2874. {
  2875. DWORD dwSize;
  2876. DWORD dwFlags;
  2877. LONG lBrightness;
  2878. LONG lContrast;
  2879. LONG lHue;
  2880. LONG lSaturation;
  2881. LONG lSharpness;
  2882. LONG lGamma;
  2883. LONG lColorEnable;
  2884. DWORD dwReserved1;
  2885. } DDCOLORCONTROL;
  2886. /*
  2887. * lBrightness field is valid.
  2888. */
  2889. #define DDCOLOR_BRIGHTNESS 0x00000001l
  2890. /*
  2891. * lContrast field is valid.
  2892. */
  2893. #define DDCOLOR_CONTRAST 0x00000002l
  2894. /*
  2895. * lHue field is valid.
  2896. */
  2897. #define DDCOLOR_HUE 0x00000004l
  2898. /*
  2899. * lSaturation field is valid.
  2900. */
  2901. #define DDCOLOR_SATURATION 0x00000008l
  2902. /*
  2903. * lSharpness field is valid.
  2904. */
  2905. #define DDCOLOR_SHARPNESS 0x00000010l
  2906. /*
  2907. * lGamma field is valid.
  2908. */
  2909. #define DDCOLOR_GAMMA 0x00000020l
  2910. /*
  2911. * lColorEnable field is valid.
  2912. */
  2913. #define DDCOLOR_COLORENABLE 0x00000040l
  2914. //@@BEGIN_MSINTERNAL
  2915. /*
  2916. * DDMODEDESC
  2917. */
  2918. typedef struct _DDMODEDESC
  2919. {
  2920. DWORD dwSize; // size of structure
  2921. DWORD dwFlags; // enumeration flags
  2922. DWORD dwMonitorFrequency; // frequency of monitor in mode
  2923. DDSURFACEDESC ddsdSurfaceDesc; // surface being enumerated
  2924. } DDMODEDESC;
  2925. typedef DDMODEDESC FAR* LPDDMODEDESC;
  2926. //@@END_MSINTERNAL
  2927. /*============================================================================
  2928. *
  2929. * Direct Draw Capability Flags
  2930. *
  2931. * These flags are used to describe the capabilities of a given Surface.
  2932. * All flags are bit flags.
  2933. *
  2934. *==========================================================================*/
  2935. /****************************************************************************
  2936. *
  2937. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  2938. *
  2939. ****************************************************************************/
  2940. /*
  2941. * This bit is reserved. It should not be specified.
  2942. */
  2943. //@@BEGIN_MSINTERNAL
  2944. /*
  2945. * In a previous life this bit used to be DDSCAPS_3D. This is now very
  2946. * obsolete.
  2947. */
  2948. //@@END_MSINTERNAL
  2949. #define DDSCAPS_RESERVED1 0x00000001l
  2950. /*
  2951. * Indicates that this surface contains alpha-only information.
  2952. * (To determine if a surface is RGBA/YUVA, the pixel format must be
  2953. * interrogated.)
  2954. */
  2955. #define DDSCAPS_ALPHA 0x00000002l
  2956. /*
  2957. * Indicates that this surface is a backbuffer. It is generally
  2958. * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  2959. * It indicates that this surface is THE back buffer of a surface
  2960. * flipping structure. DirectDraw supports N surfaces in a
  2961. * surface flipping structure. Only the surface that immediately
  2962. * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  2963. * The other surfaces are identified as back buffers by the presence
  2964. * of the DDSCAPS_FLIP capability, their attachment order, and the
  2965. * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  2966. * capabilities. The bit is sent to CreateSurface when a standalone
  2967. * back buffer is being created. This surface could be attached to
  2968. * a front buffer and/or back buffers to form a flipping surface
  2969. * structure after the CreateSurface call. See AddAttachments for
  2970. * a detailed description of the behaviors in this case.
  2971. */
  2972. #define DDSCAPS_BACKBUFFER 0x00000004l
  2973. /*
  2974. * Indicates a complex surface structure is being described. A
  2975. * complex surface structure results in the creation of more than
  2976. * one surface. The additional surfaces are attached to the root
  2977. * surface. The complex structure can only be destroyed by
  2978. * destroying the root.
  2979. */
  2980. #define DDSCAPS_COMPLEX 0x00000008l
  2981. /*
  2982. * Indicates that this surface is a part of a surface flipping structure.
  2983. * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  2984. * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
  2985. * on the resulting creations. The dwBackBufferCount field in the
  2986. * DDSURFACEDESC structure must be set to at least 1 in order for
  2987. * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
  2988. * must always be set with creating multiple surfaces through CreateSurface.
  2989. */
  2990. #define DDSCAPS_FLIP 0x00000010l
  2991. /*
  2992. * Indicates that this surface is THE front buffer of a surface flipping
  2993. * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
  2994. * capability bit is set.
  2995. * If this capability is sent to CreateSurface then a standalonw front buffer
  2996. * is created. This surface will not have the DDSCAPS_FLIP capability.
  2997. * It can be attached to other back buffers to form a flipping structure.
  2998. * See AddAttachments for a detailed description of the behaviors in this
  2999. * case.
  3000. */
  3001. #define DDSCAPS_FRONTBUFFER 0x00000020l
  3002. /*
  3003. * Indicates that this surface is any offscreen surface that is not an overlay,
  3004. * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
  3005. * to identify plain vanilla surfaces.
  3006. */
  3007. #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
  3008. /*
  3009. * Indicates that this surface is an overlay. It may or may not be directly visible
  3010. * depending on whether or not it is currently being overlayed onto the primary
  3011. * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
  3012. * overlayed at the moment.
  3013. */
  3014. #define DDSCAPS_OVERLAY 0x00000080l
  3015. /*
  3016. * Indicates that unique DirectDrawPalette objects can be created and
  3017. * attached to this surface.
  3018. */
  3019. #define DDSCAPS_PALETTE 0x00000100l
  3020. /*
  3021. * Indicates that this surface is the primary surface. The primary
  3022. * surface represents what the user is seeing at the moment.
  3023. */
  3024. #define DDSCAPS_PRIMARYSURFACE 0x00000200l
  3025. //@@BEGIN_MSINTERNAL
  3026. /*
  3027. * Indicates that this surface is the primary surface for the left eye.
  3028. * The primary surface for the left eye represents what the user is seeing
  3029. * at the moment with the users left eye. When this surface is created the
  3030. * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  3031. * right eye.
  3032. */
  3033. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
  3034. //the zero-def'n is just to fix build issues... could be deleted when all dependencies are deleted (gdi kdexts may be only one)
  3035. //@@END_MSINTERNAL
  3036. /*
  3037. * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
  3038. * obsolete.
  3039. */
  3040. #define DDSCAPS_RESERVED3 0x00000400l
  3041. //@@BEGIN_MSINTERNAL
  3042. #if 0
  3043. //@@END_MSINTERNAL
  3044. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000000l
  3045. //@@BEGIN_MSINTERNAL
  3046. #endif
  3047. //@@END_MSINTERNAL
  3048. /*
  3049. * Indicates that this surface memory was allocated in system memory
  3050. */
  3051. #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  3052. /*
  3053. * Indicates that this surface can be used as a 3D texture. It does not
  3054. * indicate whether or not the surface is being used for that purpose.
  3055. */
  3056. #define DDSCAPS_TEXTURE 0x00001000l
  3057. /*
  3058. * Indicates that a surface may be a destination for 3D rendering. This
  3059. * bit must be set in order to query for a Direct3D Device Interface
  3060. * from this surface.
  3061. */
  3062. #define DDSCAPS_3DDEVICE 0x00002000l
  3063. /*
  3064. * Indicates that this surface exists in video memory.
  3065. */
  3066. #define DDSCAPS_VIDEOMEMORY 0x00004000l
  3067. /*
  3068. * Indicates that changes made to this surface are immediately visible.
  3069. * It is always set for the primary surface and is set for overlays while
  3070. * they are being overlayed and texture maps while they are being textured.
  3071. */
  3072. #define DDSCAPS_VISIBLE 0x00008000l
  3073. /*
  3074. * Indicates that only writes are permitted to the surface. Read accesses
  3075. * from the surface may or may not generate a protection fault, but the
  3076. * results of a read from this surface will not be meaningful. READ ONLY.
  3077. */
  3078. #define DDSCAPS_WRITEONLY 0x00010000l
  3079. /*
  3080. * Indicates that this surface is a z buffer. A z buffer does not contain
  3081. * displayable information. Instead it contains bit depth information that is
  3082. * used to determine which pixels are visible and which are obscured.
  3083. */
  3084. #define DDSCAPS_ZBUFFER 0x00020000l
  3085. /*
  3086. * Indicates surface will have a DC associated long term
  3087. */
  3088. #define DDSCAPS_OWNDC 0x00040000l
  3089. /*
  3090. * Indicates surface should be able to receive live video
  3091. */
  3092. #define DDSCAPS_LIVEVIDEO 0x00080000l
  3093. /*
  3094. * Indicates surface should be able to have a stream decompressed
  3095. * to it by the hardware.
  3096. */
  3097. #define DDSCAPS_HWCODEC 0x00100000l
  3098. /*
  3099. * Surface is a ModeX surface.
  3100. *
  3101. */
  3102. #define DDSCAPS_MODEX 0x00200000l
  3103. /*
  3104. * Indicates surface is one level of a mip-map. This surface will
  3105. * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  3106. * This can be done explicitly, by creating a number of surfaces and
  3107. * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  3108. * If this bit is set then DDSCAPS_TEXTURE must also be set.
  3109. */
  3110. #define DDSCAPS_MIPMAP 0x00400000l
  3111. /*
  3112. * This bit is reserved. It should not be specified.
  3113. */
  3114. //@@BEGIN_MSINTERNAL
  3115. /*
  3116. * This bit is reserved for execute buffer surfaces. These surface are not
  3117. * API visible and so this bit shows as reserved externally. However, driver
  3118. * writers do need this bit so the correct definition of DDSCAPS_EXECUTEBUFFER
  3119. * appears in ddraw.h.
  3120. *
  3121. * NOTE: Do not reassign this bit to a new surface capability. It is assigned
  3122. * to an in-use cap: DDSCAPS_EXECUTEBUFFER
  3123. */
  3124. //@@END_MSINTERNAL
  3125. #define DDSCAPS_RESERVED2 0x00800000l
  3126. //@@BEGIN_MSINTERNAL
  3127. #ifdef SHAREDZ
  3128. /*
  3129. * Indicates that this Z buffer surface can be shared with other DirectDraw
  3130. * applications. This does not necessarily mean that this surface is
  3131. * currently being shared with other processes but only that it can be. If
  3132. * this bit is set then DDSCAPS_ZBUFFER must also be set.
  3133. */
  3134. #define DDSCAPS_SHAREDZBUFFER 0x01000000l
  3135. /*
  3136. * Indicates that this backbuffer surface can be shared with other DirectDraw
  3137. * applications. This does not necessarily mean that this surface is
  3138. * currently being shared with other processes but only that it can be. If
  3139. * this bit is set than DDSCAPS_BACKBUFFER must also be set (it may also be
  3140. * set if a backbuffer is being created implicitly with as past of a complex
  3141. * flippable chain).
  3142. */
  3143. #define DDSCAPS_SHAREDBACKBUFFER 0x02000000l
  3144. #endif
  3145. //@@END_MSINTERNAL
  3146. /*
  3147. * Indicates that memory for the surface is not allocated until the surface
  3148. * is loaded (via the Direct3D texture Load() function).
  3149. */
  3150. #define DDSCAPS_ALLOCONLOAD 0x04000000l
  3151. /*
  3152. * Indicates that the surface will recieve data from a video port.
  3153. */
  3154. #define DDSCAPS_VIDEOPORT 0x08000000l
  3155. /*
  3156. * Indicates that a video memory surface is resident in true, local video
  3157. * memory rather than non-local video memory. If this flag is specified then
  3158. * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  3159. * DDSCAPS_NONLOCALVIDMEM.
  3160. */
  3161. #define DDSCAPS_LOCALVIDMEM 0x10000000l
  3162. /*
  3163. * Indicates that a video memory surface is resident in non-local video
  3164. * memory rather than true, local video memory. If this flag is specified
  3165. * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  3166. * DDSCAPS_LOCALVIDMEM.
  3167. */
  3168. #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
  3169. /*
  3170. * Indicates that this surface is a standard VGA mode surface, and not a
  3171. * ModeX surface. (This flag will never be set in combination with the
  3172. * DDSCAPS_MODEX flag).
  3173. */
  3174. #define DDSCAPS_STANDARDVGAMODE 0x40000000l
  3175. /*
  3176. * Indicates that this surface will be an optimized surface. This flag is
  3177. * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
  3178. * will be created without any underlying video memory until loaded.
  3179. */
  3180. #define DDSCAPS_OPTIMIZED 0x80000000l
  3181. //@@BEGIN_MSINTERNAL
  3182. #ifdef SHAREDZ
  3183. #define DDSCAPS_VALID 0xffffffffl
  3184. #else
  3185. #define DDSCAPS_VALID 0xfcffffffl
  3186. #endif
  3187. //@@END_MSINTERNAL
  3188. //@@BEGIN_MSINTERNAL
  3189. /*
  3190. * Indicates that this surface will not lose its contents when the physical
  3191. * surface memory is lost. Upon restoring surface memory, contents will be
  3192. * restored.
  3193. */
  3194. #define DDSCAPS2_PERSISTENTCONTENTS 0x00000001L
  3195. //@@END_MSINTERNAL
  3196. /*
  3197. * This bit is reserved
  3198. */
  3199. #define DDSCAPS2_RESERVED4 0x00000002L
  3200. #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000000L
  3201. /*
  3202. * Indicates to the driver that this surface will be locked very frequently
  3203. * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
  3204. * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  3205. * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
  3206. */
  3207. #define DDSCAPS2_HINTDYNAMIC 0x00000004L
  3208. /*
  3209. * Indicates to the driver that this surface can be re-ordered/retiled on
  3210. * load. This operation will not change the size of the texture. It is
  3211. * relatively fast and symmetrical, since the application may lock these
  3212. * bits (although it will take a performance hit when doing so). Surfaces
  3213. * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
  3214. * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
  3215. */
  3216. #define DDSCAPS2_HINTSTATIC 0x00000008L
  3217. /*
  3218. * Indicates that the client would like this texture surface to be managed by the
  3219. * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
  3220. * DDSCAPS_TEXTURE set.
  3221. */
  3222. #define DDSCAPS2_TEXTUREMANAGE 0x00000010L
  3223. /*
  3224. * These bits are reserved for internal use */
  3225. #define DDSCAPS2_RESERVED1 0x00000020L
  3226. #define DDSCAPS2_RESERVED2 0x00000040L
  3227. /*
  3228. * Indicates to the driver that this surface will never be locked again.
  3229. * The driver is free to optimize this surface via retiling and actual compression.
  3230. * All calls to Lock() or Blts from this surface will fail. Surfaces with this
  3231. * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  3232. * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
  3233. */
  3234. #define DDSCAPS2_OPAQUE 0x00000080L
  3235. /*
  3236. * Applications should set this bit at CreateSurface time to indicate that they
  3237. * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
  3238. */
  3239. #define DDSCAPS2_HINTANTIALIASING 0x00000100L
  3240. /*
  3241. * This flag is used at CreateSurface time to indicate that this set of
  3242. * surfaces is a cubic environment map
  3243. */
  3244. #define DDSCAPS2_CUBEMAP 0x00000200L
  3245. /*
  3246. * These flags preform two functions:
  3247. * - At CreateSurface time, they define which of the six cube faces are
  3248. * required by the application.
  3249. * - After creation, each face in the cubemap will have exactly one of these
  3250. * bits set.
  3251. */
  3252. #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400L
  3253. #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800L
  3254. #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000L
  3255. #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000L
  3256. #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000L
  3257. #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000L
  3258. /*
  3259. * This macro may be used to specify all faces of a cube map at CreateSurface time
  3260. */
  3261. #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
  3262. DDSCAPS2_CUBEMAP_NEGATIVEX |\
  3263. DDSCAPS2_CUBEMAP_POSITIVEY |\
  3264. DDSCAPS2_CUBEMAP_NEGATIVEY |\
  3265. DDSCAPS2_CUBEMAP_POSITIVEZ |\
  3266. DDSCAPS2_CUBEMAP_NEGATIVEZ )
  3267. /*
  3268. * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
  3269. * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
  3270. * constructs such as Cube Maps, wherein there are more than one mipmap surface attached
  3271. * to the root surface.
  3272. * This caps bit is ignored by CreateSurface
  3273. */
  3274. #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000L
  3275. /* This flag indicates that the texture should be managed by D3D only */
  3276. #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000L
  3277. /* This flag indicates that the managed surface can be safely lost */
  3278. #define DDSCAPS2_DONOTPERSIST 0x00040000L
  3279. /* indicates that this surface is part of a stereo flipping chain */
  3280. #define DDSCAPS2_STEREOSURFACELEFT 0x00080000L
  3281. //@@BEGIN_MSINTERNAL
  3282. /* Used to indicate that the texture manager is creating a videomemory
  3283. * surface that shouldn't have an associated D3D texture object.
  3284. */
  3285. #define DDSCAPS2_DONOTCREATED3DTEXOBJECT 0x00100000L
  3286. //@@END_MSINTERNAL
  3287. /*
  3288. * Indicates that the surface is a volume.
  3289. * Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume
  3290. */
  3291. #define DDSCAPS2_VOLUME 0x00200000L
  3292. /*
  3293. * Indicates that the surface may be locked multiple times by the application.
  3294. * This cap cannot be used with DDSCAPS2_OPAQUE.
  3295. */
  3296. #define DDSCAPS2_NOTUSERLOCKABLE 0x00400000L
  3297. /*
  3298. * Indicates that the vertex buffer data can be used to render points and
  3299. * point sprites.
  3300. */
  3301. #define DDSCAPS2_POINTS 0x00800000L
  3302. /*
  3303. * Indicates that the vertex buffer data can be used to render rt pactches.
  3304. */
  3305. #define DDSCAPS2_RTPATCHES 0x01000000L
  3306. /*
  3307. * Indicates that the vertex buffer data can be used to render n patches.
  3308. */
  3309. #define DDSCAPS2_NPATCHES 0x02000000L
  3310. /*
  3311. * This bit is reserved for internal use
  3312. */
  3313. #define DDSCAPS2_RESERVED3 0x04000000L
  3314. //@@BEGIN_MSINTERNAL
  3315. /*
  3316. * Indicates that the surface contains interlaced data that should be
  3317. * deinterlaced when displayed.
  3318. */
  3319. #define DDSCAPS2_DEINTERLACE 0x08000000L
  3320. //@@END_MSINTERNAL
  3321. /*
  3322. * Indicates that the contents of the backbuffer do not have to be preserved
  3323. * the contents of the backbuffer after they are presented.
  3324. */
  3325. #define DDSCAPS2_DISCARDBACKBUFFER 0x10000000L
  3326. /*
  3327. * Indicates that all surfaces in this creation chain should be given an alpha channel.
  3328. * This flag will be set on primary surface chains that may have no explicit pixel format
  3329. * (and thus take on the format of the current display mode).
  3330. * The driver should infer that all these surfaces have a format having an alpha channel.
  3331. * (e.g. assume D3DFMT_A8R8G8B8 if the display mode is x888.)
  3332. */
  3333. #define DDSCAPS2_ENABLEALPHACHANNEL 0x20000000L
  3334. /*
  3335. * This is a mask that indicates the set of bits that may be set
  3336. * at createsurface time to indicate number of samples per pixel
  3337. * when multisampling
  3338. */
  3339. #define DDSCAPS3_MULTISAMPLE_MASK 0x0000001FL
  3340. //@@BEGIN_MSINTERNAL
  3341. #define DDSCAPS2_VALID 0x3ffffffeL
  3342. //@@END_MSINTERNAL
  3343. //@@BEGIN_MSINTERNAL
  3344. #define DDSCAPS3_VALID DDSCAPS3_MULTISAMPLE_MASK
  3345. //@@END_MSINTERNAL
  3346. //@@BEGIN_MSINTERNAL
  3347. #define DDSCAPS4_VALID 0x00000000L
  3348. //@@END_MSINTERNAL
  3349. /****************************************************************************
  3350. *
  3351. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  3352. *
  3353. ****************************************************************************/
  3354. /*
  3355. * Display hardware has 3D acceleration.
  3356. */
  3357. #define DDCAPS_3D 0x00000001l
  3358. /*
  3359. * Indicates that DirectDraw will support only dest rectangles that are aligned
  3360. * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  3361. * READ ONLY.
  3362. */
  3363. #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
  3364. /*
  3365. * Indicates that DirectDraw will support only source rectangles whose sizes in
  3366. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
  3367. */
  3368. #define DDCAPS_ALIGNSIZEDEST 0x00000004l
  3369. /*
  3370. * Indicates that DirectDraw will support only source rectangles that are aligned
  3371. * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  3372. * READ ONLY.
  3373. */
  3374. #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
  3375. /*
  3376. * Indicates that DirectDraw will support only source rectangles whose sizes in
  3377. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
  3378. */
  3379. #define DDCAPS_ALIGNSIZESRC 0x00000010l
  3380. /*
  3381. * Indicates that DirectDraw will create video memory surfaces that have a stride
  3382. * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
  3383. */
  3384. #define DDCAPS_ALIGNSTRIDE 0x00000020l
  3385. /*
  3386. * Display hardware is capable of blt operations.
  3387. */
  3388. #define DDCAPS_BLT 0x00000040l
  3389. /*
  3390. * Display hardware is capable of asynchronous blt operations.
  3391. */
  3392. #define DDCAPS_BLTQUEUE 0x00000080l
  3393. /*
  3394. * Display hardware is capable of color space conversions during the blt operation.
  3395. */
  3396. #define DDCAPS_BLTFOURCC 0x00000100l
  3397. /*
  3398. * Display hardware is capable of stretching during blt operations.
  3399. */
  3400. #define DDCAPS_BLTSTRETCH 0x00000200l
  3401. /*
  3402. * Display hardware is shared with GDI.
  3403. */
  3404. #define DDCAPS_GDI 0x00000400l
  3405. /*
  3406. * Display hardware can overlay.
  3407. */
  3408. #define DDCAPS_OVERLAY 0x00000800l
  3409. /*
  3410. * Set if display hardware supports overlays but can not clip them.
  3411. */
  3412. #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
  3413. /*
  3414. * Indicates that overlay hardware is capable of color space conversions during
  3415. * the overlay operation.
  3416. */
  3417. #define DDCAPS_OVERLAYFOURCC 0x00002000l
  3418. /*
  3419. * Indicates that stretching can be done by the overlay hardware.
  3420. */
  3421. #define DDCAPS_OVERLAYSTRETCH 0x00004000l
  3422. /*
  3423. * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  3424. * other than the primary surface.
  3425. */
  3426. #define DDCAPS_PALETTE 0x00008000l
  3427. /*
  3428. * Indicates that palette changes can be syncd with the veritcal refresh.
  3429. */
  3430. #define DDCAPS_PALETTEVSYNC 0x00010000l
  3431. /*
  3432. * Display hardware can return the current scan line.
  3433. */
  3434. #define DDCAPS_READSCANLINE 0x00020000l
  3435. //@@BEGIN_MSINTERNAL
  3436. /*
  3437. * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
  3438. * can be created.
  3439. */
  3440. #define DDCAPS_STEREOVIEW 0x00040000l
  3441. //@@END_MSINTERNAL
  3442. /*
  3443. * This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete
  3444. */
  3445. #define DDCAPS_RESERVED1 0x00040000l
  3446. /*
  3447. * Display hardware is capable of generating a vertical blank interrupt.
  3448. */
  3449. #define DDCAPS_VBI 0x00080000l
  3450. /*
  3451. * Supports the use of z buffers with blt operations.
  3452. */
  3453. #define DDCAPS_ZBLTS 0x00100000l
  3454. /*
  3455. * Supports Z Ordering of overlays.
  3456. */
  3457. #define DDCAPS_ZOVERLAYS 0x00200000l
  3458. /*
  3459. * Supports color key
  3460. */
  3461. #define DDCAPS_COLORKEY 0x00400000l
  3462. /*
  3463. * Supports alpha surfaces
  3464. */
  3465. #define DDCAPS_ALPHA 0x00800000l
  3466. /*
  3467. * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  3468. */
  3469. #define DDCAPS_COLORKEYHWASSIST 0x01000000l
  3470. /*
  3471. * no hardware support at all
  3472. */
  3473. #define DDCAPS_NOHARDWARE 0x02000000l
  3474. /*
  3475. * Display hardware is capable of color fill with bltter
  3476. */
  3477. #define DDCAPS_BLTCOLORFILL 0x04000000l
  3478. /*
  3479. * Display hardware is bank switched, and potentially very slow at
  3480. * random access to VRAM.
  3481. */
  3482. #define DDCAPS_BANKSWITCHED 0x08000000l
  3483. /*
  3484. * Display hardware is capable of depth filling Z-buffers with bltter
  3485. */
  3486. #define DDCAPS_BLTDEPTHFILL 0x10000000l
  3487. /*
  3488. * Display hardware is capable of clipping while bltting.
  3489. */
  3490. #define DDCAPS_CANCLIP 0x20000000l
  3491. /*
  3492. * Display hardware is capable of clipping while stretch bltting.
  3493. */
  3494. #define DDCAPS_CANCLIPSTRETCHED 0x40000000l
  3495. /*
  3496. * Display hardware is capable of bltting to or from system memory
  3497. */
  3498. #define DDCAPS_CANBLTSYSMEM 0x80000000l
  3499. /****************************************************************************
  3500. *
  3501. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  3502. *
  3503. ****************************************************************************/
  3504. /*
  3505. * Display hardware is certified
  3506. */
  3507. #define DDCAPS2_CERTIFIED 0x00000001l
  3508. /*
  3509. * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  3510. * Direct3D rendering operations between calls to BeginScene() and EndScene()
  3511. */
  3512. #define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
  3513. /*
  3514. * Display hardware contains a video port
  3515. */
  3516. #define DDCAPS2_VIDEOPORT 0x00000004l
  3517. /*
  3518. * The overlay can be automatically flipped according to the video port
  3519. * VSYNCs, providing automatic doubled buffered display of video port
  3520. * data using an overlay
  3521. */
  3522. #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l
  3523. /*
  3524. * Overlay can display each field of interlaced data individually while
  3525. * it is interleaved in memory without causing jittery artifacts.
  3526. */
  3527. #define DDCAPS2_CANBOBINTERLEAVED 0x00000010l
  3528. /*
  3529. * Overlay can display each field of interlaced data individually while
  3530. * it is not interleaved in memory without causing jittery artifacts.
  3531. */
  3532. #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l
  3533. /*
  3534. * The overlay surface contains color controls (brightness, sharpness, etc.)
  3535. */
  3536. #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l
  3537. /*
  3538. * The primary surface contains color controls (gamma, etc.)
  3539. */
  3540. #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l
  3541. /*
  3542. * RGBZ -> RGB supported for 16:16 RGB:Z
  3543. */
  3544. #define DDCAPS2_CANDROPZ16BIT 0x00000100l
  3545. /*
  3546. * Driver supports non-local video memory.
  3547. */
  3548. #define DDCAPS2_NONLOCALVIDMEM 0x00000200l
  3549. /*
  3550. * Dirver supports non-local video memory but has different capabilities for
  3551. * non-local video memory surfaces. If this bit is set then so must
  3552. * DDCAPS2_NONLOCALVIDMEM.
  3553. */
  3554. #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l
  3555. /*
  3556. * Driver neither requires nor prefers surfaces to be pagelocked when performing
  3557. * blts involving system memory surfaces
  3558. */
  3559. #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l
  3560. /*
  3561. * Driver can create surfaces which are wider than the primary surface
  3562. */
  3563. #define DDCAPS2_WIDESURFACES 0x00001000l
  3564. /*
  3565. * Driver supports bob without using a video port by handling the
  3566. * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
  3567. */
  3568. #define DDCAPS2_CANFLIPODDEVEN 0x00002000l
  3569. /*
  3570. * Driver supports bob using hardware
  3571. */
  3572. #define DDCAPS2_CANBOBHARDWARE 0x00004000l
  3573. /*
  3574. * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
  3575. */
  3576. #define DDCAPS2_COPYFOURCC 0x00008000l
  3577. //@@BEGIN_MSINTERNAL
  3578. /*
  3579. * Driver supports optimized surfaces
  3580. */
  3581. #define DDCAPS2_OPTIMIZEDSURFACES 0x00010000l
  3582. //@@END_MSINTERNAL
  3583. /*
  3584. * Driver supports loadable gamma ramps for the primary surface
  3585. */
  3586. #define DDCAPS2_PRIMARYGAMMA 0x00020000l
  3587. //@@BEGIN_MSINTERNAL
  3588. /*
  3589. * This cap was meant to be used for driver managed textures, but they were broken
  3590. * in DX 6.x. The cap was reintroduced in DX7 as 0x00800000l. However, 0x00040000l
  3591. * cannot be reassigned to anything else since it causes bad things to happen in
  3592. * the D3D 6.x runtime (snene 11/12/98).
  3593. */
  3594. #define DDCAPS2_NEVERNEVERUSE 0x00040000l
  3595. //@@END_MSINTERNAL
  3596. /*
  3597. * Driver can render in windowed mode.
  3598. */
  3599. #define DDCAPS2_CANRENDERWINDOWED 0x00080000l
  3600. /*
  3601. * A calibrator is available to adjust the gamma ramp according to the
  3602. * physical display properties so that the result will be identical on
  3603. * all calibrated systems.
  3604. */
  3605. #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000l
  3606. /*
  3607. * Indicates that the driver will respond to DDFLIP_INTERVALn flags
  3608. */
  3609. #define DDCAPS2_FLIPINTERVAL 0x00200000l
  3610. /*
  3611. * Indicates that the driver will respond to DDFLIP_NOVSYNC
  3612. */
  3613. #define DDCAPS2_FLIPNOVSYNC 0x00400000l
  3614. /*
  3615. * Driver supports management of video memory, if this flag is ON,
  3616. * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on
  3617. * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
  3618. */
  3619. #define DDCAPS2_CANMANAGETEXTURE 0x00800000l
  3620. /*
  3621. * The Direct3D texture manager uses this cap to decide whether to put managed
  3622. * surfaces in non-local video memory. If the cap is set, the texture manager will
  3623. * put managed surfaces in non-local vidmem. Drivers that cannot texture from
  3624. * local vidmem SHOULD NOT set this cap.
  3625. */
  3626. #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000l
  3627. /*
  3628. * Indicates that the driver supports DX7 type of stereo in at least one mode (which may
  3629. * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher)
  3630. * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of
  3631. * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application
  3632. * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode.
  3633. */
  3634. #define DDCAPS2_STEREO 0x02000000L
  3635. /*
  3636. * This caps bit is intended for internal DirectDraw use.
  3637. * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set.
  3638. * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and
  3639. * all the assoicated system memory blt caps must be correct).
  3640. * -It implies that the system->video blt caps in DDCAPS also apply to system to
  3641. * nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops
  3642. * members of DDCAPS (DDCORECAPS) are filled in correctly.
  3643. * -Any blt from system to nonlocal memory that matches these caps bits will
  3644. * be passed to the driver.
  3645. *
  3646. * NOTE: This is intended to enable the driver itself to do efficient reordering
  3647. * of textures. This is NOT meant to imply that hardware can write into AGP memory.
  3648. * This operation is not currently supported.
  3649. */
  3650. #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000L
  3651. /*
  3652. * was DDCAPS2_PUREHAL
  3653. */
  3654. #define DDCAPS2_RESERVED1 0x08000000L
  3655. /*
  3656. * Driver supports management of video memory, if this flag is ON,
  3657. * driver manages the resource if requested with DDSCAPS2_TEXTUREMANAGE on
  3658. * DirectX manages the resource if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
  3659. */
  3660. #define DDCAPS2_CANMANAGERESOURCE 0x10000000L
  3661. /*
  3662. * Driver supports dynamic textures. This will allow the application to set
  3663. * D3DUSAGE_DYNAMIC (DDSCAPS2_HINTDYNAMIC for drivers) at texture create time.
  3664. * Video memory dynamic textures WILL be lockable by applications. It is
  3665. * expected that these locks will be very efficient (which implies that the
  3666. * driver should always maintain a linear copy, a pointer to which can be
  3667. * quickly handed out to the application).
  3668. */
  3669. #define DDCAPS2_DYNAMICTEXTURES 0x20000000L
  3670. //@@BEGIN_MSINTERNAL
  3671. /****************************************************************************
  3672. *
  3673. * DIRECTDRAW ALPHA CAPABILITY FLAGS (for DDCAPS members dwAlphaCaps,
  3674. * dwSVBAlphaCaps, dwVSBAlphaCaps, and dwSSBAlphaCaps)
  3675. *
  3676. ****************************************************************************/
  3677. /*
  3678. * Driver supports blitting of surfaces that contain alpha information
  3679. * in the pixel format.
  3680. */
  3681. #define DDALPHACAPS_BLTALPHAPIXELS 0x00000001l
  3682. /*
  3683. * Driver performs saturated arithmetic when alpha-blending for a blit.
  3684. * This prevents the dest pixels' color components from overflowing.
  3685. */
  3686. #define DDALPHACAPS_BLTSATURATE 0x00000002l
  3687. /*
  3688. * Driver can perform alpha blitting with pixels in premultiplied-
  3689. * alpha format (color components stored in each pixel have been
  3690. * premultiplied by the pixel's alpha component).
  3691. */
  3692. #define DDALPHACAPS_BLTPREMULT 0x00000004l
  3693. /*
  3694. * Driver can perform alpha blitting with pixels in NON-premultiplied-
  3695. * alpha format (color components NOT premultiplied by alpha component).
  3696. */
  3697. #define DDALPHACAPS_BLTNONPREMULT 0x00000008l
  3698. /*
  3699. * Driver can perform one-factor ARGB scaling of source pixels
  3700. * during a blit.
  3701. */
  3702. #define DDALPHACAPS_BLTARGBSCALE1F 0x00000010l
  3703. /*
  3704. * Driver can perform two-factor ARGB scaling of source pixels
  3705. * during a blit.
  3706. */
  3707. #define DDALPHACAPS_BLTARGBSCALE2F 0x00000020l
  3708. /*
  3709. * Driver can perform four-factor ARGB scaling of source pixels
  3710. * during a blit.
  3711. */
  3712. #define DDALPHACAPS_BLTARGBSCALE4F 0x00000040l
  3713. /*
  3714. * Driver can do an alpha-blended color fill of a dest surface.
  3715. */
  3716. #define DDALPHACAPS_BLTALPHAFILL 0x00000080l
  3717. /*
  3718. * Driver can handle source alpha channel and ARGB scaling at the same time.
  3719. */
  3720. #define DDALPHACAPS_BLTALPHAANDARGBSCALING 0x00000100l
  3721. /*
  3722. * Driver supports overlays with surfaces that contain alpha information
  3723. * in the pixel format.
  3724. */
  3725. #define DDALPHACAPS_OVERLAYALPHAPIXELS 0x00010000l
  3726. /*
  3727. * Driver performs saturated arithmetic to prevent the color
  3728. * components in an alpha-blended overlay from overflowing.
  3729. */
  3730. #define DDALPHACAPS_OVERLAYSATURATE 0x00020000l
  3731. /*
  3732. * Driver can do alpha-blended overlays with pixels in premultiplied-
  3733. * alpha format (color components stored in each pixel have been
  3734. * premultiplied by the pixel's alpha component).
  3735. */
  3736. #define DDALPHACAPS_OVERLAYPREMULT 0x00040000l
  3737. /*
  3738. * Driver can do alpha-blended overlays with pixels in NON-premultiplied-
  3739. * alpha format (color components NOT premultiplied by alpha component).
  3740. */
  3741. #define DDALPHACAPS_OVERLAYNONPREMULT 0x00080000l
  3742. /*
  3743. * Driver can perform one-factor ARGB scaling of source pixels
  3744. * for an overlay.
  3745. */
  3746. #define DDALPHACAPS_OVERLAYARGBSCALE1F 0x00100000l
  3747. /*
  3748. * Driver can perform two-factor ARGB scaling of source pixels
  3749. * for an overlay.
  3750. */
  3751. #define DDALPHACAPS_OVERLAYARGBSCALE2F 0x00200000l
  3752. /*
  3753. * Driver can perform four-factor ARGB scaling of source pixels
  3754. * for an overlay.
  3755. */
  3756. #define DDALPHACAPS_OVERLAYARGBSCALE4F 0x00400000l
  3757. /*
  3758. * Driver can handle alpha blending and dest color keying at the same time.
  3759. */
  3760. #define DDALPHACAPS_OVERLAYALPHAANDKEYDEST 0x00800000l
  3761. /*
  3762. * Driver can handle source alpha channel and ARGB scaling at the same time.
  3763. */
  3764. #define DDALPHACAPS_OVERLAYALPHAANDARGBSCALING 0x01000000l
  3765. //@@END_MSINTERNAL
  3766. /****************************************************************************
  3767. *
  3768. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  3769. //@@BEGIN_MSINTERNAL
  3770. * -- These are obsolete. They are for the obsolete dwFXAlphaCaps member in DDCAPS_DX1/3/5.
  3771. //@@END_MSINTERNAL
  3772. *
  3773. ****************************************************************************/
  3774. /*
  3775. * Supports alpha blending around the edge of a source color keyed surface.
  3776. * For Blt.
  3777. */
  3778. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
  3779. /*
  3780. * Supports alpha information in the pixel format. The bit depth of alpha
  3781. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  3782. * more opaque as the alpha value increases. (0 is transparent.)
  3783. * For Blt.
  3784. */
  3785. #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
  3786. /*
  3787. * Supports alpha information in the pixel format. The bit depth of alpha
  3788. * information in the pixel format can be 1,2,4, or 8. The alpha value
  3789. * becomes more transparent as the alpha value increases. (0 is opaque.)
  3790. * This flag can only be set if DDCAPS_ALPHA is set.
  3791. * For Blt.
  3792. */
  3793. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
  3794. /*
  3795. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  3796. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  3797. * (0 is transparent.)
  3798. * For Blt.
  3799. */
  3800. #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
  3801. /*
  3802. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  3803. * The NEG suffix indicates that this alpha channel becomes more transparent
  3804. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  3805. * DDCAPS_ALPHA is set.
  3806. * For Blt.
  3807. */
  3808. #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
  3809. /*
  3810. * Supports alpha blending around the edge of a source color keyed surface.
  3811. * For Overlays.
  3812. */
  3813. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
  3814. /*
  3815. * Supports alpha information in the pixel format. The bit depth of alpha
  3816. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  3817. * more opaque as the alpha value increases. (0 is transparent.)
  3818. * For Overlays.
  3819. */
  3820. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
  3821. /*
  3822. * Supports alpha information in the pixel format. The bit depth of alpha
  3823. * information in the pixel format can be 1,2,4, or 8. The alpha value
  3824. * becomes more transparent as the alpha value increases. (0 is opaque.)
  3825. * This flag can only be set if DDCAPS_ALPHA is set.
  3826. * For Overlays.
  3827. */
  3828. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
  3829. /*
  3830. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  3831. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  3832. * (0 is transparent.)
  3833. * For Overlays.
  3834. */
  3835. #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
  3836. /*
  3837. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  3838. * The NEG suffix indicates that this alpha channel becomes more transparent
  3839. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  3840. * DDCAPS_ALPHA is set.
  3841. * For Overlays.
  3842. */
  3843. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
  3844. #if DIRECTDRAW_VERSION < 0x0600
  3845. #endif //DIRECTDRAW_VERSION
  3846. //@@BEGIN_MSINTERNAL
  3847. /****************************************************************************
  3848. *
  3849. * DIRECTDRAW FILTER CAPABILITY FLAGS (for DDCAPS members dwFilterCaps,
  3850. * dwSVBFilterCaps, dwVSBFilterCaps, and dwSSBFilterCaps)
  3851. *
  3852. ****************************************************************************/
  3853. /*
  3854. * Driver can do filtering of source pixels for an alpha blit to improve
  3855. * quality of image that is stretched or shrunk to fit dest rect.
  3856. */
  3857. #define DDFILTCAPS_BLTQUALITYFILTER 0x00000001l
  3858. /*
  3859. * Driver can disable filtering for an alpha blit. This may be necessary to
  3860. * preserve color key values in an image that is stretched or shrunk.
  3861. */
  3862. #define DDFILTCAPS_BLTCANDISABLEFILTER 0x00000002l
  3863. /*
  3864. * When filtering, driver can treat pixels bordering source rectangle as
  3865. * transparent in order to smoothly blend source image onto dest image.
  3866. */
  3867. #define DDFILTCAPS_BLTTRANSPBORDER 0x00000004l
  3868. /****************************************************************************
  3869. *
  3870. * DIRECTDRAW TRANSFORM CAPABILITY FLAGS (for DDCAPS members dwTransformCaps,
  3871. * dwSVBTransformCaps, dwVSBTransformCaps, and dwSSBTransformCaps)
  3872. *
  3873. ****************************************************************************/
  3874. /*
  3875. * Driver can do an affine-transformed blit.
  3876. */
  3877. #define DDTFRMCAPS_BLTAFFINETRANSFORM 0x00000001l
  3878. /*
  3879. * Driver can do an affine-transformed overlay.
  3880. */
  3881. #define DDTFRMCAPS_OVERLAYAFFINETRANSFORM 0x00000002l
  3882. //@@END_MSINTERNAL
  3883. /****************************************************************************
  3884. *
  3885. * DIRECTDRAW FX CAPABILITY FLAGS
  3886. *
  3887. ****************************************************************************/
  3888. /*
  3889. * Uses arithmetic operations to stretch and shrink surfaces during blt
  3890. * rather than pixel doubling techniques. Along the Y axis.
  3891. */
  3892. #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
  3893. /*
  3894. * Uses arithmetic operations to stretch during blt
  3895. * rather than pixel doubling techniques. Along the Y axis. Only
  3896. * works for x1, x2, etc.
  3897. */
  3898. #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
  3899. /*
  3900. * Supports mirroring left to right in blt.
  3901. */
  3902. #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
  3903. /*
  3904. * Supports mirroring top to bottom in blt.
  3905. */
  3906. #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
  3907. /*
  3908. * Supports arbitrary rotation for blts.
  3909. */
  3910. #define DDFXCAPS_BLTROTATION 0x00000100l
  3911. /*
  3912. * Supports 90 degree rotations for blts.
  3913. */
  3914. #define DDFXCAPS_BLTROTATION90 0x00000200l
  3915. /*
  3916. * DirectDraw supports arbitrary shrinking of a surface along the
  3917. * x axis (horizontal direction) for blts.
  3918. */
  3919. #define DDFXCAPS_BLTSHRINKX 0x00000400l
  3920. /*
  3921. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3922. * along the x axis (horizontal direction) for blts.
  3923. */
  3924. #define DDFXCAPS_BLTSHRINKXN 0x00000800l
  3925. /*
  3926. * DirectDraw supports arbitrary shrinking of a surface along the
  3927. * y axis (horizontal direction) for blts.
  3928. */
  3929. #define DDFXCAPS_BLTSHRINKY 0x00001000l
  3930. /*
  3931. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3932. * along the y axis (vertical direction) for blts.
  3933. */
  3934. #define DDFXCAPS_BLTSHRINKYN 0x00002000l
  3935. /*
  3936. * DirectDraw supports arbitrary stretching of a surface along the
  3937. * x axis (horizontal direction) for blts.
  3938. */
  3939. #define DDFXCAPS_BLTSTRETCHX 0x00004000l
  3940. /*
  3941. * DirectDraw supports integer stretching (1x,2x,) of a surface
  3942. * along the x axis (horizontal direction) for blts.
  3943. */
  3944. #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
  3945. /*
  3946. * DirectDraw supports arbitrary stretching of a surface along the
  3947. * y axis (horizontal direction) for blts.
  3948. */
  3949. #define DDFXCAPS_BLTSTRETCHY 0x00010000l
  3950. /*
  3951. * DirectDraw supports integer stretching (1x,2x,) of a surface
  3952. * along the y axis (vertical direction) for blts.
  3953. */
  3954. #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
  3955. /*
  3956. * Uses arithmetic operations to stretch and shrink surfaces during
  3957. * overlay rather than pixel doubling techniques. Along the Y axis
  3958. * for overlays.
  3959. */
  3960. #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
  3961. /*
  3962. * Uses arithmetic operations to stretch surfaces during
  3963. * overlay rather than pixel doubling techniques. Along the Y axis
  3964. * for overlays. Only works for x1, x2, etc.
  3965. */
  3966. #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
  3967. /*
  3968. * DirectDraw supports arbitrary shrinking of a surface along the
  3969. * x axis (horizontal direction) for overlays.
  3970. */
  3971. #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
  3972. /*
  3973. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3974. * along the x axis (horizontal direction) for overlays.
  3975. */
  3976. #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
  3977. /*
  3978. * DirectDraw supports arbitrary shrinking of a surface along the
  3979. * y axis (horizontal direction) for overlays.
  3980. */
  3981. #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
  3982. /*
  3983. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3984. * along the y axis (vertical direction) for overlays.
  3985. */
  3986. #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
  3987. /*
  3988. * DirectDraw supports arbitrary stretching of a surface along the
  3989. * x axis (horizontal direction) for overlays.
  3990. */
  3991. #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
  3992. /*
  3993. * DirectDraw supports integer stretching (1x,2x,) of a surface
  3994. * along the x axis (horizontal direction) for overlays.
  3995. */
  3996. #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
  3997. /*
  3998. * DirectDraw supports arbitrary stretching of a surface along the
  3999. * y axis (horizontal direction) for overlays.
  4000. */
  4001. #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
  4002. /*
  4003. * DirectDraw supports integer stretching (1x,2x,) of a surface
  4004. * along the y axis (vertical direction) for overlays.
  4005. */
  4006. #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
  4007. /*
  4008. * DirectDraw supports mirroring of overlays across the vertical axis
  4009. */
  4010. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  4011. /*
  4012. * DirectDraw supports mirroring of overlays across the horizontal axis
  4013. */
  4014. #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
  4015. /*
  4016. * DirectDraw supports deinterlacing of overlay surfaces
  4017. */
  4018. #define DDFXCAPS_OVERLAYDEINTERLACE 0x20000000l
  4019. /*
  4020. * Driver can do alpha blending for blits.
  4021. */
  4022. #define DDFXCAPS_BLTALPHA 0x00000001l
  4023. //@@BEGIN_MSINTERNAL
  4024. /*
  4025. * Driver can do geometric transformations (or warps) for blits.
  4026. */
  4027. #define DDFXCAPS_BLTTRANSFORM 0x00000002l
  4028. //@@END_MSINTERNAL
  4029. /*
  4030. * Driver can do surface-reconstruction filtering for warped blits.
  4031. */
  4032. #define DDFXCAPS_BLTFILTER DDFXCAPS_BLTARITHSTRETCHY
  4033. /*
  4034. * Driver can do alpha blending for overlays.
  4035. */
  4036. #define DDFXCAPS_OVERLAYALPHA 0x00000004l
  4037. //@@BEGIN_MSINTERNAL
  4038. /*
  4039. * Driver can do geometric transformations (or warps) for overlays.
  4040. */
  4041. #define DDFXCAPS_OVERLAYTRANSFORM 0x20000000l
  4042. //@@END_MSINTERNAL
  4043. /*
  4044. * Driver can do surface-reconstruction filtering for warped overlays.
  4045. */
  4046. #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
  4047. /****************************************************************************
  4048. *
  4049. * DIRECTDRAW STEREO VIEW CAPABILITIES
  4050. *
  4051. ****************************************************************************/
  4052. /*
  4053. * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete
  4054. */
  4055. #define DDSVCAPS_RESERVED1 0x00000001l
  4056. /*
  4057. * This flag used to be DDSVCAPS_FLICKER, which is now obsolete
  4058. */
  4059. #define DDSVCAPS_RESERVED2 0x00000002l
  4060. /*
  4061. * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete
  4062. */
  4063. #define DDSVCAPS_RESERVED3 0x00000004l
  4064. /*
  4065. * This flag used to be DDSVCAPS_SPLIT, which is now obsolete
  4066. */
  4067. #define DDSVCAPS_RESERVED4 0x00000008l
  4068. /*
  4069. * The stereo view is accomplished with switching technology
  4070. */
  4071. #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010L
  4072. /****************************************************************************
  4073. *
  4074. * DIRECTDRAWPALETTE CAPABILITIES
  4075. *
  4076. ****************************************************************************/
  4077. /*
  4078. * Index is 4 bits. There are sixteen color entries in the palette table.
  4079. */
  4080. #define DDPCAPS_4BIT 0x00000001l
  4081. /*
  4082. * Index is onto a 8 bit color index. This field is only valid with the
  4083. * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  4084. * surface is in 8bpp. Each color entry is one byte long and is an index
  4085. * into destination surface's 8bpp palette.
  4086. */
  4087. #define DDPCAPS_8BITENTRIES 0x00000002l
  4088. /*
  4089. * Index is 8 bits. There are 256 color entries in the palette table.
  4090. */
  4091. #define DDPCAPS_8BIT 0x00000004l
  4092. /*
  4093. * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  4094. * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  4095. * object.
  4096. * This flag is obsolete. DirectDraw always initializes the color array from
  4097. * the lpDDColorArray parameter. The definition remains for source-level
  4098. * compatibility.
  4099. */
  4100. #define DDPCAPS_INITIALIZE 0x00000000l
  4101. /*
  4102. * This palette is the one attached to the primary surface. Changing this
  4103. * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  4104. * and supported.
  4105. */
  4106. #define DDPCAPS_PRIMARYSURFACE 0x00000010l
  4107. /*
  4108. * This palette is the one attached to the primary surface left. Changing
  4109. * this table has immediate effect on the display for the left eye unless
  4110. * DDPSETPAL_VSYNC is specified and supported.
  4111. */
  4112. #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
  4113. /*
  4114. * This palette can have all 256 entries defined
  4115. */
  4116. #define DDPCAPS_ALLOW256 0x00000040l
  4117. /*
  4118. * This palette can have modifications to it synced with the monitors
  4119. * refresh rate.
  4120. */
  4121. #define DDPCAPS_VSYNC 0x00000080l
  4122. /*
  4123. * Index is 1 bit. There are two color entries in the palette table.
  4124. */
  4125. #define DDPCAPS_1BIT 0x00000100l
  4126. /*
  4127. * Index is 2 bit. There are four color entries in the palette table.
  4128. */
  4129. #define DDPCAPS_2BIT 0x00000200l
  4130. /*
  4131. * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
  4132. */
  4133. #define DDPCAPS_ALPHA 0x00000400l
  4134. //@@BEGIN_MSINTERNAL
  4135. #define DDPCAPS_VALID 0x000007ffl
  4136. //@@END_MSINTERNAL
  4137. /****************************************************************************
  4138. *
  4139. * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  4140. *
  4141. ****************************************************************************/
  4142. //@@BEGIN_MSINTERNAL
  4143. /*
  4144. * Palette changes take effect immediately.
  4145. */
  4146. #define DDPSETPAL_IMMEDIATE 0x00000000l // default
  4147. /*
  4148. * Palette changes should take effect during the vertical blank to avoid
  4149. * palette tearing.
  4150. */
  4151. #define DDPSETPAL_VSYNC 0x00000002l
  4152. //@@END_MSINTERNAL
  4153. /****************************************************************************
  4154. *
  4155. * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  4156. *
  4157. ****************************************************************************/
  4158. /* 0 is the only legal value */
  4159. /****************************************************************************
  4160. *
  4161. * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
  4162. *
  4163. ****************************************************************************/
  4164. /*
  4165. * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
  4166. * must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this
  4167. * pointer and Release when the private data is destroyed. This includes when
  4168. * the surface or palette is destroyed before such priovate data is destroyed.
  4169. */
  4170. #define DDSPD_IUNKNOWNPOINTER 0x00000001L
  4171. /*
  4172. * Private data is only valid for the current state of the object,
  4173. * as determined by the uniqueness value.
  4174. */
  4175. #define DDSPD_VOLATILE 0x00000002L
  4176. //@@BEGIN_MSINTERNAL
  4177. #define DDSPD_VALID 0x00000003L
  4178. //@@END_MSINTERNAL
  4179. /****************************************************************************
  4180. *
  4181. * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  4182. *
  4183. ****************************************************************************/
  4184. //@@BEGIN_MSINTERNAL
  4185. /*
  4186. * Palette change takes effect immediately.
  4187. */
  4188. #define DDSETPAL_IMMEDIATE 0x00000000l // default
  4189. /*
  4190. * Palette change should take effect during the vertical blank to avoid
  4191. * palette tearing.
  4192. */
  4193. #define DDSETPAL_VSYNC 0x00000002l
  4194. //@@END_MSINTERNAL
  4195. /****************************************************************************
  4196. *
  4197. * DIRECTDRAW BITDEPTH CONSTANTS
  4198. *
  4199. * NOTE: These are only used to indicate supported bit depths. These
  4200. * are flags only, they are not to be used as an actual bit depth. The
  4201. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  4202. * bit depths in a surface or for changing the display mode.
  4203. *
  4204. ****************************************************************************/
  4205. /*
  4206. * 1 bit per pixel.
  4207. */
  4208. #define DDBD_1 0x00004000l
  4209. /*
  4210. * 2 bits per pixel.
  4211. */
  4212. #define DDBD_2 0x00002000l
  4213. /*
  4214. * 4 bits per pixel.
  4215. */
  4216. #define DDBD_4 0x00001000l
  4217. /*
  4218. * 8 bits per pixel.
  4219. */
  4220. #define DDBD_8 0x00000800l
  4221. /*
  4222. * 16 bits per pixel.
  4223. */
  4224. #define DDBD_16 0x00000400l
  4225. /*
  4226. * 24 bits per pixel.
  4227. */
  4228. #define DDBD_24 0X00000200l
  4229. /*
  4230. * 32 bits per pixel.
  4231. */
  4232. #define DDBD_32 0x00000100l
  4233. /****************************************************************************
  4234. *
  4235. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  4236. *
  4237. ****************************************************************************/
  4238. /*
  4239. * Set if the structure contains a color space. Not set if the structure
  4240. * contains a single color key.
  4241. */
  4242. #define DDCKEY_COLORSPACE 0x00000001l
  4243. /*
  4244. * Set if the structure specifies a color key or color space which is to be
  4245. * used as a destination color key for blt operations.
  4246. */
  4247. #define DDCKEY_DESTBLT 0x00000002l
  4248. /*
  4249. * Set if the structure specifies a color key or color space which is to be
  4250. * used as a destination color key for overlay operations.
  4251. */
  4252. #define DDCKEY_DESTOVERLAY 0x00000004l
  4253. /*
  4254. * Set if the structure specifies a color key or color space which is to be
  4255. * used as a source color key for blt operations.
  4256. */
  4257. #define DDCKEY_SRCBLT 0x00000008l
  4258. /*
  4259. * Set if the structure specifies a color key or color space which is to be
  4260. * used as a source color key for overlay operations.
  4261. */
  4262. #define DDCKEY_SRCOVERLAY 0x00000010l
  4263. //@@BEGIN_MSINTERNAL
  4264. #define DDCKEY_VALID 0x0000001fl
  4265. //@@END_MSINTERNAL
  4266. /****************************************************************************
  4267. *
  4268. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  4269. *
  4270. ****************************************************************************/
  4271. /*
  4272. * Supports transparent blting using a color key to identify the replaceable
  4273. * bits of the destination surface for RGB colors.
  4274. */
  4275. #define DDCKEYCAPS_DESTBLT 0x00000001l
  4276. /*
  4277. * Supports transparent blting using a color space to identify the replaceable
  4278. * bits of the destination surface for RGB colors.
  4279. */
  4280. #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
  4281. /*
  4282. * Supports transparent blting using a color space to identify the replaceable
  4283. * bits of the destination surface for YUV colors.
  4284. */
  4285. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
  4286. /*
  4287. * Supports transparent blting using a color key to identify the replaceable
  4288. * bits of the destination surface for YUV colors.
  4289. */
  4290. #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
  4291. /*
  4292. * Supports overlaying using colorkeying of the replaceable bits of the surface
  4293. * being overlayed for RGB colors.
  4294. */
  4295. #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
  4296. /*
  4297. * Supports a color space as the color key for the destination for RGB colors.
  4298. */
  4299. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
  4300. /*
  4301. * Supports a color space as the color key for the destination for YUV colors.
  4302. */
  4303. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
  4304. /*
  4305. * Supports only one active destination color key value for visible overlay
  4306. * surfaces.
  4307. */
  4308. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
  4309. /*
  4310. * Supports overlaying using colorkeying of the replaceable bits of the
  4311. * surface being overlayed for YUV colors.
  4312. */
  4313. #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
  4314. /*
  4315. * Supports transparent blting using the color key for the source with
  4316. * this surface for RGB colors.
  4317. */
  4318. #define DDCKEYCAPS_SRCBLT 0x00000200l
  4319. /*
  4320. * Supports transparent blting using a color space for the source with
  4321. * this surface for RGB colors.
  4322. */
  4323. #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
  4324. /*
  4325. * Supports transparent blting using a color space for the source with
  4326. * this surface for YUV colors.
  4327. */
  4328. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
  4329. /*
  4330. * Supports transparent blting using the color key for the source with
  4331. * this surface for YUV colors.
  4332. */
  4333. #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
  4334. /*
  4335. * Supports overlays using the color key for the source with this
  4336. * overlay surface for RGB colors.
  4337. */
  4338. #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
  4339. /*
  4340. * Supports overlays using a color space as the source color key for
  4341. * the overlay surface for RGB colors.
  4342. */
  4343. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
  4344. /*
  4345. * Supports overlays using a color space as the source color key for
  4346. * the overlay surface for YUV colors.
  4347. */
  4348. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
  4349. /*
  4350. * Supports only one active source color key value for visible
  4351. * overlay surfaces.
  4352. */
  4353. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
  4354. /*
  4355. * Supports overlays using the color key for the source with this
  4356. * overlay surface for YUV colors.
  4357. */
  4358. #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
  4359. /*
  4360. * there are no bandwidth trade-offs for using colorkey with an overlay
  4361. */
  4362. #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
  4363. /****************************************************************************
  4364. *
  4365. * DIRECTDRAW PIXELFORMAT FLAGS
  4366. *
  4367. ****************************************************************************/
  4368. /*
  4369. * The surface has alpha channel information in the pixel format.
  4370. */
  4371. #define DDPF_ALPHAPIXELS 0x00000001l
  4372. /*
  4373. * The pixel format contains alpha only information
  4374. */
  4375. #define DDPF_ALPHA 0x00000002l
  4376. /*
  4377. * The FourCC code is valid.
  4378. */
  4379. #define DDPF_FOURCC 0x00000004l
  4380. /*
  4381. * The surface is 4-bit color indexed.
  4382. */
  4383. #define DDPF_PALETTEINDEXED4 0x00000008l
  4384. /*
  4385. * The surface is indexed into a palette which stores indices
  4386. * into the destination surface's 8-bit palette.
  4387. */
  4388. #define DDPF_PALETTEINDEXEDTO8 0x00000010l
  4389. /*
  4390. * The surface is 8-bit color indexed.
  4391. */
  4392. #define DDPF_PALETTEINDEXED8 0x00000020l
  4393. /*
  4394. * The RGB data in the pixel format structure is valid.
  4395. */
  4396. #define DDPF_RGB 0x00000040l
  4397. /*
  4398. * The surface will accept pixel data in the format specified
  4399. * and compress it during the write.
  4400. */
  4401. #define DDPF_COMPRESSED 0x00000080l
  4402. /*
  4403. * The surface will accept RGB data and translate it during
  4404. * the write to YUV data. The format of the data to be written
  4405. * will be contained in the pixel format structure. The DDPF_RGB
  4406. * flag will be set.
  4407. */
  4408. #define DDPF_RGBTOYUV 0x00000100l
  4409. /*
  4410. * pixel format is YUV - YUV data in pixel format struct is valid
  4411. */
  4412. #define DDPF_YUV 0x00000200l
  4413. /*
  4414. * pixel format is a z buffer only surface
  4415. */
  4416. #define DDPF_ZBUFFER 0x00000400l
  4417. /*
  4418. * The surface is 1-bit color indexed.
  4419. */
  4420. #define DDPF_PALETTEINDEXED1 0x00000800l
  4421. /*
  4422. * The surface is 2-bit color indexed.
  4423. */
  4424. #define DDPF_PALETTEINDEXED2 0x00001000l
  4425. /*
  4426. * The surface contains Z information in the pixels
  4427. */
  4428. #define DDPF_ZPIXELS 0x00002000l
  4429. /*
  4430. * The surface contains stencil information along with Z
  4431. */
  4432. #define DDPF_STENCILBUFFER 0x00004000l
  4433. /*
  4434. * Premultiplied alpha format -- the color components have been
  4435. * premultiplied by the alpha component.
  4436. */
  4437. #define DDPF_ALPHAPREMULT 0x00008000l
  4438. //@@BEGIN_MSINTERNAL
  4439. /*
  4440. * Empty surface
  4441. */
  4442. #define DDPF_EMPTYSURFACE 0x00010000l
  4443. //@@END_MSINTERNAL
  4444. /*
  4445. * Luminance data in the pixel format is valid.
  4446. * Use this flag for luminance-only or luminance+alpha surfaces,
  4447. * the bit depth is then ddpf.dwLuminanceBitCount.
  4448. */
  4449. #define DDPF_LUMINANCE 0x00020000l
  4450. /*
  4451. * Luminance data in the pixel format is valid.
  4452. * Use this flag when hanging luminance off bumpmap surfaces,
  4453. * the bit mask for the luminance portion of the pixel is then
  4454. * ddpf.dwBumpLuminanceBitMask
  4455. */
  4456. #define DDPF_BUMPLUMINANCE 0x00040000l
  4457. /*
  4458. * Bump map dUdV data in the pixel format is valid.
  4459. */
  4460. #define DDPF_BUMPDUDV 0x00080000l
  4461. //@@BEGIN_MSINTERNAL
  4462. /*
  4463. * This DDPF flag is used by drivers to signify that this format is new and may be
  4464. * a candidate for hiding from certain applications
  4465. * KEEP THIS DEFINITION IN SYNC WITH THAT OF DDPF_NOVEL_TEXTURE_FORMAT IN DDRAWI.H
  4466. */
  4467. #define DDPF_RESERVED1 0x00100000l
  4468. /*
  4469. * This DDPF flag indicates a DX8 style texture list entry.
  4470. * Keep this definition in sync with DDPF_D3DFORMAT in DDRAWI.H
  4471. */
  4472. #define DDPF_RESERVED2 0x00200000l
  4473. //@@END_MSINTERNAL
  4474. /*===========================================================================
  4475. *
  4476. *
  4477. * DIRECTDRAW CALLBACK FLAGS
  4478. *
  4479. *
  4480. *==========================================================================*/
  4481. /****************************************************************************
  4482. *
  4483. * DIRECTDRAW ENUMSURFACES FLAGS
  4484. *
  4485. ****************************************************************************/
  4486. /*
  4487. * Enumerate all of the surfaces that meet the search criterion.
  4488. */
  4489. #define DDENUMSURFACES_ALL 0x00000001l
  4490. /*
  4491. * A search hit is a surface that matches the surface description.
  4492. */
  4493. #define DDENUMSURFACES_MATCH 0x00000002l
  4494. /*
  4495. * A search hit is a surface that does not match the surface description.
  4496. */
  4497. #define DDENUMSURFACES_NOMATCH 0x00000004l
  4498. /*
  4499. * Enumerate the first surface that can be created which meets the search criterion.
  4500. */
  4501. #define DDENUMSURFACES_CANBECREATED 0x00000008l
  4502. /*
  4503. * Enumerate the surfaces that already exist that meet the search criterion.
  4504. */
  4505. #define DDENUMSURFACES_DOESEXIST 0x00000010l
  4506. //@@BEGIN_MSINTERNAL
  4507. #define DDENUMSURFACES_VALID 0x0000001fl
  4508. //@@END_MSINTERNAL
  4509. /****************************************************************************
  4510. *
  4511. * DIRECTDRAW SETDISPLAYMODE FLAGS
  4512. *
  4513. ****************************************************************************/
  4514. /*
  4515. * The desired mode is a standard VGA mode
  4516. */
  4517. #define DDSDM_STANDARDVGAMODE 0x00000001l
  4518. //@@BEGIN_MSINTERNAL
  4519. #define DDSDM_VALID 0x00000001l
  4520. //@@END_MSINTERNAL
  4521. /****************************************************************************
  4522. *
  4523. * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  4524. *
  4525. ****************************************************************************/
  4526. /*
  4527. * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
  4528. * that a particular mode will be enumerated only once. This flag specifies whether
  4529. * the refresh rate is taken into account when determining if a mode is unique.
  4530. */
  4531. #define DDEDM_REFRESHRATES 0x00000001l
  4532. /*
  4533. * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
  4534. * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
  4535. * enumerated if the application has previously called SetCooperativeLevel with the
  4536. * DDSCL_ALLOWMODEX flag set).
  4537. */
  4538. #define DDEDM_STANDARDVGAMODES 0x00000002L
  4539. //@@BEGIN_MSINTERNAL
  4540. #define DDEDM_VALID 0x00000003l
  4541. //@@END_MSINTERNAL
  4542. /****************************************************************************
  4543. *
  4544. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  4545. *
  4546. ****************************************************************************/
  4547. /*
  4548. * Exclusive mode owner will be responsible for the entire primary surface.
  4549. * GDI can be ignored. used with DD
  4550. */
  4551. #define DDSCL_FULLSCREEN 0x00000001l
  4552. /*
  4553. * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  4554. */
  4555. #define DDSCL_ALLOWREBOOT 0x00000002l
  4556. /*
  4557. * prevents DDRAW from modifying the application window.
  4558. * prevents DDRAW from minimize/restore the application window on activation.
  4559. */
  4560. #define DDSCL_NOWINDOWCHANGES 0x00000004l
  4561. /*
  4562. * app wants to work as a regular Windows application
  4563. */
  4564. #define DDSCL_NORMAL 0x00000008l
  4565. /*
  4566. * app wants exclusive access
  4567. */
  4568. #define DDSCL_EXCLUSIVE 0x00000010l
  4569. //@@BEGIN_MSINTERNAL
  4570. /*
  4571. * dont hook window proc, only valid for non-exclusive
  4572. */
  4573. #define DDSCL_DONTHOOKHWND 0x00000020l
  4574. //@@END_MSINTERNAL
  4575. /*
  4576. * app can deal with non-windows display modes
  4577. */
  4578. #define DDSCL_ALLOWMODEX 0x00000040l
  4579. /*
  4580. * this window will receive the focus messages
  4581. */
  4582. #define DDSCL_SETFOCUSWINDOW 0x00000080l
  4583. /*
  4584. * this window is associated with the DDRAW object and will
  4585. * cover the screen in fullscreen mode
  4586. */
  4587. #define DDSCL_SETDEVICEWINDOW 0x00000100l
  4588. /*
  4589. * app wants DDRAW to create a window to be associated with the
  4590. * DDRAW object
  4591. */
  4592. #define DDSCL_CREATEDEVICEWINDOW 0x00000200l
  4593. /*
  4594. * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
  4595. * take the global crtisec more frequently.
  4596. */
  4597. #define DDSCL_MULTITHREADED 0x00000400l
  4598. /*
  4599. * App specifies that it would like to keep the FPU set up for optimal Direct3D
  4600. * performance (single precision and exceptions disabled) so Direct3D
  4601. * does not need to explicitly set the FPU each time. This is assumed by
  4602. * default in DirectX 7. See also DDSCL_FPUPRESERVE
  4603. */
  4604. #define DDSCL_FPUSETUP 0x00000800l
  4605. /*
  4606. * App specifies that it needs either double precision FPU or FPU exceptions
  4607. * enabled. This makes Direct3D explicitly set the FPU state eah time it is
  4608. * called. Setting the flag will reduce Direct3D performance. The flag is
  4609. * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP
  4610. */
  4611. #define DDSCL_FPUPRESERVE 0x00001000l
  4612. //@@BEGIN_MSINTERNAL
  4613. /*
  4614. * Used to flag a call from the DX8 thunk layer, which we use to modify
  4615. * msg loop behaviour.
  4616. */
  4617. #define DDSCL_DX8APP 0x00002000l
  4618. //@@END_MSINTERNAL
  4619. //@@BEGIN_MSINTERNAL
  4620. #define DDSCL_VALID 0x00003FFFl
  4621. //@@END_MSINTERNAL
  4622. /****************************************************************************
  4623. *
  4624. * DIRECTDRAW BLT FLAGS
  4625. *
  4626. ****************************************************************************/
  4627. /*
  4628. * Use the alpha information in the pixel format or the alpha channel surface
  4629. * attached to the destination surface as the alpha channel for this blt.
  4630. */
  4631. #define DDBLT_ALPHADEST 0x00000001l
  4632. /*
  4633. * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  4634. * for the destination surface for this blt.
  4635. */
  4636. #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
  4637. /*
  4638. * The NEG suffix indicates that the destination surface becomes more
  4639. * transparent as the alpha value increases. (0 is opaque)
  4640. */
  4641. #define DDBLT_ALPHADESTNEG 0x00000004l
  4642. /*
  4643. * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  4644. * channel for the destination for this blt.
  4645. */
  4646. #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
  4647. /*
  4648. * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  4649. * for the edges of the image that border the color key colors.
  4650. */
  4651. #define DDBLT_ALPHAEDGEBLEND 0x00000010l
  4652. /*
  4653. * Use the alpha information in the pixel format or the alpha channel surface
  4654. * attached to the source surface as the alpha channel for this blt.
  4655. */
  4656. #define DDBLT_ALPHASRC 0x00000020l
  4657. /*
  4658. * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  4659. * for the source for this blt.
  4660. */
  4661. #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
  4662. /*
  4663. * The NEG suffix indicates that the source surface becomes more transparent
  4664. * as the alpha value increases. (0 is opaque)
  4665. */
  4666. #define DDBLT_ALPHASRCNEG 0x00000080l
  4667. /*
  4668. * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  4669. * for the source for this blt.
  4670. */
  4671. #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
  4672. /*
  4673. * Do this blt asynchronously through the FIFO in the order received. If
  4674. * there is no room in the hardware FIFO fail the call.
  4675. */
  4676. #define DDBLT_ASYNC 0x00000200l
  4677. /*
  4678. * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  4679. * to fill the destination rectangle on the destination surface with.
  4680. */
  4681. #define DDBLT_COLORFILL 0x00000400l
  4682. /*
  4683. * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  4684. * to use for the blt.
  4685. */
  4686. #define DDBLT_DDFX 0x00000800l
  4687. /*
  4688. * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  4689. * that are not part of the Win32 API.
  4690. */
  4691. #define DDBLT_DDROPS 0x00001000l
  4692. /*
  4693. * Use the color key associated with the destination surface.
  4694. */
  4695. #define DDBLT_KEYDEST 0x00002000l
  4696. /*
  4697. * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  4698. * for the destination surface.
  4699. */
  4700. #define DDBLT_KEYDESTOVERRIDE 0x00004000l
  4701. /*
  4702. * Use the color key associated with the source surface.
  4703. */
  4704. #define DDBLT_KEYSRC 0x00008000l
  4705. /*
  4706. * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  4707. * for the source surface.
  4708. */
  4709. #define DDBLT_KEYSRCOVERRIDE 0x00010000l
  4710. /*
  4711. * Use the dwROP field in the DDBLTFX structure for the raster operation
  4712. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  4713. */
  4714. #define DDBLT_ROP 0x00020000l
  4715. /*
  4716. * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  4717. * (specified in 1/100th of a degree) to rotate the surface.
  4718. */
  4719. #define DDBLT_ROTATIONANGLE 0x00040000l
  4720. /*
  4721. * Z-buffered blt using the z-buffers attached to the source and destination
  4722. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  4723. * z-buffer opcode.
  4724. */
  4725. #define DDBLT_ZBUFFER 0x00080000l
  4726. /*
  4727. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  4728. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  4729. * for the destination.
  4730. */
  4731. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
  4732. /*
  4733. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  4734. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  4735. * respectively for the destination.
  4736. */
  4737. #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
  4738. /*
  4739. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  4740. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  4741. * for the source.
  4742. */
  4743. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
  4744. /*
  4745. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  4746. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  4747. * respectively for the source.
  4748. */
  4749. #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
  4750. /*
  4751. * wait until the device is ready to handle the blt
  4752. * this will cause blt to not return DDERR_WASSTILLDRAWING
  4753. */
  4754. #define DDBLT_WAIT 0x01000000l
  4755. /*
  4756. * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  4757. * to fill the destination rectangle on the destination Z-buffer surface
  4758. * with.
  4759. */
  4760. #define DDBLT_DEPTHFILL 0x02000000l
  4761. //@@BEGIN_MSINTERNAL
  4762. //Turns on ddbltfx.dwZDestConstBitDepth as a write mask for zbuffer clears (so as not to
  4763. //clobber the stencil or vice versa). This is VERY internal only. Fielded only by the HEL
  4764. #define DDBLT_DEPTHFILLWRITEMASK 0x04000000l
  4765. //@@END_MSINTERNAL
  4766. /*
  4767. * wait until the device is ready to handle the blt
  4768. * this will cause blt to not return DDERR_WASSTILLDRAWING
  4769. */
  4770. #define DDBLT_DONOTWAIT 0x08000000l
  4771. /*
  4772. * These flags indicate a presentation blt (i.e. a blt
  4773. * that moves surface contents from an offscreen back buffer to the primary
  4774. * surface). The driver is not allowed to "queue" more than three such blts.
  4775. * The "end" of the presentation blt is indicated, since the
  4776. * blt may be clipped, in which case the runtime will call the driver with
  4777. * several blts. All blts (even if not clipped) are tagged with DDBLT_PRESENTATION
  4778. * and the last (even if not clipped) additionally with DDBLT_LAST_PRESENTATION.
  4779. * Thus the true rule is that the driver must not schedule a DDBLT_PRESENTATION
  4780. * blt if there are 3 or more DDBLT_PRESENTLAST blts in the hardware pipe.
  4781. * If there are such blts in the pipe, the driver should return DDERR_WASSTILLDRAWING
  4782. * until the oldest queued DDBLT_LAST_PRESENTATION blts has been retired (i.e. the
  4783. * pixels have been actually written to the primary surface). Once the oldest blt
  4784. * has been retired, the driver is free to schedule the current blt.
  4785. * The goal is to provide a mechanism whereby the device's hardware queue never
  4786. * gets more than 3 frames ahead of the frames being generated by the application.
  4787. * When excessive queueing occurs, applications become unusable because the application
  4788. * visibly lags user input, and such problems make windowed interactive applications impossible.
  4789. * Some drivers may not have sufficient knowledge of their hardware's FIFO to know
  4790. * when a certain blt has been retired. Such drivers should code cautiously, and
  4791. * simply not allow any frames to be queued at all. DDBLT_LAST_PRESENTATION should cause
  4792. * such drivers to return DDERR_WASSTILLDRAWING until the accelerator is completely
  4793. * finished- exactly as if the application had called Lock on the source surface
  4794. * before calling Blt.
  4795. * In other words, the driver is allowed and encouraged to
  4796. * generate as much latency as it can, but never more than 3 frames worth.
  4797. * Implementation detail: Drivers should count blts against the SOURCE surface, not
  4798. * against the primary surface. This enables multiple parallel windowed application
  4799. * to function more optimally.
  4800. * This flag is passed only to DX8 or higher drivers.
  4801. *
  4802. * APPLICATIONS DO NOT SET THESE FLAGS. THEY ARE SET BY THE DIRECTDRAW RUNTIME.
  4803. *
  4804. */
  4805. #define DDBLT_PRESENTATION 0x10000000l
  4806. #define DDBLT_LAST_PRESENTATION 0x20000000l
  4807. //@@BEGIN_MSINTERNAL
  4808. //We are running out of blt flags. From now on, the high bit will be used
  4809. //to indicate a DX8 (or higher) sourced blt, and we will start re-using
  4810. //old bits for internal-only flags (flags which are passed to the thunk
  4811. //layer's blt but not to the driver. All these DX8-only bits will be
  4812. //filtered off before checking against DDBLT_VALID.
  4813. #define DDBLT_DX8ORHIGHER 0x80000000l
  4814. //will use the hWnd with the clipper to get the Destination
  4815. #define DDBLT_WINDOWCLIP 0x00000001l /* DDBLT_ALPHADEST */
  4816. #define DDBLT_COPYVSYNC 0x00000002l /* DDBLT_ALPHADESTCONSTOVERRIDE */
  4817. #define DDBLT_VALID 0x1fffffffl
  4818. //@@END_MSINTERNAL
  4819. /****************************************************************************
  4820. *
  4821. * BLTFAST FLAGS
  4822. *
  4823. ****************************************************************************/
  4824. #define DDBLTFAST_NOCOLORKEY 0x00000000
  4825. #define DDBLTFAST_SRCCOLORKEY 0x00000001
  4826. #define DDBLTFAST_DESTCOLORKEY 0x00000002
  4827. #define DDBLTFAST_WAIT 0x00000010
  4828. #define DDBLTFAST_DONOTWAIT 0x00000020
  4829. //@@BEGIN_MSINTERNAL
  4830. #define DDBLTFAST_COLORKEY_MASK 0x0000000F
  4831. #define DDBLTFAST_VALID 0x00000033
  4832. //@@END_MSINTERNAL
  4833. //@@BEGIN_MSINTERNAL
  4834. /****************************************************************************
  4835. *
  4836. * Flags for AlphaBlt API call
  4837. *
  4838. ****************************************************************************/
  4839. /*
  4840. * Use color key associated with source surface.
  4841. */
  4842. #define DDABLT_KEYSRC 0x40000000L
  4843. /*
  4844. * Mirror the source image left-to-right in the destination rect.
  4845. */
  4846. #define DDABLT_MIRRORLEFTRIGHT 0x20000000L
  4847. /*
  4848. * Mirror the source image vertically in the destination rect.
  4849. */
  4850. #define DDABLT_MIRRORUPDOWN 0x10000000L
  4851. /*
  4852. * If previously initiated drawing operation is still in progress,
  4853. * wait for it to finish instead of returning DDERR_WASSTILLDRAWING.
  4854. */
  4855. #define DDABLT_WAIT 0x08000000L
  4856. /*
  4857. * Mandates hardware acceleration -- no software emulation.
  4858. */
  4859. #define DDABLT_HARDWAREONLY 0x04000000L
  4860. /*
  4861. * Convert the source pixels to the destination pixel format, but
  4862. * perform no color keying, no alpha blending, and no ARGB scaling.
  4863. */
  4864. #define DDABLT_NOBLEND 0x02000000L
  4865. /*
  4866. * Enable filtering of source pixels for blit in order to improve quality
  4867. * of stretched or shrunk image.
  4868. */
  4869. #define DDABLT_FILTERENABLE 0x01000000l
  4870. /*
  4871. * Disable filtering. Use nearest-neighbor source pixels for stretch blits.
  4872. */
  4873. #define DDABLT_FILTERDISABLE 0x00800000L
  4874. /*
  4875. * If the driver is unable to use the ARGB scaling factors as specified,
  4876. * degrade the scaling operation to one the driver can perform.
  4877. */
  4878. #define DDABLT_DEGRADEARGBSCALING 0x00400000L
  4879. /*
  4880. * If previously initiated drawing operation is still in progress,
  4881. * return DDERR_WASSTILLDRAWING instead of waiting for it to finish.
  4882. */
  4883. #define DDABLT_DONOTWAIT 0x00200000L
  4884. /*
  4885. * Fill dest surface with pixel value contained in lpDDAlphaBltFX->dwFillValue.
  4886. */
  4887. #define DDABLT_USEFILLVALUE 0x00100000L
  4888. /*
  4889. * Mandates software emulation -- no hardware acceleration.
  4890. */
  4891. #define DDABLT_SOFTWAREONLY 0x00080000L
  4892. /*
  4893. * When filtering, pixels bordering source rectangle are treated as transparent
  4894. * in order to smoothly blend edges of source image onto dest image.
  4895. */
  4896. #define DDABLT_FILTERTRANSPBORDER 0x00040000L
  4897. #define DDABLT_VALID 0x7ffc0000L
  4898. //@@END_MSINTERNAL
  4899. /****************************************************************************
  4900. *
  4901. * FLIP FLAGS
  4902. *
  4903. ****************************************************************************/
  4904. #define DDFLIP_WAIT 0x00000001L
  4905. /*
  4906. * Indicates that the target surface contains the even field of video data.
  4907. * This flag is only valid with an overlay surface.
  4908. */
  4909. #define DDFLIP_EVEN 0x00000002L
  4910. /*
  4911. * Indicates that the target surface contains the odd field of video data.
  4912. * This flag is only valid with an overlay surface.
  4913. */
  4914. #define DDFLIP_ODD 0x00000004L
  4915. /*
  4916. * Causes DirectDraw to perform the physical flip immediately and return
  4917. * to the application. Typically, what was the front buffer but is now the back
  4918. * buffer will still be visible (depending on timing) until the next vertical
  4919. * retrace. Subsequent operations involving the two flipped surfaces will
  4920. * not check to see if the physical flip has finished (i.e. will not return
  4921. * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
  4922. * This allows an application to perform Flips at a higher frequency than the
  4923. * monitor refresh rate, but may introduce visible artifacts.
  4924. * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set,
  4925. * DDFLIP_NOVSYNC has no effect.
  4926. */
  4927. #define DDFLIP_NOVSYNC 0x00000008L
  4928. /*
  4929. * Flip Interval Flags. These flags indicate how many vertical retraces to wait between
  4930. * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
  4931. * surface involved in the flip until the specified number of vertical retraces has
  4932. * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set,
  4933. * DDFLIP_INTERVALn has no effect.
  4934. */
  4935. /*
  4936. * DirectDraw will flip on every other vertical sync
  4937. */
  4938. #define DDFLIP_INTERVAL2 0x02000000L
  4939. /*
  4940. * DirectDraw will flip on every third vertical sync
  4941. */
  4942. #define DDFLIP_INTERVAL3 0x03000000L
  4943. /*
  4944. * DirectDraw will flip on every fourth vertical sync
  4945. */
  4946. #define DDFLIP_INTERVAL4 0x04000000L
  4947. /*
  4948. * DirectDraw will flip and display a main stereo surface
  4949. */
  4950. #define DDFLIP_STEREO 0x00000010L
  4951. /*
  4952. * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish
  4953. * to override the default and use time when the accelerator is busy (as denoted by
  4954. * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT.
  4955. */
  4956. #define DDFLIP_DONOTWAIT 0x00000020L
  4957. //@@BEGIN_MSINTERNAL
  4958. #define DDFLIP_INTERVAL1 0x01000000L
  4959. #define DDFLIP_INTERVALMASK 0x07000000L
  4960. #define DDFLIP_VALID 0x0700003fL
  4961. //@@END_MSINTERNAL
  4962. //@@BEGIN_MSINTERNAL
  4963. #ifdef COMPOSITION
  4964. /****************************************************************************
  4965. *
  4966. * DIRECTDRAW COMP FLAGS
  4967. *
  4968. ****************************************************************************/
  4969. /*
  4970. * Use the alpha information in the pixel format or the alpha channel surface
  4971. * attached to the destination surface as the alpha channel for this blt.
  4972. */
  4973. #define DDCOMP_ALPHADEST 0x00000001l
  4974. /*
  4975. * Use the dwConstAlphaDest field in the DDCOMPOSEFX structure as the alpha channel
  4976. * for the destination surface for this blt.
  4977. */
  4978. #define DDCOMP_ALPHADESTCONSTOVERRIDE 0x00000002l
  4979. /*
  4980. * The NEG suffix indicates that the destination surface becomes more
  4981. * transparent as the alpha value increases. (0 is opaque)
  4982. */
  4983. #define DDCOMP_ALPHADESTNEG 0x00000004l
  4984. /*
  4985. * Use the lpDDSAlphaDest field in the DDCOMPOSEFX structure as the alpha
  4986. * channel for the destination for this blt.
  4987. */
  4988. #define DDCOMP_ALPHADESTSURFACEOVERRIDE 0x00000008l
  4989. /*
  4990. * Use the dwAlphaEdgeBlend field in the DDCOMPOSEFX structure as the alpha channel
  4991. * for the edges of the image that border the color key colors.
  4992. */
  4993. #define DDCOMP_ALPHAEDGEBLEND 0x00000010l
  4994. /*
  4995. * Use the alpha information in the pixel format or the alpha channel surface
  4996. * attached to the source surface as the alpha channel for this blt.
  4997. */
  4998. #define DDCOMP_ALPHASRC 0x00000020l
  4999. /*
  5000. * Use the dwConstAlphaSrc field in the DDCOMPOSEFX structure as the alpha channel
  5001. * for the source for this blt.
  5002. */
  5003. #define DDCOMP_ALPHASRCCONSTOVERRIDE 0x00000040l
  5004. /*
  5005. * The NEG suffix indicates that the source surface becomes more transparent
  5006. * as the alpha value increases. (0 is opaque)
  5007. */
  5008. #define DDCOMP_ALPHASRCNEG 0x00000080l
  5009. /*
  5010. * Use the lpDDSAlphaSrc field in the DDCOMPOSEFX structure as the alpha channel
  5011. * for the source for this blt.
  5012. */
  5013. #define DDCOMP_ALPHASRCSURFACEOVERRIDE 0x00000100l
  5014. /*
  5015. * Before performing this blt invoke the callback specified by the lpfnCallback
  5016. * field in the DDCOMPOSEFX structure.
  5017. */
  5018. #define DDCOMP_CALLBACK 0x00000200l
  5019. /*
  5020. * Uses the dwFillColor field in the DDCOMPOSEFX structure as the RGB color
  5021. * to fill the destination rectangle on the destination surface with.
  5022. */
  5023. #define DDCOMP_COLORFILL 0x00000400l
  5024. /*
  5025. * Uses the dwDDFX field in the DDCOMPOSEFX structure to specify the effects
  5026. * to use for the blt.
  5027. */
  5028. #define DDCOMP_DDFX 0x00000800l
  5029. /*
  5030. * Uses the dwDDROPS field in the DDCOMPOSEFX structure to specify the ROPS
  5031. * that are not part of the Win32 API.
  5032. */
  5033. #define DDCOMP_DDROPS 0x00001000l
  5034. /*
  5035. * Use the color key associated with the destination surface.
  5036. */
  5037. #define DDCOMP_KEYDEST 0x00002000l
  5038. /*
  5039. * Use the dckDestColorkey field in the DDCOMPOSEFX structure as the color key
  5040. * for the destination surface.
  5041. */
  5042. #define DDCOMP_KEYDESTOVERRIDE 0x00004000l
  5043. /*
  5044. * Use the color key associated with the source surface.
  5045. */
  5046. #define DDCOMP_KEYSRC 0x00008000l
  5047. /*
  5048. * Use the dckSrcColorkey field in the DDCOMPOSEFX structure as the color key
  5049. * for the source surface.
  5050. */
  5051. #define DDCOMP_KEYSRCOVERRIDE 0x00010000l
  5052. /*
  5053. * Do this blt when DestUnlock is called for the last time on the source surface.
  5054. */
  5055. #define DDCOMP_ONDESTUNLOCK 0x00020000l
  5056. /*
  5057. * Do this blt when Flip is called on the source surface.
  5058. */
  5059. #define DDCOMP_ONFLIP 0x00040000l
  5060. /*
  5061. * Do this blt when Unlock is called for the last time on the source surface.
  5062. */
  5063. #define DDCOMP_ONUNLOCK 0x00080000l
  5064. /*
  5065. * Repeat this composition blt the number of times specified in the dwRepeat
  5066. * field of the DDCOMPOSEFX structure
  5067. */
  5068. #define DDCOMP_REPEAT 0x00100000l
  5069. /*
  5070. * Use the dwROP field in the DDCOMPOSEFX structure for the raster operation
  5071. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  5072. */
  5073. #define DDCOMP_ROP 0x00200000l
  5074. /*
  5075. * Use the dwRotationAngle field in the DDCOMPOSEFX structure as the angle
  5076. * (specified in 1/100th of a degree) to rotate the surface.
  5077. */
  5078. #define DDCOMP_ROTATIONANGLE 0x00400000l
  5079. /*
  5080. * Z-buffered blt using the z-buffers attached to the source and destination
  5081. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  5082. * z-buffer opcode.
  5083. */
  5084. #define DDCOMP_ZBUFFER 0x00800000l
  5085. /*
  5086. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  5087. * in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode respectively
  5088. * for the destination.
  5089. */
  5090. #define DDCOMP_ZBUFFERDESTCONSTOVERRIDE 0x01000000l
  5091. /*
  5092. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  5093. * field in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode
  5094. * respectively for the destination.
  5095. */
  5096. #define DDCOMP_ZBUFFERDESTOVERRIDE 0x02000000l
  5097. /*
  5098. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  5099. * in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode respectively
  5100. * for the source.
  5101. */
  5102. #define DDCOMP_ZBUFFERSRCCONSTOVERRIDE 0x04000000l
  5103. /*
  5104. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  5105. * field in the DDCOMPOSEFX structure as the z-buffer and z-buffer opcode
  5106. * respectively for the source.
  5107. */
  5108. #define DDCOMP_ZBUFFERSRCOVERRIDE 0x08000000l
  5109. #endif
  5110. //@@END_MSINTERNAL
  5111. /****************************************************************************
  5112. *
  5113. * DIRECTDRAW SURFACE OVERLAY FLAGS
  5114. *
  5115. ****************************************************************************/
  5116. /*
  5117. * Use the alpha information in the pixel format or the alpha channel surface
  5118. * attached to the destination surface as the alpha channel for the
  5119. * destination overlay.
  5120. */
  5121. #define DDOVER_ALPHADEST 0x00000001l
  5122. /*
  5123. * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  5124. * destination alpha channel for this overlay.
  5125. */
  5126. #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
  5127. /*
  5128. * The NEG suffix indicates that the destination surface becomes more
  5129. * transparent as the alpha value increases.
  5130. */
  5131. #define DDOVER_ALPHADESTNEG 0x00000004l
  5132. /*
  5133. * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  5134. * channel destination for this overlay.
  5135. */
  5136. #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
  5137. /*
  5138. * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  5139. * channel for the edges of the image that border the color key colors.
  5140. */
  5141. #define DDOVER_ALPHAEDGEBLEND 0x00000010l
  5142. /*
  5143. * Use the alpha information in the pixel format or the alpha channel surface
  5144. * attached to the source surface as the source alpha channel for this overlay.
  5145. */
  5146. #define DDOVER_ALPHASRC 0x00000020l
  5147. /*
  5148. * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  5149. * alpha channel for this overlay.
  5150. */
  5151. #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
  5152. /*
  5153. * The NEG suffix indicates that the source surface becomes more transparent
  5154. * as the alpha value increases.
  5155. */
  5156. #define DDOVER_ALPHASRCNEG 0x00000080l
  5157. /*
  5158. * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  5159. * source for this overlay.
  5160. */
  5161. #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
  5162. /*
  5163. * Turn this overlay off.
  5164. */
  5165. #define DDOVER_HIDE 0x00000200l
  5166. /*
  5167. * Use the color key associated with the destination surface.
  5168. */
  5169. #define DDOVER_KEYDEST 0x00000400l
  5170. /*
  5171. * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  5172. * for the destination surface
  5173. */
  5174. #define DDOVER_KEYDESTOVERRIDE 0x00000800l
  5175. /*
  5176. * Use the color key associated with the source surface.
  5177. */
  5178. #define DDOVER_KEYSRC 0x00001000l
  5179. /*
  5180. * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  5181. * for the source surface.
  5182. */
  5183. #define DDOVER_KEYSRCOVERRIDE 0x00002000l
  5184. /*
  5185. * Turn this overlay on.
  5186. */
  5187. #define DDOVER_SHOW 0x00004000l
  5188. /*
  5189. * Add a dirty rect to an emulated overlayed surface.
  5190. */
  5191. #define DDOVER_ADDDIRTYRECT 0x00008000l
  5192. /*
  5193. * Redraw all dirty rects on an emulated overlayed surface.
  5194. */
  5195. #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
  5196. /*
  5197. * Redraw the entire surface on an emulated overlayed surface.
  5198. */
  5199. #define DDOVER_REFRESHALL 0x00020000l
  5200. //@@BEGIN_MSINTERNAL
  5201. /*
  5202. * Force redrawing onto the destination surface without regard for the background
  5203. */
  5204. #define DDOVER_REFRESHPOUND 0x00040000l
  5205. //@@END_MSINTERNAL
  5206. /*
  5207. * Use the overlay FX flags to define special overlay FX
  5208. */
  5209. #define DDOVER_DDFX 0x00080000l
  5210. /*
  5211. * Autoflip the overlay when ever the video port autoflips
  5212. */
  5213. #define DDOVER_AUTOFLIP 0x00100000l
  5214. /*
  5215. * Display each field of video port data individually without
  5216. * causing any jittery artifacts
  5217. */
  5218. #define DDOVER_BOB 0x00200000l
  5219. /*
  5220. * Indicates that bob/weave decisions should not be overridden by other
  5221. * interfaces.
  5222. */
  5223. #define DDOVER_OVERRIDEBOBWEAVE 0x00400000l
  5224. /*
  5225. * Indicates that the surface memory is composed of interleaved fields.
  5226. */
  5227. #define DDOVER_INTERLEAVED 0x00800000l
  5228. /*
  5229. * Indicates that bob will be performed using hardware rather than
  5230. * software or emulated.
  5231. */
  5232. #define DDOVER_BOBHARDWARE 0x01000000l
  5233. /*
  5234. * Indicates that overlay FX structure contains valid ARGB scaling factors.
  5235. */
  5236. #define DDOVER_ARGBSCALEFACTORS 0x02000000l
  5237. /*
  5238. * Indicates that ARGB scaling factors can be degraded to fit driver capabilities.
  5239. */
  5240. #define DDOVER_DEGRADEARGBSCALING 0x04000000l
  5241. //@@BEGIN_MSINTERNAL
  5242. #define DDOVER_VALID 0x07ffffffl
  5243. //@@END_MSINTERNAL
  5244. //@@BEGIN_MSINTERNAL
  5245. /****************************************************************************
  5246. *
  5247. * Flags for dwFlags member of DDSPRITE structure
  5248. *
  5249. ****************************************************************************/
  5250. /*
  5251. * Use the color key associated with the destination surface.
  5252. */
  5253. #define DDSPRITE_KEYDEST 0x00000001l
  5254. /*
  5255. * Uses the dest color key value stored in the embedded DDSPRITEFX
  5256. * structure instead of the color key stored in the dest surface.
  5257. */
  5258. #define DDSPRITE_KEYDESTOVERRIDE 0x00000002l
  5259. /*
  5260. * Use the color key associated with the source surface.
  5261. */
  5262. #define DDSPRITE_KEYSRC 0x00000004l
  5263. /*
  5264. * Uses the source color key value stored in the embedded DDSPRITEFX
  5265. * structure instead of the color key stored in the source surface.
  5266. */
  5267. #define DDSPRITE_KEYSRCOVERRIDE 0x00000008l
  5268. /*
  5269. * Indicates that the rcSrc member contains a valid source rectangle.
  5270. */
  5271. #define DDSPRITE_RECTSRC 0x00000010l
  5272. /*
  5273. * Indicates that the rcDest member contains a valid destination rectangle.
  5274. */
  5275. #define DDSPRITE_RECTDEST 0x00000020l
  5276. /*
  5277. * Indicates that the ddSpriteFX member contains a valid DDSPRITEFX value.
  5278. */
  5279. #define DDSPRITE_DDSPRITEFX 0x00000040l
  5280. //@@END_MSINTERNAL
  5281. //@@BEGIN_MSINTERNAL
  5282. // Mask of valid DDSPRITE_ flag bits
  5283. #define DDSPRITE_VALID 0x0000006fl
  5284. //@@END_MSINTERNAL
  5285. //@@BEGIN_MSINTERNAL
  5286. /****************************************************************************
  5287. *
  5288. * Flags for SetSpriteDisplayList API call
  5289. *
  5290. ****************************************************************************/
  5291. /*
  5292. * Sprites in display list are to be blitted to destination surface.
  5293. */
  5294. #define DDSSDL_BLTSPRITES 0x00000001l
  5295. /*
  5296. * Sprites in display list are to be displayed as overlays on dest (primary) surface.
  5297. */
  5298. #define DDSSDL_OVERLAYSPRITES 0x00000002l
  5299. /*
  5300. * Sprites in display list are sorted in back-to-front order (default is F-to-B).
  5301. */
  5302. #define DDSSDL_BACKTOFRONT 0x00000004l
  5303. /*
  5304. * Perform page flip of primary surface at same time new display list is shown.
  5305. */
  5306. #define DDSSDL_PAGEFLIP 0x00000008l
  5307. /*
  5308. * If hardware acceleration is unavailable, fail rather than emulate.
  5309. */
  5310. #define DDSSDL_HARDWAREONLY 0x00000010l
  5311. /*
  5312. * Wait to return until driver is ready to accept new sprite display list.
  5313. */
  5314. #define DDSSDL_WAIT 0x00000020l
  5315. //@@END_MSINTERNAL
  5316. //@@BEGIN_MSINTERNAL
  5317. // Mask of all valid DDSSDL_ flag bits
  5318. #define DDSSDL_VALID 0x0000003fl
  5319. //@@END_MSINTERNAL
  5320. /****************************************************************************
  5321. *
  5322. * DIRECTDRAWSURFACE LOCK FLAGS
  5323. *
  5324. ****************************************************************************/
  5325. /*
  5326. * The default. Set to indicate that Lock should return a valid memory pointer
  5327. * to the top of the specified rectangle. If no rectangle is specified then a
  5328. * pointer to the top of the surface is returned.
  5329. */
  5330. #define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
  5331. /*
  5332. * Set to indicate that Lock should wait until it can obtain a valid memory
  5333. * pointer before returning. If this bit is set, Lock will never return
  5334. * DDERR_WASSTILLDRAWING.
  5335. */
  5336. #define DDLOCK_WAIT 0x00000001L
  5337. /*
  5338. * Set if an event handle is being passed to Lock. Lock will trigger the event
  5339. * when it can return the surface memory pointer requested.
  5340. */
  5341. #define DDLOCK_EVENT 0x00000002L
  5342. /*
  5343. * Indicates that the surface being locked will only be read from.
  5344. */
  5345. #define DDLOCK_READONLY 0x00000010L
  5346. /*
  5347. * Indicates that the surface being locked will only be written to
  5348. */
  5349. #define DDLOCK_WRITEONLY 0x00000020L
  5350. //@@BEGIN_MSINTERNAL
  5351. /*
  5352. * Indicates that InternalLock should set the busy bit and Win16 lock
  5353. * for surfaces not explicitly in system memory.
  5354. */
  5355. #define DDLOCK_TAKE_WIN16 0x00000040L
  5356. /*
  5357. * Indicates that InternalLock should set the busy bit and Win16 lock
  5358. * for surfaces in video memory only
  5359. */
  5360. #define DDLOCK_TAKE_WIN16_VRAM 0x00000080L
  5361. /*
  5362. * Indicates that InternalLock should check for lost surfaces. By
  5363. * default it does not.
  5364. */
  5365. #define DDLOCK_FAILLOSTSURFACES 0x00000100L
  5366. /*
  5367. * Indicates that InternalLock should fail if the vis rgn has changed
  5368. * since it was last queried. This flag is only used on NT.
  5369. */
  5370. #define DDLOCK_FAILONVISRGNCHANGED 0x00000200L
  5371. /*
  5372. * This flag is used by the API DD_Surface_Lock to force InternalLock
  5373. * to fail an attempt to lock an emulated primary on NT.
  5374. * This is a symptom of the two-headed nature of InternalLock: it both
  5375. * locks a surface (increases its usage count) and returns a pointer
  5376. * to the bits. An emulated blt on NT requires the first but cares not about the
  5377. * second. DD_Surface_Lock needs the pointer, so it must fail when the
  5378. * second function of InternalLock fails.
  5379. */
  5380. #define DDLOCK_FAILEMULATEDNTPRIMARY 0x00000400L
  5381. //@@END_MSINTERNAL
  5382. /*
  5383. * Indicates that a system wide lock should not be taken when this surface
  5384. * is locked. This has several advantages (cursor responsiveness, ability
  5385. * to call more Windows functions, easier debugging) when locking video
  5386. * memory surfaces. However, an application specifying this flag must
  5387. * comply with a number of conditions documented in the help file.
  5388. * Furthermore, this flag cannot be specified when locking the primary.
  5389. */
  5390. #define DDLOCK_NOSYSLOCK 0x00000800L
  5391. /*
  5392. * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices
  5393. * that were referred to in Draw*PrimtiveVB calls since the start of the
  5394. * frame (or the last lock without this flag) will be modified during the
  5395. * lock. This can be useful when one is only appending data to the vertex
  5396. * buffer
  5397. */
  5398. #define DDLOCK_NOOVERWRITE 0x00001000L
  5399. /*
  5400. * Indicates that no assumptions will be made about the contents of the
  5401. * surface or vertex buffer during this lock.
  5402. * This enables two things:
  5403. * - Direct3D or the driver may provide an alternative memory
  5404. * area as the vertex buffer. This is useful when one plans to clear the
  5405. * contents of the vertex buffer and fill in new data.
  5406. * - Drivers sometimes store surface data in a re-ordered format.
  5407. * When the application locks the surface, the driver is forced to un-re-order
  5408. * the surface data before allowing the application to see the surface contents.
  5409. * This flag is a hint to the driver that it can skip the un-re-ordering process
  5410. * since the application plans to overwrite every single pixel in the surface
  5411. * or locked rectangle (and so erase any un-re-ordered pixels anyway).
  5412. * Applications should always set this flag when they intend to overwrite the entire
  5413. * surface or locked rectangle.
  5414. */
  5415. #define DDLOCK_DISCARDCONTENTS 0x00002000L
  5416. /*
  5417. * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS
  5418. */
  5419. #define DDLOCK_OKTOSWAP 0x00002000L
  5420. /*
  5421. * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish
  5422. * to override the default and use time when the accelerator is busy (as denoted by
  5423. * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT.
  5424. */
  5425. #define DDLOCK_DONOTWAIT 0x00004000L
  5426. /*
  5427. * This indicates volume texture lock with front and back specified.
  5428. */
  5429. #define DDLOCK_HASVOLUMETEXTUREBOXRECT 0x00008000L
  5430. /*
  5431. * This indicates that the driver should not update dirty rect information for this lock.
  5432. */
  5433. #define DDLOCK_NODIRTYUPDATE 0x00010000L
  5434. //@@BEGIN_MSINTERNAL
  5435. /*
  5436. * An aggregate of all the valid flags which can be passed into the API
  5437. */
  5438. #define DDLOCK_VALID 0x00017831L
  5439. //@@END_MSINTERNAL
  5440. /****************************************************************************
  5441. *
  5442. * DIRECTDRAWSURFACE PAGELOCK FLAGS
  5443. *
  5444. ****************************************************************************/
  5445. /*
  5446. * No flags defined at present
  5447. */
  5448. //@@BEGIN_MSINTERNAL
  5449. #define DDPAGELOCK_VALID 0x00000000L
  5450. //@@END_MSINTERNAL
  5451. /****************************************************************************
  5452. *
  5453. * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  5454. *
  5455. ****************************************************************************/
  5456. /*
  5457. * No flags defined at present
  5458. */
  5459. //@@BEGIN_MSINTERNAL
  5460. #define DDPAGEUNLOCK_VALID 0x00000000L
  5461. //@@END_MSINTERNAL
  5462. /****************************************************************************
  5463. *
  5464. * DIRECTDRAWSURFACE BLT FX FLAGS
  5465. *
  5466. ****************************************************************************/
  5467. /*
  5468. * If stretching, use arithmetic stretching along the Y axis for this blt.
  5469. */
  5470. #define DDBLTFX_ARITHSTRETCHY 0x00000001l
  5471. /*
  5472. * Do this blt mirroring the surface left to right. Spin the
  5473. * surface around its y-axis.
  5474. */
  5475. #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
  5476. /*
  5477. * Do this blt mirroring the surface up and down. Spin the surface
  5478. * around its x-axis.
  5479. */
  5480. #define DDBLTFX_MIRRORUPDOWN 0x00000004l
  5481. /*
  5482. * Schedule this blt to avoid tearing.
  5483. */
  5484. #define DDBLTFX_NOTEARING 0x00000008l
  5485. /*
  5486. * Do this blt rotating the surface one hundred and eighty degrees.
  5487. */
  5488. #define DDBLTFX_ROTATE180 0x00000010l
  5489. /*
  5490. * Do this blt rotating the surface two hundred and seventy degrees.
  5491. */
  5492. #define DDBLTFX_ROTATE270 0x00000020l
  5493. /*
  5494. * Do this blt rotating the surface ninety degrees.
  5495. */
  5496. #define DDBLTFX_ROTATE90 0x00000040l
  5497. /*
  5498. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  5499. * specified to limit the bits copied from the source surface.
  5500. */
  5501. #define DDBLTFX_ZBUFFERRANGE 0x00000080l
  5502. /*
  5503. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  5504. * before comparing it with the desting z values.
  5505. */
  5506. #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
  5507. //@@BEGIN_MSINTERNAL
  5508. /****************************************************************************
  5509. *
  5510. * DIRECTDRAWSURFACE COMP FX FLAGS
  5511. *
  5512. ****************************************************************************/
  5513. /*
  5514. * If stretching, use arithmetic stretching along the Y axis for this blt.
  5515. */
  5516. #define DDCOMPFX_ARITHSTRETCHY 0x00000001l
  5517. /*
  5518. * Do this blt mirroring the surface left to right. Spin the
  5519. * surface around its y-axis.
  5520. */
  5521. #define DDCOMPFX_MIRRORLEFTRIGHT 0x00000002l
  5522. /*
  5523. * Do this blt mirroring the surface up and down. Spin the surface
  5524. * around its x-axis.
  5525. */
  5526. #define DDCOMPFX_MIRRORUPDOWN 0x00000004l
  5527. /*
  5528. * Schedule this blt to avoid tearing.
  5529. */
  5530. #define DDCOMPFX_NOTEARING 0x00000008l
  5531. /*
  5532. * Do this blt rotating the surface one hundred and eighty degrees.
  5533. */
  5534. #define DDCOMPFX_ROTATE180 0x00000010l
  5535. /*
  5536. * Do this blt rotating the surface two hundred and seventy degrees.
  5537. */
  5538. #define DDCOMPFX_ROTATE270 0x00000020l
  5539. /*
  5540. * Do this blt rotating the surface ninety degrees.
  5541. */
  5542. #define DDCOMPFX_ROTATE90 0x00000040l
  5543. /*
  5544. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  5545. * specified to limit the bits copied from the source surface.
  5546. */
  5547. #define DDCOMPFX_ZBUFFERRANGE 0x00000080l
  5548. /*
  5549. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  5550. * before comparing it with the desting z values.
  5551. */
  5552. #define DDCOMPFX_ZBUFFERBASEDEST 0x00000100l
  5553. //@@END_MSINTERNAL
  5554. /****************************************************************************
  5555. *
  5556. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  5557. *
  5558. ****************************************************************************/
  5559. /*
  5560. * If stretching, use arithmetic stretching along the Y axis for this overlay.
  5561. */
  5562. #define DDOVERFX_ARITHSTRETCHY 0x00000001l
  5563. /*
  5564. * Mirror the overlay across the vertical axis
  5565. */
  5566. #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
  5567. /*
  5568. * Mirror the overlay across the horizontal axis
  5569. */
  5570. #define DDOVERFX_MIRRORUPDOWN 0x00000004l
  5571. /*
  5572. * Deinterlace the overlay, if possible
  5573. */
  5574. #define DDOVERFX_DEINTERLACE 0x00000008l
  5575. //@@BEGIN_MSINTERNAL
  5576. /****************************************************************************
  5577. *
  5578. * Flags for dwDDFX member of DDSPRITEFX structure
  5579. *
  5580. ****************************************************************************/
  5581. /*
  5582. * Use affine transformation matrix in fTransform member.
  5583. */
  5584. #define DDSPRITEFX_AFFINETRANSFORM 0x00000001l
  5585. /*
  5586. * Use RGBA scaling factors in ddargbScaleFactors member.
  5587. */
  5588. #define DDSPRITEFX_RGBASCALING 0x00000002l
  5589. /*
  5590. * Degrade RGBA scaling factors to accommodate driver's capabilities.
  5591. */
  5592. #define DDSPRITEFX_DEGRADERGBASCALING 0x00000004l
  5593. /*
  5594. * Do bilinear filtering of stretched or warped sprite.
  5595. */
  5596. #define DDSPRITEFX_BILINEARFILTER 0x00000008l
  5597. /*
  5598. * Do "blur" filtering of stretched or warped sprite.
  5599. */
  5600. #define DDSPRITEFX_BLURFILTER 0x00000010l
  5601. /*
  5602. * Do "flat" filtering of stretched or warped sprite.
  5603. */
  5604. #define DDSPRITEFX_FLATFILTER 0x00000020l
  5605. /*
  5606. * Degrade filtering operation to accommodate driver's capabilities.
  5607. */
  5608. #define DDSPRITEFX_DEGRADEFILTER 0x00000040l
  5609. // mask of valid DDSPRITEFX_ flags
  5610. #define DDSPRITEFX_VALID 0x0000007fl
  5611. //@@END_MSINTERNAL
  5612. /****************************************************************************
  5613. *
  5614. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  5615. *
  5616. ****************************************************************************/
  5617. /*
  5618. * return when the vertical blank interval begins
  5619. */
  5620. #define DDWAITVB_BLOCKBEGIN 0x00000001l
  5621. /*
  5622. * set up an event to trigger when the vertical blank begins
  5623. */
  5624. #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
  5625. /*
  5626. * return when the vertical blank interval ends and display begins
  5627. */
  5628. #define DDWAITVB_BLOCKEND 0x00000004l
  5629. /****************************************************************************
  5630. *
  5631. * DIRECTDRAW GETFLIPSTATUS FLAGS
  5632. *
  5633. ****************************************************************************/
  5634. /*
  5635. * is it OK to flip now?
  5636. */
  5637. #define DDGFS_CANFLIP 0x00000001l
  5638. /*
  5639. * is the last flip finished?
  5640. */
  5641. #define DDGFS_ISFLIPDONE 0x00000002l
  5642. // @@BEGIN_MSINTERNAL
  5643. #define DDGFS_VALID 0x00000003l
  5644. // @@END_MSINTERNAL
  5645. /****************************************************************************
  5646. *
  5647. * DIRECTDRAW GETBLTSTATUS FLAGS
  5648. *
  5649. ****************************************************************************/
  5650. /*
  5651. * is it OK to blt now?
  5652. */
  5653. #define DDGBS_CANBLT 0x00000001l
  5654. /*
  5655. * is the blt to the surface finished?
  5656. */
  5657. #define DDGBS_ISBLTDONE 0x00000002l
  5658. // @@BEGIN_MSINTERNAL
  5659. #define DDGBS_VALID 0x00000003l
  5660. // @@END_MSINTERNAL
  5661. /****************************************************************************
  5662. *
  5663. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  5664. *
  5665. ****************************************************************************/
  5666. /*
  5667. * Enumerate overlays back to front.
  5668. */
  5669. #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
  5670. /*
  5671. * Enumerate overlays front to back
  5672. */
  5673. #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
  5674. /****************************************************************************
  5675. *
  5676. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  5677. *
  5678. ****************************************************************************/
  5679. /*
  5680. * Send overlay to front
  5681. */
  5682. #define DDOVERZ_SENDTOFRONT 0x00000000l
  5683. /*
  5684. * Send overlay to back
  5685. */
  5686. #define DDOVERZ_SENDTOBACK 0x00000001l
  5687. /*
  5688. * Move Overlay forward
  5689. */
  5690. #define DDOVERZ_MOVEFORWARD 0x00000002l
  5691. /*
  5692. * Move Overlay backward
  5693. */
  5694. #define DDOVERZ_MOVEBACKWARD 0x00000003l
  5695. /*
  5696. * Move Overlay in front of relative surface
  5697. */
  5698. #define DDOVERZ_INSERTINFRONTOF 0x00000004l
  5699. /*
  5700. * Move Overlay in back of relative surface
  5701. */
  5702. #define DDOVERZ_INSERTINBACKOF 0x00000005l
  5703. // @@BEGIN_MSINTERNAL
  5704. /****************************************************************************
  5705. *
  5706. * CREATE/LOAD SURFACE FROM STREAM/FILE FLAGS
  5707. * Valid for:
  5708. * IDirectDraw4::CreateSurfaceFromStream
  5709. * IDirectDraw4::CreateSurfaceFromFile
  5710. * IDirectDrawSurface4::LoadFromStream
  5711. * IDirectDrawSurface4::LoadFromFile
  5712. *
  5713. ****************************************************************************/
  5714. /*
  5715. * Any palette information in the stream will be discarded.
  5716. * Mutually exclusive with DDLS_MERGEEPALETTE
  5717. * If neither DDLS_IGNOREPALETTE nor DDLS_MERGEPALETTE are specified, then any palette information
  5718. * in the stream will be loaded into a new DirectDrawPalette and attached to the surface.
  5719. */
  5720. #define DDLS_IGNOREPALETTE 0x00000001L
  5721. /*
  5722. * Any palette information in the stream/file will be matched against all existing DirectDrawPalettes.
  5723. * Any matching palette will be attached to the surface. If no palette matches, a new palette is created
  5724. * and attached to the surface.
  5725. * Mutually exclusive with DDLS_IGNOREPALETTE
  5726. * If neither DDLS_IGNOREPALETTE nor DDLS_MERGEPALETTE are specified, then any palette information
  5727. * in the stream will be loaded into a new DirectDrawPalette and attached to the surface.
  5728. */
  5729. #define DDLS_MERGEPALETTE 0x00000002L
  5730. /*
  5731. * The source image will be stretched to fit the specified width.
  5732. * Valid only if the DDSURFACEDESC2 passed to the function has valid width and height members,
  5733. * or if passed to IDirectDrawSurface4::LoadFromFile/Stream.
  5734. * Note that if the specified target width or height is smaller than the source dimension, the
  5735. * source image will be shrunken in that dimension regardless of the setting of this flag.
  5736. */
  5737. #define DDLS_STRETCHTOFIT 0x00000004L
  5738. /*
  5739. * If stretched, the source image will be bilinear filtered.
  5740. * Valid only if DDLS_STRETCHTOFIT is specified.
  5741. */
  5742. #define DDLS_BILINEARFILTER 0x00000008L
  5743. /*
  5744. * The source image will be stretched only as far as is possible maintaining the
  5745. * height to width ratio of the source image.
  5746. * Valid only if DDLS_STRETCHTOFIT is specified.
  5747. */
  5748. #define DDLS_MAINTAINASPECTRATIO 0x00000010L
  5749. /*
  5750. * The source image will be centered in the target surface. If this flag is not specified,
  5751. * the image will be placed in the upper left corner of the surface.
  5752. * Any unused space will be initialized to zero.
  5753. * Valid only if the DDSURFACEDESC2 passed to the function has valid width and height members,
  5754. * or if passed to IDirectDrawSurface4::LoadFromFile/Stream.
  5755. */
  5756. #define DDLS_CENTER 0x00000020L
  5757. // @@END_MSINTERNAL
  5758. //@@BEGIN_MSINTERNAL
  5759. #define DDLS_VALID 0x0000003FL
  5760. //@@END_MSINTERNAL
  5761. /****************************************************************************
  5762. *
  5763. * DIRECTDRAW SETGAMMARAMP FLAGS
  5764. *
  5765. ****************************************************************************/
  5766. /*
  5767. * Request calibrator to adjust the gamma ramp according to the physical
  5768. * properties of the display so that the result should appear identical
  5769. * on all systems.
  5770. */
  5771. #define DDSGR_CALIBRATE 0x00000001L
  5772. //@@BEGIN_MSINTERNAL
  5773. #define DDSGR_VALID 0x00000001L
  5774. //@@END_MSINTERNAL
  5775. /****************************************************************************
  5776. *
  5777. * DIRECTDRAW STARTMODETEST FLAGS
  5778. *
  5779. ****************************************************************************/
  5780. /*
  5781. * Indicates that the mode being tested has passed
  5782. */
  5783. #define DDSMT_ISTESTREQUIRED 0x00000001L
  5784. //@@BEGIN_MSINTERNAL
  5785. #define DDSMT_VALID 0x00000001L
  5786. //@@END_MSINTERNAL
  5787. /****************************************************************************
  5788. *
  5789. * DIRECTDRAW EVALUATEMODE FLAGS
  5790. *
  5791. ****************************************************************************/
  5792. /*
  5793. * Indicates that the mode being tested has passed
  5794. */
  5795. #define DDEM_MODEPASSED 0x00000001L
  5796. /*
  5797. * Indicates that the mode being tested has failed
  5798. */
  5799. #define DDEM_MODEFAILED 0x00000002L
  5800. //@@BEGIN_MSINTERNAL
  5801. #define DDEM_VALID 0x00000003L
  5802. //@@END_MSINTERNAL
  5803. /*===========================================================================
  5804. *
  5805. *
  5806. * DIRECTDRAW RETURN CODES
  5807. *
  5808. * The return values from DirectDraw Commands and Surface that return an HRESULT
  5809. * are codes from DirectDraw concerning the results of the action
  5810. * requested by DirectDraw.
  5811. *
  5812. *==========================================================================*/
  5813. /*
  5814. * Status is OK
  5815. *
  5816. * Issued by: DirectDraw Commands and all callbacks
  5817. */
  5818. //@@BEGIN_MSINTERNAL
  5819. #define DD_OK_HANDLED 1
  5820. #define DD_OK_NOTHANDLED 0
  5821. //@@END_MSINTERNAL
  5822. #define DD_OK S_OK
  5823. #define DD_FALSE S_FALSE
  5824. /****************************************************************************
  5825. *
  5826. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  5827. *
  5828. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  5829. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  5830. * enumeration callback routines.
  5831. *
  5832. ****************************************************************************/
  5833. /*
  5834. * stop the enumeration
  5835. */
  5836. #define DDENUMRET_CANCEL 0
  5837. /*
  5838. * continue the enumeration
  5839. */
  5840. #define DDENUMRET_OK 1
  5841. /****************************************************************************
  5842. *
  5843. * DIRECTDRAW ERRORS
  5844. *
  5845. * Errors are represented by negative values and cannot be combined.
  5846. *
  5847. //@@BEGIN_MSINTERNAL
  5848. * NOTE: To avoid collision with other DX APIs, DDraw uses error codes
  5849. * [5-699] and [1024-2048].
  5850. //@@END_MSINTERNAL
  5851. ****************************************************************************/
  5852. /*
  5853. * This object is already initialized
  5854. */
  5855. #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
  5856. /*
  5857. * This surface can not be attached to the requested surface.
  5858. */
  5859. #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
  5860. /*
  5861. * This surface can not be detached from the requested surface.
  5862. */
  5863. #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
  5864. /*
  5865. * Support is currently not available.
  5866. */
  5867. #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
  5868. /*
  5869. * An exception was encountered while performing the requested operation
  5870. */
  5871. #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
  5872. /*
  5873. * Generic failure.
  5874. */
  5875. #define DDERR_GENERIC E_FAIL
  5876. /*
  5877. * Height of rectangle provided is not a multiple of reqd alignment
  5878. */
  5879. #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
  5880. /*
  5881. * Unable to match primary surface creation request with existing
  5882. * primary surface.
  5883. */
  5884. #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
  5885. /*
  5886. * One or more of the caps bits passed to the callback are incorrect.
  5887. */
  5888. #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
  5889. /*
  5890. * DirectDraw does not support provided Cliplist.
  5891. */
  5892. #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
  5893. /*
  5894. * DirectDraw does not support the requested mode
  5895. */
  5896. #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
  5897. /*
  5898. * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  5899. */
  5900. #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
  5901. /*
  5902. * One or more of the parameters passed to the callback function are
  5903. * incorrect.
  5904. */
  5905. #define DDERR_INVALIDPARAMS E_INVALIDARG
  5906. /*
  5907. * pixel format was invalid as specified
  5908. */
  5909. #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
  5910. /*
  5911. * Rectangle provided was invalid.
  5912. */
  5913. #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
  5914. /*
  5915. * Operation could not be carried out because one or more surfaces are locked
  5916. */
  5917. #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
  5918. /*
  5919. * There is no 3D present.
  5920. */
  5921. #define DDERR_NO3D MAKE_DDHRESULT( 170 )
  5922. /*
  5923. * Operation could not be carried out because there is no alpha accleration
  5924. * hardware present or available.
  5925. */
  5926. #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
  5927. /*
  5928. * Operation could not be carried out because there is no stereo
  5929. * hardware present or available.
  5930. */
  5931. #define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
  5932. /*
  5933. * Operation could not be carried out because there is no hardware
  5934. * present which supports stereo surfaces
  5935. */
  5936. #define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
  5937. // @@BEGIN_MSINTERNAL
  5938. /*
  5939. * Operation could not be carried out because there is no hardware support
  5940. * for synchronizing blts to avoid tearing.
  5941. */
  5942. #define DDERR_NOANTITEARHW MAKE_DDHRESULT( 190 )
  5943. /*
  5944. * Operation could not be carried out because there is no hardware support
  5945. * for asynchronous blting.
  5946. */
  5947. #define DDERR_NOBLTQUEUEHW MAKE_DDHRESULT( 200 )
  5948. // @@END_MSINTERNAL
  5949. /*
  5950. * no clip list available
  5951. */
  5952. #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
  5953. /*
  5954. * Operation could not be carried out because there is no color conversion
  5955. * hardware present or available.
  5956. */
  5957. #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
  5958. /*
  5959. * Create function called without DirectDraw object method SetCooperativeLevel
  5960. * being called.
  5961. */
  5962. #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
  5963. /*
  5964. * Surface doesn't currently have a color key
  5965. */
  5966. #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
  5967. /*
  5968. * Operation could not be carried out because there is no hardware support
  5969. * of the dest color key.
  5970. */
  5971. #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
  5972. /*
  5973. * No DirectDraw support possible with current display driver
  5974. */
  5975. #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
  5976. /*
  5977. * Operation requires the application to have exclusive mode but the
  5978. * application does not have exclusive mode.
  5979. */
  5980. #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
  5981. /*
  5982. * Flipping visible surfaces is not supported.
  5983. */
  5984. #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
  5985. /*
  5986. * There is no GDI present.
  5987. */
  5988. #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
  5989. /*
  5990. * Operation could not be carried out because there is no hardware present
  5991. * or available.
  5992. */
  5993. #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
  5994. /*
  5995. * Requested item was not found
  5996. */
  5997. #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
  5998. /*
  5999. * Operation could not be carried out because there is no overlay hardware
  6000. * present or available.
  6001. */
  6002. #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
  6003. /*
  6004. * Operation could not be carried out because the source and destination
  6005. * rectangles are on the same surface and overlap each other.
  6006. */
  6007. #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
  6008. /*
  6009. * Operation could not be carried out because there is no appropriate raster
  6010. * op hardware present or available.
  6011. */
  6012. #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
  6013. /*
  6014. * Operation could not be carried out because there is no rotation hardware
  6015. * present or available.
  6016. */
  6017. #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
  6018. /*
  6019. * Operation could not be carried out because there is no hardware support
  6020. * for stretching
  6021. */
  6022. #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
  6023. /*
  6024. * DirectDrawSurface is not in 4 bit color palette and the requested operation
  6025. * requires 4 bit color palette.
  6026. */
  6027. #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
  6028. /*
  6029. * DirectDrawSurface is not in 4 bit color index palette and the requested
  6030. * operation requires 4 bit color index palette.
  6031. */
  6032. #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
  6033. /*
  6034. * DirectDraw Surface is not in 8 bit color mode and the requested operation
  6035. * requires 8 bit color.
  6036. */
  6037. #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
  6038. /*
  6039. * Operation could not be carried out because there is no texture mapping
  6040. * hardware present or available.
  6041. */
  6042. #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
  6043. /*
  6044. * Operation could not be carried out because there is no hardware support
  6045. * for vertical blank synchronized operations.
  6046. */
  6047. #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
  6048. /*
  6049. * Operation could not be carried out because there is no hardware support
  6050. * for zbuffer blting.
  6051. */
  6052. #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
  6053. /*
  6054. * Overlay surfaces could not be z layered based on their BltOrder because
  6055. * the hardware does not support z layering of overlays.
  6056. */
  6057. #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
  6058. /*
  6059. * The hardware needed for the requested operation has already been
  6060. * allocated.
  6061. */
  6062. #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
  6063. /*
  6064. * DirectDraw does not have enough memory to perform the operation.
  6065. */
  6066. #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
  6067. /*
  6068. * DirectDraw does not have enough memory to perform the operation.
  6069. */
  6070. #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
  6071. /*
  6072. * hardware does not support clipped overlays
  6073. */
  6074. #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
  6075. /*
  6076. * Can only have ony color key active at one time for overlays
  6077. */
  6078. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
  6079. /*
  6080. * Access to this palette is being refused because the palette is already
  6081. * locked by another thread.
  6082. */
  6083. #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
  6084. /*
  6085. * No src color key specified for this operation.
  6086. */
  6087. #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
  6088. /*
  6089. * This surface is already attached to the surface it is being attached to.
  6090. */
  6091. #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
  6092. /*
  6093. * This surface is already a dependency of the surface it is being made a
  6094. * dependency of.
  6095. */
  6096. #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
  6097. /*
  6098. * Access to this surface is being refused because the surface is already
  6099. * locked by another thread.
  6100. */
  6101. #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
  6102. /*
  6103. * Access to this surface is being refused because no driver exists
  6104. * which can supply a pointer to the surface.
  6105. * This is most likely to happen when attempting to lock the primary
  6106. * surface when no DCI provider is present.
  6107. * Will also happen on attempts to lock an optimized surface.
  6108. */
  6109. #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
  6110. /*
  6111. * Access to Surface refused because Surface is obscured.
  6112. */
  6113. #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
  6114. /*
  6115. * Access to this surface is being refused because the surface is gone.
  6116. * The DIRECTDRAWSURFACE object representing this surface should
  6117. * have Restore called on it.
  6118. */
  6119. #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
  6120. /*
  6121. * The requested surface is not attached.
  6122. */
  6123. #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
  6124. /*
  6125. * Height requested by DirectDraw is too large.
  6126. */
  6127. #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
  6128. /*
  6129. * Size requested by DirectDraw is too large -- The individual height and
  6130. * width are OK.
  6131. */
  6132. #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
  6133. /*
  6134. * Width requested by DirectDraw is too large.
  6135. */
  6136. #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
  6137. /*
  6138. * Action not supported.
  6139. */
  6140. #define DDERR_UNSUPPORTED E_NOTIMPL
  6141. /*
  6142. * Pixel format requested is unsupported by DirectDraw
  6143. */
  6144. #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
  6145. /*
  6146. * Bitmask in the pixel format requested is unsupported by DirectDraw
  6147. */
  6148. #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
  6149. /*
  6150. * The specified stream contains invalid data
  6151. */
  6152. #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
  6153. /*
  6154. * vertical blank is in progress
  6155. */
  6156. #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
  6157. /*
  6158. * Informs DirectDraw that the previous Blt which is transfering information
  6159. * to or from this Surface is incomplete.
  6160. */
  6161. #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
  6162. // @@BEGIN_MSINTERNAL
  6163. /*
  6164. * NT specific: VisRgn changed and must be reset before call can be
  6165. * completed.
  6166. */
  6167. #define DDERR_VISRGNCHANGED MAKE_DDHRESULT( 541 )
  6168. // @@END_MSINTERNAL
  6169. /*
  6170. * The specified surface type requires specification of the COMPLEX flag
  6171. */
  6172. #define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
  6173. /*
  6174. * Rectangle provided was not horizontally aligned on reqd. boundary
  6175. */
  6176. #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
  6177. /*
  6178. * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  6179. * identifier.
  6180. */
  6181. #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
  6182. /*
  6183. * A DirectDraw object representing this driver has already been created
  6184. * for this process.
  6185. */
  6186. #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
  6187. /*
  6188. * A hardware only DirectDraw object creation was attempted but the driver
  6189. * did not support any hardware.
  6190. */
  6191. #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
  6192. /*
  6193. * this process already has created a primary surface
  6194. */
  6195. #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
  6196. /*
  6197. * software emulation not available.
  6198. */
  6199. #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
  6200. /*
  6201. * region passed to Clipper::GetClipList is too small.
  6202. */
  6203. #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
  6204. /*
  6205. * an attempt was made to set a clip list for a clipper objec that
  6206. * is already monitoring an hwnd.
  6207. */
  6208. #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
  6209. /*
  6210. * No clipper object attached to surface object
  6211. */
  6212. #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
  6213. /*
  6214. * Clipper notification requires an HWND or
  6215. * no HWND has previously been set as the CooperativeLevel HWND.
  6216. */
  6217. #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
  6218. /*
  6219. * HWND used by DirectDraw CooperativeLevel has been subclassed,
  6220. * this prevents DirectDraw from restoring state.
  6221. */
  6222. #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
  6223. /*
  6224. * The CooperativeLevel HWND has already been set.
  6225. * It can not be reset while the process has surfaces or palettes created.
  6226. */
  6227. #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
  6228. /*
  6229. * No palette object attached to this surface.
  6230. */
  6231. #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
  6232. /*
  6233. * No hardware support for 16 or 256 color palettes.
  6234. */
  6235. #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
  6236. /*
  6237. * If a clipper object is attached to the source surface passed into a
  6238. * BltFast call.
  6239. */
  6240. #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
  6241. /*
  6242. * No blter.
  6243. */
  6244. #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
  6245. /*
  6246. * No DirectDraw ROP hardware.
  6247. */
  6248. #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
  6249. /*
  6250. * returned when GetOverlayPosition is called on a hidden overlay
  6251. */
  6252. #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
  6253. /*
  6254. * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  6255. * has never been called on to establish a destionation.
  6256. */
  6257. #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
  6258. /*
  6259. * returned when the position of the overlay on the destionation is no longer
  6260. * legal for that destionation.
  6261. */
  6262. #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
  6263. /*
  6264. * returned when an overlay member is called for a non-overlay surface
  6265. */
  6266. #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
  6267. /*
  6268. * An attempt was made to set the cooperative level when it was already
  6269. * set to exclusive.
  6270. */
  6271. #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
  6272. /*
  6273. * An attempt has been made to flip a surface that is not flippable.
  6274. */
  6275. #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
  6276. /*
  6277. * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  6278. * created.
  6279. */
  6280. #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
  6281. /*
  6282. * Surface was not locked. An attempt to unlock a surface that was not
  6283. * locked at all, or by this process, has been attempted.
  6284. */
  6285. #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
  6286. /*
  6287. * Windows can not create any more DCs, or a DC was requested for a paltte-indexed
  6288. * surface when the surface had no palette AND the display mode was not palette-indexed
  6289. * (in this case DirectDraw cannot select a proper palette into the DC)
  6290. */
  6291. #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
  6292. /*
  6293. * No DC was ever created for this surface.
  6294. */
  6295. #define DDERR_NODC MAKE_DDHRESULT( 586 )
  6296. /*
  6297. * This surface can not be restored because it was created in a different
  6298. * mode.
  6299. */
  6300. #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
  6301. /*
  6302. * This surface can not be restored because it is an implicitly created
  6303. * surface.
  6304. */
  6305. #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
  6306. /*
  6307. * The surface being used is not a palette-based surface
  6308. */
  6309. #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
  6310. /*
  6311. * The display is currently in an unsupported mode
  6312. */
  6313. #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
  6314. /*
  6315. * Operation could not be carried out because there is no mip-map
  6316. * texture mapping hardware present or available.
  6317. */
  6318. #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
  6319. /*
  6320. * The requested action could not be performed because the surface was of
  6321. * the wrong type.
  6322. */
  6323. #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
  6324. // @@BEGIN_MSINTERNAL
  6325. /*
  6326. * Operation could not be carried out because there is no hardware support
  6327. * for execute buffers.
  6328. */
  6329. #define DDERR_NOEXECUTEBUFFERHW MAKE_DDHRESULT( 593 )
  6330. // @@END_MSINTERNAL
  6331. // @@BEGIN_MSINTERNAL
  6332. #ifdef SHAREDZ
  6333. /*
  6334. * This process has already created a shared Z buffer
  6335. */
  6336. #define DDERR_SHAREDZBUFFERALREADYEXISTS MAKE_DDHRESULT( 594 )
  6337. /*
  6338. * Unable to match shared Z buffer creation request with existing
  6339. * shared Z buffer.
  6340. */
  6341. #define DDERR_INCOMPATIBLESHAREDZBUFFER MAKE_DDHRESULT( 595 )
  6342. /*
  6343. * This process has already created a shared backbuffer
  6344. */
  6345. #define DDERR_SHAREDBACKBUFFERALREADYEXISTS MAKE_DDHRESULT( 596 )
  6346. /*
  6347. * Unable to match shared backbuffer creation request with existing
  6348. * shared backbuffer.
  6349. */
  6350. #define DDERR_INCOMPATIBLESHAREDBACKBUFFER MAKE_DDHRESULT( 597 )
  6351. /*
  6352. * Operation could not be carried out because there is no hardware support
  6353. * for shared Z buffers.
  6354. */
  6355. #define DDERR_NOSHAREDZBUFFERHW MAKE_DDHRESULT( 598 )
  6356. /*
  6357. * Operation could not be carried out because there is no hardware support
  6358. * for shared backbuffers.
  6359. */
  6360. #define DDERR_NOSHAREDBACKBUFFERHW MAKE_DDHRESULT( 599 )
  6361. #endif
  6362. // @@END_MSINTERNAL
  6363. /*
  6364. * Device does not support optimized surfaces, therefore no video memory optimized surfaces
  6365. */
  6366. #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
  6367. /*
  6368. * Surface is an optimized surface, but has not yet been allocated any memory
  6369. */
  6370. #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
  6371. /*
  6372. * Attempt was made to create or set a device window without first setting
  6373. * the focus window
  6374. */
  6375. #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
  6376. /*
  6377. * Attempt was made to set a palette on a mipmap sublevel
  6378. */
  6379. #define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
  6380. /*
  6381. * A DC has already been returned for this surface. Only one DC can be
  6382. * retrieved per surface.
  6383. */
  6384. #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
  6385. /*
  6386. * An attempt was made to allocate non-local video memory from a device
  6387. * that does not support non-local video memory.
  6388. */
  6389. #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
  6390. /*
  6391. * The attempt to page lock a surface failed.
  6392. */
  6393. #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
  6394. //@@BEGIN_MSINTERNAL
  6395. /*
  6396. * The GUID is not recognized by the driver. In case of Optimized Surfaces,
  6397. * this GUID represents the compresison technique requested.
  6398. */
  6399. #define DDERR_UNRECOGNIZEDGUID MAKE_DDHRESULT( 650 )
  6400. /*
  6401. * The driver does not support Optimized Surfaces
  6402. */
  6403. #define DDERR_NOOPTSURFACESUPPORT MAKE_DDHRESULT( 651 )
  6404. /*
  6405. * The surface is not an optimized surface
  6406. */
  6407. #define DDERR_NOTANOPTIMIZEDSURFACE MAKE_DDHRESULT( 652 )
  6408. /*
  6409. * The surface is an empty optimized surface
  6410. */
  6411. #define DDERR_ISANEMPTYOPTIMIZEDSURFACE MAKE_DDHRESULT( 653 )
  6412. /*
  6413. * The surface is not an empty optimized surface
  6414. */
  6415. #define DDERR_NOTANEMPTYOPTIMIZEDSURFACE MAKE_DDHRESULT( 654 )
  6416. /*
  6417. * The surface is optimized
  6418. */
  6419. #define DDERR_ISOPTIMIZEDSURFACE MAKE_DDHRESULT( 655 )
  6420. //@@END_MSINTERNAL
  6421. /*
  6422. * The attempt to page unlock a surface failed.
  6423. */
  6424. #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
  6425. /*
  6426. * An attempt was made to page unlock a surface with no outstanding page locks.
  6427. */
  6428. #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
  6429. /*
  6430. * There is more data available than the specified buffer size could hold
  6431. */
  6432. #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
  6433. /*
  6434. * The data has expired and is therefore no longer valid.
  6435. */
  6436. #define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
  6437. /*
  6438. * The mode test has finished executing.
  6439. */
  6440. #define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
  6441. /*
  6442. * The mode test has switched to a new mode.
  6443. */
  6444. #define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
  6445. /*
  6446. * D3D has not yet been initialized.
  6447. */
  6448. #define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
  6449. /*
  6450. * The video port is not active
  6451. */
  6452. #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
  6453. /*
  6454. * The monitor does not have EDID data.
  6455. */
  6456. #define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
  6457. /*
  6458. * The driver does not enumerate display mode refresh rates.
  6459. */
  6460. #define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
  6461. /*
  6462. * Surfaces created by one direct draw device cannot be used directly by
  6463. * another direct draw device.
  6464. */
  6465. #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
  6466. //@@BEGIN_MSINTERNAL
  6467. /*=======================================================================
  6468. * DANGER WIL ROBINSON! D3D errors begin at 700... take care not to
  6469. * step on D3dD's toes when defining new ddraw errors.
  6470. *=======================================================================*/
  6471. /****************************************************************************
  6472. *
  6473. * end of DIRECTDRAW ERRORS
  6474. *
  6475. * NOTE: To avoid collision with other DX APIs, DDraw uses error codes
  6476. * [5-699] and [1024-2048].
  6477. *
  6478. ****************************************************************************/
  6479. //@@END_MSINTERNAL
  6480. /*
  6481. * An attempt was made to invoke an interface member of a DirectDraw object
  6482. * created by CoCreateInstance() before it was initialized.
  6483. */
  6484. #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
  6485. /* Alpha bit depth constants */
  6486. //@@BEGIN_MSINTERNAL
  6487. /*
  6488. * 1 bit alpha constants
  6489. */
  6490. /*
  6491. * Completely transparent. Colors being blended with this constant do not affect
  6492. * the final result.
  6493. */
  6494. #define DDALPHA1_TRANSPARENT 0
  6495. /*
  6496. * Completely opaque. Colors being blended with this constant are the final result.
  6497. */
  6498. #define DDALPHA1_OPAQUE 1
  6499. /*
  6500. * 2 bit alpha constants
  6501. */
  6502. /*
  6503. * Completely transparent. Colors being blended with this constant do not effect
  6504. * the final result.
  6505. */
  6506. #define DDALPHA2_TRANSPARENT 0
  6507. /*
  6508. * 50-50 blend. Colors being blended with this constant effect the final result
  6509. * with 50% of their color.
  6510. */
  6511. #define DDALPHA2_50 2
  6512. /*
  6513. * Completely opaque. Colors being blended with this constant are the final result.
  6514. */
  6515. #define DDALPHA2_OPAQUE 3
  6516. /*
  6517. * 4 bit alpha constants
  6518. */
  6519. /*
  6520. * Completely transparent. Colors being blended with this constant do not effect
  6521. * the final result.
  6522. */
  6523. #define DDALPHA4_TRANSPARENT 0
  6524. /*
  6525. * Opaque modifier is multiplied by any value between 0 and _OPAQUE to
  6526. * establish gradients of alpha blending.
  6527. */
  6528. #define DDALPHA4_OPAQUEMOD 1
  6529. /*
  6530. * 50-50 blend. Colors being blended with this constant effect the final result
  6531. * with 50% of their color.
  6532. */
  6533. #define DDALPHA4_50 8
  6534. /*
  6535. * Completely opaque. Colors being blended with this constant are the final result.
  6536. */
  6537. #define DDALPHA4_OPAQUE 15
  6538. /*
  6539. * 8 bit alpha constants
  6540. */
  6541. /*
  6542. * Completely transparent. Colors being blended with this constant do not effect
  6543. * the final result.
  6544. */
  6545. #define DDALPHA8_TRANSPARENT 0
  6546. /*
  6547. * Opaque modifier is multiplied by any value between 0 and _OPAQUE to
  6548. * establish gradients of alpha blending.
  6549. */
  6550. #define DDALPHA8_OPAQUEMOD 1
  6551. /*
  6552. * 50-50 blend. Colors being blended with this constant effect the final result
  6553. * with 50% of their color.
  6554. */
  6555. #define DDALPHA8_50 128
  6556. /*
  6557. * Completely opaque. Colors being blended with this constant are the final result.
  6558. */
  6559. #define DDALPHA8_OPAQUE 255
  6560. //@@END_MSINTERNAL
  6561. #ifdef __cplusplus
  6562. };
  6563. #endif
  6564. #ifdef ENABLE_NAMELESS_UNION_PRAGMA
  6565. #pragma warning(default:4201)
  6566. #endif
  6567. #endif //__DDRAW_INCLUDED__