PageRenderTime 79ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/packages/ptc/src/win32/directx/p_ddraw.pp

https://github.com/slibre/freepascal
Puppet | 5259 lines | 4867 code | 361 blank | 31 comment | 275 complexity | 8d08739756d3642ddbd99cc70dfc0c85 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
  1. (*==========================================================================;
  2. *
  3. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddraw.h
  6. * Content: DirectDraw include file
  7. *
  8. ***************************************************************************)
  9. unit p_ddraw;
  10. {$MODE objfpc}{$H+}
  11. {$MACRO on}
  12. {$PACKRECORDS c}
  13. {$MODESWITCH NESTEDCOMMENTS-}
  14. {$DEFINE DIRECTDRAW_DYNAMIC_LINK}
  15. interface
  16. uses
  17. windows;
  18. {#ifndef __DDRAW_INCLUDED__
  19. #define __DDRAW_INCLUDED__
  20. //Disable the nameless union warning when building internally
  21. #undef ENABLE_NAMELESS_UNION_PRAGMA
  22. #ifdef DIRECTX_REDIST
  23. #define ENABLE_NAMELESS_UNION_PRAGMA
  24. #endif
  25. #ifdef ENABLE_NAMELESS_UNION_PRAGMA
  26. #pragma warning(disable:4201)
  27. #endif}
  28. (*
  29. * If you wish an application built against the newest version of DirectDraw
  30. * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION
  31. * to be the earlies version of DirectDraw you wish to run against. For,
  32. * example if you wish an application to run against a DX 3 runtime define
  33. * DIRECTDRAW_VERSION to be 0x0300.
  34. *)
  35. {$IFNDEF DIRECTDRAW_VERSION}
  36. {$DEFINE DIRECTDRAW_VERSION:=$0700}
  37. {$ENDIF} //#endif /* DIRECTDRAW_VERSION */
  38. {#if defined( _WIN32 ) && !defined( _NO_COM )
  39. #define COM_NO_WINDOWS_H
  40. #include <objbase.h>
  41. #else
  42. #define IUnknown void
  43. #if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
  44. #define CO_E_NOTINITIALIZED 0x800401F0L
  45. #endif
  46. #endif}
  47. const
  48. _FACDD = $876;
  49. //#define _FACDD 0x876
  50. //#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  51. //#ifdef __cplusplus
  52. //extern "C" {
  53. //#endif
  54. //
  55. // For compilers that don't support nameless unions, do a
  56. //
  57. // #define NONAMELESSUNION
  58. //
  59. // before #include <ddraw.h>
  60. //
  61. {#ifndef DUMMYUNIONNAMEN
  62. #if defined(__cplusplus) || !defined(NONAMELESSUNION)
  63. #define DUMMYUNIONNAMEN(n)
  64. #else
  65. #define DUMMYUNIONNAMEN(n) u##n
  66. #endif
  67. #endif}
  68. {#ifndef MAKEFOURCC
  69. #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
  70. ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
  71. ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
  72. #endif //defined(MAKEFOURCC)}
  73. (*
  74. * FOURCC codes for DX compressed-texture pixel formats
  75. *)
  76. const
  77. FOURCC_DXT1 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('1') shl 24);
  78. FOURCC_DXT2 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('2') shl 24);
  79. FOURCC_DXT3 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('3') shl 24);
  80. FOURCC_DXT4 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('4') shl 24);
  81. FOURCC_DXT5 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('5') shl 24);
  82. (*
  83. * GUIDS used by DirectDraw objects
  84. *)
  85. //#if defined( _WIN32 ) && !defined( _NO_COM )
  86. const
  87. CLSID_DirectDraw: TGuid = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}';
  88. CLSID_DirectDraw7: TGuid = '{3c305196-50db-11d3-9cfe-00c04fd930c5}';
  89. CLSID_DirectDrawClipper: TGuid = '{593817A0-7DB3-11CF-A2DE-00AA00b93356}';
  90. IID_IDirectDraw: TGuid = '{6C14DB80-A733-11CE-A521-0020AF0BE560}';
  91. IID_IDirectDraw2: TGuid = '{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}';
  92. IID_IDirectDraw4: TGuid = '{9c59509a-39bd-11d1-8c4a-00c04fd930c5}';
  93. IID_IDirectDraw7: TGuid = '{15e65ec0-3b9c-11d2-b92f-00609797ea5b}';
  94. IID_IDirectDrawSurface: TGuid = '{6C14DB81-A733-11CE-A521-0020AF0BE560}';
  95. IID_IDirectDrawSurface2: TGuid = '{57805885-6eec-11cf-9441-a82303c10e27}';
  96. IID_IDirectDrawSurface3: TGuid = '{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}';
  97. IID_IDirectDrawSurface4: TGuid = '{0B2B8630-AD35-11D0-8EA6-00609797EA5B}';
  98. IID_IDirectDrawSurface7: TGuid = '{06675a80-3b9b-11d2-b92f-00609797ea5b}';
  99. IID_IDirectDrawPalette: TGuid = '{6C14DB84-A733-11CE-A521-0020AF0BE560}';
  100. IID_IDirectDrawClipper: TGuid = '{6C14DB85-A733-11CE-A521-0020AF0BE560}';
  101. IID_IDirectDrawColorControl: TGuid = '{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}';
  102. IID_IDirectDrawGammaControl: TGuid = '{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}';
  103. //#endif
  104. (*============================================================================
  105. *
  106. * DirectDraw Structures
  107. *
  108. * Various structures used to invoke DirectDraw.
  109. *
  110. *==========================================================================*)
  111. {struct IDirectDraw;
  112. struct IDirectDrawSurface;
  113. struct IDirectDrawPalette;
  114. struct IDirectDrawClipper;}
  115. {typedef struct IDirectDraw FAR *LPDIRECTDRAW;
  116. typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
  117. typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4;
  118. typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7;
  119. typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
  120. typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
  121. typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
  122. typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4;
  123. typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7;
  124. typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
  125. typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
  126. typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
  127. typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL;}
  128. type
  129. IDirectDraw = interface;
  130. IDirectDraw2 = interface;
  131. IDirectDraw4 = interface;
  132. IDirectDraw7 = interface;
  133. IDirectDrawSurface = interface;
  134. IDirectDrawSurface2 = interface;
  135. IDirectDrawSurface3 = interface;
  136. IDirectDrawSurface4 = interface;
  137. IDirectDrawSurface7 = interface;
  138. IDirectDrawPalette = interface;
  139. IDirectDrawClipper = interface;
  140. IDirectDrawColorControl = interface;
  141. IDirectDrawGammaControl = interface;
  142. {typedef struct _DDFXROP FAR *LPDDFXROP;
  143. typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
  144. typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2;
  145. typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;}
  146. (*
  147. * API's
  148. *)
  149. //#if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  150. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  151. // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  152. LPDDENUMCALLBACKA = function(lpGUID: PGUID; lpDriverDescription: LPSTR; lpDriverName: LPSTR; lpContext: LPVOID): BOOL; stdcall;
  153. // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  154. LPDDENUMCALLBACKW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR; lpDriverName: LPWSTR; lpContext: LPVOID): BOOL; stdcall;
  155. type
  156. { /*
  157. * Protect against old SDKs
  158. */
  159. #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
  160. #define HMONITOR_DECLARED
  161. DECLARE_HANDLE(HMONITOR);
  162. #endif}
  163. {$WARNING HMONITOR should go to the windows unit}
  164. HMONITOR = HANDLE;
  165. // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
  166. LPDDENUMCALLBACKEXA = function(lpGUID: PGUID; lpDriverDescription: LPSTR; lpDriverName: LPSTR; lpContext: LPVOID; hm: HMONITOR): BOOL; stdcall;
  167. // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
  168. LPDDENUMCALLBACKEXW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR; lpDriverName: LPWSTR; lpContext: LPVOID; hm: HMONITOR): BOOL; stdcall;
  169. type
  170. // typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  171. LPDIRECTDRAWENUMERATEEXA = function(lpCallback: LPDDENUMCALLBACKEXA; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall;
  172. // typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  173. LPDIRECTDRAWENUMERATEEXW = function(lpCallback: LPDDENUMCALLBACKEXW; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall;
  174. { #ifdef UNICODE
  175. typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
  176. #define DirectDrawEnumerate DirectDrawEnumerateW
  177. typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX;
  178. typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX;
  179. #define DirectDrawEnumerateEx DirectDrawEnumerateExW
  180. #else
  181. typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
  182. #define DirectDrawEnumerate DirectDrawEnumerateA
  183. typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX;
  184. typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX;
  185. #define DirectDrawEnumerateEx DirectDrawEnumerateExA
  186. #endif}
  187. //#endif}
  188. (*
  189. * Flags for DirectDrawEnumerateEx
  190. * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
  191. * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
  192. * By default, only the primary display device is enumerated.
  193. * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
  194. *)
  195. (*
  196. * This flag causes enumeration of any GDI display devices which are part of
  197. * the Windows Desktop
  198. *)
  199. const
  200. DDENUM_ATTACHEDSECONDARYDEVICES = $00000001;
  201. (*
  202. * This flag causes enumeration of any GDI display devices which are not
  203. * part of the Windows Desktop
  204. *)
  205. DDENUM_DETACHEDSECONDARYDEVICES = $00000002;
  206. (*
  207. * This flag causes enumeration of non-display devices
  208. *)
  209. DDENUM_NONDISPLAYDEVICES = $00000004;
  210. REGSTR_KEY_DDHW_DESCRIPTION = 'Description';
  211. REGSTR_KEY_DDHW_DRIVERNAME = 'DriverName';
  212. REGSTR_PATH_DDHW = 'Hardware\DirectDrawDrivers';
  213. DDCREATE_HARDWAREONLY = $00000001;
  214. DDCREATE_EMULATIONONLY = $00000002;
  215. {#if defined(WINNT) || !defined(WIN32)
  216. #ifndef _HRESULT_DEFINED
  217. #define _HRESULT_DEFINED
  218. typedef __success(return >= 0) long HRESULT;
  219. #endif // !_HRESULT_DEFINED
  220. #endif}
  221. (*
  222. * Generic pixel format with 8-bit RGB and alpha components
  223. *)
  224. type
  225. PDDARGB = ^TDDARGB;
  226. TDDARGB = record
  227. blue: BYTE;
  228. green: BYTE;
  229. red: BYTE;
  230. alpha: BYTE;
  231. end;
  232. (*
  233. * This version of the structure remains for backwards source compatibility.
  234. * The DDARGB structure is the one that should be used for all DirectDraw APIs.
  235. *)
  236. PDDRGBA = ^TDDRGBA;
  237. TDDRGBA = record
  238. red: BYTE;
  239. green: BYTE;
  240. blue: BYTE;
  241. alpha: BYTE;
  242. end;
  243. (*
  244. * DDCOLORKEY
  245. *)
  246. PDDCOLORKEY = ^TDDCOLORKEY;
  247. TDDCOLORKEY = record
  248. dwColorSpaceLowValue: DWORD; // low boundary of color space that is to
  249. // be treated as Color Key, inclusive
  250. dwColorSpaceHighValue: DWORD; // high boundary of color space that is
  251. // to be treated as Color Key, inclusive
  252. end;
  253. PDirectDrawSurface = Pointer;
  254. (*
  255. * DDBLTFX
  256. * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  257. *)
  258. PDDBLTFX = ^TDDBLTFX;
  259. TDDBLTFX = record
  260. dwSize: DWORD; // size of structure
  261. dwDDFX: DWORD; // FX operations
  262. dwROP: DWORD; // Win32 raster operations
  263. dwDDROP: DWORD; // Raster operations new for DirectDraw
  264. dwRotationAngle: DWORD; // Rotation angle for blt
  265. dwZBufferOpCode: DWORD; // ZBuffer compares
  266. dwZBufferLow: DWORD; // Low limit of Z buffer
  267. dwZBufferHigh: DWORD; // High limit of Z buffer
  268. dwZBufferBaseDest: DWORD; // Destination base value
  269. dwZDestConstBitDepth: DWORD; // Bit depth used to specify Z constant for destination
  270. case Integer of
  271. 0: (
  272. dwZDestConst: DWORD; // Constant to use as Z buffer for dest
  273. );
  274. 1: (
  275. lpDDSZBufferDest: PDirectDrawSurface; // Surface to use as Z buffer for dest
  276. dwZSrcConstBitDepth: DWORD; // Bit depth used to specify Z constant for source
  277. case Integer of
  278. 0: (
  279. dwZSrcConst: DWORD; // Constant to use as Z buffer for src
  280. );
  281. 1: (
  282. lpDDSZBufferSrc: PDirectDrawSurface; // Surface to use as Z buffer for src
  283. dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend
  284. dwAlphaEdgeBlend: DWORD; // Alpha for edge blending
  285. dwReserved: DWORD;
  286. dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination
  287. case Integer of
  288. 0: (
  289. dwAlphaDestConst: DWORD; // Constant to use as Alpha Channel
  290. );
  291. 1: (
  292. lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as Alpha Channel
  293. dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source
  294. case Integer of
  295. 0: (
  296. dwAlphaSrcConst: DWORD; // Constant to use as Alpha Channel
  297. );
  298. 1: (
  299. lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as Alpha Channel
  300. case Integer of
  301. 0: (
  302. dwFillColor: DWORD; // color in RGB or Palettized
  303. );
  304. 1: (
  305. dwFillDepth: DWORD; // depth value for z-buffer
  306. );
  307. 2: (
  308. dwFillPixel: DWORD; // pixel value for RGBA or RGBZ
  309. );
  310. 3: (
  311. lpDDSPattern: PDirectDrawSurface; // Surface to use as pattern
  312. ddckDestColorkey: TDDCOLORKEY; // DestColorkey override
  313. ddckSrcColorkey: TDDCOLORKEY; // SrcColorkey override
  314. );
  315. );
  316. );
  317. );
  318. );
  319. end;
  320. (*
  321. * DDSCAPS
  322. *)
  323. PDDSCAPS = ^TDDSCAPS;
  324. TDDSCAPS = record
  325. dwCaps: DWORD; // capabilities of surface wanted
  326. end;
  327. (*
  328. * DDOSCAPS
  329. *)
  330. PDDOSCAPS = ^TDDOSCAPS;
  331. TDDOSCAPS = record
  332. dwCaps: DWORD; // capabilities of surface wanted
  333. end;
  334. (*
  335. * This structure is used internally by DirectDraw.
  336. *)
  337. PDDSCAPSEX = ^TDDSCAPSEX;
  338. TDDSCAPSEX = record
  339. dwCaps2: DWORD;
  340. dwCaps3: DWORD;
  341. case Integer of
  342. 0: (
  343. dwCaps4: DWORD;
  344. );
  345. 1: (
  346. dwVolumeDepth: DWORD;
  347. );
  348. end;
  349. (*
  350. * DDSCAPS2
  351. *)
  352. PDDSCAPS2 = ^TDDSCAPS2;
  353. TDDSCAPS2 = record
  354. dwCaps: DWORD; // capabilities of surface wanted
  355. dwCaps2: DWORD;
  356. dwCaps3: DWORD;
  357. case Integer of
  358. 0: (
  359. dwCaps4: DWORD;
  360. );
  361. 1: (
  362. dwVolumeDepth: DWORD;
  363. );
  364. end;
  365. (*
  366. * DDCAPS
  367. *)
  368. const
  369. DD_ROP_SPACE = 256 div 32; // space required to store ROP array
  370. (*
  371. * NOTE: Our choosen structure number scheme is to append a single digit to
  372. * the end of the structure giving the version that structure is associated
  373. * with.
  374. *)
  375. (*
  376. * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally
  377. * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0.
  378. * New applications should use the DDCAPS structure defined below.
  379. *)
  380. type
  381. PDDCAPS_DX1 = ^TDDCAPS_DX1;
  382. TDDCAPS_DX1 = record
  383. dwSize: DWORD; // size of the DDDRIVERCAPS structure
  384. dwCaps: DWORD; // driver specific capabilities
  385. dwCaps2: DWORD; // more driver specific capabilites
  386. dwCKeyCaps: DWORD; // color key capabilities of the surface
  387. dwFXCaps: DWORD; // driver specific stretching and effects capabilites
  388. dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
  389. dwPalCaps: DWORD; // palette capabilities
  390. dwSVCaps: DWORD; // stereo vision capabilities
  391. dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
  392. dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
  393. dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  394. dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
  395. dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
  396. dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  397. dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
  398. dwVidMemTotal: DWORD; // total amount of video memory
  399. dwVidMemFree: DWORD; // amount of free video memory
  400. dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
  401. dwCurrVisibleOverlays: DWORD; // current number of visible overlays
  402. dwNumFourCCCodes: DWORD; // number of four cc codes
  403. dwAlignBoundarySrc: DWORD; // source rectangle alignment
  404. dwAlignSizeSrc: DWORD; // source rectangle byte size
  405. dwAlignBoundaryDest: DWORD; // dest rectangle alignment
  406. dwAlignSizeDest: DWORD; // dest rectangle byte size
  407. dwAlignStrideAlign: DWORD; // stride alignment
  408. dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
  409. ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities
  410. dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  411. dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  412. dwMinLiveVideoStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
  413. dwMaxLiveVideoStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
  414. dwMinHwCodecStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
  415. dwMaxHwCodecStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
  416. dwReserved1: DWORD; // reserved
  417. dwReserved2: DWORD; // reserved
  418. dwReserved3: DWORD; // reserved
  419. end;
  420. (*
  421. * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
  422. * It is present for back compatability.
  423. *)
  424. PDDCAPS_DX3 = ^TDDCAPS_DX3;
  425. TDDCAPS_DX3 = record
  426. dwSize: DWORD; // size of the DDDRIVERCAPS structure
  427. dwCaps: DWORD; // driver specific capabilities
  428. dwCaps2: DWORD; // more driver specific capabilites
  429. dwCKeyCaps: DWORD; // color key capabilities of the surface
  430. dwFXCaps: DWORD; // driver specific stretching and effects capabilites
  431. dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
  432. dwPalCaps: DWORD; // palette capabilities
  433. dwSVCaps: DWORD; // stereo vision capabilities
  434. dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
  435. dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
  436. dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  437. dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
  438. dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
  439. dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  440. dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
  441. dwVidMemTotal: DWORD; // total amount of video memory
  442. dwVidMemFree: DWORD; // amount of free video memory
  443. dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
  444. dwCurrVisibleOverlays: DWORD; // current number of visible overlays
  445. dwNumFourCCCodes: DWORD; // number of four cc codes
  446. dwAlignBoundarySrc: DWORD; // source rectangle alignment
  447. dwAlignSizeSrc: DWORD; // source rectangle byte size
  448. dwAlignBoundaryDest: DWORD; // dest rectangle alignment
  449. dwAlignSizeDest: DWORD; // dest rectangle byte size
  450. dwAlignStrideAlign: DWORD; // stride alignment
  451. dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
  452. ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities
  453. dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  454. dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  455. dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  456. dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  457. dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  458. dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  459. dwReserved1: DWORD; // reserved
  460. dwReserved2: DWORD; // reserved
  461. dwReserved3: DWORD; // reserved
  462. dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
  463. dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
  464. dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
  465. dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
  466. dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
  467. dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
  468. dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
  469. dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
  470. dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
  471. dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
  472. dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
  473. dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
  474. dwReserved4: DWORD; // reserved
  475. dwReserved5: DWORD; // reserved
  476. dwReserved6: DWORD; // reserved
  477. end;
  478. (*
  479. * This structure is the DDCAPS structure as it was in version 5 of Direct X.
  480. * It is present for back compatability.
  481. *)
  482. PDDCAPS_DX5 = ^TDDCAPS_DX5;
  483. TDDCAPS_DX5 = record
  484. (* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure
  485. (* 4*) dwCaps: DWORD; // driver specific capabilities
  486. (* 8*) dwCaps2: DWORD; // more driver specific capabilites
  487. (* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface
  488. (* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites
  489. (* 14*) dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
  490. (* 18*) dwPalCaps: DWORD; // palette capabilities
  491. (* 1c*) dwSVCaps: DWORD; // stereo vision capabilities
  492. (* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
  493. (* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
  494. (* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  495. (* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
  496. (* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
  497. (* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  498. (* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
  499. (* 3c*) dwVidMemTotal: DWORD; // total amount of video memory
  500. (* 40*) dwVidMemFree: DWORD; // amount of free video memory
  501. (* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
  502. (* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays
  503. (* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes
  504. (* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment
  505. (* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size
  506. (* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment
  507. (* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size
  508. (* 60*) dwAlignStrideAlign: DWORD; // stride alignment
  509. (* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
  510. (* 84*) ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities
  511. (* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  512. (* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  513. (* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  514. (* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  515. (* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  516. (* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  517. (* a0*) dwReserved1: DWORD; // reserved
  518. (* a4*) dwReserved2: DWORD; // reserved
  519. (* a8*) dwReserved3: DWORD; // reserved
  520. (* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
  521. (* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
  522. (* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
  523. (* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
  524. (* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
  525. (* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
  526. (* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
  527. (* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
  528. (*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
  529. (*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
  530. (*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
  531. (*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
  532. // Members added for DX5:
  533. (*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports
  534. (*134*) dwCurrVideoPorts: DWORD; // current number of video ports used
  535. (*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
  536. (*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
  537. (*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
  538. (*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
  539. (*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
  540. (*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
  541. end;
  542. PDDCAPS_DX6 = ^TDDCAPS_DX6;
  543. TDDCAPS_DX6 = record
  544. (* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure
  545. (* 4*) dwCaps: DWORD; // driver specific capabilities
  546. (* 8*) dwCaps2: DWORD; // more driver specific capabilites
  547. (* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface
  548. (* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites
  549. (* 14*) dwFXAlphaCaps: DWORD; // alpha caps
  550. (* 18*) dwPalCaps: DWORD; // palette capabilities
  551. (* 1c*) dwSVCaps: DWORD; // stereo vision capabilities
  552. (* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
  553. (* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
  554. (* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  555. (* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
  556. (* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
  557. (* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  558. (* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
  559. (* 3c*) dwVidMemTotal: DWORD; // total amount of video memory
  560. (* 40*) dwVidMemFree: DWORD; // amount of free video memory
  561. (* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
  562. (* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays
  563. (* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes
  564. (* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment
  565. (* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size
  566. (* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment
  567. (* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size
  568. (* 60*) dwAlignStrideAlign: DWORD; // stride alignment
  569. (* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
  570. (* 84*) ddsOldCaps: TDDSCAPS; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  571. (* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  572. (* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  573. (* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  574. (* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  575. (* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  576. (* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  577. (* a0*) dwReserved1: DWORD; // reserved
  578. (* a4*) dwReserved2: DWORD; // reserved
  579. (* a8*) dwReserved3: DWORD; // reserved
  580. (* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
  581. (* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
  582. (* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
  583. (* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
  584. (* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
  585. (* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
  586. (* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
  587. (* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
  588. (*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
  589. (*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
  590. (*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
  591. (*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
  592. (*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports
  593. (*134*) dwCurrVideoPorts: DWORD; // current number of video ports used
  594. (*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
  595. (*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
  596. (*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
  597. (*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
  598. (*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
  599. (*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
  600. // Members added for DX6 release
  601. (*16c*) ddsCaps: TDDSCAPS2; // Surface Caps
  602. end;
  603. PDDCAPS_DX7 = ^TDDCAPS_DX7;
  604. TDDCAPS_DX7 = record
  605. (* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure
  606. (* 4*) dwCaps: DWORD; // driver specific capabilities
  607. (* 8*) dwCaps2: DWORD; // more driver specific capabilites
  608. (* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface
  609. (* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites
  610. (* 14*) dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
  611. (* 18*) dwPalCaps: DWORD; // palette capabilities
  612. (* 1c*) dwSVCaps: DWORD; // stereo vision capabilities
  613. (* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
  614. (* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
  615. (* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  616. (* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
  617. (* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
  618. (* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
  619. (* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
  620. (* 3c*) dwVidMemTotal: DWORD; // total amount of video memory
  621. (* 40*) dwVidMemFree: DWORD; // amount of free video memory
  622. (* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
  623. (* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays
  624. (* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes
  625. (* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment
  626. (* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size
  627. (* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment
  628. (* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size
  629. (* 60*) dwAlignStrideAlign: DWORD; // stride alignment
  630. (* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
  631. (* 84*) ddsOldCaps: TDDSCAPS; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  632. (* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  633. (* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  634. (* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  635. (* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  636. (* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  637. (* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  638. (* a0*) dwReserved1: DWORD; // reserved
  639. (* a4*) dwReserved2: DWORD; // reserved
  640. (* a8*) dwReserved3: DWORD; // reserved
  641. (* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
  642. (* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
  643. (* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
  644. (* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
  645. (* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
  646. (* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
  647. (* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
  648. (* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
  649. (*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
  650. (*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
  651. (*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
  652. (*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
  653. (*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports
  654. (*134*) dwCurrVideoPorts: DWORD; // current number of video ports used
  655. (*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
  656. (*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
  657. (*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
  658. (*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
  659. (*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
  660. (*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
  661. // Members added for DX6 release
  662. (*16c*) ddsCaps: TDDSCAPS2; // Surface Caps
  663. end;
  664. {$IF DIRECTDRAW_VERSION <= $300}
  665. TDDCAPS = TDDCAPS_DX3;
  666. {$ELSEIF DIRECTDRAW_VERSION <= $500}
  667. TDDCAPS = TDDCAPS_DX5;
  668. {$ELSEIF DIRECTDRAW_VERSION <= $600}
  669. TDDCAPS = TDDCAPS_DX6;
  670. {$ELSE}
  671. TDDCAPS = TDDCAPS_DX7;
  672. {$ENDIF}
  673. PDDCAPS = TDDCAPS;
  674. (*
  675. * DDPIXELFORMAT
  676. *)
  677. PDDPIXELFORMAT = ^TDDPIXELFORMAT;
  678. TDDPIXELFORMAT = record
  679. dwSize: DWORD; // size of structure
  680. dwFlags: DWORD; // pixel format flags
  681. dwFourCC: DWORD; // (FOURCC code)
  682. case Integer of
  683. 0: (
  684. dwRGBBitCount: DWORD; // how many bits per pixel
  685. );
  686. 1: (
  687. dwYUVBitCount: DWORD; // how many bits per pixel
  688. );
  689. 2: (
  690. dwZBufferBitDepth: DWORD; // how many total bits/pixel in z buffer (including any stencil bits)
  691. );
  692. 3: (
  693. dwAlphaBitDepth: DWORD; // how many bits for alpha channels
  694. );
  695. 4: (
  696. dwLuminanceBitCount: DWORD; // how many bits per pixel
  697. );
  698. 5: (
  699. dwBumpBitCount: DWORD; // how many bits per "buxel", total
  700. );
  701. 6: (
  702. dwPrivateFormatBitCount: DWORD; // Bits per pixel of private driver formats. Only valid in texture
  703. // format list and if DDPF_D3DFORMAT is set
  704. case Integer of
  705. 0: (
  706. dwRBitMask: DWORD; // mask for red bit
  707. );
  708. 1: (
  709. dwYBitMask: DWORD; // mask for Y bits
  710. );
  711. 2: (
  712. dwStencilBitDepth: DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
  713. );
  714. 3: (
  715. dwLuminanceBitMask: DWORD; // mask for luminance bits
  716. );
  717. 4: (
  718. dwBumpDuBitMask: DWORD; // mask for bump map U delta bits
  719. );
  720. 5: (
  721. dwOperations: DWORD; // DDPF_D3DFORMAT Operations
  722. case Integer of
  723. 0: (
  724. dwGBitMask: DWORD; // mask for green bits
  725. );
  726. 1: (
  727. dwUBitMask: DWORD; // mask for U bits
  728. );
  729. 2: (
  730. dwZBitMask: DWORD; // mask for Z bits
  731. );
  732. 3: (
  733. dwBumpDvBitMask: DWORD; // mask for bump map V delta bits
  734. );
  735. 4: (
  736. MultiSampleCaps: record
  737. wFlipMSTypes: WORD; // Multisample methods supported via flip for this D3DFORMAT
  738. wBltMSTypes: WORD; // Multisample methods supported via blt for this D3DFORMAT
  739. end;
  740. case Integer of
  741. 0: (
  742. dwBBitMask: DWORD; // mask for blue bits
  743. );
  744. 1: (
  745. dwVBitMask: DWORD; // mask for V bits
  746. );
  747. 2: (
  748. dwStencilBitMask: DWORD; // mask for stencil bits
  749. );
  750. 3: (
  751. dwBumpLuminanceBitMask: DWORD; // mask for luminance in bump map
  752. case Integer of
  753. 0: (
  754. dwRGBAlphaBitMask: DWORD; // mask for alpha channel
  755. );
  756. 1: (
  757. dwYUVAlphaBitMask: DWORD; // mask for alpha channel
  758. );
  759. 2: (
  760. dwLuminanceAlphaBitMask: DWORD; // mask for alpha channel
  761. );
  762. 3: (
  763. dwRGBZBitMask: DWORD; // mask for Z channel
  764. );
  765. 4: (
  766. dwYUVZBitMask: DWORD; // mask for Z channel
  767. );
  768. );
  769. );
  770. );
  771. );
  772. end;
  773. (*
  774. * DDOVERLAYFX
  775. *)
  776. PDDOVERLAYFX = ^TDDOVERLAYFX;
  777. TDDOVERLAYFX = record
  778. dwSize: DWORD; // size of structure
  779. dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend
  780. dwAlphaEdgeBlend: DWORD; // Constant to use as alpha for edge blend
  781. dwReserved: DWORD;
  782. dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination
  783. case Integer of
  784. 0: (
  785. dwAlphaDestConst: DWORD; // Constant to use as alpha channel for dest
  786. );
  787. 1: (
  788. lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as alpha channel for dest
  789. dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source
  790. case Integer of
  791. 0: (
  792. dwAlphaSrcConst: DWORD; // Constant to use as alpha channel for src
  793. );
  794. 1: (
  795. lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as alpha channel for src
  796. dckDestColorkey: TDDCOLORKEY; // DestColorkey override
  797. dckSrcColorkey: TDDCOLORKEY; // DestColorkey override
  798. dwDDFX: DWORD; // Overlay FX
  799. dwFlags: DWORD; // flags
  800. );
  801. );
  802. end;
  803. (*
  804. * DDBLTBATCH: BltBatch entry structure
  805. *)
  806. PDDBLTBATCH = ^TDDBLTBATCH;
  807. TDDBLTBATCH = record
  808. lprDest: PRECT;
  809. lpDDSSrc: IDirectDrawSurface;
  810. lprSrc: PRECT;
  811. dwFlags: DWORD;
  812. lpDDBltFx: PDDBLTFX;
  813. end;
  814. (*
  815. * DDGAMMARAMP
  816. *)
  817. PDDGAMMARAMP = ^TDDGAMMARAMP;
  818. TDDGAMMARAMP = record
  819. red: array [0..255] of WORD;
  820. green: array [0..255] of WORD;
  821. blue: array [0..255] of WORD;
  822. end;
  823. (*
  824. * This is the structure within which DirectDraw returns data about the current graphics driver and chipset
  825. *)
  826. const
  827. MAX_DDDEVICEID_STRING = 512;
  828. type
  829. PDDDEVICEIDENTIFIER = ^TDDDEVICEIDENTIFIER;
  830. TDDDEVICEIDENTIFIER = record
  831. (*
  832. * These elements are for presentation to the user only. They should not be used to identify particular
  833. * drivers, since this is unreliable and many different strings may be associated with the same
  834. * device, and the same driver from different vendors.
  835. *)
  836. szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char;
  837. szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char;
  838. (*
  839. * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  840. * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  841. * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  842. *
  843. * This version has the form:
  844. * wProduct = HIWORD(liDriverVersion.HighPart)
  845. * wVersion = LOWORD(liDriverVersion.HighPart)
  846. * wSubVersion = HIWORD(liDriverVersion.LowPart)
  847. * wBuild = LOWORD(liDriverVersion.LowPart)
  848. *)
  849. //#ifdef _WIN32
  850. liDriverVersion: LARGE_INTEGER; { Defined for applications and other 32 bit components }
  851. //#else
  852. // DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
  853. // DWORD dwDriverVersionHighPart;
  854. //#endif
  855. (*
  856. * These elements can be used to identify particular chipsets. Use with extreme caution.
  857. * dwVendorId Identifies the manufacturer. May be zero if unknown.
  858. * dwDeviceId Identifies the type of chipset. May be zero if unknown.
  859. * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  860. * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
  861. *)
  862. dwVendorId: DWORD;
  863. dwDeviceId: DWORD;
  864. dwSubSysId: DWORD;
  865. dwRevision: DWORD;
  866. (*
  867. * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  868. * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  869. * reprofile the graphics subsystem.
  870. * This element can also be used to identify particular problematic drivers.
  871. *)
  872. guidDeviceIdentifier: TGuid;
  873. end;
  874. PDDDEVICEIDENTIFIER2 = ^TDDDEVICEIDENTIFIER2;
  875. TDDDEVICEIDENTIFIER2 = record
  876. (*
  877. * These elements are for presentation to the user only. They should not be used to identify particular
  878. * drivers, since this is unreliable and many different strings may be associated with the same
  879. * device, and the same driver from different vendors.
  880. *)
  881. szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char;
  882. szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char;
  883. (*
  884. * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  885. * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  886. * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  887. *
  888. * This version has the form:
  889. * wProduct = HIWORD(liDriverVersion.HighPart)
  890. * wVersion = LOWORD(liDriverVersion.HighPart)
  891. * wSubVersion = HIWORD(liDriverVersion.LowPart)
  892. * wBuild = LOWORD(liDriverVersion.LowPart)
  893. *)
  894. //#ifdef _WIN32
  895. liDriverVersion: LARGE_INTEGER; { Defined for applications and other 32 bit components }
  896. //#else
  897. // DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
  898. // DWORD dwDriverVersionHighPart;
  899. //#endif
  900. (*
  901. * These elements can be used to identify particular chipsets. Use with extreme caution.
  902. * dwVendorId Identifies the manufacturer. May be zero if unknown.
  903. * dwDeviceId Identifies the type of chipset. May be zero if unknown.
  904. * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  905. * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
  906. *)
  907. dwVendorId: DWORD;
  908. dwDeviceId: DWORD;
  909. dwSubSysId: DWORD;
  910. dwRevision: DWORD;
  911. (*
  912. * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  913. * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  914. * reprofile the graphics subsystem.
  915. * This element can also be used to identify particular problematic drivers.
  916. *)
  917. guidDeviceIdentifier: TGuid;
  918. (*
  919. * This element is used to determine the Windows Hardware Quality Lab (WHQL)
  920. * certification level for this driver/device pair.
  921. *)
  922. dwWHQLLevel: DWORD;
  923. end;
  924. (*
  925. * Flags for the IDirectDraw4::GetDeviceIdentifier method
  926. *)
  927. (*
  928. * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
  929. * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
  930. * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
  931. * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
  932. * of the DirectDraw object involved.
  933. *)
  934. const
  935. DDGDI_GETHOSTIDENTIFIER = $00000001;
  936. (*
  937. * callbacks
  938. *)
  939. {typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  940. #ifdef STREAMING
  941. typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  942. #endif}
  943. type
  944. (*
  945. * DDSURFACEDESC
  946. *)
  947. PDDSURFACEDESC = ^TDDSURFACEDESC;
  948. TDDSURFACEDESC = record
  949. dwSize: DWORD; // size of the DDSURFACEDESC structure
  950. dwFlags: DWORD; // determines what fields are valid
  951. dwHeight: DWORD; // height of surface to be created
  952. dwWidth: DWORD; // width of input surface
  953. case Integer of
  954. 0: (
  955. lPitch: LONG; // distance to start of next line (return value only)
  956. );
  957. 1: (
  958. dwLinearSize: DWORD; // Formless late-allocated optimized surface size
  959. dwBackBufferCount: DWORD; // number of back buffers requested
  960. case Integer of
  961. 0: (
  962. dwMipMapCount: DWORD; // number of mip-map levels requested
  963. );
  964. 1: (
  965. dwZBufferBitDepth: DWORD; // depth of Z buffer requested
  966. );
  967. 2: (
  968. dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
  969. dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
  970. dwReserved: DWORD; // reserved
  971. lpSurface: LPVOID; // pointer to the associated surface memory
  972. ddckCKDestOverlay: TDDCOLORKEY; // color key for destination overlay use
  973. ddckCKDestBlt: TDDCOLORKEY; // color key for destination blt use
  974. ddckCKSrcOverlay: TDDCOLORKEY; // color key for source overlay use
  975. ddckCKSrcBlt: TDDCOLORKEY; // color key for source blt use
  976. ddpfPixelFormat: TDDPIXELFORMAT; // pixel format description of the surface
  977. ddsCaps: TDDSCAPS; // direct draw surface capabilities
  978. );
  979. );
  980. end;
  981. (*
  982. * DDSURFACEDESC2
  983. *)
  984. PDDSURFACEDESC2 = ^TDDSURFACEDESC2;
  985. TDDSURFACEDESC2 = record
  986. dwSize: DWORD; // size of the DDSURFACEDESC structure
  987. dwFlags: DWORD; // determines what fields are valid
  988. dwHeight: DWORD; // height of surface to be created
  989. dwWidth: DWORD; // width of input surface
  990. case Integer of
  991. 0: (
  992. lPitch: LONG; // distance to start of next line (return value only)
  993. );
  994. 1: (
  995. dwLinearSize: DWORD; // Formless late-allocated optimized surface size
  996. case Integer of
  997. 0: (
  998. dwBackBufferCount: DWORD; // number of back buffers requested
  999. );
  1000. 1: (
  1001. dwDepth: DWORD; // the depth if this is a volume texture
  1002. case Integer of
  1003. 0: (
  1004. dwMipMapCount: DWORD; // number of mip-map levels requestde
  1005. // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
  1006. );
  1007. 1: (
  1008. dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
  1009. );
  1010. 2: (
  1011. dwSrcVBHandle: DWORD; // The source used in VB::Optimize
  1012. dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
  1013. dwReserved: DWORD; // reserved
  1014. lpSurface: LPVOID; // pointer to the associated surface memory
  1015. case Integer of
  1016. 0: (
  1017. dwEmptyFaceColor: DWORD; // Physical color for empty cubemap faces
  1018. );
  1019. 1: (
  1020. ddckCKDestOverlay: TDDCOLORKEY; // color key for destination overlay use
  1021. ddckCKDestBlt: TDDCOLORKEY; // color key for destination blt use
  1022. ddckCKSrcOverlay: TDDCOLORKEY; // color key for source overlay use
  1023. ddckCKSrcBlt: TDDCOLORKEY; // color key for source blt use
  1024. case Integer of
  1025. 0: (
  1026. dwFVF: DWORD; // vertex format description of vertex buffers
  1027. );
  1028. 1: (
  1029. ddpfPixelFormat: TDDPIXELFORMAT; // pixel format description of the surface
  1030. ddsCaps: TDDSCAPS2; // direct draw surface capabilities
  1031. dwTextureStage: DWORD; // stage in multitexture cascade
  1032. );
  1033. );
  1034. );
  1035. );
  1036. );
  1037. end;
  1038. //#ifndef WINNT
  1039. type
  1040. LPDDENUMMODESCALLBACK = function(lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: LPVOID): HRESULT; stdcall;
  1041. LPDDENUMMODESCALLBACK2 = function(lpDDSurfaceDesc: PDDSURFACEDESC2; lpContext: LPVOID): HRESULT; stdcall;
  1042. LPDDENUMSURFACESCALLBACK = function(lpDDSurface: IDirectDrawSurface; lpDDSurfaceDesc: PDDSURFACEDESC; lpContet: LPVOID): HRESULT; stdcall;
  1043. LPDDENUMSURFACESCALLBACK2 = function(lpDDSurface: IDirectDrawSurface4; lpDDSurfaceDesc: PDDSURFACEDESC2; lpContext: LPVOID): HRESULT; stdcall;
  1044. LPDDENUMSURFACESCALLBACK7 = function(lpDDSurface: IDirectDrawSurface7; lpDDSurfaceDesc: PDDSURFACEDESC2; lpContext: LPVOID): HRESULT; stdcall;
  1045. //#endif
  1046. const
  1047. (*
  1048. * ddsCaps field is valid.
  1049. *)
  1050. DDSD_CAPS = $00000001; // default
  1051. (*
  1052. * dwHeight field is valid.
  1053. *)
  1054. DDSD_HEIGHT = $00000002;
  1055. (*
  1056. * dwWidth field is valid.
  1057. *)
  1058. DDSD_WIDTH = $00000004;
  1059. (*
  1060. * lPitch is valid.
  1061. *)
  1062. DDSD_PITCH = $00000008;
  1063. (*
  1064. * dwBackBufferCount is valid.
  1065. *)
  1066. DDSD_BACKBUFFERCOUNT = $00000020;
  1067. (*
  1068. * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2)
  1069. *)
  1070. DDSD_ZBUFFERBITDEPTH = $00000040;
  1071. (*
  1072. * dwAlphaBitDepth is valid.
  1073. *)
  1074. DDSD_ALPHABITDEPTH = $00000080;
  1075. (*
  1076. * lpSurface is valid.
  1077. *)
  1078. DDSD_LPSURFACE = $00000800;
  1079. (*
  1080. * ddpfPixelFormat is valid.
  1081. *)
  1082. DDSD_PIXELFORMAT = $00001000;
  1083. (*
  1084. * ddckCKDestOverlay is valid.
  1085. *)
  1086. DDSD_CKDESTOVERLAY = $00002000;
  1087. (*
  1088. * ddckCKDestBlt is valid.
  1089. *)
  1090. DDSD_CKDESTBLT = $00004000;
  1091. (*
  1092. * ddckCKSrcOverlay is valid.
  1093. *)
  1094. DDSD_CKSRCOVERLAY = $00008000;
  1095. (*
  1096. * ddckCKSrcBlt is valid.
  1097. *)
  1098. DDSD_CKSRCBLT = $00010000;
  1099. (*
  1100. * dwMipMapCount is valid.
  1101. *)
  1102. DDSD_MIPMAPCOUNT = $00020000;
  1103. (*
  1104. * dwRefreshRate is valid
  1105. *)
  1106. DDSD_REFRESHRATE = $00040000;
  1107. (*
  1108. * dwLinearSize is valid
  1109. *)
  1110. DDSD_LINEARSIZE = $00080000;
  1111. (*
  1112. * dwTextureStage is valid
  1113. *)
  1114. DDSD_TEXTURESTAGE = $00100000;
  1115. (*
  1116. * dwFVF is valid
  1117. *)
  1118. DDSD_FVF = $00200000;
  1119. (*
  1120. * dwSrcVBHandle is valid
  1121. *)
  1122. DDSD_SRCVBHANDLE = $00400000;
  1123. (*
  1124. * dwDepth is valid
  1125. *)
  1126. DDSD_DEPTH = $00800000;
  1127. (*
  1128. * All input fields are valid.
  1129. *)
  1130. DDSD_ALL = $00fff9ee;
  1131. (*
  1132. * DDOPTSURFACEDESC
  1133. *)
  1134. type
  1135. PDDOPTSURFACEDESC = ^TDDOPTSURFACEDESC;
  1136. TDDOPTSURFACEDESC = record
  1137. dwSize: DWORD; // size of the DDOPTSURFACEDESC structure
  1138. dwFlags: DWORD; // determines what fields are valid
  1139. ddSCaps: TDDSCAPS2; // Common caps like: Memory type
  1140. ddOSCaps: TDDOSCAPS; // Common caps like: Memory type
  1141. guid: TGUID; // Compression technique GUID
  1142. dwCompressionRatio: DWORD; // Compression ratio
  1143. end;
  1144. const
  1145. (*
  1146. * guid field is valid.
  1147. *)
  1148. DDOSD_GUID = $00000001;
  1149. (*
  1150. * dwCompressionRatio field is valid.
  1151. *)
  1152. DDOSD_COMPRESSION_RATIO = $00000002;
  1153. (*
  1154. * ddSCaps field is valid.
  1155. *)
  1156. DDOSD_SCAPS = $00000004;
  1157. (*
  1158. * ddOSCaps field is valid.
  1159. *)
  1160. DDOSD_OSCAPS = $00000008;
  1161. (*
  1162. * All input fields are valid.
  1163. *)
  1164. DDOSD_ALL = $0000000f;
  1165. (*
  1166. * The surface's optimized pixelformat is compressed
  1167. *)
  1168. DDOSDCAPS_OPTCOMPRESSED = $00000001;
  1169. (*
  1170. * The surface's optimized pixelformat is reordered
  1171. *)
  1172. DDOSDCAPS_OPTREORDERED = $00000002;
  1173. (*
  1174. * The opt surface is a monolithic mipmap
  1175. *)
  1176. DDOSDCAPS_MONOLITHICMIPMAP = $00000004;
  1177. (*
  1178. * The valid Surf caps:
  1179. * #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  1180. * #define DDSCAPS_VIDEOMEMORY 0x00004000l
  1181. * #define DDSCAPS_LOCALVIDMEM 0x10000000l
  1182. * #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
  1183. *)
  1184. DDOSDCAPS_VALIDSCAPS = $30004800;
  1185. (*
  1186. * The valid OptSurf caps
  1187. *)
  1188. DDOSDCAPS_VALIDOSCAPS = $00000007;
  1189. (*
  1190. * DDCOLORCONTROL
  1191. *)
  1192. type
  1193. PDDCOLORCONTROL = ^TDDCOLORCONTROL;
  1194. TDDCOLORCONTROL = record
  1195. dwSize: DWORD;
  1196. dwFlags: DWORD;
  1197. lBrightness: LONG;
  1198. lContrast: LONG;
  1199. lHue: LONG;
  1200. lSaturation: LONG;
  1201. lSharpness: LONG;
  1202. lGamma: LONG;
  1203. lColorEnable: LONG;
  1204. dwReserved1: DWORD;
  1205. end;
  1206. const
  1207. (*
  1208. * lBrightness field is valid.
  1209. *)
  1210. DDCOLOR_BRIGHTNESS = $00000001;
  1211. (*
  1212. * lContrast field is valid.
  1213. *)
  1214. DDCOLOR_CONTRAST = $00000002;
  1215. (*
  1216. * lHue field is valid.
  1217. *)
  1218. DDCOLOR_HUE = $00000004;
  1219. (*
  1220. * lSaturation field is valid.
  1221. *)
  1222. DDCOLOR_SATURATION = $00000008;
  1223. (*
  1224. * lSharpness field is valid.
  1225. *)
  1226. DDCOLOR_SHARPNESS = $00000010;
  1227. (*
  1228. * lGamma field is valid.
  1229. *)
  1230. DDCOLOR_GAMMA = $00000020;
  1231. (*
  1232. * lColorEnable field is valid.
  1233. *)
  1234. DDCOLOR_COLORENABLE = $00000040;
  1235. (*
  1236. * INTERACES FOLLOW:
  1237. * IDirectDraw
  1238. * IDirectDrawClipper
  1239. * IDirectDrawPalette
  1240. * IDirectDrawSurface
  1241. *)
  1242. (*
  1243. * IDirectDraw
  1244. *)
  1245. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1246. //#undef INTERFACE
  1247. //#define INTERFACE IDirectDraw
  1248. //DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  1249. type
  1250. IDirectDraw = interface(IUnknown)
  1251. ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
  1252. (*** IDirectDraw methods ***)
  1253. function Compact: HRESULT; stdcall;
  1254. function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper; pUnkOuter: IUnknown): HRESULT; stdcall;
  1255. function CreatePalette(dwFlags: DWORD; lpColorTable: PPALETTEENTRY; out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HRESULT; stdcall;
  1256. function CreateSurface(lpDDSurfaceDesc: PDDSURFACEDESC; out lplpDDSurface: IDirectDrawSurface; pUnkOuter: IUnknown): HRESULT; stdcall;
  1257. function DuplicateSurface(lpDDSurface: IDirectDrawSurface; out lplpDupDDSurface: IDirectDrawSurface): HRESULT; stdcall;
  1258. function EnumDisplayModes(dwFlags: DWORD; lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: LPVOID; lpEnumCallback: LPDDENUMMODESCALLBACK): HRESULT; stdcall;
  1259. function EnumSurfaces(dwFlags: DWORD; lpDDSD: PDDSURFACEDESC; lpContext: LPVOID; lpEnumCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1260. function FlipToGDISurface: HRESULT; stdcall;
  1261. function GetCaps(lpDDDriverCaps: PDDCAPS; lpDDHELCaps: PDDCAPS): HRESULT; stdcall;
  1262. function GetDisplayMode(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1263. function GetFourCCCodes(lpNumCodes: LPDWORD; lpCodes: LPDWORD): HRESULT; stdcall;
  1264. function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HRESULT; stdcall;
  1265. function GetMonitorFrequency(lpdwFrequency: LPDWORD): HRESULT; stdcall;
  1266. function GetScanLine(lpdwScanLine: LPDWORD): HRESULT; stdcall;
  1267. function GetVerticalBlankStatus(lpbIsInVB: LPBOOL): HRESULT; stdcall;
  1268. function Initialize(lpGUID: PGUID): HRESULT; stdcall;
  1269. function RestoreDisplayMode: HRESULT; stdcall;
  1270. function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
  1271. function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBpp: DWORD): HRESULT; stdcall;
  1272. function WaitForVerticalBlank(dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1273. end;
  1274. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1275. //#undef INTERFACE
  1276. //#define INTERFACE IDirectDraw2
  1277. //DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  1278. IDirectDraw2 = interface(IUnknown)
  1279. ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
  1280. (*** IDirectDraw methods ***)
  1281. function Compact: HRESULT; stdcall;
  1282. function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper; pUnkOuter: IUnknown): HRESULT; stdcall;
  1283. function CreatePalette(dwFlags: DWORD; lpColorTable: PPALETTEENTRY; out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HRESULT; stdcall;
  1284. function CreateSurface(lpDDSurfaceDesc: PDDSURFACEDESC; out lplpDDSurface: IDirectDrawSurface; pUnkOuter: IUnknown): HRESULT; stdcall;
  1285. function DuplicateSurface(lpDDSurface: IDirectDrawSurface; out lplpDupDDSurface: IDirectDrawSurface): HRESULT; stdcall;
  1286. function EnumDisplayModes(dwFlags: DWORD; lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: LPVOID; lpEnumModesCallback: LPDDENUMMODESCALLBACK): HRESULT; stdcall;
  1287. function EnumSurfaces(dwFlags: DWORD; lpDDSD: PDDSURFACEDESC; lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1288. function FlipToGDISurface: HRESULT; stdcall;
  1289. function GetCaps(lpDDDriverCaps: PDDCAPS; lpDDHELCaps: PDDCAPS): HRESULT; stdcall;
  1290. function GetDisplayMode(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1291. function GetFourCCCodes(lpNumCodes: LPDWORD; lpCodes: LPDWORD): HRESULT; stdcall;
  1292. function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HRESULT; stdcall;
  1293. function GetMonitorFrequency(lpdwFrequency: LPDWORD): HRESULT; stdcall;
  1294. function GetScanLine(lpdwScanLine: LPDWORD): HRESULT; stdcall;
  1295. function GetVerticalBlankStatus(lpbIsInVB: LPBOOL): HRESULT; stdcall;
  1296. function Initialize(lpGUID: PGUID): HRESULT; stdcall;
  1297. function RestoreDisplayMode: HRESULT; stdcall;
  1298. function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
  1299. function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; dwRefreshRate: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1300. function WaitForVerticalBlank(dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1301. (*** Added in the v2 interface ***)
  1302. function GetAvailableVidMem(lpDDSCaps: PDDSCAPS; lpdwTotal: LPDWORD; lpdwFree: LPDWORD): HRESULT; stdcall;
  1303. end;
  1304. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1305. //#undef INTERFACE
  1306. //#define INTERFACE IDirectDraw4
  1307. //DECLARE_INTERFACE_( IDirectDraw4, IUnknown )
  1308. IDirectDraw4 = interface(IUnknown)
  1309. ['{9c59509a-39bd-11d1-8c4a-00c04fd930c5}']
  1310. (*** IDirectDraw methods ***)
  1311. function Compact: HRESULT; stdcall;
  1312. function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper; pUnkOuter: IUnknown): HRESULT; stdcall;
  1313. function CreatePalette(dwFlags: DWORD; lpDDColorArray: PPALETTEENTRY; out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HRESULT; stdcall;
  1314. function CreateSurface(lpDDSurfaceDesc2: PDDSURFACEDESC2; out lplpDDSurface: IDirectDrawSurface4; pUnkOuter: IUnknown): HRESULT; stdcall;
  1315. function DuplicateSurface(lpDDSurface: IDirectDrawSurface4; out lplpDupDDSurface: IDirectDrawSurface4): HRESULT; stdcall;
  1316. function EnumDisplayModes(dwFlags: DWORD; lpDDSurfaceDesc2: PDDSURFACEDESC2; lpContext: LPVOID; lpEnumModesCallback: LPDDENUMMODESCALLBACK2): HRESULT; stdcall;
  1317. function EnumSurfaces(dwFlags: DWORD; lpDDSD2: PDDSURFACEDESC2; lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK2): HRESULT; stdcall;
  1318. function FlipToGDISurface: HRESULT; stdcall;
  1319. function GetCaps(lpDDDriverCaps: PDDCAPS; lpDDHELCaps: PDDCAPS): HRESULT; stdcall;
  1320. function GetDisplayMode(lpDDSurfaceDesc2: PDDSURFACEDESC2): HRESULT; stdcall;
  1321. function GetFourCCCodes(lpNumCodes: LPDWORD; lpCodes: LPDWORD): HRESULT; stdcall;
  1322. function GetGDISurface(out lplpGDIDDSSurface4: IDirectDrawSurface4): HRESULT; stdcall;
  1323. function GetMonitorFrequency(lpdwFrequency: LPDWORD): HRESULT; stdcall;
  1324. function GetScanLine(lpdwScanLine: LPDWORD): HRESULT; stdcall;
  1325. function GetVerticalBlankStatus(lpbIsInVB: LPBOOL): HRESULT; stdcall;
  1326. function Initialize(lpGUID: PGUID): HRESULT; stdcall;
  1327. function RestoreDisplayMode: HRESULT; stdcall;
  1328. function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
  1329. function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; dwRefreshRate: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1330. function WaitForVerticalBlank(dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1331. (*** Added in the v2 interface ***)
  1332. function GetAvailableVidMem(lpDDSCaps2: PDDSCAPS2; lpdwTotal: LPDWORD; lpdwFree: LPDWORD): HRESULT; stdcall;
  1333. (*** Added in the V4 Interface ***)
  1334. function GetSurfaceFromDC(hdc: HDC; out lpDDS4: IDirectDrawSurface4): HRESULT; stdcall;
  1335. function RestoreAllSurfaces: HRESULT; stdcall;
  1336. function TestCooperativeLevel: HRESULT; stdcall;
  1337. function GetDeviceIdentifier(lpdddi: PDDDEVICEIDENTIFIER; dwFlags: DWORD): HRESULT; stdcall;
  1338. end;
  1339. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1340. //#undef INTERFACE
  1341. //#define INTERFACE IDirectDraw7
  1342. //DECLARE_INTERFACE_( IDirectDraw7, IUnknown )
  1343. IDirectDraw7 = interface(IUnknown)
  1344. ['{15e65ec0-3b9c-11d2-b92f-00609797ea5b}']
  1345. (*** IDirectDraw methods ***)
  1346. function Compact: HRESULT; stdcall;
  1347. function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper; pUnkOuter: IUnknown): HRESULT; stdcall;
  1348. function CreatePalette(dwFlags: DWORD; lpDDColorArray: PPALETTEENTRY; out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HRESULT; stdcall;
  1349. function CreateSurface(lpDDSurfaceDesc2: PDDSURFACEDESC2; out lplpDDSurface: IDirectDrawSurface7; pUnkOuter: IUnknown): HRESULT; stdcall;
  1350. function DuplicateSurface(lpDDSurface: IDirectDrawSurface7; out lplpDupDDSurface: IDirectDrawSurface7): HRESULT; stdcall;
  1351. function EnumDisplayModes(dwFlags: DWORD; lpDDSurfaceDesc2: PDDSURFACEDESC2; lpContext: LPVOID; lpEnumModesCallback: LPDDENUMMODESCALLBACK2): HRESULT; stdcall;
  1352. function EnumSurfaces(dwFlags: DWORD; lpDDSD2: PDDSURFACEDESC2; lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK7): HRESULT; stdcall;
  1353. function FlipToGDISurface: HRESULT; stdcall;
  1354. function GetCaps(lpDDDriverCaps: PDDCAPS; lpDDHELCaps: PDDCAPS): HRESULT; stdcall;
  1355. function GetDisplayMode(lpDDSurfaceDesc2: PDDSURFACEDESC2): HRESULT; stdcall;
  1356. function GetFourCCCodes(lpNumCodes: LPDWORD; lpCodes: LPDWORD): HRESULT; stdcall;
  1357. function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface7): HRESULT; stdcall;
  1358. function GetMonitorFrequency(lpdwFrequency: LPDWORD): HRESULT; stdcall;
  1359. function GetScanLine(lpdwScanLine: LPDWORD): HRESULT; stdcall;
  1360. function GetVerticalBlankStatus(lpbIsInVB: LPBOOL): HRESULT; stdcall;
  1361. function Initialize(lpGUID: PGUID): HRESULT; stdcall;
  1362. function RestoreDisplayMode: HRESULT; stdcall;
  1363. function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
  1364. function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; dwRefreshRate: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1365. function WaitForVerticalBlank(dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1366. (*** Added in the v2 interface ***)
  1367. function GetAvailableVidMem(lpDDSCaps2: PDDSCAPS2; lpdwTotal: LPDWORD; lpdwFree: LPDWORD): HRESULT; stdcall;
  1368. (*** Added in the V4 Interface ***)
  1369. function GetSurfaceFromDC(hdc: HDC; out lpDDS: IDirectDrawSurface7): HRESULT; stdcall;
  1370. function RestoreAllSurfaces: HRESULT; stdcall;
  1371. function TestCooperativeLevel: HRESULT; stdcall;
  1372. function GetDeviceIdentifier(lpdddi: PDDDEVICEIDENTIFIER2; dwFlags: DWORD): HRESULT; stdcall;
  1373. function StartModeTest(lpModesToTest: LPSIZE; dwNumEntries: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1374. function EvaluateMode(dwFlags: DWORD; pSecondsUntilTimeout: PDWORD): HRESULT; stdcall;
  1375. end;
  1376. (*
  1377. * IDirectDrawPalette
  1378. *)
  1379. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1380. //#undef INTERFACE
  1381. //#define INTERFACE IDirectDrawPalette
  1382. //DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  1383. IDirectDrawPalette = interface(IUnknown)
  1384. ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
  1385. (*** IDirectDrawPalette methods ***)
  1386. function GetCaps(lpdwCaps: LPDWORD): HRESULT; stdcall;
  1387. function GetEntries(dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD; lpEntries: LPPALETTEENTRY): HRESULT; stdcall;
  1388. function Initialize(lpDD: IDirectDraw; dwFlags: DWORD; lpDDColorTable: LPPALETTEENTRY): HRESULT; stdcall;
  1389. function SetEntries(dwFlags: DWORD; dwStartingEntry: DWORD; dwCount: DWORD; lpEntries: LPPALETTEENTRY): HRESULT; stdcall;
  1390. end;
  1391. (*
  1392. * IDirectDrawClipper
  1393. *)
  1394. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1395. //#undef INTERFACE
  1396. //#define INTERFACE IDirectDrawClipper
  1397. //DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  1398. PHWND = ^HWND;
  1399. IDirectDrawClipper = interface(IUnknown)
  1400. ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
  1401. (*** IDirectDrawClipper methods ***)
  1402. function GetClipList(lpRect: PRECT; lpClipList: LPRGNDATA; lpdwSize: LPDWORD): HRESULT; stdcall;
  1403. function GetHWnd(lphWnd: PHWND): HRESULT; stdcall;
  1404. function Initialize(lpDD: IDirectDraw; dwFlags: DWORD): HRESULT; stdcall;
  1405. function IsClipListChanged(lpbChanged: PBOOL): HRESULT; stdcall;
  1406. function SetClipList(lpClipList: LPRGNDATA; dwFlags: DWORD): HRESULT; stdcall;
  1407. function SetHWnd(dwFlags: DWORD; hWnd: HWND): HRESULT; stdcall;
  1408. end;
  1409. (*
  1410. * IDirectDrawSurface and related interfaces
  1411. *)
  1412. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1413. //#undef INTERFACE
  1414. //#define INTERFACE IDirectDrawSurface
  1415. //DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  1416. PHDC = ^HDC;
  1417. IDirectDrawSurface = interface(IUnknown)
  1418. ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
  1419. (*** IDirectDrawSurface methods ***)
  1420. function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
  1421. function AddOverlayDirtyRect(lpRect: PRECT): HRESULT; stdcall;
  1422. function Blt(lpDestRect: PRECT; lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRECT; dwFlags: DWORD; lpDDBltFx: PDDBLTFX): HRESULT; stdcall;
  1423. function BltBatch(lpDDBltBatch: PDDBLTBATCH; dwCount: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1424. function BltFast(dwX: DWORD; dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRECT; dwTrans: DWORD): HRESULT; stdcall;
  1425. function DeleteAttachedSurface(dwFlags: DWORD; lpDDSAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
  1426. function EnumAttachedSurfaces(lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1427. function EnumOverlayZOrders(dwFlags: DWORD; lpContext: LPVOID; lpfnCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1428. function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface; dwFlags: DWORD): HRESULT; stdcall;
  1429. function GetAttachedSurface(lpDDSCaps: PDDSCAPS; out lplpDDAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
  1430. function GetBltStatus(dwFlags: DWORD): HRESULT; stdcall;
  1431. function GetCaps(lpDDSCaps: PDDSCAPS): HRESULT; stdcall;
  1432. function GetClipper(out lplpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1433. function GetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1434. function GetDC(lphDC: PHDC): HRESULT; stdcall;
  1435. function GetFlipStatus(dwFlags: DWORD): HRESULT; stdcall;
  1436. function GetOverlayPosition(lplX: LPLONG; lplY: LPLONG): HRESULT; stdcall;
  1437. function GetPalette(out lplpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1438. function GetPixelFormat(lpDDPixelFormat: PDDPIXELFORMAT): HRESULT; stdcall;
  1439. function GetSurfaceDesc(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1440. function Initialize(lpDD: IDirectDraw; lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1441. function IsLost: HRESULT; stdcall;
  1442. function Lock(lpDestRect: PRECT; lpDDSurfaceDesc: PDDSURFACEDESC; dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1443. function ReleaseDC(hDC: HDC): HRESULT; stdcall;
  1444. function Restore: HRESULT; stdcall;
  1445. function SetClipper(lpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1446. function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1447. function SetOverlayPosition(lX: LONG; lY: LONG): HRESULT; stdcall;
  1448. function SetPalette(lpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1449. function Unlock(lpSurfaceData: LPVOID): HRESULT; stdcall;
  1450. function UpdateOverlay(lpSrcRect: PRECT; lpDDDestSurface: IDirectDrawSurface; lpDestRect: PRECT; dwFlags: DWORD; lpDDOverlayFx: PDDOVERLAYFX): HRESULT; stdcall;
  1451. function UpdateOverlayDisplay(dwFlags: DWORD): HRESULT; stdcall;
  1452. function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface): HRESULT; stdcall;
  1453. end;
  1454. (*
  1455. * IDirectDrawSurface2 and related interfaces
  1456. *)
  1457. //#undef INTERFACE
  1458. //#define INTERFACE IDirectDrawSurface2
  1459. //DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  1460. LPLPVOID = ^LPVOID;
  1461. IDirectDrawSurface2 = interface(IUnknown)
  1462. ['{57805885-6eec-11cf-9441-a82303c10e27}']
  1463. (*** IDirectDrawSurface methods ***)
  1464. function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface2): HRESULT; stdcall;
  1465. function AddOverlayDirtyRect(lpRect: PRECT): HRESULT; stdcall;
  1466. function Blt(lpDestRect: PRECT; lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRECT; dwFlags: DWORD; lpDDBltFx: PDDBLTFX): HRESULT; stdcall;
  1467. function BltBatch(lpDDBltBatch: PDDBLTBATCH; dwCount: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1468. function BltFast(dwX: DWORD; dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRECT; dwTrans: DWORD): HRESULT; stdcall;
  1469. function DeleteAttachedSurface(dwFlags: DWORD; lpDDSAttachedSurface: IDirectDrawSurface2): HRESULT; stdcall;
  1470. function EnumAttachedSurfaces(lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1471. function EnumOverlayZOrders(dwFlags: DWORD; lpContext: LPVOID; lpfnCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1472. function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface2; dwFlags: DWORD): HRESULT; stdcall;
  1473. function GetAttachedSurface(lpDDSCaps: PDDSCAPS; out lplpDDAttachedSurface: IDirectDrawSurface2): HRESULT; stdcall;
  1474. function GetBltStatus(dwFlags: DWORD): HRESULT; stdcall;
  1475. function GetCaps(lpDDSCaps: PDDSCAPS): HRESULT; stdcall;
  1476. function GetClipper(out lplpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1477. function GetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1478. function GetDC(lphDC: PHDC): HRESULT; stdcall;
  1479. function GetFlipStatus(dwFlags: DWORD): HRESULT; stdcall;
  1480. function GetOverlayPosition(lplX: LPLONG; lplY: LPLONG): HRESULT; stdcall;
  1481. function GetPalette(out lplpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1482. function GetPixelFormat(lpDDPixelFormat: PDDPIXELFORMAT): HRESULT; stdcall;
  1483. function GetSurfaceDesc(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1484. function Initialize(lpDD: IDirectDraw; lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1485. function IsLost: HRESULT; stdcall;
  1486. function Lock(lpDestRect: PRECT; lpDDSurfaceDesc: PDDSURFACEDESC; dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1487. function ReleaseDC(hDC: HDC): HRESULT; stdcall;
  1488. function Restore: HRESULT; stdcall;
  1489. function SetClipper(lpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1490. function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1491. function SetOverlayPosition(lX: LONG; lY: LONG): HRESULT; stdcall;
  1492. function SetPalette(lpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1493. function Unlock(lpSurfaceData: LPVOID): HRESULT; stdcall;
  1494. function UpdateOverlay(lpSrcRect: PRECT; lpDDDestSurface: IDirectDrawSurface2; lpDestRect: PRECT; dwFlags: DWORD; lpDDOverlayFx: PDDOVERLAYFX): HRESULT; stdcall;
  1495. function UpdateOverlayDisplay(dwFlags: DWORD): HRESULT; stdcall;
  1496. function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface2): HRESULT; stdcall;
  1497. (*** Added in the v2 interface ***)
  1498. function GetDDInterface(lplpDD: LPLPVOID): HRESULT; stdcall;
  1499. function PageLock(dwFlags: DWORD): HRESULT; stdcall;
  1500. function PageUnlock(dwFlags: DWORD): HRESULT; stdcall;
  1501. end;
  1502. (*
  1503. * IDirectDrawSurface3 and related interfaces
  1504. *)
  1505. //#undef INTERFACE
  1506. //#define INTERFACE IDirectDrawSurface3
  1507. //DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
  1508. IDirectDrawSurface3 = interface(IUnknown)
  1509. ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}']
  1510. (*** IDirectDrawSurface methods ***)
  1511. function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface3): HRESULT; stdcall;
  1512. function AddOverlayDirtyRect(lpRect: PRECT): HRESULT; stdcall;
  1513. function Blt(lpDestRect: PRECT; lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRECT; dwFlags: DWORD; lpDDBltFx: PDDBLTFX): HRESULT; stdcall;
  1514. function BltBatch(lpDDBltBatch: PDDBLTBATCH; dwCount: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1515. function BltFast(dwX: DWORD; dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRECT; dwTrans: DWORD): HRESULT; stdcall;
  1516. function DeleteAttachedSurface(dwFlags: DWORD; lpDDSAttachedSurface: IDirectDrawSurface3): HRESULT; stdcall;
  1517. function EnumAttachedSurfaces(lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1518. function EnumOverlayZOrders(dwFlags: DWORD; lpContext: LPVOID; lpfnCallback: LPDDENUMSURFACESCALLBACK): HRESULT; stdcall;
  1519. function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface3; dwFlags: DWORD): HRESULT; stdcall;
  1520. function GetAttachedSurface(lpDDSCaps: PDDSCAPS; out lplpDDAttachedSurface: IDirectDrawSurface3): HRESULT; stdcall;
  1521. function GetBltStatus(dwFlags: DWORD): HRESULT; stdcall;
  1522. function GetCaps(lpDDSCaps: PDDSCAPS): HRESULT; stdcall;
  1523. function GetClipper(out lplpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1524. function GetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1525. function GetDC(lphDC: PHDC): HRESULT; stdcall;
  1526. function GetFlipStatus(dwFlags: DWORD): HRESULT; stdcall;
  1527. function GetOverlayPosition(lplX: LPLONG; lplY: LPLONG): HRESULT; stdcall;
  1528. function GetPalette(out lplpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1529. function GetPixelFormat(lpDDPixelFormat: PDDPIXELFORMAT): HRESULT; stdcall;
  1530. function GetSurfaceDesc(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1531. function Initialize(lpDD: IDirectDraw; lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; stdcall;
  1532. function IsLost: HRESULT; stdcall;
  1533. function Lock(lpDestRect: PRECT; lpDDSurfaceDesc: PDDSURFACEDESC; dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1534. function ReleaseDC(hDC: HDC): HRESULT; stdcall;
  1535. function Restore: HRESULT; stdcall;
  1536. function SetClipper(lpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1537. function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1538. function SetOverlayPosition(lX: LONG; lY: LONG): HRESULT; stdcall;
  1539. function SetPalette(lpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1540. function Unlock(lpSurfaceData: LPVOID): HRESULT; stdcall;
  1541. function UpdateOverlay(lpSrcRect: PRECT; lpDDDestSurface: IDirectDrawSurface3; lpDestRect: PRECT; dwFlags: DWORD; lpDDOverlayFx: PDDOVERLAYFX): HRESULT; stdcall;
  1542. function UpdateOverlayDisplay(dwFlags: DWORD): HRESULT; stdcall;
  1543. function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface3): HRESULT; stdcall;
  1544. (*** Added in the v2 interface ***)
  1545. function GetDDInterface(lplpDD: LPLPVOID): HRESULT; stdcall;
  1546. function PageLock(dwFlags: DWORD): HRESULT; stdcall;
  1547. function PageUnlock(dwFlags: DWORD): HRESULT; stdcall;
  1548. (*** Added in the V3 interface ***)
  1549. function SetSurfaceDesc(lpddsd: PDDSURFACEDESC; dwFlags: DWORD): HRESULT; stdcall;
  1550. end;
  1551. (*
  1552. * IDirectDrawSurface4 and related interfaces
  1553. *)
  1554. //#undef INTERFACE
  1555. //#define INTERFACE IDirectDrawSurface4
  1556. //DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown )
  1557. IDirectDrawSurface4 = interface(IUnknown)
  1558. ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}']
  1559. (*** IDirectDrawSurface methods ***)
  1560. function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface4): HRESULT; stdcall;
  1561. function AddOverlayDirtyRect(lpRect: PRECT): HRESULT; stdcall;
  1562. function Blt(lpDestRect: PRECT; lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRECT; dwFlags: DWORD; lpDDBltFx: PDDBLTFX): HRESULT; stdcall;
  1563. function BltBatch(lpDDBltBatch: PDDBLTBATCH; dwCount: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1564. function BltFast(dwX: DWORD; dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRECT; dwTrans: DWORD): HRESULT; stdcall;
  1565. function DeleteAttachedSurface(dwFlags: DWORD; lpDDSAttachedSurface: IDirectDrawSurface4): HRESULT; stdcall;
  1566. function EnumAttachedSurfaces(lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK2): HRESULT; stdcall;
  1567. function EnumOverlayZOrders(dwFlags: DWORD; lpContext: LPVOID; lpfnCallback: LPDDENUMSURFACESCALLBACK2): HRESULT; stdcall;
  1568. function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface4; dwFlags: DWORD): HRESULT; stdcall;
  1569. function GetAttachedSurface(lpDDSCaps: PDDSCAPS2; out lplpDDAttachedSurface: IDirectDrawSurface4): HRESULT; stdcall;
  1570. function GetBltStatus(dwFlags: DWORD): HRESULT; stdcall;
  1571. function GetCaps(lpDDSCaps: PDDSCAPS2): HRESULT; stdcall;
  1572. function GetClipper(out lplpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1573. function GetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1574. function GetDC(lphDC: PHDC): HRESULT; stdcall;
  1575. function GetFlipStatus(dwFlags: DWORD): HRESULT; stdcall;
  1576. function GetOverlayPosition(lplX: LPLONG; lplY: LPLONG): HRESULT; stdcall;
  1577. function GetPalette(out lplpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1578. function GetPixelFormat(lpDDPixelFormat: PDDPIXELFORMAT): HRESULT; stdcall;
  1579. function GetSurfaceDesc(lpDDSurfaceDesc: PDDSURFACEDESC2): HRESULT; stdcall;
  1580. function Initialize(lpDD: IDirectDraw; lpDDSurfaceDesc: PDDSURFACEDESC2): HRESULT; stdcall;
  1581. function IsLost: HRESULT; stdcall;
  1582. function Lock(lpDestRect: PRECT; lpDDSurfaceDesc: PDDSURFACEDESC2; dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1583. function ReleaseDC(hDC: HDC): HRESULT; stdcall;
  1584. function Restore: HRESULT; stdcall;
  1585. function SetClipper(lpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1586. function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1587. function SetOverlayPosition(lX: LONG; lY: LONG): HRESULT; stdcall;
  1588. function SetPalette(lpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1589. function Unlock(lpRect: PRECT): HRESULT; stdcall;
  1590. function UpdateOverlay(lpSrcRect: PRECT; lpDDDestSurface: IDirectDrawSurface4; lpDestRect: PRECT; dwFlags: DWORD; lpDDOverlayFx: PDDOVERLAYFX): HRESULT; stdcall;
  1591. function UpdateOverlayDisplay(dwFlags: DWORD): HRESULT; stdcall;
  1592. function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface4): HRESULT; stdcall;
  1593. (*** Added in the v2 interface ***)
  1594. function GetDDInterface(lplpDD: LPLPVOID): HRESULT; stdcall;
  1595. function PageLock(dwFlags: DWORD): HRESULT; stdcall;
  1596. function PageUnlock(dwFlags: DWORD): HRESULT; stdcall;
  1597. (*** Added in the v3 interface ***)
  1598. function SetSurfaceDesc(lpddsd2: PDDSURFACEDESC2; dwFlags: DWORD): HRESULT; stdcall;
  1599. (*** Added in the v4 interface ***)
  1600. function SetPrivateData(guidTag: PGUID; lpData: LPVOID; cbSize: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1601. function GetPrivateData(guidTag: PGUID; lpBuffer: LPVOID; lpcbBufferSize: LPDWORD): HRESULT; stdcall;
  1602. function FreePrivateData(guidTag: PGUID): HRESULT; stdcall;
  1603. function GetUniquenessValue(lpValue: LPDWORD): HRESULT; stdcall;
  1604. function ChangeUniquenessValue: HRESULT; stdcall;
  1605. end;
  1606. (*
  1607. * IDirectDrawSurface7 and related interfaces
  1608. *)
  1609. //#undef INTERFACE
  1610. //#define INTERFACE IDirectDrawSurface7
  1611. //DECLARE_INTERFACE_( IDirectDrawSurface7, IUnknown )
  1612. IDirectDrawSurface7 = interface(IUnknown)
  1613. ['{06675a80-3b9b-11d2-b92f-00609797ea5b}']
  1614. (*** IDirectDrawSurface methods ***)
  1615. function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface7): HRESULT; stdcall;
  1616. function AddOverlayDirtyRect(lpRect: PRECT): HRESULT; stdcall;
  1617. function Blt(lpDestRect: PRECT; lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRECT; dwFlags: DWORD; lpDDBltFx: PDDBLTFX): HRESULT; stdcall;
  1618. function BltBatch(lpDDBltBatch: PDDBLTBATCH; dwCount: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1619. function BltFast(dwX: DWORD; dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRECT; dwTrans: DWORD): HRESULT; stdcall;
  1620. function DeleteAttachedSurface(dwFlags: DWORD; lpDDSAttachedSurface: IDirectDrawSurface7): HRESULT; stdcall;
  1621. function EnumAttachedSurfaces(lpContext: LPVOID; lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK7): HRESULT; stdcall;
  1622. function EnumOverlayZOrders(dwFlags: DWORD; lpContext: LPVOID; lpfnCallback: LPDDENUMSURFACESCALLBACK7): HRESULT; stdcall;
  1623. function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface7; dwFlags: DWORD): HRESULT; stdcall;
  1624. function GetAttachedSurface(lpDDSCaps: PDDSCAPS2; out lplpDDAttachedSurface: IDirectDrawSurface7): HRESULT; stdcall;
  1625. function GetBltStatus(dwFlags: DWORD): HRESULT; stdcall;
  1626. function GetCaps(lpDDSCaps: PDDSCAPS2): HRESULT; stdcall;
  1627. function GetClipper(out lplpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1628. function GetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1629. function GetDC(lphDC: PHDC): HRESULT; stdcall;
  1630. function GetFlipStatus(dwFlags: DWORD): HRESULT; stdcall;
  1631. function GetOverlayPosition(lplX: LPLONG; lplY: LPLONG): HRESULT; stdcall;
  1632. function GetPalette(out lplpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1633. function GetPixelFormat(lpDDPixelFormat: PDDPIXELFORMAT): HRESULT; stdcall;
  1634. function GetSurfaceDesc(lpDDSurfaceDesc: PDDSURFACEDESC2): HRESULT; stdcall;
  1635. function Initialize(lpDD: IDirectDraw; lpDDSurfaceDesc: PDDSURFACEDESC2): HRESULT; stdcall;
  1636. function IsLost: HRESULT; stdcall;
  1637. function Lock(lpDestRect: PRECT; lpDDSurfaceDesc: PDDSURFACEDESC2; dwFlags: DWORD; hEvent: HANDLE): HRESULT; stdcall;
  1638. function ReleaseDC(hDC: HDC): HRESULT; stdcall;
  1639. function Restore: HRESULT; stdcall;
  1640. function SetClipper(lpDDClipper: IDirectDrawClipper): HRESULT; stdcall;
  1641. function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; stdcall;
  1642. function SetOverlayPosition(lX: LONG; lY: LONG): HRESULT; stdcall;
  1643. function SetPalette(lpDDPalette: IDirectDrawPalette): HRESULT; stdcall;
  1644. function Unlock(lpRect: PRECT): HRESULT; stdcall;
  1645. function UpdateOverlay(lpSrcRect: PRECT; lpDDDestSurface: IDirectDrawSurface7; lpDestRect: PRECT; dwFlags: DWORD; lpDDOverlayFx: PDDOVERLAYFX): HRESULT; stdcall;
  1646. function UpdateOverlayDisplay(dwFlags: DWORD): HRESULT; stdcall;
  1647. function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface7): HRESULT; stdcall;
  1648. (*** Added in the v2 interface ***)
  1649. function GetDDInterface(lplpDD: LPLPVOID): HRESULT; stdcall;
  1650. function PageLock(dwFlags: DWORD): HRESULT; stdcall;
  1651. function PageUnlock(dwFlags: DWORD): HRESULT; stdcall;
  1652. (*** Added in the v3 interface ***)
  1653. function SetSurfaceDesc(lpddsd2: PDDSURFACEDESC2; dwFlags: DWORD): HRESULT; stdcall;
  1654. (*** Added in the v4 interface ***)
  1655. function SetPrivateData(guidTag: PGUID; lpData: LPVOID; cbSize: DWORD; dwFlags: DWORD): HRESULT; stdcall;
  1656. function GetPrivateData(guidTag: PGUID; lpBuffer: LPVOID; lpcbBufferSize: LPDWORD): HRESULT; stdcall;
  1657. function FreePrivateData(guidTag: PGUID): HRESULT; stdcall;
  1658. function GetUniquenessValue(lpValue: LPDWORD): HRESULT; stdcall;
  1659. function ChangeUniquenessValue: HRESULT; stdcall;
  1660. (*** Moved Texture7 methods here ***)
  1661. function SetPriority(dwPriority: DWORD): HRESULT; stdcall;
  1662. function GetPriority(lpdwPriority: LPDWORD): HRESULT; stdcall;
  1663. function SetLOD(dwMaxLOD: DWORD): HRESULT; stdcall;
  1664. function GetLOD(lpdwMaxLOD: LPDWORD): HRESULT; stdcall;
  1665. end;
  1666. (*
  1667. * IDirectDrawColorControl
  1668. *)
  1669. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1670. //#undef INTERFACE
  1671. //#define INTERFACE IDirectDrawColorControl
  1672. //DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
  1673. IDirectDrawColorControl = interface(IUnknown)
  1674. ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}']
  1675. (*** IDirectDrawColorControl methods ***)
  1676. function GetColorControls(lpColorControl: PDDCOLORCONTROL): HRESULT; stdcall;
  1677. function SetColorControls(lpColorControl: PDDCOLORCONTROL): HRESULT; stdcall;
  1678. end;
  1679. (*
  1680. * IDirectDrawGammaControl
  1681. *)
  1682. //#if defined( _WIN32 ) && !defined( _NO_COM )
  1683. //#undef INTERFACE
  1684. //#define INTERFACE IDirectDrawGammaControl
  1685. //DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown )
  1686. IDirectDrawGammaControl = interface(IUnknown)
  1687. ['{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}']
  1688. (*** IDirectDrawGammaControl methods ***)
  1689. function GetGammaRamp(dwFlags: DWORD; lpRampData: PDDGAMMARAMP): HRESULT; stdcall;
  1690. function SetGammaRamp(dwFlags: DWORD; lpRampData: PDDGAMMARAMP): HRESULT; stdcall;
  1691. end;
  1692. (*============================================================================
  1693. *
  1694. * Direct Draw Capability Flags
  1695. *
  1696. * These flags are used to describe the capabilities of a given Surface.
  1697. * All flags are bit flags.
  1698. *
  1699. *==========================================================================*)
  1700. (****************************************************************************
  1701. *
  1702. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  1703. *
  1704. ****************************************************************************)
  1705. const
  1706. (*
  1707. * This bit is reserved. It should not be specified.
  1708. *)
  1709. DDSCAPS_RESERVED1 = $00000001;
  1710. (*
  1711. * Indicates that this surface contains alpha-only information.
  1712. * (To determine if a surface is RGBA/YUVA, the pixel format must be
  1713. * interrogated.)
  1714. *)
  1715. DDSCAPS_ALPHA = $00000002;
  1716. (*
  1717. * Indicates that this surface is a backbuffer. It is generally
  1718. * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  1719. * It indicates that this surface is THE back buffer of a surface
  1720. * flipping structure. DirectDraw supports N surfaces in a
  1721. * surface flipping structure. Only the surface that immediately
  1722. * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  1723. * The other surfaces are identified as back buffers by the presence
  1724. * of the DDSCAPS_FLIP capability, their attachment order, and the
  1725. * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  1726. * capabilities. The bit is sent to CreateSurface when a standalone
  1727. * back buffer is being created. This surface could be attached to
  1728. * a front buffer and/or back buffers to form a flipping surface
  1729. * structure after the CreateSurface call. See AddAttachments for
  1730. * a detailed description of the behaviors in this case.
  1731. *)
  1732. DDSCAPS_BACKBUFFER = $00000004;
  1733. (*
  1734. * Indicates a complex surface structure is being described. A
  1735. * complex surface structure results in the creation of more than
  1736. * one surface. The additional surfaces are attached to the root
  1737. * surface. The complex structure can only be destroyed by
  1738. * destroying the root.
  1739. *)
  1740. DDSCAPS_COMPLEX = $00000008;
  1741. (*
  1742. * Indicates that this surface is a part of a surface flipping structure.
  1743. * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  1744. * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
  1745. * on the resulting creations. The dwBackBufferCount field in the
  1746. * DDSURFACEDESC structure must be set to at least 1 in order for
  1747. * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
  1748. * must always be set with creating multiple surfaces through CreateSurface.
  1749. *)
  1750. DDSCAPS_FLIP = $00000010;
  1751. (*
  1752. * Indicates that this surface is THE front buffer of a surface flipping
  1753. * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
  1754. * capability bit is set.
  1755. * If this capability is sent to CreateSurface then a standalonw front buffer
  1756. * is created. This surface will not have the DDSCAPS_FLIP capability.
  1757. * It can be attached to other back buffers to form a flipping structure.
  1758. * See AddAttachments for a detailed description of the behaviors in this
  1759. * case.
  1760. *)
  1761. DDSCAPS_FRONTBUFFER = $00000020;
  1762. (*
  1763. * Indicates that this surface is any offscreen surface that is not an overlay,
  1764. * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
  1765. * to identify plain vanilla surfaces.
  1766. *)
  1767. DDSCAPS_OFFSCREENPLAIN = $00000040;
  1768. (*
  1769. * Indicates that this surface is an overlay. It may or may not be directly visible
  1770. * depending on whether or not it is currently being overlayed onto the primary
  1771. * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
  1772. * overlayed at the moment.
  1773. *)
  1774. DDSCAPS_OVERLAY = $00000080;
  1775. (*
  1776. * Indicates that unique DirectDrawPalette objects can be created and
  1777. * attached to this surface.
  1778. *)
  1779. DDSCAPS_PALETTE = $00000100;
  1780. (*
  1781. * Indicates that this surface is the primary surface. The primary
  1782. * surface represents what the user is seeing at the moment.
  1783. *)
  1784. DDSCAPS_PRIMARYSURFACE = $00000200;
  1785. (*
  1786. * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
  1787. * obsolete.
  1788. *)
  1789. DDSCAPS_RESERVED3 = $00000400;
  1790. DDSCAPS_PRIMARYSURFACELEFT = $00000000;
  1791. (*
  1792. * Indicates that this surface memory was allocated in system memory
  1793. *)
  1794. DDSCAPS_SYSTEMMEMORY = $00000800;
  1795. (*
  1796. * Indicates that this surface can be used as a 3D texture. It does not
  1797. * indicate whether or not the surface is being used for that purpose.
  1798. *)
  1799. DDSCAPS_TEXTURE = $00001000;
  1800. (*
  1801. * Indicates that a surface may be a destination for 3D rendering. This
  1802. * bit must be set in order to query for a Direct3D Device Interface
  1803. * from this surface.
  1804. *)
  1805. DDSCAPS_3DDEVICE = $00002000;
  1806. (*
  1807. * Indicates that this surface exists in video memory.
  1808. *)
  1809. DDSCAPS_VIDEOMEMORY = $00004000;
  1810. (*
  1811. * Indicates that changes made to this surface are immediately visible.
  1812. * It is always set for the primary surface and is set for overlays while
  1813. * they are being overlayed and texture maps while they are being textured.
  1814. *)
  1815. DDSCAPS_VISIBLE = $00008000;
  1816. (*
  1817. * Indicates that only writes are permitted to the surface. Read accesses
  1818. * from the surface may or may not generate a protection fault, but the
  1819. * results of a read from this surface will not be meaningful. READ ONLY.
  1820. *)
  1821. DDSCAPS_WRITEONLY = $00010000;
  1822. (*
  1823. * Indicates that this surface is a z buffer. A z buffer does not contain
  1824. * displayable information. Instead it contains bit depth information that is
  1825. * used to determine which pixels are visible and which are obscured.
  1826. *)
  1827. DDSCAPS_ZBUFFER = $00020000;
  1828. (*
  1829. * Indicates surface will have a DC associated long term
  1830. *)
  1831. DDSCAPS_OWNDC = $00040000;
  1832. (*
  1833. * Indicates surface should be able to receive live video
  1834. *)
  1835. DDSCAPS_LIVEVIDEO = $00080000;
  1836. (*
  1837. * Indicates surface should be able to have a stream decompressed
  1838. * to it by the hardware.
  1839. *)
  1840. DDSCAPS_HWCODEC = $00100000;
  1841. (*
  1842. * Surface is a ModeX surface.
  1843. *
  1844. *)
  1845. DDSCAPS_MODEX = $00200000;
  1846. (*
  1847. * Indicates surface is one level of a mip-map. This surface will
  1848. * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  1849. * This can be done explicitly, by creating a number of surfaces and
  1850. * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  1851. * If this bit is set then DDSCAPS_TEXTURE must also be set.
  1852. *)
  1853. DDSCAPS_MIPMAP = $00400000;
  1854. (*
  1855. * This bit is reserved. It should not be specified.
  1856. *)
  1857. DDSCAPS_RESERVED2 = $00800000;
  1858. (*
  1859. * Indicates that memory for the surface is not allocated until the surface
  1860. * is loaded (via the Direct3D texture Load() function).
  1861. *)
  1862. DDSCAPS_ALLOCONLOAD = $04000000;
  1863. (*
  1864. * Indicates that the surface will recieve data from a video port.
  1865. *)
  1866. DDSCAPS_VIDEOPORT = $08000000;
  1867. (*
  1868. * Indicates that a video memory surface is resident in true, local video
  1869. * memory rather than non-local video memory. If this flag is specified then
  1870. * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  1871. * DDSCAPS_NONLOCALVIDMEM.
  1872. *)
  1873. DDSCAPS_LOCALVIDMEM = $10000000;
  1874. (*
  1875. * Indicates that a video memory surface is resident in non-local video
  1876. * memory rather than true, local video memory. If this flag is specified
  1877. * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  1878. * DDSCAPS_LOCALVIDMEM.
  1879. *)
  1880. DDSCAPS_NONLOCALVIDMEM = $20000000;
  1881. (*
  1882. * Indicates that this surface is a standard VGA mode surface, and not a
  1883. * ModeX surface. (This flag will never be set in combination with the
  1884. * DDSCAPS_MODEX flag).
  1885. *)
  1886. DDSCAPS_STANDARDVGAMODE = $40000000;
  1887. (*
  1888. * Indicates that this surface will be an optimized surface. This flag is
  1889. * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
  1890. * will be created without any underlying video memory until loaded.
  1891. *)
  1892. DDSCAPS_OPTIMIZED = $80000000;
  1893. (*
  1894. * This bit is reserved
  1895. *)
  1896. DDSCAPS2_RESERVED4 = $00000002;
  1897. DDSCAPS2_HARDWAREDEINTERLACE = $00000000;
  1898. (*
  1899. * Indicates to the driver that this surface will be locked very frequently
  1900. * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
  1901. * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  1902. * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
  1903. *)
  1904. DDSCAPS2_HINTDYNAMIC = $00000004;
  1905. (*
  1906. * Indicates to the driver that this surface can be re-ordered/retiled on
  1907. * load. This operation will not change the size of the texture. It is
  1908. * relatively fast and symmetrical, since the application may lock these
  1909. * bits (although it will take a performance hit when doing so). Surfaces
  1910. * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
  1911. * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
  1912. *)
  1913. DDSCAPS2_HINTSTATIC = $00000008;
  1914. (*
  1915. * Indicates that the client would like this texture surface to be managed by the
  1916. * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
  1917. * DDSCAPS_TEXTURE set.
  1918. *)
  1919. DDSCAPS2_TEXTUREMANAGE = $00000010;
  1920. (*
  1921. * These bits are reserved for internal use *)
  1922. DDSCAPS2_RESERVED1 = $00000020;
  1923. DDSCAPS2_RESERVED2 = $00000040;
  1924. (*
  1925. * Indicates to the driver that this surface will never be locked again.
  1926. * The driver is free to optimize this surface via retiling and actual compression.
  1927. * All calls to Lock() or Blts from this surface will fail. Surfaces with this
  1928. * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  1929. * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
  1930. *)
  1931. DDSCAPS2_OPAQUE = $00000080;
  1932. (*
  1933. * Applications should set this bit at CreateSurface time to indicate that they
  1934. * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
  1935. *)
  1936. DDSCAPS2_HINTANTIALIASING = $00000100;
  1937. (*
  1938. * This flag is used at CreateSurface time to indicate that this set of
  1939. * surfaces is a cubic environment map
  1940. *)
  1941. DDSCAPS2_CUBEMAP = $00000200;
  1942. (*
  1943. * These flags preform two functions:
  1944. * - At CreateSurface time, they define which of the six cube faces are
  1945. * required by the application.
  1946. * - After creation, each face in the cubemap will have exactly one of these
  1947. * bits set.
  1948. *)
  1949. DDSCAPS2_CUBEMAP_POSITIVEX = $00000400;
  1950. DDSCAPS2_CUBEMAP_NEGATIVEX = $00000800;
  1951. DDSCAPS2_CUBEMAP_POSITIVEY = $00001000;
  1952. DDSCAPS2_CUBEMAP_NEGATIVEY = $00002000;
  1953. DDSCAPS2_CUBEMAP_POSITIVEZ = $00004000;
  1954. DDSCAPS2_CUBEMAP_NEGATIVEZ = $00008000;
  1955. (*
  1956. * This macro may be used to specify all faces of a cube map at CreateSurface time
  1957. *)
  1958. DDSCAPS2_CUBEMAP_ALLFACES = DDSCAPS2_CUBEMAP_POSITIVEX or
  1959. DDSCAPS2_CUBEMAP_NEGATIVEX or
  1960. DDSCAPS2_CUBEMAP_POSITIVEY or
  1961. DDSCAPS2_CUBEMAP_NEGATIVEY or
  1962. DDSCAPS2_CUBEMAP_POSITIVEZ or
  1963. DDSCAPS2_CUBEMAP_NEGATIVEZ;
  1964. (*
  1965. * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
  1966. * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
  1967. * constructs such as Cube Maps, wherein there are more than one mipmap surface attached
  1968. * to the root surface.
  1969. * This caps bit is ignored by CreateSurface
  1970. *)
  1971. DDSCAPS2_MIPMAPSUBLEVEL = $00010000;
  1972. (* This flag indicates that the texture should be managed by D3D only *)
  1973. DDSCAPS2_D3DTEXTUREMANAGE = $00020000;
  1974. (* This flag indicates that the managed surface can be safely lost *)
  1975. DDSCAPS2_DONOTPERSIST = $00040000;
  1976. (* indicates that this surface is part of a stereo flipping chain *)
  1977. DDSCAPS2_STEREOSURFACELEFT = $00080000;
  1978. (*
  1979. * Indicates that the surface is a volume.
  1980. * Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume
  1981. *)
  1982. DDSCAPS2_VOLUME = $00200000;
  1983. (*
  1984. * Indicates that the surface may be locked multiple times by the application.
  1985. * This cap cannot be used with DDSCAPS2_OPAQUE.
  1986. *)
  1987. DDSCAPS2_NOTUSERLOCKABLE = $00400000;
  1988. (*
  1989. * Indicates that the vertex buffer data can be used to render points and
  1990. * point sprites.
  1991. *)
  1992. DDSCAPS2_POINTS = $00800000;
  1993. (*
  1994. * Indicates that the vertex buffer data can be used to render rt pactches.
  1995. *)
  1996. DDSCAPS2_RTPATCHES = $01000000;
  1997. (*
  1998. * Indicates that the vertex buffer data can be used to render n patches.
  1999. *)
  2000. DDSCAPS2_NPATCHES = $02000000;
  2001. (*
  2002. * This bit is reserved for internal use
  2003. *)
  2004. DDSCAPS2_RESERVED3 = $04000000;
  2005. (*
  2006. * Indicates that the contents of the backbuffer do not have to be preserved
  2007. * the contents of the backbuffer after they are presented.
  2008. *)
  2009. DDSCAPS2_DISCARDBACKBUFFER = $10000000;
  2010. (*
  2011. * Indicates that all surfaces in this creation chain should be given an alpha channel.
  2012. * This flag will be set on primary surface chains that may have no explicit pixel format
  2013. * (and thus take on the format of the current display mode).
  2014. * The driver should infer that all these surfaces have a format having an alpha channel.
  2015. * (e.g. assume D3DFMT_A8R8G8B8 if the display mode is x888.)
  2016. *)
  2017. DDSCAPS2_ENABLEALPHACHANNEL = $20000000;
  2018. (*
  2019. * Indicates that all surfaces in this creation chain is extended primary surface format.
  2020. * This flag will be set on extended primary surface chains that always have explicit pixel
  2021. * format and the pixel format is typically GDI (Graphics Device Interface) couldn't handle,
  2022. * thus only used with fullscreen application. (e.g. D3DFMT_A2R10G10B10 format)
  2023. *)
  2024. DDSCAPS2_EXTENDEDFORMATPRIMARY = $40000000;
  2025. (*
  2026. * Indicates that all surfaces in this creation chain is additional primary surface.
  2027. * This flag will be set on primary surface chains which must present on the adapter
  2028. * id provided on dwCaps4. Typically this will be used to create secondary primary surface
  2029. * on DualView display adapter.
  2030. *)
  2031. DDSCAPS2_ADDITIONALPRIMARY = $80000000;
  2032. (*
  2033. * This is a mask that indicates the set of bits that may be set
  2034. * at createsurface time to indicate number of samples per pixel
  2035. * when multisampling
  2036. *)
  2037. DDSCAPS3_MULTISAMPLE_MASK = $0000001F;
  2038. (*
  2039. * This is a mask that indicates the set of bits that may be set
  2040. * at createsurface time to indicate the quality level of rendering
  2041. * for the current number of samples per pixel
  2042. *)
  2043. DDSCAPS3_MULTISAMPLE_QUALITY_MASK = $000000E0;
  2044. DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT = 5;
  2045. (*
  2046. * This bit is reserved for internal use
  2047. *)
  2048. DDSCAPS3_RESERVED1 = $00000100;
  2049. (*
  2050. * This bit is reserved for internal use
  2051. *)
  2052. DDSCAPS3_RESERVED2 = $00000200;
  2053. (*
  2054. * This indicates whether this surface has light-weight miplevels
  2055. *)
  2056. DDSCAPS3_LIGHTWEIGHTMIPMAP = $00000400;
  2057. (*
  2058. * This indicates that the mipsublevels for this surface are auto-generated
  2059. *)
  2060. DDSCAPS3_AUTOGENMIPMAP = $00000800;
  2061. (*
  2062. * This indicates that the mipsublevels for this surface are auto-generated
  2063. *)
  2064. DDSCAPS3_DMAP = $00001000;
  2065. (* D3D9Ex only -- *)
  2066. {$IFNDEF D3D_DISABLE_9EX}
  2067. (*
  2068. * This indicates that this surface is to be shared by processes
  2069. *)
  2070. DDSCAPS3_CREATESHAREDRESOURCE = $00002000;
  2071. (*
  2072. * This indicates that this surface need to be initialized before being
  2073. * shared, this bit implies that this surface is read only after initialization
  2074. * absence of this bit implies that this surface allows both read and write
  2075. *)
  2076. DDSCAPS3_READONLYRESOURCE = $00004000;
  2077. (*
  2078. * This indicates that this surface is to share an existing video memory with
  2079. * another surface created with DDSCAPS3_CREATESHAREDRESOURCE, This bit is never
  2080. * used with DDSCAPS3_CREATESHAREDRESOURCE
  2081. *)
  2082. DDSCAPS3_OPENSHAREDRESOURCE = $00008000;
  2083. {$ENDIF} // !D3D_DISABLE_9EX
  2084. (* -- D3D9Ex only *)
  2085. (****************************************************************************
  2086. *
  2087. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  2088. *
  2089. ****************************************************************************)
  2090. (*
  2091. * Display hardware has 3D acceleration.
  2092. *)
  2093. DDCAPS_3D = $00000001;
  2094. (*
  2095. * Indicates that DirectDraw will support only dest rectangles that are aligned
  2096. * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  2097. * READ ONLY.
  2098. *)
  2099. DDCAPS_ALIGNBOUNDARYDEST = $00000002;
  2100. (*
  2101. * Indicates that DirectDraw will support only source rectangles whose sizes in
  2102. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
  2103. *)
  2104. DDCAPS_ALIGNSIZEDEST = $00000004;
  2105. (*
  2106. * Indicates that DirectDraw will support only source rectangles that are aligned
  2107. * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  2108. * READ ONLY.
  2109. *)
  2110. DDCAPS_ALIGNBOUNDARYSRC = $00000008;
  2111. (*
  2112. * Indicates that DirectDraw will support only source rectangles whose sizes in
  2113. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
  2114. *)
  2115. DDCAPS_ALIGNSIZESRC = $00000010;
  2116. (*
  2117. * Indicates that DirectDraw will create video memory surfaces that have a stride
  2118. * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
  2119. *)
  2120. DDCAPS_ALIGNSTRIDE = $00000020;
  2121. (*
  2122. * Display hardware is capable of blt operations.
  2123. *)
  2124. DDCAPS_BLT = $00000040;
  2125. (*
  2126. * Display hardware is capable of asynchronous blt operations.
  2127. *)
  2128. DDCAPS_BLTQUEUE = $00000080;
  2129. (*
  2130. * Display hardware is capable of color space conversions during the blt operation.
  2131. *)
  2132. DDCAPS_BLTFOURCC = $00000100;
  2133. (*
  2134. * Display hardware is capable of stretching during blt operations.
  2135. *)
  2136. DDCAPS_BLTSTRETCH = $00000200;
  2137. (*
  2138. * Display hardware is shared with GDI.
  2139. *)
  2140. DDCAPS_GDI = $00000400;
  2141. (*
  2142. * Display hardware can overlay.
  2143. *)
  2144. DDCAPS_OVERLAY = $00000800;
  2145. (*
  2146. * Set if display hardware supports overlays but can not clip them.
  2147. *)
  2148. DDCAPS_OVERLAYCANTCLIP = $00001000;
  2149. (*
  2150. * Indicates that overlay hardware is capable of color space conversions during
  2151. * the overlay operation.
  2152. *)
  2153. DDCAPS_OVERLAYFOURCC = $00002000;
  2154. (*
  2155. * Indicates that stretching can be done by the overlay hardware.
  2156. *)
  2157. DDCAPS_OVERLAYSTRETCH = $00004000;
  2158. (*
  2159. * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  2160. * other than the primary surface.
  2161. *)
  2162. DDCAPS_PALETTE = $00008000;
  2163. (*
  2164. * Indicates that palette changes can be syncd with the veritcal refresh.
  2165. *)
  2166. DDCAPS_PALETTEVSYNC = $00010000;
  2167. (*
  2168. * Display hardware can return the current scan line.
  2169. *)
  2170. DDCAPS_READSCANLINE = $00020000;
  2171. (*
  2172. * This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete
  2173. *)
  2174. DDCAPS_RESERVED1 = $00040000;
  2175. (*
  2176. * Display hardware is capable of generating a vertical blank interrupt.
  2177. *)
  2178. DDCAPS_VBI = $00080000;
  2179. (*
  2180. * Supports the use of z buffers with blt operations.
  2181. *)
  2182. DDCAPS_ZBLTS = $00100000;
  2183. (*
  2184. * Supports Z Ordering of overlays.
  2185. *)
  2186. DDCAPS_ZOVERLAYS = $00200000;
  2187. (*
  2188. * Supports color key
  2189. *)
  2190. DDCAPS_COLORKEY = $00400000;
  2191. (*
  2192. * Supports alpha surfaces
  2193. *)
  2194. DDCAPS_ALPHA = $00800000;
  2195. (*
  2196. * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  2197. *)
  2198. DDCAPS_COLORKEYHWASSIST = $01000000;
  2199. (*
  2200. * no hardware support at all
  2201. *)
  2202. DDCAPS_NOHARDWARE = $02000000;
  2203. (*
  2204. * Display hardware is capable of color fill with bltter
  2205. *)
  2206. DDCAPS_BLTCOLORFILL = $04000000;
  2207. (*
  2208. * Display hardware is bank switched, and potentially very slow at
  2209. * random access to VRAM.
  2210. *)
  2211. DDCAPS_BANKSWITCHED = $08000000;
  2212. (*
  2213. * Display hardware is capable of depth filling Z-buffers with bltter
  2214. *)
  2215. DDCAPS_BLTDEPTHFILL = $10000000;
  2216. (*
  2217. * Display hardware is capable of clipping while bltting.
  2218. *)
  2219. DDCAPS_CANCLIP = $20000000;
  2220. (*
  2221. * Display hardware is capable of clipping while stretch bltting.
  2222. *)
  2223. DDCAPS_CANCLIPSTRETCHED = $40000000;
  2224. (*
  2225. * Display hardware is capable of bltting to or from system memory
  2226. *)
  2227. DDCAPS_CANBLTSYSMEM = $80000000;
  2228. (****************************************************************************
  2229. *
  2230. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  2231. *
  2232. ****************************************************************************)
  2233. (*
  2234. * Display hardware is certified
  2235. *)
  2236. DDCAPS2_CERTIFIED = $00000001;
  2237. (*
  2238. * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  2239. * Direct3D rendering operations between calls to BeginScene() and EndScene()
  2240. *)
  2241. DDCAPS2_NO2DDURING3DSCENE = $00000002;
  2242. (*
  2243. * Display hardware contains a video port
  2244. *)
  2245. DDCAPS2_VIDEOPORT = $00000004;
  2246. (*
  2247. * The overlay can be automatically flipped according to the video port
  2248. * VSYNCs, providing automatic doubled buffered display of video port
  2249. * data using an overlay
  2250. *)
  2251. DDCAPS2_AUTOFLIPOVERLAY = $00000008;
  2252. (*
  2253. * Overlay can display each field of interlaced data individually while
  2254. * it is interleaved in memory without causing jittery artifacts.
  2255. *)
  2256. DDCAPS2_CANBOBINTERLEAVED = $00000010;
  2257. (*
  2258. * Overlay can display each field of interlaced data individually while
  2259. * it is not interleaved in memory without causing jittery artifacts.
  2260. *)
  2261. DDCAPS2_CANBOBNONINTERLEAVED = $00000020;
  2262. (*
  2263. * The overlay surface contains color controls (brightness, sharpness, etc.)
  2264. *)
  2265. DDCAPS2_COLORCONTROLOVERLAY = $00000040;
  2266. (*
  2267. * The primary surface contains color controls (gamma, etc.)
  2268. *)
  2269. DDCAPS2_COLORCONTROLPRIMARY = $00000080;
  2270. (*
  2271. * RGBZ -> RGB supported for 16:16 RGB:Z
  2272. *)
  2273. DDCAPS2_CANDROPZ16BIT = $00000100;
  2274. (*
  2275. * Driver supports non-local video memory.
  2276. *)
  2277. DDCAPS2_NONLOCALVIDMEM = $00000200;
  2278. (*
  2279. * Dirver supports non-local video memory but has different capabilities for
  2280. * non-local video memory surfaces. If this bit is set then so must
  2281. * DDCAPS2_NONLOCALVIDMEM.
  2282. *)
  2283. DDCAPS2_NONLOCALVIDMEMCAPS = $00000400;
  2284. (*
  2285. * Driver neither requires nor prefers surfaces to be pagelocked when performing
  2286. * blts involving system memory surfaces
  2287. *)
  2288. DDCAPS2_NOPAGELOCKREQUIRED = $00000800;
  2289. (*
  2290. * Driver can create surfaces which are wider than the primary surface
  2291. *)
  2292. DDCAPS2_WIDESURFACES = $00001000;
  2293. (*
  2294. * Driver supports bob without using a video port by handling the
  2295. * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
  2296. *)
  2297. DDCAPS2_CANFLIPODDEVEN = $00002000;
  2298. (*
  2299. * Driver supports bob using hardware
  2300. *)
  2301. DDCAPS2_CANBOBHARDWARE = $00004000;
  2302. (*
  2303. * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
  2304. *)
  2305. DDCAPS2_COPYFOURCC = $00008000;
  2306. (*
  2307. * Driver supports loadable gamma ramps for the primary surface
  2308. *)
  2309. DDCAPS2_PRIMARYGAMMA = $00020000;
  2310. (*
  2311. * Driver can render in windowed mode.
  2312. *)
  2313. DDCAPS2_CANRENDERWINDOWED = $00080000;
  2314. (*
  2315. * A calibrator is available to adjust the gamma ramp according to the
  2316. * physical display properties so that the result will be identical on
  2317. * all calibrated systems.
  2318. *)
  2319. DDCAPS2_CANCALIBRATEGAMMA = $00100000;
  2320. (*
  2321. * Indicates that the driver will respond to DDFLIP_INTERVALn flags
  2322. *)
  2323. DDCAPS2_FLIPINTERVAL = $00200000;
  2324. (*
  2325. * Indicates that the driver will respond to DDFLIP_NOVSYNC
  2326. *)
  2327. DDCAPS2_FLIPNOVSYNC = $00400000;
  2328. (*
  2329. * Driver supports management of video memory, if this flag is ON,
  2330. * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on
  2331. * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
  2332. *)
  2333. DDCAPS2_CANMANAGETEXTURE = $00800000;
  2334. (*
  2335. * The Direct3D texture manager uses this cap to decide whether to put managed
  2336. * surfaces in non-local video memory. If the cap is set, the texture manager will
  2337. * put managed surfaces in non-local vidmem. Drivers that cannot texture from
  2338. * local vidmem SHOULD NOT set this cap.
  2339. *)
  2340. DDCAPS2_TEXMANINNONLOCALVIDMEM = $01000000;
  2341. (*
  2342. * Indicates that the driver supports DX7 type of stereo in at least one mode (which may
  2343. * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher)
  2344. * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of
  2345. * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application
  2346. * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode.
  2347. *)
  2348. DDCAPS2_STEREO = $02000000;
  2349. (*
  2350. * This caps bit is intended for internal DirectDraw use.
  2351. * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set.
  2352. * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and
  2353. * all the assoicated system memory blt caps must be correct).
  2354. * -It implies that the system->video blt caps in DDCAPS also apply to system to
  2355. * nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops
  2356. * members of DDCAPS (DDCORECAPS) are filled in correctly.
  2357. * -Any blt from system to nonlocal memory that matches these caps bits will
  2358. * be passed to the driver.
  2359. *
  2360. * NOTE: This is intended to enable the driver itself to do efficient reordering
  2361. * of textures. This is NOT meant to imply that hardware can write into AGP memory.
  2362. * This operation is not currently supported.
  2363. *)
  2364. DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL = $04000000;
  2365. (*
  2366. * was DDCAPS2_PUREHAL
  2367. *)
  2368. DDCAPS2_RESERVED1 = $08000000;
  2369. (*
  2370. * Driver supports management of video memory, if this flag is ON,
  2371. * driver manages the resource if requested with DDSCAPS2_TEXTUREMANAGE on
  2372. * DirectX manages the resource if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
  2373. *)
  2374. DDCAPS2_CANMANAGERESOURCE = $10000000;
  2375. (*
  2376. * Driver supports dynamic textures. This will allow the application to set
  2377. * D3DUSAGE_DYNAMIC (DDSCAPS2_HINTDYNAMIC for drivers) at texture create time.
  2378. * Video memory dynamic textures WILL be lockable by applications. It is
  2379. * expected that these locks will be very efficient (which implies that the
  2380. * driver should always maintain a linear copy, a pointer to which can be
  2381. * quickly handed out to the application).
  2382. *)
  2383. DDCAPS2_DYNAMICTEXTURES = $20000000;
  2384. (*
  2385. * Driver supports auto-generation of mipmaps.
  2386. *)
  2387. DDCAPS2_CANAUTOGENMIPMAP = $40000000;
  2388. (* D3D9Ex only -- *)
  2389. {$IFNDEF D3D_DISABLE_9EX}
  2390. (*
  2391. * Driver supports sharing of cross process resouces
  2392. *)
  2393. DDCAPS2_CANSHARERESOURCE = $80000000;
  2394. {$ENDIF} // !D3D_DISABLE_9EX
  2395. (* -- D3D9Ex only *)
  2396. (****************************************************************************
  2397. *
  2398. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  2399. *
  2400. ****************************************************************************)
  2401. (*
  2402. * Supports alpha blending around the edge of a source color keyed surface.
  2403. * For Blt.
  2404. *)
  2405. DDFXALPHACAPS_BLTALPHAEDGEBLEND = $00000001;
  2406. (*
  2407. * Supports alpha information in the pixel format. The bit depth of alpha
  2408. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  2409. * more opaque as the alpha value increases. (0 is transparent.)
  2410. * For Blt.
  2411. *)
  2412. DDFXALPHACAPS_BLTALPHAPIXELS = $00000002;
  2413. (*
  2414. * Supports alpha information in the pixel format. The bit depth of alpha
  2415. * information in the pixel format can be 1,2,4, or 8. The alpha value
  2416. * becomes more transparent as the alpha value increases. (0 is opaque.)
  2417. * This flag can only be set if DDCAPS_ALPHA is set.
  2418. * For Blt.
  2419. *)
  2420. DDFXALPHACAPS_BLTALPHAPIXELSNEG = $00000004;
  2421. (*
  2422. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  2423. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  2424. * (0 is transparent.)
  2425. * For Blt.
  2426. *)
  2427. DDFXALPHACAPS_BLTALPHASURFACES = $00000008;
  2428. (*
  2429. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  2430. * The NEG suffix indicates that this alpha channel becomes more transparent
  2431. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  2432. * DDCAPS_ALPHA is set.
  2433. * For Blt.
  2434. *)
  2435. DDFXALPHACAPS_BLTALPHASURFACESNEG = $00000010;
  2436. (*
  2437. * Supports alpha blending around the edge of a source color keyed surface.
  2438. * For Overlays.
  2439. *)
  2440. DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND = $00000020;
  2441. (*
  2442. * Supports alpha information in the pixel format. The bit depth of alpha
  2443. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  2444. * more opaque as the alpha value increases. (0 is transparent.)
  2445. * For Overlays.
  2446. *)
  2447. DDFXALPHACAPS_OVERLAYALPHAPIXELS = $00000040;
  2448. (*
  2449. * Supports alpha information in the pixel format. The bit depth of alpha
  2450. * information in the pixel format can be 1,2,4, or 8. The alpha value
  2451. * becomes more transparent as the alpha value increases. (0 is opaque.)
  2452. * This flag can only be set if DDCAPS_ALPHA is set.
  2453. * For Overlays.
  2454. *)
  2455. DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG = $00000080;
  2456. (*
  2457. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  2458. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  2459. * (0 is transparent.)
  2460. * For Overlays.
  2461. *)
  2462. DDFXALPHACAPS_OVERLAYALPHASURFACES = $00000100;
  2463. (*
  2464. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  2465. * The NEG suffix indicates that this alpha channel becomes more transparent
  2466. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  2467. * DDCAPS_ALPHA is set.
  2468. * For Overlays.
  2469. *)
  2470. DDFXALPHACAPS_OVERLAYALPHASURFACESNEG = $00000200;
  2471. {$IF DIRECTDRAW_VERSION < $0600}
  2472. {$ENDIF} //DIRECTDRAW_VERSION
  2473. (****************************************************************************
  2474. *
  2475. * DIRECTDRAW FX CAPABILITY FLAGS
  2476. *
  2477. ****************************************************************************)
  2478. (*
  2479. * Uses arithmetic operations to stretch and shrink surfaces during blt
  2480. * rather than pixel doubling techniques. Along the Y axis.
  2481. *)
  2482. DDFXCAPS_BLTARITHSTRETCHY = $00000020;
  2483. (*
  2484. * Uses arithmetic operations to stretch during blt
  2485. * rather than pixel doubling techniques. Along the Y axis. Only
  2486. * works for x1, x2, etc.
  2487. *)
  2488. DDFXCAPS_BLTARITHSTRETCHYN = $00000010;
  2489. (*
  2490. * Supports mirroring left to right in blt.
  2491. *)
  2492. DDFXCAPS_BLTMIRRORLEFTRIGHT = $00000040;
  2493. (*
  2494. * Supports mirroring top to bottom in blt.
  2495. *)
  2496. DDFXCAPS_BLTMIRRORUPDOWN = $00000080;
  2497. (*
  2498. * Supports arbitrary rotation for blts.
  2499. *)
  2500. DDFXCAPS_BLTROTATION = $00000100;
  2501. (*
  2502. * Supports 90 degree rotations for blts.
  2503. *)
  2504. DDFXCAPS_BLTROTATION90 = $00000200;
  2505. (*
  2506. * DirectDraw supports arbitrary shrinking of a surface along the
  2507. * x axis (horizontal direction) for blts.
  2508. *)
  2509. DDFXCAPS_BLTSHRINKX = $00000400;
  2510. (*
  2511. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2512. * along the x axis (horizontal direction) for blts.
  2513. *)
  2514. DDFXCAPS_BLTSHRINKXN = $00000800;
  2515. (*
  2516. * DirectDraw supports arbitrary shrinking of a surface along the
  2517. * y axis (horizontal direction) for blts.
  2518. *)
  2519. DDFXCAPS_BLTSHRINKY = $00001000;
  2520. (*
  2521. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2522. * along the y axis (vertical direction) for blts.
  2523. *)
  2524. DDFXCAPS_BLTSHRINKYN = $00002000;
  2525. (*
  2526. * DirectDraw supports arbitrary stretching of a surface along the
  2527. * x axis (horizontal direction) for blts.
  2528. *)
  2529. DDFXCAPS_BLTSTRETCHX = $00004000;
  2530. (*
  2531. * DirectDraw supports integer stretching (1x,2x,) of a surface
  2532. * along the x axis (horizontal direction) for blts.
  2533. *)
  2534. DDFXCAPS_BLTSTRETCHXN = $00008000;
  2535. (*
  2536. * DirectDraw supports arbitrary stretching of a surface along the
  2537. * y axis (horizontal direction) for blts.
  2538. *)
  2539. DDFXCAPS_BLTSTRETCHY = $00010000;
  2540. (*
  2541. * DirectDraw supports integer stretching (1x,2x,) of a surface
  2542. * along the y axis (vertical direction) for blts.
  2543. *)
  2544. DDFXCAPS_BLTSTRETCHYN = $00020000;
  2545. (*
  2546. * Uses arithmetic operations to stretch and shrink surfaces during
  2547. * overlay rather than pixel doubling techniques. Along the Y axis
  2548. * for overlays.
  2549. *)
  2550. DDFXCAPS_OVERLAYARITHSTRETCHY = $00040000;
  2551. (*
  2552. * Uses arithmetic operations to stretch surfaces during
  2553. * overlay rather than pixel doubling techniques. Along the Y axis
  2554. * for overlays. Only works for x1, x2, etc.
  2555. *)
  2556. DDFXCAPS_OVERLAYARITHSTRETCHYN = $00000008;
  2557. (*
  2558. * DirectDraw supports arbitrary shrinking of a surface along the
  2559. * x axis (horizontal direction) for overlays.
  2560. *)
  2561. DDFXCAPS_OVERLAYSHRINKX = $00080000;
  2562. (*
  2563. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2564. * along the x axis (horizontal direction) for overlays.
  2565. *)
  2566. DDFXCAPS_OVERLAYSHRINKXN = $00100000;
  2567. (*
  2568. * DirectDraw supports arbitrary shrinking of a surface along the
  2569. * y axis (horizontal direction) for overlays.
  2570. *)
  2571. DDFXCAPS_OVERLAYSHRINKY = $00200000;
  2572. (*
  2573. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2574. * along the y axis (vertical direction) for overlays.
  2575. *)
  2576. DDFXCAPS_OVERLAYSHRINKYN = $00400000;
  2577. (*
  2578. * DirectDraw supports arbitrary stretching of a surface along the
  2579. * x axis (horizontal direction) for overlays.
  2580. *)
  2581. DDFXCAPS_OVERLAYSTRETCHX = $00800000;
  2582. (*
  2583. * DirectDraw supports integer stretching (1x,2x,) of a surface
  2584. * along the x axis (horizontal direction) for overlays.
  2585. *)
  2586. DDFXCAPS_OVERLAYSTRETCHXN = $01000000;
  2587. (*
  2588. * DirectDraw supports arbitrary stretching of a surface along the
  2589. * y axis (horizontal direction) for overlays.
  2590. *)
  2591. DDFXCAPS_OVERLAYSTRETCHY = $02000000;
  2592. (*
  2593. * DirectDraw supports integer stretching (1x,2x,) of a surface
  2594. * along the y axis (vertical direction) for overlays.
  2595. *)
  2596. DDFXCAPS_OVERLAYSTRETCHYN = $04000000;
  2597. (*
  2598. * DirectDraw supports mirroring of overlays across the vertical axis
  2599. *)
  2600. DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000;
  2601. (*
  2602. * DirectDraw supports mirroring of overlays across the horizontal axis
  2603. *)
  2604. DDFXCAPS_OVERLAYMIRRORUPDOWN = $10000000;
  2605. (*
  2606. * DirectDraw supports deinterlacing of overlay surfaces
  2607. *)
  2608. DDFXCAPS_OVERLAYDEINTERLACE = $20000000;
  2609. (*
  2610. * Driver can do alpha blending for blits.
  2611. *)
  2612. DDFXCAPS_BLTALPHA = $00000001;
  2613. (*
  2614. * Driver can do surface-reconstruction filtering for warped blits.
  2615. *)
  2616. DDFXCAPS_BLTFILTER = DDFXCAPS_BLTARITHSTRETCHY;
  2617. (*
  2618. * Driver can do alpha blending for overlays.
  2619. *)
  2620. DDFXCAPS_OVERLAYALPHA = $00000004;
  2621. (*
  2622. * Driver can do surface-reconstruction filtering for warped overlays.
  2623. *)
  2624. DDFXCAPS_OVERLAYFILTER = DDFXCAPS_OVERLAYARITHSTRETCHY;
  2625. (****************************************************************************
  2626. *
  2627. * DIRECTDRAW STEREO VIEW CAPABILITIES
  2628. *
  2629. ****************************************************************************)
  2630. (*
  2631. * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete
  2632. *)
  2633. DDSVCAPS_RESERVED1 = $00000001;
  2634. (*
  2635. * This flag used to be DDSVCAPS_FLICKER, which is now obsolete
  2636. *)
  2637. DDSVCAPS_RESERVED2 = $00000002;
  2638. (*
  2639. * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete
  2640. *)
  2641. DDSVCAPS_RESERVED3 = $00000004;
  2642. (*
  2643. * This flag used to be DDSVCAPS_SPLIT, which is now obsolete
  2644. *)
  2645. DDSVCAPS_RESERVED4 = $00000008;
  2646. (*
  2647. * The stereo view is accomplished with switching technology
  2648. *)
  2649. DDSVCAPS_STEREOSEQUENTIAL = $00000010;
  2650. (****************************************************************************
  2651. *
  2652. * DIRECTDRAWPALETTE CAPABILITIES
  2653. *
  2654. ****************************************************************************)
  2655. (*
  2656. * Index is 4 bits. There are sixteen color entries in the palette table.
  2657. *)
  2658. DDPCAPS_4BIT = $00000001;
  2659. (*
  2660. * Index is onto a 8 bit color index. This field is only valid with the
  2661. * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  2662. * surface is in 8bpp. Each color entry is one byte long and is an index
  2663. * into destination surface's 8bpp palette.
  2664. *)
  2665. DDPCAPS_8BITENTRIES = $00000002;
  2666. (*
  2667. * Index is 8 bits. There are 256 color entries in the palette table.
  2668. *)
  2669. DDPCAPS_8BIT = $00000004;
  2670. (*
  2671. * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  2672. * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  2673. * object.
  2674. * This flag is obsolete. DirectDraw always initializes the color array from
  2675. * the lpDDColorArray parameter. The definition remains for source-level
  2676. * compatibility.
  2677. *)
  2678. DDPCAPS_INITIALIZE = $00000000;
  2679. (*
  2680. * This palette is the one attached to the primary surface. Changing this
  2681. * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  2682. * and supported.
  2683. *)
  2684. DDPCAPS_PRIMARYSURFACE = $00000010;
  2685. (*
  2686. * This palette is the one attached to the primary surface left. Changing
  2687. * this table has immediate effect on the display for the left eye unless
  2688. * DDPSETPAL_VSYNC is specified and supported.
  2689. *)
  2690. DDPCAPS_PRIMARYSURFACELEFT = $00000020;
  2691. (*
  2692. * This palette can have all 256 entries defined
  2693. *)
  2694. DDPCAPS_ALLOW256 = $00000040;
  2695. (*
  2696. * This palette can have modifications to it synced with the monitors
  2697. * refresh rate.
  2698. *)
  2699. DDPCAPS_VSYNC = $00000080;
  2700. (*
  2701. * Index is 1 bit. There are two color entries in the palette table.
  2702. *)
  2703. DDPCAPS_1BIT = $00000100;
  2704. (*
  2705. * Index is 2 bit. There are four color entries in the palette table.
  2706. *)
  2707. DDPCAPS_2BIT = $00000200;
  2708. (*
  2709. * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
  2710. *)
  2711. DDPCAPS_ALPHA = $00000400;
  2712. (****************************************************************************
  2713. *
  2714. * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  2715. *
  2716. ****************************************************************************)
  2717. (****************************************************************************
  2718. *
  2719. * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  2720. *
  2721. ****************************************************************************)
  2722. (* 0 is the only legal value *)
  2723. (****************************************************************************
  2724. *
  2725. * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
  2726. *
  2727. ****************************************************************************)
  2728. (*
  2729. * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
  2730. * must be set to sizeof(IUnknown* ). DirectDraw will call AddRef through this
  2731. * pointer and Release when the private data is destroyed. This includes when
  2732. * the surface or palette is destroyed before such priovate data is destroyed.
  2733. *)
  2734. DDSPD_IUNKNOWNPOINTER = $00000001;
  2735. (*
  2736. * Private data is only valid for the current state of the object,
  2737. * as determined by the uniqueness value.
  2738. *)
  2739. DDSPD_VOLATILE = $00000002;
  2740. (****************************************************************************
  2741. *
  2742. * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  2743. *
  2744. ****************************************************************************)
  2745. (****************************************************************************
  2746. *
  2747. * DIRECTDRAW BITDEPTH CONSTANTS
  2748. *
  2749. * NOTE: These are only used to indicate supported bit depths. These
  2750. * are flags only, they are not to be used as an actual bit depth. The
  2751. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  2752. * bit depths in a surface or for changing the display mode.
  2753. *
  2754. ****************************************************************************)
  2755. (*
  2756. * 1 bit per pixel.
  2757. *)
  2758. DDBD_1 = $00004000;
  2759. (*
  2760. * 2 bits per pixel.
  2761. *)
  2762. DDBD_2 = $00002000;
  2763. (*
  2764. * 4 bits per pixel.
  2765. *)
  2766. DDBD_4 = $00001000;
  2767. (*
  2768. * 8 bits per pixel.
  2769. *)
  2770. DDBD_8 = $00000800;
  2771. (*
  2772. * 16 bits per pixel.
  2773. *)
  2774. DDBD_16 = $00000400;
  2775. (*
  2776. * 24 bits per pixel.
  2777. *)
  2778. DDBD_24 = $00000200;
  2779. (*
  2780. * 32 bits per pixel.
  2781. *)
  2782. DDBD_32 = $00000100;
  2783. (****************************************************************************
  2784. *
  2785. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  2786. *
  2787. ****************************************************************************)
  2788. (*
  2789. * Set if the structure contains a color space. Not set if the structure
  2790. * contains a single color key.
  2791. *)
  2792. DDCKEY_COLORSPACE = $00000001;
  2793. (*
  2794. * Set if the structure specifies a color key or color space which is to be
  2795. * used as a destination color key for blt operations.
  2796. *)
  2797. DDCKEY_DESTBLT = $00000002;
  2798. (*
  2799. * Set if the structure specifies a color key or color space which is to be
  2800. * used as a destination color key for overlay operations.
  2801. *)
  2802. DDCKEY_DESTOVERLAY = $00000004;
  2803. (*
  2804. * Set if the structure specifies a color key or color space which is to be
  2805. * used as a source color key for blt operations.
  2806. *)
  2807. DDCKEY_SRCBLT = $00000008;
  2808. (*
  2809. * Set if the structure specifies a color key or color space which is to be
  2810. * used as a source color key for overlay operations.
  2811. *)
  2812. DDCKEY_SRCOVERLAY = $00000010;
  2813. (****************************************************************************
  2814. *
  2815. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  2816. *
  2817. ****************************************************************************)
  2818. (*
  2819. * Supports transparent blting using a color key to identify the replaceable
  2820. * bits of the destination surface for RGB colors.
  2821. *)
  2822. DDCKEYCAPS_DESTBLT = $00000001;
  2823. (*
  2824. * Supports transparent blting using a color space to identify the replaceable
  2825. * bits of the destination surface for RGB colors.
  2826. *)
  2827. DDCKEYCAPS_DESTBLTCLRSPACE = $00000002;
  2828. (*
  2829. * Supports transparent blting using a color space to identify the replaceable
  2830. * bits of the destination surface for YUV colors.
  2831. *)
  2832. DDCKEYCAPS_DESTBLTCLRSPACEYUV = $00000004;
  2833. (*
  2834. * Supports transparent blting using a color key to identify the replaceable
  2835. * bits of the destination surface for YUV colors.
  2836. *)
  2837. DDCKEYCAPS_DESTBLTYUV = $00000008;
  2838. (*
  2839. * Supports overlaying using colorkeying of the replaceable bits of the surface
  2840. * being overlayed for RGB colors.
  2841. *)
  2842. DDCKEYCAPS_DESTOVERLAY = $00000010;
  2843. (*
  2844. * Supports a color space as the color key for the destination for RGB colors.
  2845. *)
  2846. DDCKEYCAPS_DESTOVERLAYCLRSPACE = $00000020;
  2847. (*
  2848. * Supports a color space as the color key for the destination for YUV colors.
  2849. *)
  2850. DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = $00000040;
  2851. (*
  2852. * Supports only one active destination color key value for visible overlay
  2853. * surfaces.
  2854. *)
  2855. DDCKEYCAPS_DESTOVERLAYONEACTIVE = $00000080;
  2856. (*
  2857. * Supports overlaying using colorkeying of the replaceable bits of the
  2858. * surface being overlayed for YUV colors.
  2859. *)
  2860. DDCKEYCAPS_DESTOVERLAYYUV = $00000100;
  2861. (*
  2862. * Supports transparent blting using the color key for the source with
  2863. * this surface for RGB colors.
  2864. *)
  2865. DDCKEYCAPS_SRCBLT = $00000200;
  2866. (*
  2867. * Supports transparent blting using a color space for the source with
  2868. * this surface for RGB colors.
  2869. *)
  2870. DDCKEYCAPS_SRCBLTCLRSPACE = $00000400;
  2871. (*
  2872. * Supports transparent blting using a color space for the source with
  2873. * this surface for YUV colors.
  2874. *)
  2875. DDCKEYCAPS_SRCBLTCLRSPACEYUV = $00000800;
  2876. (*
  2877. * Supports transparent blting using the color key for the source with
  2878. * this surface for YUV colors.
  2879. *)
  2880. DDCKEYCAPS_SRCBLTYUV = $00001000;
  2881. (*
  2882. * Supports overlays using the color key for the source with this
  2883. * overlay surface for RGB colors.
  2884. *)
  2885. DDCKEYCAPS_SRCOVERLAY = $00002000;
  2886. (*
  2887. * Supports overlays using a color space as the source color key for
  2888. * the overlay surface for RGB colors.
  2889. *)
  2890. DDCKEYCAPS_SRCOVERLAYCLRSPACE = $00004000;
  2891. (*
  2892. * Supports overlays using a color space as the source color key for
  2893. * the overlay surface for YUV colors.
  2894. *)
  2895. DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV = $00008000;
  2896. (*
  2897. * Supports only one active source color key value for visible
  2898. * overlay surfaces.
  2899. *)
  2900. DDCKEYCAPS_SRCOVERLAYONEACTIVE = $00010000;
  2901. (*
  2902. * Supports overlays using the color key for the source with this
  2903. * overlay surface for YUV colors.
  2904. *)
  2905. DDCKEYCAPS_SRCOVERLAYYUV = $00020000;
  2906. (*
  2907. * there are no bandwidth trade-offs for using colorkey with an overlay
  2908. *)
  2909. DDCKEYCAPS_NOCOSTOVERLAY = $00040000;
  2910. (****************************************************************************
  2911. *
  2912. * DIRECTDRAW PIXELFORMAT FLAGS
  2913. *
  2914. ****************************************************************************)
  2915. (*
  2916. * The surface has alpha channel information in the pixel format.
  2917. *)
  2918. DDPF_ALPHAPIXELS = $00000001;
  2919. (*
  2920. * The pixel format contains alpha only information
  2921. *)
  2922. DDPF_ALPHA = $00000002;
  2923. (*
  2924. * The FourCC code is valid.
  2925. *)
  2926. DDPF_FOURCC = $00000004;
  2927. (*
  2928. * The surface is 4-bit color indexed.
  2929. *)
  2930. DDPF_PALETTEINDEXED4 = $00000008;
  2931. (*
  2932. * The surface is indexed into a palette which stores indices
  2933. * into the destination surface's 8-bit palette.
  2934. *)
  2935. DDPF_PALETTEINDEXEDTO8 = $00000010;
  2936. (*
  2937. * The surface is 8-bit color indexed.
  2938. *)
  2939. DDPF_PALETTEINDEXED8 = $00000020;
  2940. (*
  2941. * The RGB data in the pixel format structure is valid.
  2942. *)
  2943. DDPF_RGB = $00000040;
  2944. (*
  2945. * The surface will accept pixel data in the format specified
  2946. * and compress it during the write.
  2947. *)
  2948. DDPF_COMPRESSED = $00000080;
  2949. (*
  2950. * The surface will accept RGB data and translate it during
  2951. * the write to YUV data. The format of the data to be written
  2952. * will be contained in the pixel format structure. The DDPF_RGB
  2953. * flag will be set.
  2954. *)
  2955. DDPF_RGBTOYUV = $00000100;
  2956. (*
  2957. * pixel format is YUV - YUV data in pixel format struct is valid
  2958. *)
  2959. DDPF_YUV = $00000200;
  2960. (*
  2961. * pixel format is a z buffer only surface
  2962. *)
  2963. DDPF_ZBUFFER = $00000400;
  2964. (*
  2965. * The surface is 1-bit color indexed.
  2966. *)
  2967. DDPF_PALETTEINDEXED1 = $00000800;
  2968. (*
  2969. * The surface is 2-bit color indexed.
  2970. *)
  2971. DDPF_PALETTEINDEXED2 = $00001000;
  2972. (*
  2973. * The surface contains Z information in the pixels
  2974. *)
  2975. DDPF_ZPIXELS = $00002000;
  2976. (*
  2977. * The surface contains stencil information along with Z
  2978. *)
  2979. DDPF_STENCILBUFFER = $00004000;
  2980. (*
  2981. * Premultiplied alpha format -- the color components have been
  2982. * premultiplied by the alpha component.
  2983. *)
  2984. DDPF_ALPHAPREMULT = $00008000;
  2985. (*
  2986. * Luminance data in the pixel format is valid.
  2987. * Use this flag for luminance-only or luminance+alpha surfaces,
  2988. * the bit depth is then ddpf.dwLuminanceBitCount.
  2989. *)
  2990. DDPF_LUMINANCE = $00020000;
  2991. (*
  2992. * Luminance data in the pixel format is valid.
  2993. * Use this flag when hanging luminance off bumpmap surfaces,
  2994. * the bit mask for the luminance portion of the pixel is then
  2995. * ddpf.dwBumpLuminanceBitMask
  2996. *)
  2997. DDPF_BUMPLUMINANCE = $00040000;
  2998. (*
  2999. * Bump map dUdV data in the pixel format is valid.
  3000. *)
  3001. DDPF_BUMPDUDV = $00080000;
  3002. (*===========================================================================
  3003. *
  3004. *
  3005. * DIRECTDRAW CALLBACK FLAGS
  3006. *
  3007. *
  3008. *==========================================================================*)
  3009. (****************************************************************************
  3010. *
  3011. * DIRECTDRAW ENUMSURFACES FLAGS
  3012. *
  3013. ****************************************************************************)
  3014. (*
  3015. * Enumerate all of the surfaces that meet the search criterion.
  3016. *)
  3017. DDENUMSURFACES_ALL = $00000001;
  3018. (*
  3019. * A search hit is a surface that matches the surface description.
  3020. *)
  3021. DDENUMSURFACES_MATCH = $00000002;
  3022. (*
  3023. * A search hit is a surface that does not match the surface description.
  3024. *)
  3025. DDENUMSURFACES_NOMATCH = $00000004;
  3026. (*
  3027. * Enumerate the first surface that can be created which meets the search criterion.
  3028. *)
  3029. DDENUMSURFACES_CANBECREATED = $00000008;
  3030. (*
  3031. * Enumerate the surfaces that already exist that meet the search criterion.
  3032. *)
  3033. DDENUMSURFACES_DOESEXIST = $00000010;
  3034. (****************************************************************************
  3035. *
  3036. * DIRECTDRAW SETDISPLAYMODE FLAGS
  3037. *
  3038. ****************************************************************************)
  3039. (*
  3040. * The desired mode is a standard VGA mode
  3041. *)
  3042. DDSDM_STANDARDVGAMODE = $00000001;
  3043. (****************************************************************************
  3044. *
  3045. * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  3046. *
  3047. ****************************************************************************)
  3048. (*
  3049. * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
  3050. * that a particular mode will be enumerated only once. This flag specifies whether
  3051. * the refresh rate is taken into account when determining if a mode is unique.
  3052. *)
  3053. DDEDM_REFRESHRATES = $00000001;
  3054. (*
  3055. * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
  3056. * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
  3057. * enumerated if the application has previously called SetCooperativeLevel with the
  3058. * DDSCL_ALLOWMODEX flag set).
  3059. *)
  3060. DDEDM_STANDARDVGAMODES = $00000002;
  3061. (****************************************************************************
  3062. *
  3063. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  3064. *
  3065. ****************************************************************************)
  3066. (*
  3067. * Exclusive mode owner will be responsible for the entire primary surface.
  3068. * GDI can be ignored. used with DD
  3069. *)
  3070. DDSCL_FULLSCREEN = $00000001;
  3071. (*
  3072. * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  3073. *)
  3074. DDSCL_ALLOWREBOOT = $00000002;
  3075. (*
  3076. * prevents DDRAW from modifying the application window.
  3077. * prevents DDRAW from minimize/restore the application window on activation.
  3078. *)
  3079. DDSCL_NOWINDOWCHANGES = $00000004;
  3080. (*
  3081. * app wants to work as a regular Windows application
  3082. *)
  3083. DDSCL_NORMAL = $00000008;
  3084. (*
  3085. * app wants exclusive access
  3086. *)
  3087. DDSCL_EXCLUSIVE = $00000010;
  3088. (*
  3089. * app can deal with non-windows display modes
  3090. *)
  3091. DDSCL_ALLOWMODEX = $00000040;
  3092. (*
  3093. * this window will receive the focus messages
  3094. *)
  3095. DDSCL_SETFOCUSWINDOW = $00000080;
  3096. (*
  3097. * this window is associated with the DDRAW object and will
  3098. * cover the screen in fullscreen mode
  3099. *)
  3100. DDSCL_SETDEVICEWINDOW = $00000100;
  3101. (*
  3102. * app wants DDRAW to create a window to be associated with the
  3103. * DDRAW object
  3104. *)
  3105. DDSCL_CREATEDEVICEWINDOW = $00000200;
  3106. (*
  3107. * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
  3108. * take the global crtisec more frequently.
  3109. *)
  3110. DDSCL_MULTITHREADED = $00000400;
  3111. (*
  3112. * App specifies that it would like to keep the FPU set up for optimal Direct3D
  3113. * performance (single precision and exceptions disabled) so Direct3D
  3114. * does not need to explicitly set the FPU each time. This is assumed by
  3115. * default in DirectX 7. See also DDSCL_FPUPRESERVE
  3116. *)
  3117. DDSCL_FPUSETUP = $00000800;
  3118. (*
  3119. * App specifies that it needs either double precision FPU or FPU exceptions
  3120. * enabled. This makes Direct3D explicitly set the FPU state eah time it is
  3121. * called. Setting the flag will reduce Direct3D performance. The flag is
  3122. * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP
  3123. *)
  3124. DDSCL_FPUPRESERVE = $00001000;
  3125. (****************************************************************************
  3126. *
  3127. * DIRECTDRAW BLT FLAGS
  3128. *
  3129. ****************************************************************************)
  3130. (*
  3131. * Use the alpha information in the pixel format or the alpha channel surface
  3132. * attached to the destination surface as the alpha channel for this blt.
  3133. *)
  3134. DDBLT_ALPHADEST = $00000001;
  3135. (*
  3136. * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  3137. * for the destination surface for this blt.
  3138. *)
  3139. DDBLT_ALPHADESTCONSTOVERRIDE = $00000002;
  3140. (*
  3141. * The NEG suffix indicates that the destination surface becomes more
  3142. * transparent as the alpha value increases. (0 is opaque)
  3143. *)
  3144. DDBLT_ALPHADESTNEG = $00000004;
  3145. (*
  3146. * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  3147. * channel for the destination for this blt.
  3148. *)
  3149. DDBLT_ALPHADESTSURFACEOVERRIDE = $00000008;
  3150. (*
  3151. * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  3152. * for the edges of the image that border the color key colors.
  3153. *)
  3154. DDBLT_ALPHAEDGEBLEND = $00000010;
  3155. (*
  3156. * Use the alpha information in the pixel format or the alpha channel surface
  3157. * attached to the source surface as the alpha channel for this blt.
  3158. *)
  3159. DDBLT_ALPHASRC = $00000020;
  3160. (*
  3161. * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  3162. * for the source for this blt.
  3163. *)
  3164. DDBLT_ALPHASRCCONSTOVERRIDE = $00000040;
  3165. (*
  3166. * The NEG suffix indicates that the source surface becomes more transparent
  3167. * as the alpha value increases. (0 is opaque)
  3168. *)
  3169. DDBLT_ALPHASRCNEG = $00000080;
  3170. (*
  3171. * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  3172. * for the source for this blt.
  3173. *)
  3174. DDBLT_ALPHASRCSURFACEOVERRIDE = $00000100;
  3175. (*
  3176. * Do this blt asynchronously through the FIFO in the order received. If
  3177. * there is no room in the hardware FIFO fail the call.
  3178. *)
  3179. DDBLT_ASYNC = $00000200;
  3180. (*
  3181. * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  3182. * to fill the destination rectangle on the destination surface with.
  3183. *)
  3184. DDBLT_COLORFILL = $00000400;
  3185. (*
  3186. * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  3187. * to use for the blt.
  3188. *)
  3189. DDBLT_DDFX = $00000800;
  3190. (*
  3191. * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  3192. * that are not part of the Win32 API.
  3193. *)
  3194. DDBLT_DDROPS = $00001000;
  3195. (*
  3196. * Use the color key associated with the destination surface.
  3197. *)
  3198. DDBLT_KEYDEST = $00002000;
  3199. (*
  3200. * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  3201. * for the destination surface.
  3202. *)
  3203. DDBLT_KEYDESTOVERRIDE = $00004000;
  3204. (*
  3205. * Use the color key associated with the source surface.
  3206. *)
  3207. DDBLT_KEYSRC = $00008000;
  3208. (*
  3209. * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  3210. * for the source surface.
  3211. *)
  3212. DDBLT_KEYSRCOVERRIDE = $00010000;
  3213. (*
  3214. * Use the dwROP field in the DDBLTFX structure for the raster operation
  3215. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  3216. *)
  3217. DDBLT_ROP = $00020000;
  3218. (*
  3219. * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  3220. * (specified in 1/100th of a degree) to rotate the surface.
  3221. *)
  3222. DDBLT_ROTATIONANGLE = $00040000;
  3223. (*
  3224. * Z-buffered blt using the z-buffers attached to the source and destination
  3225. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  3226. * z-buffer opcode.
  3227. *)
  3228. DDBLT_ZBUFFER = $00080000;
  3229. (*
  3230. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  3231. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  3232. * for the destination.
  3233. *)
  3234. DDBLT_ZBUFFERDESTCONSTOVERRIDE = $00100000;
  3235. (*
  3236. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  3237. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  3238. * respectively for the destination.
  3239. *)
  3240. DDBLT_ZBUFFERDESTOVERRIDE = $00200000;
  3241. (*
  3242. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  3243. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  3244. * for the source.
  3245. *)
  3246. DDBLT_ZBUFFERSRCCONSTOVERRIDE = $00400000;
  3247. (*
  3248. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  3249. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  3250. * respectively for the source.
  3251. *)
  3252. DDBLT_ZBUFFERSRCOVERRIDE = $00800000;
  3253. (*
  3254. * wait until the device is ready to handle the blt
  3255. * this will cause blt to not return DDERR_WASSTILLDRAWING
  3256. *)
  3257. DDBLT_WAIT = $01000000;
  3258. (*
  3259. * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  3260. * to fill the destination rectangle on the destination Z-buffer surface
  3261. * with.
  3262. *)
  3263. DDBLT_DEPTHFILL = $02000000;
  3264. (*
  3265. * Return immediately (with DDERR_WASSTILLDRAWING) if the device is not
  3266. * ready to schedule the blt at the time Blt() is called.
  3267. *)
  3268. DDBLT_DONOTWAIT = $08000000;
  3269. (*
  3270. * These flags indicate a presentation blt (i.e. a blt
  3271. * that moves surface contents from an offscreen back buffer to the primary
  3272. * surface). The driver is not allowed to "queue" more than three such blts.
  3273. * The "end" of the presentation blt is indicated, since the
  3274. * blt may be clipped, in which case the runtime will call the driver with
  3275. * several blts. All blts (even if not clipped) are tagged with DDBLT_PRESENTATION
  3276. * and the last (even if not clipped) additionally with DDBLT_LAST_PRESENTATION.
  3277. * Thus the true rule is that the driver must not schedule a DDBLT_PRESENTATION
  3278. * blt if there are 3 or more DDBLT_PRESENTLAST blts in the hardware pipe.
  3279. * If there are such blts in the pipe, the driver should return DDERR_WASSTILLDRAWING
  3280. * until the oldest queued DDBLT_LAST_PRESENTATION blts has been retired (i.e. the
  3281. * pixels have been actually written to the primary surface). Once the oldest blt
  3282. * has been retired, the driver is free to schedule the current blt.
  3283. * The goal is to provide a mechanism whereby the device's hardware queue never
  3284. * gets more than 3 frames ahead of the frames being generated by the application.
  3285. * When excessive queueing occurs, applications become unusable because the application
  3286. * visibly lags user input, and such problems make windowed interactive applications impossible.
  3287. * Some drivers may not have sufficient knowledge of their hardware's FIFO to know
  3288. * when a certain blt has been retired. Such drivers should code cautiously, and
  3289. * simply not allow any frames to be queued at all. DDBLT_LAST_PRESENTATION should cause
  3290. * such drivers to return DDERR_WASSTILLDRAWING until the accelerator is completely
  3291. * finished- exactly as if the application had called Lock on the source surface
  3292. * before calling Blt.
  3293. * In other words, the driver is allowed and encouraged to
  3294. * generate as much latency as it can, but never more than 3 frames worth.
  3295. * Implementation detail: Drivers should count blts against the SOURCE surface, not
  3296. * against the primary surface. This enables multiple parallel windowed application
  3297. * to function more optimally.
  3298. * This flag is passed only to DX8 or higher drivers.
  3299. *
  3300. * APPLICATIONS DO NOT SET THESE FLAGS. THEY ARE SET BY THE DIRECTDRAW RUNTIME.
  3301. *
  3302. *)
  3303. DDBLT_PRESENTATION = $10000000;
  3304. DDBLT_LAST_PRESENTATION = $20000000;
  3305. (*
  3306. * If DDBLT_EXTENDED_FLAGS is set, then the driver should re-interpret
  3307. * other flags according to the definitions that follow.
  3308. * For example, bit 0 (0x00000001L) means DDBLT_ALPHADEST, unless
  3309. * DDBLT_EXTENDED_FLAGS is also set, in which case bit 0 means
  3310. * DDBLT_EXTENDED_LINEAR_CONTENT.
  3311. * Only DirectX9 and higher drivers will be given extended blt flags.
  3312. * Only flags explicitly mentioned here should be re-interpreted.
  3313. * All other flags retain their original meanings.
  3314. *
  3315. * List of re-interpreted flags:
  3316. *
  3317. * Bit Hex value New meaning old meaning
  3318. * ---------------------------------------------------------------
  3319. * 2 0x00000004 DDBLT_EXTENDED_LINEAR_CONTENT DDBLT_ALPHADESTNEG
  3320. * 4 0x00000010 DDBLT_EXTENDED_PRESENTATION_STRETCHFACTOR DDBLT_ALPHAEDGEBLEND
  3321. *
  3322. *
  3323. * NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED
  3324. * FOR USE BY THE DIRECT3D RUNTIME.
  3325. *)
  3326. DDBLT_EXTENDED_FLAGS = $40000000;
  3327. (*
  3328. * EXTENDED FLAG. SEE DEFINITION OF DDBLT_EXTENDED_FLAGS.
  3329. * This flag indidcates that the source surface contains content in a
  3330. * linear color space. The driver may perform gamma correction to the
  3331. * desktop color space (i.e. sRGB, gamma 2.2) as part of this blt.
  3332. * If the device can perform such a conversion as part of the copy,
  3333. * the driver should also set D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION
  3334. *
  3335. * NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED
  3336. * FOR USE BY THE DIRECT3D RUNTIME. Use IDirect3DSwapChain9::Present
  3337. * and specify D3DPRESENT_LINEAR_CONTENT in order to use this functionality.
  3338. *)
  3339. DDBLT_EXTENDED_LINEAR_CONTENT = $00000004;
  3340. (****************************************************************************
  3341. *
  3342. * BLTFAST FLAGS
  3343. *
  3344. ****************************************************************************)
  3345. DDBLTFAST_NOCOLORKEY = $00000000;
  3346. DDBLTFAST_SRCCOLORKEY = $00000001;
  3347. DDBLTFAST_DESTCOLORKEY = $00000002;
  3348. DDBLTFAST_WAIT = $00000010;
  3349. DDBLTFAST_DONOTWAIT = $00000020;
  3350. (****************************************************************************
  3351. *
  3352. * FLIP FLAGS
  3353. *
  3354. ****************************************************************************)
  3355. DDFLIP_WAIT = $00000001;
  3356. (*
  3357. * Indicates that the target surface contains the even field of video data.
  3358. * This flag is only valid with an overlay surface.
  3359. *)
  3360. DDFLIP_EVEN = $00000002;
  3361. (*
  3362. * Indicates that the target surface contains the odd field of video data.
  3363. * This flag is only valid with an overlay surface.
  3364. *)
  3365. DDFLIP_ODD = $00000004;
  3366. (*
  3367. * Causes DirectDraw to perform the physical flip immediately and return
  3368. * to the application. Typically, what was the front buffer but is now the back
  3369. * buffer will still be visible (depending on timing) until the next vertical
  3370. * retrace. Subsequent operations involving the two flipped surfaces will
  3371. * not check to see if the physical flip has finished (i.e. will not return
  3372. * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
  3373. * This allows an application to perform Flips at a higher frequency than the
  3374. * monitor refresh rate, but may introduce visible artifacts.
  3375. * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set,
  3376. * DDFLIP_NOVSYNC has no effect.
  3377. *)
  3378. DDFLIP_NOVSYNC = $00000008;
  3379. (*
  3380. * Flip Interval Flags. These flags indicate how many vertical retraces to wait between
  3381. * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
  3382. * surface involved in the flip until the specified number of vertical retraces has
  3383. * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set,
  3384. * DDFLIP_INTERVALn has no effect.
  3385. *)
  3386. (*
  3387. * DirectDraw will flip on every other vertical sync
  3388. *)
  3389. DDFLIP_INTERVAL2 = $02000000;
  3390. (*
  3391. * DirectDraw will flip on every third vertical sync
  3392. *)
  3393. DDFLIP_INTERVAL3 = $03000000;
  3394. (*
  3395. * DirectDraw will flip on every fourth vertical sync
  3396. *)
  3397. DDFLIP_INTERVAL4 = $04000000;
  3398. (*
  3399. * DirectDraw will flip and display a main stereo surface
  3400. *)
  3401. DDFLIP_STEREO = $00000010;
  3402. (*
  3403. * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish
  3404. * to override the default and use time when the accelerator is busy (as denoted by
  3405. * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT.
  3406. *)
  3407. DDFLIP_DONOTWAIT = $00000020;
  3408. (****************************************************************************
  3409. *
  3410. * DIRECTDRAW SURFACE OVERLAY FLAGS
  3411. *
  3412. ****************************************************************************)
  3413. (*
  3414. * Use the alpha information in the pixel format or the alpha channel surface
  3415. * attached to the destination surface as the alpha channel for the
  3416. * destination overlay.
  3417. *)
  3418. DDOVER_ALPHADEST = $00000001;
  3419. (*
  3420. * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  3421. * destination alpha channel for this overlay.
  3422. *)
  3423. DDOVER_ALPHADESTCONSTOVERRIDE = $00000002;
  3424. (*
  3425. * The NEG suffix indicates that the destination surface becomes more
  3426. * transparent as the alpha value increases.
  3427. *)
  3428. DDOVER_ALPHADESTNEG = $00000004;
  3429. (*
  3430. * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  3431. * channel destination for this overlay.
  3432. *)
  3433. DDOVER_ALPHADESTSURFACEOVERRIDE = $00000008;
  3434. (*
  3435. * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  3436. * channel for the edges of the image that border the color key colors.
  3437. *)
  3438. DDOVER_ALPHAEDGEBLEND = $00000010;
  3439. (*
  3440. * Use the alpha information in the pixel format or the alpha channel surface
  3441. * attached to the source surface as the source alpha channel for this overlay.
  3442. *)
  3443. DDOVER_ALPHASRC = $00000020;
  3444. (*
  3445. * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  3446. * alpha channel for this overlay.
  3447. *)
  3448. DDOVER_ALPHASRCCONSTOVERRIDE = $00000040;
  3449. (*
  3450. * The NEG suffix indicates that the source surface becomes more transparent
  3451. * as the alpha value increases.
  3452. *)
  3453. DDOVER_ALPHASRCNEG = $00000080;
  3454. (*
  3455. * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  3456. * source for this overlay.
  3457. *)
  3458. DDOVER_ALPHASRCSURFACEOVERRIDE = $00000100;
  3459. (*
  3460. * Turn this overlay off.
  3461. *)
  3462. DDOVER_HIDE = $00000200;
  3463. (*
  3464. * Use the color key associated with the destination surface.
  3465. *)
  3466. DDOVER_KEYDEST = $00000400;
  3467. (*
  3468. * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  3469. * for the destination surface
  3470. *)
  3471. DDOVER_KEYDESTOVERRIDE = $00000800;
  3472. (*
  3473. * Use the color key associated with the source surface.
  3474. *)
  3475. DDOVER_KEYSRC = $00001000;
  3476. (*
  3477. * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  3478. * for the source surface.
  3479. *)
  3480. DDOVER_KEYSRCOVERRIDE = $00002000;
  3481. (*
  3482. * Turn this overlay on.
  3483. *)
  3484. DDOVER_SHOW = $00004000;
  3485. (*
  3486. * Add a dirty rect to an emulated overlayed surface.
  3487. *)
  3488. DDOVER_ADDDIRTYRECT = $00008000;
  3489. (*
  3490. * Redraw all dirty rects on an emulated overlayed surface.
  3491. *)
  3492. DDOVER_REFRESHDIRTYRECTS = $00010000;
  3493. (*
  3494. * Redraw the entire surface on an emulated overlayed surface.
  3495. *)
  3496. DDOVER_REFRESHALL = $00020000;
  3497. (*
  3498. * Use the overlay FX flags to define special overlay FX
  3499. *)
  3500. DDOVER_DDFX = $00080000;
  3501. (*
  3502. * Autoflip the overlay when ever the video port autoflips
  3503. *)
  3504. DDOVER_AUTOFLIP = $00100000;
  3505. (*
  3506. * Display each field of video port data individually without
  3507. * causing any jittery artifacts
  3508. *)
  3509. DDOVER_BOB = $00200000;
  3510. (*
  3511. * Indicates that bob/weave decisions should not be overridden by other
  3512. * interfaces.
  3513. *)
  3514. DDOVER_OVERRIDEBOBWEAVE = $00400000;
  3515. (*
  3516. * Indicates that the surface memory is composed of interleaved fields.
  3517. *)
  3518. DDOVER_INTERLEAVED = $00800000;
  3519. (*
  3520. * Indicates that bob will be performed using hardware rather than
  3521. * software or emulated.
  3522. *)
  3523. DDOVER_BOBHARDWARE = $01000000;
  3524. (*
  3525. * Indicates that overlay FX structure contains valid ARGB scaling factors.
  3526. *)
  3527. DDOVER_ARGBSCALEFACTORS = $02000000;
  3528. (*
  3529. * Indicates that ARGB scaling factors can be degraded to fit driver capabilities.
  3530. *)
  3531. DDOVER_DEGRADEARGBSCALING = $04000000;
  3532. {$IFDEF COMBOX_SANDBOX}
  3533. {$DEFINE DX_LONGHORN_PRESERVEDC}
  3534. {$ENDIF}
  3535. {$IFDEF DX_LONGHORN_PRESERVEDC}
  3536. (****************************************************************************
  3537. *
  3538. * DIRECTDRAWSURFACE SETSURFACEDESC FLAGS
  3539. *
  3540. ****************************************************************************)
  3541. (*
  3542. * The default. The GDI DC will be tore down.
  3543. *)
  3544. DDSETSURFACEDESC_RECREATEDC = $00000000; // default
  3545. (*
  3546. * The default. The GDI DC will be kept.
  3547. *)
  3548. DDSETSURFACEDESC_PRESERVEDC = $00000001;
  3549. {$ENDIF} // DX_LONGHORN_PRESERVEDC
  3550. (****************************************************************************
  3551. *
  3552. * DIRECTDRAWSURFACE LOCK FLAGS
  3553. *
  3554. ****************************************************************************)
  3555. (*
  3556. * The default. Set to indicate that Lock should return a valid memory pointer
  3557. * to the top of the specified rectangle. If no rectangle is specified then a
  3558. * pointer to the top of the surface is returned.
  3559. *)
  3560. DDLOCK_SURFACEMEMORYPTR = $00000000; // default
  3561. (*
  3562. * Set to indicate that Lock should wait until it can obtain a valid memory
  3563. * pointer before returning. If this bit is set, Lock will never return
  3564. * DDERR_WASSTILLDRAWING.
  3565. *)
  3566. DDLOCK_WAIT = $00000001;
  3567. (*
  3568. * Set if an event handle is being passed to Lock. Lock will trigger the event
  3569. * when it can return the surface memory pointer requested.
  3570. *)
  3571. DDLOCK_EVENT = $00000002;
  3572. (*
  3573. * Indicates that the surface being locked will only be read from.
  3574. *)
  3575. DDLOCK_READONLY = $00000010;
  3576. (*
  3577. * Indicates that the surface being locked will only be written to
  3578. *)
  3579. DDLOCK_WRITEONLY = $00000020;
  3580. (*
  3581. * Indicates that a system wide lock should not be taken when this surface
  3582. * is locked. This has several advantages (cursor responsiveness, ability
  3583. * to call more Windows functions, easier debugging) when locking video
  3584. * memory surfaces. However, an application specifying this flag must
  3585. * comply with a number of conditions documented in the help file.
  3586. * Furthermore, this flag cannot be specified when locking the primary.
  3587. *)
  3588. DDLOCK_NOSYSLOCK = $00000800;
  3589. (*
  3590. * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices
  3591. * that were referred to in Draw*PrimtiveVB calls since the start of the
  3592. * frame (or the last lock without this flag) will be modified during the
  3593. * lock. This can be useful when one is only appending data to the vertex
  3594. * buffer
  3595. *)
  3596. DDLOCK_NOOVERWRITE = $00001000;
  3597. (*
  3598. * Indicates that no assumptions will be made about the contents of the
  3599. * surface or vertex buffer during this lock.
  3600. * This enables two things:
  3601. * - Direct3D or the driver may provide an alternative memory
  3602. * area as the vertex buffer. This is useful when one plans to clear the
  3603. * contents of the vertex buffer and fill in new data.
  3604. * - Drivers sometimes store surface data in a re-ordered format.
  3605. * When the application locks the surface, the driver is forced to un-re-order
  3606. * the surface data before allowing the application to see the surface contents.
  3607. * This flag is a hint to the driver that it can skip the un-re-ordering process
  3608. * since the application plans to overwrite every single pixel in the surface
  3609. * or locked rectangle (and so erase any un-re-ordered pixels anyway).
  3610. * Applications should always set this flag when they intend to overwrite the entire
  3611. * surface or locked rectangle.
  3612. *)
  3613. DDLOCK_DISCARDCONTENTS = $00002000;
  3614. (*
  3615. * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS
  3616. *)
  3617. DDLOCK_OKTOSWAP = $00002000;
  3618. (*
  3619. * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish
  3620. * to override the default and use time when the accelerator is busy (as denoted by
  3621. * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT.
  3622. *)
  3623. DDLOCK_DONOTWAIT = $00004000;
  3624. (*
  3625. * This indicates volume texture lock with front and back specified.
  3626. *)
  3627. DDLOCK_HASVOLUMETEXTUREBOXRECT = $00008000;
  3628. (*
  3629. * This indicates that the driver should not update dirty rect information for this lock.
  3630. *)
  3631. DDLOCK_NODIRTYUPDATE = $00010000;
  3632. (****************************************************************************
  3633. *
  3634. * DIRECTDRAWSURFACE PAGELOCK FLAGS
  3635. *
  3636. ****************************************************************************)
  3637. (*
  3638. * No flags defined at present
  3639. *)
  3640. (****************************************************************************
  3641. *
  3642. * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  3643. *
  3644. ****************************************************************************)
  3645. (*
  3646. * No flags defined at present
  3647. *)
  3648. (****************************************************************************
  3649. *
  3650. * DIRECTDRAWSURFACE BLT FX FLAGS
  3651. *
  3652. ****************************************************************************)
  3653. (*
  3654. * If stretching, use arithmetic stretching along the Y axis for this blt.
  3655. *)
  3656. DDBLTFX_ARITHSTRETCHY = $00000001;
  3657. (*
  3658. * Do this blt mirroring the surface left to right. Spin the
  3659. * surface around its y-axis.
  3660. *)
  3661. DDBLTFX_MIRRORLEFTRIGHT = $00000002;
  3662. (*
  3663. * Do this blt mirroring the surface up and down. Spin the surface
  3664. * around its x-axis.
  3665. *)
  3666. DDBLTFX_MIRRORUPDOWN = $00000004;
  3667. (*
  3668. * Schedule this blt to avoid tearing.
  3669. *)
  3670. DDBLTFX_NOTEARING = $00000008;
  3671. (*
  3672. * Do this blt rotating the surface one hundred and eighty degrees.
  3673. *)
  3674. DDBLTFX_ROTATE180 = $00000010;
  3675. (*
  3676. * Do this blt rotating the surface two hundred and seventy degrees.
  3677. *)
  3678. DDBLTFX_ROTATE270 = $00000020;
  3679. (*
  3680. * Do this blt rotating the surface ninety degrees.
  3681. *)
  3682. DDBLTFX_ROTATE90 = $00000040;
  3683. (*
  3684. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  3685. * specified to limit the bits copied from the source surface.
  3686. *)
  3687. DDBLTFX_ZBUFFERRANGE = $00000080;
  3688. (*
  3689. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  3690. * before comparing it with the desting z values.
  3691. *)
  3692. DDBLTFX_ZBUFFERBASEDEST = $00000100;
  3693. (****************************************************************************
  3694. *
  3695. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  3696. *
  3697. ****************************************************************************)
  3698. (*
  3699. * If stretching, use arithmetic stretching along the Y axis for this overlay.
  3700. *)
  3701. DDOVERFX_ARITHSTRETCHY = $00000001;
  3702. (*
  3703. * Mirror the overlay across the vertical axis
  3704. *)
  3705. DDOVERFX_MIRRORLEFTRIGHT = $00000002;
  3706. (*
  3707. * Mirror the overlay across the horizontal axis
  3708. *)
  3709. DDOVERFX_MIRRORUPDOWN = $00000004;
  3710. (*
  3711. * Deinterlace the overlay, if possible
  3712. *)
  3713. DDOVERFX_DEINTERLACE = $00000008;
  3714. (****************************************************************************
  3715. *
  3716. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  3717. *
  3718. ****************************************************************************)
  3719. (*
  3720. * return when the vertical blank interval begins
  3721. *)
  3722. DDWAITVB_BLOCKBEGIN = $00000001;
  3723. (*
  3724. * set up an event to trigger when the vertical blank begins
  3725. *)
  3726. DDWAITVB_BLOCKBEGINEVENT = $00000002;
  3727. (*
  3728. * return when the vertical blank interval ends and display begins
  3729. *)
  3730. DDWAITVB_BLOCKEND = $00000004;
  3731. (****************************************************************************
  3732. *
  3733. * DIRECTDRAW GETFLIPSTATUS FLAGS
  3734. *
  3735. ****************************************************************************)
  3736. (*
  3737. * is it OK to flip now?
  3738. *)
  3739. DDGFS_CANFLIP = $00000001;
  3740. (*
  3741. * is the last flip finished?
  3742. *)
  3743. DDGFS_ISFLIPDONE = $00000002;
  3744. (****************************************************************************
  3745. *
  3746. * DIRECTDRAW GETBLTSTATUS FLAGS
  3747. *
  3748. ****************************************************************************)
  3749. (*
  3750. * is it OK to blt now?
  3751. *)
  3752. DDGBS_CANBLT = $00000001;
  3753. (*
  3754. * is the blt to the surface finished?
  3755. *)
  3756. DDGBS_ISBLTDONE = $00000002;
  3757. (****************************************************************************
  3758. *
  3759. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  3760. *
  3761. ****************************************************************************)
  3762. (*
  3763. * Enumerate overlays back to front.
  3764. *)
  3765. DDENUMOVERLAYZ_BACKTOFRONT = $00000000;
  3766. (*
  3767. * Enumerate overlays front to back
  3768. *)
  3769. DDENUMOVERLAYZ_FRONTTOBACK = $00000001;
  3770. (****************************************************************************
  3771. *
  3772. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  3773. *
  3774. ****************************************************************************)
  3775. (*
  3776. * Send overlay to front
  3777. *)
  3778. DDOVERZ_SENDTOFRONT = $00000000;
  3779. (*
  3780. * Send overlay to back
  3781. *)
  3782. DDOVERZ_SENDTOBACK = $00000001;
  3783. (*
  3784. * Move Overlay forward
  3785. *)
  3786. DDOVERZ_MOVEFORWARD = $00000002;
  3787. (*
  3788. * Move Overlay backward
  3789. *)
  3790. DDOVERZ_MOVEBACKWARD = $00000003;
  3791. (*
  3792. * Move Overlay in front of relative surface
  3793. *)
  3794. DDOVERZ_INSERTINFRONTOF = $00000004;
  3795. (*
  3796. * Move Overlay in back of relative surface
  3797. *)
  3798. DDOVERZ_INSERTINBACKOF = $00000005;
  3799. (****************************************************************************
  3800. *
  3801. * DIRECTDRAW SETGAMMARAMP FLAGS
  3802. *
  3803. ****************************************************************************)
  3804. (*
  3805. * Request calibrator to adjust the gamma ramp according to the physical
  3806. * properties of the display so that the result should appear identical
  3807. * on all systems.
  3808. *)
  3809. DDSGR_CALIBRATE = $00000001;
  3810. (****************************************************************************
  3811. *
  3812. * DIRECTDRAW STARTMODETEST FLAGS
  3813. *
  3814. ****************************************************************************)
  3815. (*
  3816. * Indicates that the mode being tested has passed
  3817. *)
  3818. DDSMT_ISTESTREQUIRED = $00000001;
  3819. (****************************************************************************
  3820. *
  3821. * DIRECTDRAW EVALUATEMODE FLAGS
  3822. *
  3823. ****************************************************************************)
  3824. (*
  3825. * Indicates that the mode being tested has passed
  3826. *)
  3827. DDEM_MODEPASSED = $00000001;
  3828. (*
  3829. * Indicates that the mode being tested has failed
  3830. *)
  3831. DDEM_MODEFAILED = $00000002;
  3832. (*===========================================================================
  3833. *
  3834. *
  3835. * DIRECTDRAW RETURN CODES
  3836. *
  3837. * The return values from DirectDraw Commands and Surface that return an HRESULT
  3838. * are codes from DirectDraw concerning the results of the action
  3839. * requested by DirectDraw.
  3840. *
  3841. *==========================================================================*)
  3842. (*
  3843. * Status is OK
  3844. *
  3845. * Issued by: DirectDraw Commands and all callbacks
  3846. *)
  3847. DD_OK = S_OK;
  3848. DD_FALSE = S_FALSE;
  3849. (****************************************************************************
  3850. *
  3851. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  3852. *
  3853. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  3854. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  3855. * enumeration callback routines.
  3856. *
  3857. ****************************************************************************)
  3858. (*
  3859. * stop the enumeration
  3860. *)
  3861. DDENUMRET_CANCEL = 0;
  3862. (*
  3863. * continue the enumeration
  3864. *)
  3865. DDENUMRET_OK = 1;
  3866. (****************************************************************************
  3867. *
  3868. * DIRECTDRAW ERRORS
  3869. *
  3870. * Errors are represented by negative values and cannot be combined.
  3871. *
  3872. ****************************************************************************)
  3873. (*
  3874. * This object is already initialized
  3875. *)
  3876. DDERR_ALREADYINITIALIZED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 5);
  3877. (*
  3878. * This surface can not be attached to the requested surface.
  3879. *)
  3880. DDERR_CANNOTATTACHSURFACE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 10);
  3881. (*
  3882. * This surface can not be detached from the requested surface.
  3883. *)
  3884. DDERR_CANNOTDETACHSURFACE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 20);
  3885. (*
  3886. * Support is currently not available.
  3887. *)
  3888. DDERR_CURRENTLYNOTAVAIL = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 40);
  3889. (*
  3890. * An exception was encountered while performing the requested operation
  3891. *)
  3892. DDERR_EXCEPTION = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 55);
  3893. (*
  3894. * Generic failure.
  3895. *)
  3896. DDERR_GENERIC = E_FAIL;
  3897. (*
  3898. * Height of rectangle provided is not a multiple of reqd alignment
  3899. *)
  3900. DDERR_HEIGHTALIGN = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 90);
  3901. (*
  3902. * Unable to match primary surface creation request with existing
  3903. * primary surface.
  3904. *)
  3905. DDERR_INCOMPATIBLEPRIMARY = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 95);
  3906. (*
  3907. * One or more of the caps bits passed to the callback are incorrect.
  3908. *)
  3909. DDERR_INVALIDCAPS = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 100);
  3910. (*
  3911. * DirectDraw does not support provided Cliplist.
  3912. *)
  3913. DDERR_INVALIDCLIPLIST = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 110);
  3914. (*
  3915. * DirectDraw does not support the requested mode
  3916. *)
  3917. DDERR_INVALIDMODE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 120);
  3918. (*
  3919. * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  3920. *)
  3921. DDERR_INVALIDOBJECT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 130);
  3922. (*
  3923. * One or more of the parameters passed to the callback function are
  3924. * incorrect.
  3925. *)
  3926. DDERR_INVALIDPARAMS = E_INVALIDARG;
  3927. (*
  3928. * pixel format was invalid as specified
  3929. *)
  3930. DDERR_INVALIDPIXELFORMAT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 145);
  3931. (*
  3932. * Rectangle provided was invalid.
  3933. *)
  3934. DDERR_INVALIDRECT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 150);
  3935. (*
  3936. * Operation could not be carried out because one or more surfaces are locked
  3937. *)
  3938. DDERR_LOCKEDSURFACES = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 160);
  3939. (*
  3940. * There is no 3D present.
  3941. *)
  3942. DDERR_NO3D = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 170);
  3943. (*
  3944. * Operation could not be carried out because there is no alpha accleration
  3945. * hardware present or available.
  3946. *)
  3947. DDERR_NOALPHAHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 180);
  3948. (*
  3949. * Operation could not be carried out because there is no stereo
  3950. * hardware present or available.
  3951. *)
  3952. DDERR_NOSTEREOHARDWARE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 181);
  3953. (*
  3954. * Operation could not be carried out because there is no hardware
  3955. * present which supports stereo surfaces
  3956. *)
  3957. DDERR_NOSURFACELEFT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 182);
  3958. (*
  3959. * no clip list available
  3960. *)
  3961. DDERR_NOCLIPLIST = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 205);
  3962. (*
  3963. * Operation could not be carried out because there is no color conversion
  3964. * hardware present or available.
  3965. *)
  3966. DDERR_NOCOLORCONVHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 210);
  3967. (*
  3968. * Create function called without DirectDraw object method SetCooperativeLevel
  3969. * being called.
  3970. *)
  3971. DDERR_NOCOOPERATIVELEVELSET = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 212);
  3972. (*
  3973. * Surface doesn't currently have a color key
  3974. *)
  3975. DDERR_NOCOLORKEY = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 215);
  3976. (*
  3977. * Operation could not be carried out because there is no hardware support
  3978. * of the dest color key.
  3979. *)
  3980. DDERR_NOCOLORKEYHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 220);
  3981. (*
  3982. * No DirectDraw support possible with current display driver
  3983. *)
  3984. DDERR_NODIRECTDRAWSUPPORT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 222);
  3985. (*
  3986. * Operation requires the application to have exclusive mode but the
  3987. * application does not have exclusive mode.
  3988. *)
  3989. DDERR_NOEXCLUSIVEMODE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 225);
  3990. (*
  3991. * Flipping visible surfaces is not supported.
  3992. *)
  3993. DDERR_NOFLIPHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 230);
  3994. (*
  3995. * There is no GDI present.
  3996. *)
  3997. DDERR_NOGDI = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 240);
  3998. (*
  3999. * Operation could not be carried out because there is no hardware present
  4000. * or available.
  4001. *)
  4002. DDERR_NOMIRRORHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 250);
  4003. (*
  4004. * Requested item was not found
  4005. *)
  4006. DDERR_NOTFOUND = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 255);
  4007. (*
  4008. * Operation could not be carried out because there is no overlay hardware
  4009. * present or available.
  4010. *)
  4011. DDERR_NOOVERLAYHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 260);
  4012. (*
  4013. * Operation could not be carried out because the source and destination
  4014. * rectangles are on the same surface and overlap each other.
  4015. *)
  4016. DDERR_OVERLAPPINGRECTS = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 270);
  4017. (*
  4018. * Operation could not be carried out because there is no appropriate raster
  4019. * op hardware present or available.
  4020. *)
  4021. DDERR_NORASTEROPHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 280);
  4022. (*
  4023. * Operation could not be carried out because there is no rotation hardware
  4024. * present or available.
  4025. *)
  4026. DDERR_NOROTATIONHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 290);
  4027. (*
  4028. * Operation could not be carried out because there is no hardware support
  4029. * for stretching
  4030. *)
  4031. DDERR_NOSTRETCHHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 310);
  4032. (*
  4033. * DirectDrawSurface is not in 4 bit color palette and the requested operation
  4034. * requires 4 bit color palette.
  4035. *)
  4036. DDERR_NOT4BITCOLOR = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 316);
  4037. (*
  4038. * DirectDrawSurface is not in 4 bit color index palette and the requested
  4039. * operation requires 4 bit color index palette.
  4040. *)
  4041. DDERR_NOT4BITCOLORINDEX = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 317);
  4042. (*
  4043. * DirectDraw Surface is not in 8 bit color mode and the requested operation
  4044. * requires 8 bit color.
  4045. *)
  4046. DDERR_NOT8BITCOLOR = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 320);
  4047. (*
  4048. * Operation could not be carried out because there is no texture mapping
  4049. * hardware present or available.
  4050. *)
  4051. DDERR_NOTEXTUREHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 330);
  4052. (*
  4053. * Operation could not be carried out because there is no hardware support
  4054. * for vertical blank synchronized operations.
  4055. *)
  4056. DDERR_NOVSYNCHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 335);
  4057. (*
  4058. * Operation could not be carried out because there is no hardware support
  4059. * for zbuffer blting.
  4060. *)
  4061. DDERR_NOZBUFFERHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 340);
  4062. (*
  4063. * Overlay surfaces could not be z layered based on their BltOrder because
  4064. * the hardware does not support z layering of overlays.
  4065. *)
  4066. DDERR_NOZOVERLAYHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 350);
  4067. (*
  4068. * The hardware needed for the requested operation has already been
  4069. * allocated.
  4070. *)
  4071. DDERR_OUTOFCAPS = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 360);
  4072. (*
  4073. * DirectDraw does not have enough memory to perform the operation.
  4074. *)
  4075. DDERR_OUTOFMEMORY = E_OUTOFMEMORY;
  4076. (*
  4077. * DirectDraw does not have enough memory to perform the operation.
  4078. *)
  4079. DDERR_OUTOFVIDEOMEMORY = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 380);
  4080. (*
  4081. * hardware does not support clipped overlays
  4082. *)
  4083. DDERR_OVERLAYCANTCLIP = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 382);
  4084. (*
  4085. * Can only have ony color key active at one time for overlays
  4086. *)
  4087. DDERR_OVERLAYCOLORKEYONLYONEACTIVE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 384);
  4088. (*
  4089. * Access to this palette is being refused because the palette is already
  4090. * locked by another thread.
  4091. *)
  4092. DDERR_PALETTEBUSY = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 387);
  4093. (*
  4094. * No src color key specified for this operation.
  4095. *)
  4096. DDERR_COLORKEYNOTSET = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 400);
  4097. (*
  4098. * This surface is already attached to the surface it is being attached to.
  4099. *)
  4100. DDERR_SURFACEALREADYATTACHED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 410);
  4101. (*
  4102. * This surface is already a dependency of the surface it is being made a
  4103. * dependency of.
  4104. *)
  4105. DDERR_SURFACEALREADYDEPENDENT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 420);
  4106. (*
  4107. * Access to this surface is being refused because the surface is already
  4108. * locked by another thread.
  4109. *)
  4110. DDERR_SURFACEBUSY = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 430);
  4111. (*
  4112. * Access to this surface is being refused because no driver exists
  4113. * which can supply a pointer to the surface.
  4114. * This is most likely to happen when attempting to lock the primary
  4115. * surface when no DCI provider is present.
  4116. * Will also happen on attempts to lock an optimized surface.
  4117. *)
  4118. DDERR_CANTLOCKSURFACE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 435);
  4119. (*
  4120. * Access to Surface refused because Surface is obscured.
  4121. *)
  4122. DDERR_SURFACEISOBSCURED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 440);
  4123. (*
  4124. * Access to this surface is being refused because the surface is gone.
  4125. * The DIRECTDRAWSURFACE object representing this surface should
  4126. * have Restore called on it.
  4127. *)
  4128. DDERR_SURFACELOST = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 450);
  4129. (*
  4130. * The requested surface is not attached.
  4131. *)
  4132. DDERR_SURFACENOTATTACHED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 460);
  4133. (*
  4134. * Height requested by DirectDraw is too large.
  4135. *)
  4136. DDERR_TOOBIGHEIGHT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 470);
  4137. (*
  4138. * Size requested by DirectDraw is too large -- The individual height and
  4139. * width are OK.
  4140. *)
  4141. DDERR_TOOBIGSIZE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 480);
  4142. (*
  4143. * Width requested by DirectDraw is too large.
  4144. *)
  4145. DDERR_TOOBIGWIDTH = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 490);
  4146. (*
  4147. * Action not supported.
  4148. *)
  4149. DDERR_UNSUPPORTED = E_NOTIMPL;
  4150. (*
  4151. * Pixel format requested is unsupported by DirectDraw
  4152. *)
  4153. DDERR_UNSUPPORTEDFORMAT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 510);
  4154. (*
  4155. * Bitmask in the pixel format requested is unsupported by DirectDraw
  4156. *)
  4157. DDERR_UNSUPPORTEDMASK = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 520);
  4158. (*
  4159. * The specified stream contains invalid data
  4160. *)
  4161. DDERR_INVALIDSTREAM = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 521);
  4162. (*
  4163. * vertical blank is in progress
  4164. *)
  4165. DDERR_VERTICALBLANKINPROGRESS = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 537);
  4166. (*
  4167. * Informs DirectDraw that the previous Blt which is transfering information
  4168. * to or from this Surface is incomplete.
  4169. *)
  4170. DDERR_WASSTILLDRAWING = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 540);
  4171. (*
  4172. * The specified surface type requires specification of the COMPLEX flag
  4173. *)
  4174. DDERR_DDSCAPSCOMPLEXREQUIRED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 542);
  4175. (*
  4176. * Rectangle provided was not horizontally aligned on reqd. boundary
  4177. *)
  4178. DDERR_XALIGN = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 560);
  4179. (*
  4180. * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  4181. * identifier.
  4182. *)
  4183. DDERR_INVALIDDIRECTDRAWGUID = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 561);
  4184. (*
  4185. * A DirectDraw object representing this driver has already been created
  4186. * for this process.
  4187. *)
  4188. DDERR_DIRECTDRAWALREADYCREATED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 562);
  4189. (*
  4190. * A hardware only DirectDraw object creation was attempted but the driver
  4191. * did not support any hardware.
  4192. *)
  4193. DDERR_NODIRECTDRAWHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 563);
  4194. (*
  4195. * this process already has created a primary surface
  4196. *)
  4197. DDERR_PRIMARYSURFACEALREADYEXISTS = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 564);
  4198. (*
  4199. * software emulation not available.
  4200. *)
  4201. DDERR_NOEMULATION = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 565);
  4202. (*
  4203. * region passed to Clipper::GetClipList is too small.
  4204. *)
  4205. DDERR_REGIONTOOSMALL = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 566);
  4206. (*
  4207. * an attempt was made to set a clip list for a clipper objec that
  4208. * is already monitoring an hwnd.
  4209. *)
  4210. DDERR_CLIPPERISUSINGHWND = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 567);
  4211. (*
  4212. * No clipper object attached to surface object
  4213. *)
  4214. DDERR_NOCLIPPERATTACHED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 568);
  4215. (*
  4216. * Clipper notification requires an HWND or
  4217. * no HWND has previously been set as the CooperativeLevel HWND.
  4218. *)
  4219. DDERR_NOHWND = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 569);
  4220. (*
  4221. * HWND used by DirectDraw CooperativeLevel has been subclassed,
  4222. * this prevents DirectDraw from restoring state.
  4223. *)
  4224. DDERR_HWNDSUBCLASSED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 570);
  4225. (*
  4226. * The CooperativeLevel HWND has already been set.
  4227. * It can not be reset while the process has surfaces or palettes created.
  4228. *)
  4229. DDERR_HWNDALREADYSET = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 571);
  4230. (*
  4231. * No palette object attached to this surface.
  4232. *)
  4233. DDERR_NOPALETTEATTACHED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 572);
  4234. (*
  4235. * No hardware support for 16 or 256 color palettes.
  4236. *)
  4237. DDERR_NOPALETTEHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 573);
  4238. (*
  4239. * If a clipper object is attached to the source surface passed into a
  4240. * BltFast call.
  4241. *)
  4242. DDERR_BLTFASTCANTCLIP = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 574);
  4243. (*
  4244. * No blter.
  4245. *)
  4246. DDERR_NOBLTHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 575);
  4247. (*
  4248. * No DirectDraw ROP hardware.
  4249. *)
  4250. DDERR_NODDROPSHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 576);
  4251. (*
  4252. * returned when GetOverlayPosition is called on a hidden overlay
  4253. *)
  4254. DDERR_OVERLAYNOTVISIBLE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 577);
  4255. (*
  4256. * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  4257. * has never been called on to establish a destionation.
  4258. *)
  4259. DDERR_NOOVERLAYDEST = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 578);
  4260. (*
  4261. * returned when the position of the overlay on the destionation is no longer
  4262. * legal for that destionation.
  4263. *)
  4264. DDERR_INVALIDPOSITION = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 579);
  4265. (*
  4266. * returned when an overlay member is called for a non-overlay surface
  4267. *)
  4268. DDERR_NOTAOVERLAYSURFACE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 580);
  4269. (*
  4270. * An attempt was made to set the cooperative level when it was already
  4271. * set to exclusive.
  4272. *)
  4273. DDERR_EXCLUSIVEMODEALREADYSET = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 581);
  4274. (*
  4275. * An attempt has been made to flip a surface that is not flippable.
  4276. *)
  4277. DDERR_NOTFLIPPABLE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 582);
  4278. (*
  4279. * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  4280. * created.
  4281. *)
  4282. DDERR_CANTDUPLICATE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 583);
  4283. (*
  4284. * Surface was not locked. An attempt to unlock a surface that was not
  4285. * locked at all, or by this process, has been attempted.
  4286. *)
  4287. DDERR_NOTLOCKED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 584);
  4288. (*
  4289. * Windows can not create any more DCs, or a DC was requested for a paltte-indexed
  4290. * surface when the surface had no palette AND the display mode was not palette-indexed
  4291. * (in this case DirectDraw cannot select a proper palette into the DC)
  4292. *)
  4293. DDERR_CANTCREATEDC = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 585);
  4294. (*
  4295. * No DC was ever created for this surface.
  4296. *)
  4297. DDERR_NODC = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 586);
  4298. (*
  4299. * This surface can not be restored because it was created in a different
  4300. * mode.
  4301. *)
  4302. DDERR_WRONGMODE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 587);
  4303. (*
  4304. * This surface can not be restored because it is an implicitly created
  4305. * surface.
  4306. *)
  4307. DDERR_IMPLICITLYCREATED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 588);
  4308. (*
  4309. * The surface being used is not a palette-based surface
  4310. *)
  4311. DDERR_NOTPALETTIZED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 589);
  4312. (*
  4313. * The display is currently in an unsupported mode
  4314. *)
  4315. DDERR_UNSUPPORTEDMODE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 590);
  4316. (*
  4317. * Operation could not be carried out because there is no mip-map
  4318. * texture mapping hardware present or available.
  4319. *)
  4320. DDERR_NOMIPMAPHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 591);
  4321. (*
  4322. * The requested action could not be performed because the surface was of
  4323. * the wrong type.
  4324. *)
  4325. DDERR_INVALIDSURFACETYPE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 592);
  4326. (*
  4327. * Device does not support optimized surfaces, therefore no video memory optimized surfaces
  4328. *)
  4329. DDERR_NOOPTIMIZEHW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 600);
  4330. (*
  4331. * Surface is an optimized surface, but has not yet been allocated any memory
  4332. *)
  4333. DDERR_NOTLOADED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 601);
  4334. (*
  4335. * Attempt was made to create or set a device window without first setting
  4336. * the focus window
  4337. *)
  4338. DDERR_NOFOCUSWINDOW = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 602);
  4339. (*
  4340. * Attempt was made to set a palette on a mipmap sublevel
  4341. *)
  4342. DDERR_NOTONMIPMAPSUBLEVEL = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 603);
  4343. (*
  4344. * A DC has already been returned for this surface. Only one DC can be
  4345. * retrieved per surface.
  4346. *)
  4347. DDERR_DCALREADYCREATED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 620);
  4348. (*
  4349. * An attempt was made to allocate non-local video memory from a device
  4350. * that does not support non-local video memory.
  4351. *)
  4352. DDERR_NONONLOCALVIDMEM = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 630);
  4353. (*
  4354. * The attempt to page lock a surface failed.
  4355. *)
  4356. DDERR_CANTPAGELOCK = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 640);
  4357. (*
  4358. * The attempt to page unlock a surface failed.
  4359. *)
  4360. DDERR_CANTPAGEUNLOCK = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 660);
  4361. (*
  4362. * An attempt was made to page unlock a surface with no outstanding page locks.
  4363. *)
  4364. DDERR_NOTPAGELOCKED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 680);
  4365. (*
  4366. * There is more data available than the specified buffer size could hold
  4367. *)
  4368. DDERR_MOREDATA = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 690);
  4369. (*
  4370. * The data has expired and is therefore no longer valid.
  4371. *)
  4372. DDERR_EXPIRED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 691);
  4373. (*
  4374. * The mode test has finished executing.
  4375. *)
  4376. DDERR_TESTFINISHED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 692);
  4377. (*
  4378. * The mode test has switched to a new mode.
  4379. *)
  4380. DDERR_NEWMODE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 693);
  4381. (*
  4382. * D3D has not yet been initialized.
  4383. *)
  4384. DDERR_D3DNOTINITIALIZED = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 694);
  4385. (*
  4386. * The video port is not active
  4387. *)
  4388. DDERR_VIDEONOTACTIVE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 695);
  4389. (*
  4390. * The monitor does not have EDID data.
  4391. *)
  4392. DDERR_NOMONITORINFORMATION = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 696);
  4393. (*
  4394. * The driver does not enumerate display mode refresh rates.
  4395. *)
  4396. DDERR_NODRIVERSUPPORT = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 697);
  4397. (*
  4398. * Surfaces created by one direct draw device cannot be used directly by
  4399. * another direct draw device.
  4400. *)
  4401. DDERR_DEVICEDOESNTOWNSURFACE = HRESULT((DWORD(1) shl 31) or (_FACDD shl 16) or 699);
  4402. (*
  4403. * An attempt was made to invoke an interface member of a DirectDraw object
  4404. * created by CoCreateInstance() before it was initialized.
  4405. *)
  4406. DDERR_NOTINITIALIZED = CO_E_NOTINITIALIZED;
  4407. (* Alpha bit depth constants *)
  4408. //#ifdef __cplusplus
  4409. //};
  4410. //#endif
  4411. //#ifdef ENABLE_NAMELESS_UNION_PRAGMA
  4412. //#pragma warning(default:4201)
  4413. //#endif
  4414. //#endif //__DDRAW_INCLUDED__
  4415. { extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  4416. extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  4417. extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  4418. extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  4419. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  4420. extern HRESULT WINAPI DirectDrawCreateEx( GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid,IUnknown FAR *pUnkOuter );
  4421. extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );}
  4422. {$IFDEF DIRECTDRAW_DYNAMIC_LINK}
  4423. var
  4424. DirectDrawEnumerateW: function(lpCallback: LPDDENUMCALLBACKW; lpContext: LPVOID): HRESULT; stdcall;
  4425. DirectDrawEnumerateA: function(lpCallback: LPDDENUMCALLBACKA; lpContext: LPVOID): HRESULT; stdcall;
  4426. DirectDrawEnumerateExW: function(lpCallback: LPDDENUMCALLBACKEXW; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall;
  4427. DirectDrawEnumerateExA: function(lpCallback: LPDDENUMCALLBACKEXA; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall;
  4428. DirectDrawCreate: function(lpGUID: PGUID; out lplpDD: IDirectDraw; pUnkOuter: IUnknown): HRESULT; stdcall;
  4429. DirectDrawCreateEx: function(lpGuid: PGUID; out lplpDD: IDirectDraw7; iid: PGUID; pUnkOuter: IUnknown): HRESULT; stdcall;
  4430. DirectDrawCreateClipper: function(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper; pUnkOuter: IUnknown): HRESULT; stdcall;
  4431. {$ELSE DIRECTDRAW_DYNAMIC_LINK}
  4432. function DirectDrawEnumerateW(lpCallback: LPDDENUMCALLBACKW; lpContext: LPVOID): HRESULT; stdcall; external 'ddraw.dll';
  4433. function DirectDrawEnumerateA(lpCallback: LPDDENUMCALLBACKA; lpContext: LPVOID): HRESULT; stdcall; external 'ddraw.dll';
  4434. function DirectDrawEnumerateExW(lpCallback: LPDDENUMCALLBACKEXW; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall; external 'ddraw.dll';
  4435. function DirectDrawEnumerateExA(lpCallback: LPDDENUMCALLBACKEXA; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall; external 'ddraw.dll';
  4436. function DirectDrawCreate(lpGUID: PGUID; out lplpDD: IDirectDraw; pUnkOuter: IUnknown): HRESULT; stdcall; external 'ddraw.dll';
  4437. function DirectDrawCreateEx(lpGuid: PGUID; out lplpDD: IDirectDraw7; iid: PGUID; pUnkOuter: IUnknown): HRESULT; stdcall; external 'ddraw.dll';
  4438. function DirectDrawCreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper; pUnkOuter: IUnknown): HRESULT; stdcall; external 'ddraw.dll';
  4439. {$ENDIF DIRECTDRAW_DYNAMIC_LINK}
  4440. function GET_WHQL_YEAR(dwWHQLLevel: DWORD): Integer; inline;
  4441. function GET_WHQL_MONTH(dwWHQLLevel: DWORD): Integer; inline;
  4442. function GET_WHQL_DAY(dwWHQLLevel: DWORD): Integer; inline;
  4443. implementation
  4444. (*
  4445. * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel
  4446. *)
  4447. {#define GET_WHQL_YEAR( dwWHQLLevel ) \
  4448. ( (dwWHQLLevel) / 0x10000 )
  4449. #define GET_WHQL_MONTH( dwWHQLLevel ) \
  4450. ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff )
  4451. #define GET_WHQL_DAY( dwWHQLLevel ) \
  4452. ( (dwWHQLLevel) & 0xff )}
  4453. function GET_WHQL_YEAR(dwWHQLLevel: DWORD): Integer; inline;
  4454. begin
  4455. Result := dwWHQLLevel div $10000;
  4456. end;
  4457. function GET_WHQL_MONTH(dwWHQLLevel: DWORD): Integer; inline;
  4458. begin
  4459. Result := (dwWHQLLevel div $100) and $00ff;
  4460. end;
  4461. function GET_WHQL_DAY(dwWHQLLevel: DWORD): Integer; inline;
  4462. begin
  4463. Result := dwWHQLLevel and $ff;
  4464. end;
  4465. end.