Leaked source code of windows server 2003
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.

7303 lines
295 KiB

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