Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1289 lines
45 KiB

  1. //------------------------------------------------------------------------------
  2. //
  3. // Copyright Microsoft Corporation 1997-2000
  4. // All rights reserved.
  5. //
  6. // File: dxtrans.idl
  7. //
  8. // Overview:
  9. // This is the IDL file for DirectX installable transform coclass,
  10. // interface, and type definitions.
  11. //
  12. //------------------------------------------------------------------------------
  13. cpp_quote("#include <servprov.h>")
  14. cpp_quote("#include <ddraw.h>")
  15. cpp_quote("#include <d3d.h>")
  16. cpp_quote("#include <d3drm.h>")
  17. cpp_quote("#include <urlmon.h>")
  18. //--- Import base idl
  19. import "oaidl.idl";
  20. import "ocidl.idl";
  21. import "servprov.idl";
  22. import "comcat.idl";
  23. //
  24. // Since direct draw does not have an IDL, we'll define DDSURFACEDESC to
  25. // be a void, but include ddraw.h in the header file. This makes MIDL happy.
  26. //
  27. #ifndef DDSURFACEDESC
  28. cpp_quote("#if 0")
  29. cpp_quote("// Bogus definition used to make MIDL compiler happy")
  30. typedef void DDSURFACEDESC;
  31. typedef void D3DRMBOX;
  32. typedef void D3DVECTOR;
  33. typedef void D3DRMMATRIX4D;
  34. typedef void* LPSECURITY_ATTRIBUTES;
  35. cpp_quote("#endif")
  36. #endif
  37. //--- Additional includes
  38. //--- Export
  39. cpp_quote( "#ifdef _DXTRANSIMPL")
  40. cpp_quote( " #define _DXTRANS_IMPL_EXT _declspec(dllexport)")
  41. cpp_quote( "#else")
  42. cpp_quote( " #define _DXTRANS_IMPL_EXT _declspec(dllimport)")
  43. cpp_quote( "#endif")
  44. //=== Forward References ====================================================
  45. interface IDXTransformFactory;
  46. interface IDXTransform;
  47. interface IDXTaskManager;
  48. interface IDXSurfaceFactory;
  49. interface IDXSurface;
  50. interface IDXARGBSurfaceInit;
  51. interface IDXRawSurface;
  52. interface IDXARGBReadPtr;
  53. interface IDXARGBReadWritePtr;
  54. interface IDXDCLock;
  55. interface IDXTScale;
  56. interface IDXLookupTable;
  57. interface IDXTBindHost;
  58. interface IBindHost;
  59. interface IDXTScaleOutput;
  60. interface IDXGradient;
  61. //=== Constants =============================================================
  62. cpp_quote("//")
  63. cpp_quote("// All GUIDs for DXTransform are declared in DXTGUID.C in the SDK include directory")
  64. cpp_quote("//")
  65. cpp_quote("EXTERN_C const GUID DDPF_RGB1;")
  66. cpp_quote("EXTERN_C const GUID DDPF_RGB2;")
  67. cpp_quote("EXTERN_C const GUID DDPF_RGB4;")
  68. cpp_quote("EXTERN_C const GUID DDPF_RGB8;")
  69. cpp_quote("EXTERN_C const GUID DDPF_RGB332;")
  70. cpp_quote("EXTERN_C const GUID DDPF_ARGB4444;")
  71. cpp_quote("EXTERN_C const GUID DDPF_RGB565;")
  72. cpp_quote("EXTERN_C const GUID DDPF_BGR565;")
  73. cpp_quote("EXTERN_C const GUID DDPF_RGB555;")
  74. cpp_quote("EXTERN_C const GUID DDPF_ARGB1555;")
  75. cpp_quote("EXTERN_C const GUID DDPF_RGB24;")
  76. cpp_quote("EXTERN_C const GUID DDPF_BGR24;")
  77. cpp_quote("EXTERN_C const GUID DDPF_RGB32;")
  78. cpp_quote("EXTERN_C const GUID DDPF_BGR32;")
  79. cpp_quote("EXTERN_C const GUID DDPF_ABGR32;")
  80. cpp_quote("EXTERN_C const GUID DDPF_ARGB32;")
  81. cpp_quote("EXTERN_C const GUID DDPF_PMARGB32;")
  82. cpp_quote("EXTERN_C const GUID DDPF_A1;")
  83. cpp_quote("EXTERN_C const GUID DDPF_A2;")
  84. cpp_quote("EXTERN_C const GUID DDPF_A4;")
  85. cpp_quote("EXTERN_C const GUID DDPF_A8;")
  86. cpp_quote("EXTERN_C const GUID DDPF_Z8;")
  87. cpp_quote("EXTERN_C const GUID DDPF_Z16;")
  88. cpp_quote("EXTERN_C const GUID DDPF_Z24;")
  89. cpp_quote("EXTERN_C const GUID DDPF_Z32;")
  90. cpp_quote("//")
  91. cpp_quote("// Component categories")
  92. cpp_quote("//")
  93. cpp_quote("EXTERN_C const GUID CATID_DXImageTransform;")
  94. cpp_quote("EXTERN_C const GUID CATID_DX3DTransform;")
  95. cpp_quote("EXTERN_C const GUID CATID_DXAuthoringTransform;")
  96. cpp_quote("EXTERN_C const GUID CATID_DXSurface;")
  97. cpp_quote("//")
  98. cpp_quote("// Service IDs")
  99. cpp_quote("//")
  100. cpp_quote("EXTERN_C const GUID SID_SDirectDraw;")
  101. cpp_quote("EXTERN_C const GUID SID_SDirect3DRM;")
  102. cpp_quote("#define SID_SDXTaskManager CLSID_DXTaskManager")
  103. cpp_quote("#define SID_SDXSurfaceFactory IID_IDXSurfaceFactory")
  104. cpp_quote("#define SID_SDXTransformFactory IID_IDXTransformFactory")
  105. cpp_quote("//")
  106. cpp_quote("// DXTransforms Core Type Library Version Info")
  107. cpp_quote("//")
  108. cpp_quote("#define DXTRANS_TLB_MAJOR_VER 1")
  109. cpp_quote("#define DXTRANS_TLB_MINOR_VER 1")
  110. //=== Struct & Enum definitions =============================================
  111. //=== Interface definitions =================================================
  112. //+-----------------------------------------------------------------------------
  113. //
  114. // IDXBaseObject
  115. //
  116. //------------------------------------------------------------------------------
  117. [
  118. object,
  119. uuid(17B59B2B-9CC8-11d1-9053-00C04FD9189D),
  120. helpstring("IDXBaseObject Interface"),
  121. pointer_default(unique),
  122. local
  123. ]
  124. interface IDXBaseObject : IUnknown
  125. {
  126. HRESULT GetGenerationId( [out]ULONG *pID);
  127. HRESULT IncrementGenerationId([in] BOOL bRefresh);
  128. HRESULT GetObjectSize( [out] ULONG *pcbSize);
  129. };
  130. //+-----------------------------------------------------------------------------
  131. //
  132. // Bounding rectangle and vector structures.
  133. //
  134. //------------------------------------------------------------------------------
  135. //--- Dimension identifiers
  136. typedef enum DXBNDID
  137. {
  138. DXB_X = 0,
  139. DXB_Y = 1,
  140. DXB_Z = 2,
  141. DXB_T = 3
  142. } DXBNDID;
  143. //--- Bound types
  144. typedef enum DXBNDTYPE
  145. {
  146. DXBT_DISCRETE,
  147. DXBT_DISCRETE64,
  148. DXBT_CONTINUOUS,
  149. DXBT_CONTINUOUS64
  150. } DXBNDTYPE;
  151. //--- Discrete bounds (image & sound)
  152. typedef struct DXDBND
  153. {
  154. long Min;
  155. long Max;
  156. } DXDBND;
  157. typedef DXDBND DXDBNDS[4];
  158. typedef struct DXDBND64
  159. {
  160. LONGLONG Min;
  161. LONGLONG Max;
  162. } DXDBND64;
  163. typedef DXDBND64 DXDBNDS64[4];
  164. //--- Continuous bounds (geometry)
  165. typedef struct DXCBND
  166. {
  167. float Min;
  168. float Max;
  169. } DXCBND;
  170. typedef DXCBND DXCBNDS[4];
  171. typedef struct DXCBND64
  172. {
  173. double Min;
  174. double Max;
  175. } DXCBND64;
  176. typedef DXCBND64 DXCBNDS64[4];
  177. //--- Combined space
  178. typedef union DXBNDS switch( DXBNDTYPE eType ) u
  179. {
  180. case DXBT_DISCRETE:
  181. DXDBND D[4];
  182. case DXBT_DISCRETE64:
  183. DXDBND64 LD[4];
  184. case DXBT_CONTINUOUS:
  185. DXCBND C[4];
  186. case DXBT_CONTINUOUS64:
  187. DXCBND64 LC[4];
  188. } DXBNDS;
  189. //--- Discrete 4D vector
  190. typedef long DXDVEC[4];
  191. typedef LONGLONG DXDVEC64[4];
  192. //--- Continous 4D vector
  193. typedef float DXCVEC[4];
  194. typedef double DXCVEC64[4];
  195. //--- Combined space vector
  196. typedef union DXVEC switch( DXBNDTYPE eType ) u
  197. {
  198. case DXBT_DISCRETE:
  199. long D[4];
  200. case DXBT_DISCRETE64:
  201. LONGLONG LD[4];
  202. case DXBT_CONTINUOUS:
  203. float C[4];
  204. case DXBT_CONTINUOUS64:
  205. double LC[4];
  206. } DXVEC;
  207. //+-----------------------------------------------------------------------------
  208. //
  209. // IDXTransformFactory
  210. //
  211. //------------------------------------------------------------------------------
  212. [
  213. object,
  214. uuid(6A950B2B-A971-11d1-81C8-0000F87557DB),
  215. helpstring("IDXTransformFactory Interface"),
  216. pointer_default(unique),
  217. local
  218. ]
  219. interface IDXTransformFactory : IServiceProvider
  220. {
  221. HRESULT SetService( [in]REFGUID guidService,
  222. [in]IUnknown *pUnkService,
  223. [in]BOOL bWeakReference);
  224. HRESULT CreateTransform( [in, size_is(ulNumInputs)]IUnknown** punkInputs,
  225. [in]ULONG ulNumInputs,
  226. [in, size_is(ulNumOutputs)]IUnknown** punkOutputs,
  227. [in]ULONG ulNumOutputs,
  228. [in]IPropertyBag* pInitProps, [in]IErrorLog* pErrLog,
  229. [in]REFCLSID TransCLSID, [in]REFIID TransIID,
  230. [out, iid_is(TransIID)]void** ppTransform );
  231. HRESULT InitializeTransform( [in]IDXTransform* pTransform,
  232. [in, size_is(ulNumInputs)]IUnknown** punkInputs,
  233. [in]ULONG ulNumInputs,
  234. [in, size_is(ulNumOutputs)]IUnknown** punkOutputs,
  235. [in]ULONG ulNumOutputs,
  236. [in]IPropertyBag* pInitProps, [in]IErrorLog* pErrLog );
  237. };
  238. //+-----------------------------------------------------------------------------
  239. //
  240. // IDXTransform
  241. //
  242. //------------------------------------------------------------------------------
  243. typedef enum DXTMISCFLAGS
  244. {
  245. DXTMF_BLEND_WITH_OUTPUT = ( 1L << 0 ),
  246. DXTMF_DITHER_OUTPUT = ( 1L << 1 ),
  247. DXTMF_OPTION_MASK = (0x0000FFFF), // Low word is settable options
  248. DXTMF_VALID_OPTIONS = (DXTMF_BLEND_WITH_OUTPUT | DXTMF_DITHER_OUTPUT),
  249. //
  250. // Status flags can not be changed by call to SetMiscFlags
  251. //
  252. DXTMF_BLEND_SUPPORTED = ( 1L << 16 ),
  253. DXTMF_DITHER_SUPPORTED = ( 1L << 17 ),
  254. DXTMF_INPLACE_OPERATION = ( 1L << 24 ),
  255. DXTMF_BOUNDS_SUPPORTED = ( 1L << 25 ),
  256. DXTMF_PLACEMENT_SUPPORTED = ( 1L << 26 ),
  257. DXTMF_QUALITY_SUPPORTED = ( 1L << 27 ),
  258. DXTMF_OPAQUE_RESULT = ( 1L << 28 )
  259. } DXTMISCFLAGS;
  260. typedef enum DXINOUTINFOFLAGS
  261. {
  262. DXINOUTF_OPTIONAL = ( 1L << 0)
  263. } DXINOUTINFOFLAGS;
  264. [
  265. object,
  266. uuid(30A5FB78-E11F-11d1-9064-00C04FD9189D),
  267. helpstring("IDXTransform Interface"),
  268. pointer_default(unique),
  269. local
  270. ]
  271. interface IDXTransform : IDXBaseObject
  272. {
  273. HRESULT Setup( [in, size_is(ulNumInputs)] IUnknown * const * punkInputs,
  274. [in]ULONG ulNumInputs,
  275. [in, size_is(ulNumOutputs)] IUnknown * const * punkOutputs,
  276. [in]ULONG ulNumOutputs,
  277. [in]DWORD dwFlags );
  278. HRESULT Execute( [in]const GUID* pRequestID, [in]const DXBNDS *pClipBnds,
  279. [in]const DXVEC *pPlacement );
  280. HRESULT MapBoundsIn2Out( [in] const DXBNDS *pInBounds,
  281. [in]ULONG ulNumInBnds,
  282. [in]ULONG ulOutIndex,
  283. [out]DXBNDS *pOutBounds );
  284. HRESULT MapBoundsOut2In( [in] ULONG ulOutIndex,
  285. [in] const DXBNDS *pOutBounds,
  286. [in] ULONG ulInIndex,
  287. [out]DXBNDS *pInBounds );
  288. HRESULT SetMiscFlags( [in] DWORD dwMiscFlags);
  289. HRESULT GetMiscFlags( [out]DWORD * pdwMiscFlags );
  290. HRESULT GetInOutInfo( [in]BOOL bIsOutput, [in]ULONG ulIndex,
  291. [out]DWORD *pdwFlags, [out, size_is(*pcIDs)] GUID *pIDs,
  292. [in, out] ULONG *pcIDs,
  293. [out] IUnknown **ppUnkCurrentObject);
  294. HRESULT SetQuality( [in] float fQuality );
  295. HRESULT GetQuality( [out] float * fQuality );
  296. };
  297. //+-----------------------------------------------------------------------------
  298. //
  299. // IDXSurfacePick
  300. //
  301. //------------------------------------------------------------------------------
  302. [
  303. object,
  304. uuid(30A5FB79-E11F-11d1-9064-00C04FD9189D),
  305. helpstring("IDXSurfacePick Interface"),
  306. pointer_default(unique),
  307. local
  308. ]
  309. interface IDXSurfacePick : IUnknown
  310. {
  311. HRESULT PointPick([in]const DXVEC *pPoint,
  312. [out]ULONG * pulInputSurfaceIndex,
  313. [out]DXVEC *pInputPoint);
  314. };
  315. //+-----------------------------------------------------------------------------
  316. //
  317. // IDXTBindHost
  318. //
  319. // Overview:
  320. // This interface is used to set a site-specific bind host for a transform.
  321. // Only transforms that need access to a bind host need to implement this
  322. // interface.
  323. //
  324. // For some reason, MIDL does not like IBindHost, so we've declared this
  325. // interface local.
  326. //
  327. //------------------------------------------------------------------------------
  328. [
  329. object,
  330. uuid(D26BCE55-E9DC-11d1-9066-00C04FD9189D),
  331. helpstring("IDXTBindHost Interface"),
  332. pointer_default(unique),
  333. local
  334. ]
  335. interface IDXTBindHost : IUnknown
  336. {
  337. HRESULT SetBindHost([in] IBindHost * pBindHost);
  338. };
  339. //+-----------------------------------------------------------------------------
  340. //
  341. // IDXTaskManager
  342. //
  343. // Overview:
  344. // This interface is used to implement a task managment service provider to
  345. // optimize thread usage.
  346. //
  347. //------------------------------------------------------------------------------
  348. typedef void (__stdcall DXTASKPROC)(void *pTaskData, BOOL* pbContinueProcessing );
  349. typedef DXTASKPROC *PFNDXTASKPROC;
  350. typedef void (__stdcall DXAPCPROC)(DWORD dwData);
  351. typedef DXAPCPROC *PFNDXAPCPROC;
  352. cpp_quote("#ifdef __cplusplus")
  353. cpp_quote("typedef struct DXTMTASKINFO" )
  354. cpp_quote("{")
  355. cpp_quote(" PFNDXTASKPROC pfnTaskProc; // Pointer to function to execute")
  356. cpp_quote(" PVOID pTaskData; // Pointer to argument data")
  357. cpp_quote(" PFNDXAPCPROC pfnCompletionAPC; // Pointer to completion APC proc")
  358. cpp_quote(" DWORD dwCompletionData; // Pointer to APC proc data")
  359. cpp_quote(" const GUID* pRequestID; // Used to identify groups of tasks")
  360. cpp_quote("} DXTMTASKINFO;")
  361. cpp_quote("#else")
  362. typedef struct DXTMTASKINFO
  363. {
  364. PVOID pfnTaskProc; // Pointer to function to execute
  365. PVOID pTaskData; // Pointer to argument data
  366. PVOID pfnCompletionAPC; // Pointer to completion APC proc
  367. DWORD dwCompletionData; // Pointer to APC proc data
  368. const GUID* pRequestID; // Used to identify groups of tasks
  369. } DXTMTASKINFO;
  370. cpp_quote("#endif")
  371. [
  372. object,
  373. uuid(254DBBC1-F922-11d0-883A-3C8B00C10000),
  374. helpstring("IDXTaskManager Interface"),
  375. pointer_default(unique),
  376. local
  377. ]
  378. interface IDXTaskManager : IUnknown
  379. {
  380. HRESULT QueryNumProcessors( [out]ULONG* pulNumProc );
  381. HRESULT SetThreadPoolSize( [in]ULONG ulNumThreads );
  382. HRESULT GetThreadPoolSize( [out]ULONG* pulNumThreads );
  383. HRESULT SetConcurrencyLimit( [in]ULONG ulNumThreads );
  384. HRESULT GetConcurrencyLimit( [out]ULONG* pulNumThreads );
  385. HRESULT ScheduleTasks( [in]DXTMTASKINFO TaskInfo[],
  386. [in]HANDLE Events[],
  387. [out]DWORD TaskIDs[],
  388. [in]ULONG ulNumTasks, [in]ULONG ulWaitPeriod );
  389. HRESULT TerminateTasks( [in]DWORD TaskIDs[], [in]ULONG ulCount,
  390. [in]ULONG ulTimeOut );
  391. HRESULT TerminateRequest( [in]REFIID RequestID, [in]ULONG ulTimeOut );
  392. };
  393. //+-----------------------------------------------------------------------------
  394. //
  395. // Sample structures (C++)
  396. //
  397. // Overview:
  398. // We want an operator so that we can cast from a DXSAMPLE to a DWORD, so
  399. // for C++ we will define the structure a special way.
  400. //
  401. //------------------------------------------------------------------------------
  402. cpp_quote("#ifdef __cplusplus")
  403. cpp_quote("/////////////////////////////////////////////////////")
  404. cpp_quote("")
  405. cpp_quote("class DXBASESAMPLE;")
  406. cpp_quote("class DXSAMPLE;")
  407. cpp_quote("class DXPMSAMPLE;")
  408. cpp_quote("")
  409. cpp_quote("/////////////////////////////////////////////////////")
  410. cpp_quote("")
  411. cpp_quote("class DXBASESAMPLE")
  412. cpp_quote("{")
  413. cpp_quote("public:")
  414. cpp_quote(" BYTE Blue;")
  415. cpp_quote(" BYTE Green;")
  416. cpp_quote(" BYTE Red;")
  417. cpp_quote(" BYTE Alpha;")
  418. cpp_quote(" DXBASESAMPLE() {}")
  419. cpp_quote(" DXBASESAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :")
  420. cpp_quote(" Alpha(alpha),")
  421. cpp_quote(" Red(red),")
  422. cpp_quote(" Green(green),")
  423. cpp_quote(" Blue(blue) {}")
  424. cpp_quote(" DXBASESAMPLE(const DWORD val) { *this = (*(DXBASESAMPLE *)&val); }")
  425. cpp_quote(" operator DWORD () const {return *((DWORD *)this); }")
  426. cpp_quote(" DWORD operator=(const DWORD val) { return *this = *((DXBASESAMPLE *)&val); }")
  427. cpp_quote("}; // DXBASESAMPLE")
  428. cpp_quote("")
  429. cpp_quote("/////////////////////////////////////////////////////")
  430. cpp_quote("")
  431. cpp_quote("class DXSAMPLE : public DXBASESAMPLE")
  432. cpp_quote("{")
  433. cpp_quote("public:")
  434. cpp_quote(" DXSAMPLE() {}")
  435. cpp_quote(" DXSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :")
  436. cpp_quote(" DXBASESAMPLE(alpha, red, green, blue) {}")
  437. cpp_quote(" DXSAMPLE(const DWORD val) { *this = (*(DXSAMPLE *)&val); }")
  438. cpp_quote(" operator DWORD () const {return *((DWORD *)this); }")
  439. cpp_quote(" DWORD operator=(const DWORD val) { return *this = *((DXSAMPLE *)&val); }")
  440. cpp_quote(" operator DXPMSAMPLE() const;")
  441. cpp_quote("}; // DXSAMPLE")
  442. cpp_quote("")
  443. cpp_quote("/////////////////////////////////////////////////////")
  444. cpp_quote("")
  445. cpp_quote("class DXPMSAMPLE : public DXBASESAMPLE")
  446. cpp_quote("{")
  447. cpp_quote("public:")
  448. cpp_quote(" DXPMSAMPLE() {}")
  449. cpp_quote(" DXPMSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :")
  450. cpp_quote(" DXBASESAMPLE(alpha, red, green, blue) {}")
  451. cpp_quote(" DXPMSAMPLE(const DWORD val) { *this = (*(DXPMSAMPLE *)&val); }")
  452. cpp_quote(" operator DWORD () const {return *((DWORD *)this); }")
  453. cpp_quote(" DWORD operator=(const DWORD val) { return *this = *((DXPMSAMPLE *)&val); }")
  454. cpp_quote(" operator DXSAMPLE() const;")
  455. cpp_quote("}; // DXPMSAMPLE")
  456. cpp_quote("")
  457. cpp_quote("//")
  458. cpp_quote("// The following cast operators are to prevent a direct assignment of a DXSAMPLE to a DXPMSAMPLE")
  459. cpp_quote("//")
  460. cpp_quote("inline DXSAMPLE::operator DXPMSAMPLE() const { return *((DXPMSAMPLE *)this); }")
  461. cpp_quote("inline DXPMSAMPLE::operator DXSAMPLE() const { return *((DXSAMPLE *)this); }")
  462. //+-----------------------------------------------------------------------------
  463. //
  464. // Sample structures (IDL, C)
  465. //
  466. //------------------------------------------------------------------------------
  467. cpp_quote("#else // !__cplusplus")
  468. typedef struct DXBASESAMPLE
  469. {
  470. BYTE Blue;
  471. BYTE Green;
  472. BYTE Red;
  473. BYTE Alpha;
  474. } DXBASESAMPLE;
  475. typedef struct DXSAMPLE
  476. {
  477. BYTE Blue;
  478. BYTE Green;
  479. BYTE Red;
  480. BYTE Alpha;
  481. } DXSAMPLE;
  482. typedef struct DXPMSAMPLE
  483. {
  484. BYTE Blue;
  485. BYTE Green;
  486. BYTE Red;
  487. BYTE Alpha;
  488. } DXPMSAMPLE;
  489. cpp_quote("#endif // !__cplusplus")
  490. //+-----------------------------------------------------------------------------
  491. //
  492. // DXRUNINFO structures.
  493. //
  494. //------------------------------------------------------------------------------
  495. typedef enum DXRUNTYPE
  496. {
  497. DXRUNTYPE_CLEAR = 0, // The run is zero Alpha
  498. DXRUNTYPE_OPAQUE = 1, // The run is full Alpha (i.e. 255)
  499. DXRUNTYPE_TRANS = 2, // The run is non-zero Alpha
  500. DXRUNTYPE_UNKNOWN= 3 // The run type is unknown. Caller must inspect.
  501. } DXRUNTYPE;
  502. const ULONG DX_MAX_RUN_INFO_COUNT = 128; // Defines the maximum number of RUNINFOs in a single row
  503. cpp_quote("// Ignore the definition used by MIDL for TLB generation")
  504. cpp_quote("#if 0")
  505. typedef struct DXRUNINFO
  506. {
  507. ULONG Bitfields;
  508. } DXRUNINFO;
  509. cpp_quote("#endif // 0")
  510. // Emit the C definition to the H file directly, as bit fields are not
  511. // supported by MIDL.
  512. cpp_quote("typedef struct DXRUNINFO")
  513. cpp_quote("{")
  514. cpp_quote(" ULONG Type : 2; // Type")
  515. cpp_quote(" ULONG Count : 30; // Number of samples in run")
  516. cpp_quote("} DXRUNINFO;")
  517. typedef enum DXSFCREATE
  518. {
  519. DXSF_FORMAT_IS_CLSID = ( 1L << 0 ),
  520. DXSF_NO_LAZY_DDRAW_LOCK = ( 1L << 1 )
  521. } DXSFCREATE;
  522. typedef enum DXBLTOPTIONS
  523. {
  524. DXBOF_DO_OVER = (1L << 0),
  525. DXBOF_DITHER = (1L << 1)
  526. } DXBLTOPTIONS;
  527. //+-----------------------------------------------------------------------------
  528. //
  529. // IDXSurfaceModifier
  530. //
  531. //------------------------------------------------------------------------------
  532. [
  533. object,
  534. uuid(144946F5-C4D4-11d1-81D1-0000F87557DB),
  535. helpstring("IDXSurfaceFactory Interface"),
  536. pointer_default(unique),
  537. local
  538. ]
  539. interface IDXSurfaceFactory : IUnknown
  540. {
  541. HRESULT CreateSurface([in] IUnknown *pDirectDraw,
  542. [in] const DDSURFACEDESC * pDDSurfaceDesc,
  543. [in] const GUID * pFormatID,
  544. [in] const DXBNDS *pBounds,
  545. [in] DWORD dwFlags,
  546. [in] IUnknown *punkOuter,
  547. [in] REFIID riid,
  548. [out, iid_is( riid )] void ** ppDXSurface);
  549. HRESULT CreateFromDDSurface([in] IUnknown *pDDrawSurface,
  550. [in] const GUID *pFormatID,
  551. [in] DWORD dwFlags,
  552. [in] IUnknown *punkOuter,
  553. [in] REFIID riid,
  554. [out, iid_is( riid )] void ** ppDXSurface);
  555. HRESULT LoadImage(
  556. [in] const LPWSTR pszFileName,
  557. [in] IUnknown *pDirectDraw,
  558. [in] const DDSURFACEDESC * pDDSurfaceDesc,
  559. [in] const GUID *pFormatID,
  560. [in] REFIID riid,
  561. [out, iid_is( riid )] void ** ppDXSurface);
  562. HRESULT LoadImageFromStream([in] IStream *pStream,
  563. [in] IUnknown *pDirectDraw,
  564. [in] const DDSURFACEDESC * pDDSurfaceDesc,
  565. [in] const GUID *pFormatID,
  566. [in] REFIID riid,
  567. [out, iid_is( riid )] void ** ppDXSurface);
  568. HRESULT CopySurfaceToNewFormat( [in]IDXSurface* pSrc,
  569. [in] IUnknown *pDirectDraw,
  570. [in] const DDSURFACEDESC * pDDSurfaceDesc,
  571. [in] const GUID *pDestFormatID,
  572. [out] IDXSurface** ppNewSurface );
  573. HRESULT CreateD3DRMTexture([in] IDXSurface *pSrc,
  574. [in] IUnknown *pDirectDraw,
  575. [in] IUnknown *pD3DRM3,
  576. [in] REFIID riid,
  577. [out, iid_is(riid)] void **ppTexture3);
  578. HRESULT BitBlt([in] IDXSurface *pDest,
  579. [in] const DXVEC *pPlacement,
  580. [in] IDXSurface *pSrc,
  581. [in] const DXBNDS *pClipBounds,
  582. [in] DWORD dwFlags);
  583. };
  584. //+-----------------------------------------------------------------------------
  585. //
  586. // IDXSurfaceModifier
  587. //
  588. //------------------------------------------------------------------------------
  589. typedef enum DXSURFMODCOMPOP
  590. {
  591. DXSURFMOD_COMP_OVER = 0,
  592. DXSURFMOD_COMP_ALPHA_MASK = 1,
  593. DXSURFMOD_COMP_MAX_VALID = 1
  594. } DXSURFMODCOMPOP;
  595. [
  596. object,
  597. uuid(9EA3B637-C37D-11d1-905E-00C04FD9189D),
  598. helpstring("IDXSurfaceModifier Interface"),
  599. pointer_default(unique),
  600. local
  601. ]
  602. interface IDXSurfaceModifier : IUnknown
  603. {
  604. HRESULT SetFillColor([in] DXSAMPLE Color);
  605. HRESULT GetFillColor([out] DXSAMPLE *pColor);
  606. HRESULT SetBounds([in] const DXBNDS *pBounds ); // Get supported though IDXSurface interface
  607. HRESULT SetBackground([in] IDXSurface *pSurface);
  608. HRESULT GetBackground([out] IDXSurface **ppSurface);
  609. HRESULT SetCompositeOperation([in] DXSURFMODCOMPOP CompOp);
  610. HRESULT GetCompositeOperation([out] DXSURFMODCOMPOP *pCompOp);
  611. //
  612. // The following methods only apply to the FOREGROUND surface
  613. //
  614. HRESULT SetForeground([in] IDXSurface *pSurface, [in] BOOL bTile, [in] const POINT * pOrigin);
  615. HRESULT GetForeground([out] IDXSurface **ppSurface, [out] BOOL *pbTile, [out] POINT * pOrigin);
  616. HRESULT SetOpacity([in] float Opacity);
  617. HRESULT GetOpacity([out] float *pOpacity);
  618. HRESULT SetLookup( [in]IDXLookupTable * pLookupTable );
  619. HRESULT GetLookup( [out]IDXLookupTable ** ppLookupTable );
  620. };
  621. //+-----------------------------------------------------------------------------
  622. //
  623. // IDXSurface
  624. //
  625. //------------------------------------------------------------------------------
  626. typedef enum DXSAMPLEFORMATENUM
  627. {
  628. DXPF_FLAGSMASK = (0xFFFF0000), // Top word is flags, low word is enum
  629. DXPF_NONPREMULT = (0x00010000), // Flags to be OR'd with pixel formats
  630. DXPF_TRANSPARENCY = (0x00020000), // Color key or one-bit alpha (alpha only 0 or 0xFF)
  631. DXPF_TRANSLUCENCY = (0x00040000), // Alpha can be any value from 0->0xFF
  632. //
  633. // This 3-bit field is used to determine what type of dithering to be used
  634. //
  635. DXPF_2BITERROR = (0x00200000), // 2 bits of error term
  636. DXPF_3BITERROR = (0x00300000), // 3 bits of error term for color (16-bit color)
  637. DXPF_4BITERROR = (0x00400000), // 4 bits of error term (ARGB 4444)
  638. DXPF_5BITERROR = (0x00500000), // 5 bits of error term for color (8-bit color)
  639. DXPF_ERRORMASK = (0x00700000), // Mask of bits used for dithering
  640. DXPF_NONSTANDARD = (0), // To be used for any surface that is not one of the following formats
  641. // This can be combined with DXPFNONPREMULT if the surface can work
  642. // better in non-premultiplied space.
  643. DXPF_PMARGB32 = (1 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY),
  644. DXPF_ARGB32 = (2 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY),
  645. DXPF_ARGB4444 = (3 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY | DXPF_4BITERROR),
  646. DXPF_A8 = (4 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY),
  647. DXPF_RGB32 = (5),
  648. DXPF_RGB24 = (6),
  649. DXPF_RGB565 = (7 | DXPF_3BITERROR),
  650. DXPF_RGB555 = (8 | DXPF_3BITERROR),
  651. DXPF_RGB8 = (9 | DXPF_5BITERROR),
  652. DXPF_ARGB1555 = (10 | DXPF_TRANSPARENCY | DXPF_3BITERROR),
  653. DXPF_RGB32_CK = (DXPF_RGB32 | DXPF_TRANSPARENCY),
  654. DXPF_RGB24_CK = (DXPF_RGB24 | DXPF_TRANSPARENCY),
  655. DXPF_RGB555_CK = (DXPF_RGB555 | DXPF_TRANSPARENCY),
  656. DXPF_RGB565_CK = (DXPF_RGB565 | DXPF_TRANSPARENCY),
  657. DXPF_RGB8_CK = (DXPF_RGB8 | DXPF_TRANSPARENCY)
  658. } DXSAMPLEFORMATENUM;
  659. typedef enum DXLOCKSURF
  660. {
  661. DXLOCKF_READ = 0,
  662. DXLOCKF_READWRITE = (1 << 0),
  663. DXLOCKF_EXISTINGINFOONLY = (1 << 1), // If used in conjunction with WANTRUNINFO will prevent creation of a runmap if one does not exist
  664. DXLOCKF_WANTRUNINFO = (1 << 2),
  665. //
  666. // The flags in the high word should be specific to the type of pointer that
  667. // is requested. These flags define ARGB flags. These flags are advisory and
  668. // are not required to be set for ARGB locks.
  669. //
  670. DXLOCKF_NONPREMULT = (1 << 16), // Caller will request non-premultiplied data
  671. DXLOCKF_VALIDFLAGS = (DXLOCKF_READWRITE | DXLOCKF_EXISTINGINFOONLY | DXLOCKF_WANTRUNINFO | DXLOCKF_NONPREMULT)
  672. } DXLOCKSURF;
  673. typedef enum DXSURFSTATUS
  674. {
  675. DXSURF_TRANSIENT = (1 << 0), // Data in this surface changes often.
  676. DXSURF_READONLY = (1 << 1), // Surface is read-only
  677. DXSURF_VALIDFLAGS = (DXSURF_TRANSIENT | DXSURF_READONLY)
  678. } DXSURFSTATUS;
  679. [
  680. object,
  681. uuid(B39FD73F-E139-11d1-9065-00C04FD9189D),
  682. helpstring("IDXSurface Interface"),
  683. pointer_default(unique),
  684. local
  685. ]
  686. interface IDXSurface : IDXBaseObject
  687. {
  688. HRESULT GetPixelFormat([out] GUID * pFormatID, [out] DXSAMPLEFORMATENUM *pSampleFormatEnum);
  689. HRESULT GetBounds( [out]DXBNDS *pBounds );
  690. HRESULT GetStatusFlags([out] DWORD * pdwStatusFlags);
  691. HRESULT SetStatusFlags([in] DWORD dwStatusFlags);
  692. HRESULT LockSurface( [in]const DXBNDS *pBounds, [in]ULONG ulTimeOut, [in]DWORD dwFlags,
  693. [in]REFIID riid, [out, iid_is(riid)] void **ppPointer,
  694. [out]ULONG* pulGenerationId );
  695. HRESULT GetDirectDrawSurface( [in] REFIID riid,
  696. [out, iid_is(riid)] void ** ppSurface);
  697. HRESULT GetColorKey(DXSAMPLE * pColorKey); // Can return E_NOTIMPL
  698. HRESULT SetColorKey(DXSAMPLE ColorKey); // Set color of 0 to get rid of color key, can return E_NOTIMPL
  699. HRESULT LockSurfaceDC( [in] const DXBNDS *pBounds, [in]ULONG ulTimeOut, [in] DWORD dwFlags,
  700. [out] IDXDCLock **ppDCLock);
  701. HRESULT SetAppData(DWORD_PTR dwAppData);
  702. HRESULT GetAppData(DWORD_PTR *pdwAppData);
  703. };
  704. //+-----------------------------------------------------------------------------
  705. //
  706. // IDXSurfaceInit
  707. //
  708. //------------------------------------------------------------------------------
  709. [
  710. object,
  711. uuid(9EA3B639-C37D-11d1-905E-00C04FD9189D),
  712. helpstring("IDXSurfaceInit Interface"),
  713. pointer_default(unique),
  714. local
  715. ]
  716. interface IDXSurfaceInit : IUnknown
  717. {
  718. HRESULT InitSurface([in] IUnknown *pDirectDraw,
  719. [in] const DDSURFACEDESC *pDDSurfaceDesc,
  720. [in] const GUID * pFormatID,
  721. [in] const DXBNDS *pBounds,
  722. [in] DWORD dwFlags);
  723. };
  724. //+-----------------------------------------------------------------------------
  725. //
  726. // IDXARGBSurfaceInit
  727. //
  728. //------------------------------------------------------------------------------
  729. [
  730. object,
  731. uuid(9EA3B63A-C37D-11d1-905E-00C04FD9189D),
  732. helpstring("IDXARGBSurfaceInit Interface"),
  733. pointer_default(unique),
  734. local
  735. ]
  736. interface IDXARGBSurfaceInit : IDXSurfaceInit
  737. {
  738. HRESULT InitFromDDSurface( [in] IUnknown *pDDrawSurface,
  739. [in] const GUID * pFormatID,
  740. [in] DWORD dwFlags);
  741. HRESULT InitFromRawSurface([in] IDXRawSurface *pRawSurface);
  742. };
  743. //+-----------------------------------------------------------------------------
  744. //
  745. // IDXARGBReadPtr
  746. //
  747. //------------------------------------------------------------------------------
  748. typedef struct tagDXNATIVETYPEINFO
  749. {
  750. BYTE * pCurrentData;
  751. BYTE * pFirstByte;
  752. long lPitch;
  753. DWORD dwColorKey;
  754. } DXNATIVETYPEINFO;
  755. typedef struct tagDXPACKEDRECTDESC
  756. {
  757. DXBASESAMPLE *pSamples;
  758. BOOL bPremult;
  759. RECT rect;
  760. long lRowPadding;
  761. } DXPACKEDRECTDESC;
  762. typedef struct tagDXOVERSAMPLEDESC
  763. {
  764. POINT p;
  765. DXPMSAMPLE Color;
  766. } DXOVERSAMPLEDESC;
  767. [
  768. object,
  769. uuid(EAAAC2D6-C290-11d1-905D-00C04FD9189D),
  770. helpstring("IDXARGBReadPtr Interface"),
  771. pointer_default(unique),
  772. local
  773. ]
  774. interface IDXARGBReadPtr : IUnknown
  775. {
  776. HRESULT GetSurface( [in]REFIID riid, [out, iid_is( riid )]void ** ppSurface);
  777. DXSAMPLEFORMATENUM GetNativeType( [out]DXNATIVETYPEINFO *pInfo );
  778. void Move( [in]long cSamples );
  779. void MoveToRow( [in]ULONG y );
  780. void MoveToXY( [in]ULONG x, [in]ULONG y);
  781. ULONG MoveAndGetRunInfo( [in]ULONG Row, [out] const DXRUNINFO** ppInfo ); // Returns count of runs
  782. DXSAMPLE * Unpack( [in]DXSAMPLE* pSamples, [in]ULONG cSamples, [in]BOOL bMove );
  783. DXPMSAMPLE * UnpackPremult( [in]DXPMSAMPLE* pSamples, [in]ULONG cSamples, [in]BOOL bMove );
  784. void UnpackRect([in] const DXPACKEDRECTDESC * pRectDesc);
  785. };
  786. //+-----------------------------------------------------------------------------
  787. //
  788. // IDXARGBReadWritePtr
  789. //
  790. //------------------------------------------------------------------------------
  791. [
  792. object,
  793. uuid(EAAAC2D7-C290-11d1-905D-00C04FD9189D),
  794. helpstring("IDXARGBReadWritePtr Interface"),
  795. pointer_default(unique),
  796. local
  797. ]
  798. interface IDXARGBReadWritePtr : IDXARGBReadPtr
  799. {
  800. void PackAndMove( [in]const DXSAMPLE *pSamples, [in]ULONG cSamples );
  801. void PackPremultAndMove( [in]const DXPMSAMPLE *pSamples, [in]ULONG cSamples );
  802. void PackRect([in]const DXPACKEDRECTDESC *pRectDesc);
  803. void CopyAndMoveBoth( [in]DXBASESAMPLE *pScratchBuffer, [in]IDXARGBReadPtr *pSrc,
  804. [in]ULONG cSamples, [in]BOOL bIsOpaque );
  805. void CopyRect( [in] DXBASESAMPLE *pScratchBuffer,
  806. [in] const RECT *pDestRect, [in]IDXARGBReadPtr *pSrc,
  807. [in] const POINT *pSrcOrigin, [in]BOOL bIsOpaque);
  808. void FillAndMove( [in]DXBASESAMPLE *pScratchBuffer, [in]DXPMSAMPLE SampVal,
  809. [in]ULONG cSamples, [in]BOOL bDoOver );
  810. void FillRect( [in]const RECT *pRect, [in]DXPMSAMPLE SampVal, [in]BOOL bDoOver );
  811. void OverSample( [in]const DXOVERSAMPLEDESC * pOverDesc);
  812. void OverArrayAndMove([in]DXBASESAMPLE *pScratchBuffer,
  813. [in] const DXPMSAMPLE *pSrc,
  814. [in] ULONG cSamples);
  815. };
  816. //+-----------------------------------------------------------------------------
  817. //
  818. // IDXDCLock
  819. //
  820. //------------------------------------------------------------------------------
  821. [
  822. object,
  823. uuid(0F619456-CF39-11d1-905E-00C04FD9189D),
  824. helpstring("IDXDCLock Interface"),
  825. pointer_default(unique),
  826. local
  827. ]
  828. interface IDXDCLock : IUnknown
  829. {
  830. HDC GetDC(void);
  831. };
  832. //+-----------------------------------------------------------------------------
  833. //
  834. // IDXTScaleOutput
  835. //
  836. // Overview:
  837. // Generic interface that any transform can support which allows caller to
  838. // specify the desired output bounds.
  839. //------------------------------------------------------------------------------
  840. [
  841. object,
  842. uuid(B2024B50-EE77-11d1-9066-00C04FD9189D),
  843. helpstring("IDXTScaleOutput Interface"),
  844. pointer_default(unique),
  845. local
  846. ]
  847. interface IDXTScaleOutput : IUnknown
  848. {
  849. HRESULT SetOutputSize([in] const SIZE OutSize, [in] BOOL bMaintainAspect);
  850. };
  851. //+-----------------------------------------------------------------------------
  852. //
  853. // IDXGradient
  854. //
  855. //------------------------------------------------------------------------------
  856. [
  857. object,
  858. uuid(B2024B51-EE77-11d1-9066-00C04FD9189D),
  859. helpstring("IDXGradient Interface"),
  860. pointer_default(unique),
  861. local
  862. ]
  863. interface IDXGradient : IDXTScaleOutput
  864. {
  865. HRESULT SetGradient(DXSAMPLE StartColor, DXSAMPLE EndColor, BOOL bHorizontal);
  866. HRESULT GetOutputSize([out] SIZE *pOutSize);
  867. };
  868. //+-----------------------------------------------------------------------------
  869. //
  870. // IDXTScale
  871. //
  872. // Overview:
  873. // This is the control interface for the simple scale transform.
  874. //
  875. //------------------------------------------------------------------------------
  876. [
  877. object,
  878. uuid(B39FD742-E139-11d1-9065-00C04FD9189D),
  879. helpstring("IDXTScale Interface"),
  880. pointer_default(unique),
  881. local
  882. ]
  883. interface IDXTScale : IUnknown
  884. {
  885. HRESULT SetScales( [in]float Scales[2] );
  886. HRESULT GetScales( [out]float Scales[2] );
  887. HRESULT ScaleFitToSize( [in,out]DXBNDS* pClipBounds,
  888. [in]SIZE FitToSize, [in]BOOL bMaintainAspect );
  889. };
  890. //+-----------------------------------------------------------------------------
  891. //
  892. // IDXEffect
  893. //
  894. // Overview:
  895. // This interface is used to generically control transforms that are
  896. // transition effects.
  897. //
  898. //------------------------------------------------------------------------------
  899. typedef enum DISPIDDXEFFECT
  900. {
  901. DISPID_DXECAPABILITIES = 10000, // Start at 10000 to avoid conflicts with inhereted interfaces
  902. DISPID_DXEPROGRESS,
  903. DISPID_DXESTEP,
  904. DISPID_DXEDURATION,
  905. DISPID_DXE_NEXT_ID
  906. } DISPIDDXBOUNDEDEFFECT;
  907. typedef enum DXEFFECTTYPE
  908. {
  909. DXTET_PERIODIC = (1 << 0), // Result at 1 is same as result at 0
  910. DXTET_MORPH = (1 << 1) // Transition between 2 inputs (input 0 to input 1)
  911. } DXEFFECTTYPE;
  912. [
  913. object,
  914. uuid(E31FB81B-1335-11d1-8189-0000F87557DB),
  915. helpstring("IDXEffect Interface"),
  916. pointer_default(unique),
  917. dual
  918. ]
  919. interface IDXEffect : IDispatch
  920. {
  921. [propget, id(DISPID_DXECAPABILITIES)]
  922. HRESULT Capabilities([out, retval] long *pVal);
  923. [propget, id(DISPID_DXEPROGRESS)]
  924. HRESULT Progress([out, retval] float *pVal);
  925. [propput, id(DISPID_DXEPROGRESS)]
  926. HRESULT Progress([in] float newVal);
  927. [propget, id(DISPID_DXESTEP)]
  928. HRESULT StepResolution([out, retval] float *pVal);
  929. [propget, id(DISPID_DXEDURATION)]
  930. HRESULT Duration([out, retval] float *pVal);
  931. [propput, id(DISPID_DXEDURATION)]
  932. HRESULT Duration([in] float newVal);
  933. };
  934. //+-----------------------------------------------------------------------------
  935. //
  936. // IDXLookupTable
  937. //
  938. //------------------------------------------------------------------------------
  939. [
  940. object,
  941. uuid(01BAFC7F-9E63-11d1-9053-00C04FD9189D),
  942. helpstring("IDXLookupTable Interface"),
  943. pointer_default(unique),
  944. local
  945. ]
  946. interface IDXLookupTable : IDXBaseObject
  947. {
  948. HRESULT GetTables( [out]BYTE RedLUT[256],
  949. [out]BYTE GreenLUT[256],
  950. [out]BYTE BlueLUT[256],
  951. [out]BYTE AlphaLUT[256] );
  952. HRESULT IsChannelIdentity([out] DXBASESAMPLE * pSampleBools);
  953. HRESULT GetIndexValues([in] ULONG Index, [out] DXBASESAMPLE *pSample);
  954. HRESULT ApplyTables([in, out] DXSAMPLE *pSamples, [in] ULONG cSamples);
  955. };
  956. //+-----------------------------------------------------------------------------
  957. //
  958. // IDXRawSurface
  959. //
  960. // Overview:
  961. // User created objects support IDXRawSurface
  962. //
  963. //------------------------------------------------------------------------------
  964. typedef struct DXRAWSURFACEINFO
  965. {
  966. BYTE * pFirstByte;
  967. long lPitch;
  968. ULONG Width;
  969. ULONG Height;
  970. const GUID * pPixelFormat;
  971. HDC hdc;
  972. DWORD dwColorKey; // Note: High byte must == 0xFF for color keyed surface. Low 3 bytes are native data type.
  973. DXBASESAMPLE * pPalette;
  974. } DXRAWSURFACEINFO;
  975. [
  976. object,
  977. uuid(09756C8A-D96A-11d1-9062-00C04FD9189D),
  978. helpstring("IDXRawSurface Interface"),
  979. pointer_default(unique),
  980. local
  981. ]
  982. interface IDXRawSurface : IUnknown
  983. {
  984. HRESULT GetSurfaceInfo(DXRAWSURFACEINFO * pSurfaceInfo);
  985. };
  986. //+-----------------------------------------------------------------------------
  987. //
  988. // IHTMLDXTransform
  989. //
  990. //------------------------------------------------------------------------------
  991. [
  992. object,
  993. uuid(30E2AB7D-4FDD-4159-B7EA-DC722BF4ADE5),
  994. helpstring("IHTMLDXTransform Interface"),
  995. pointer_default(unique),
  996. local
  997. ]
  998. interface IHTMLDXTransform : IUnknown
  999. {
  1000. HRESULT SetHostUrl(BSTR bstrHostUrl);
  1001. };
  1002. //+-----------------------------------------------------------------------------
  1003. //
  1004. // ICSSFilterDispatch
  1005. //
  1006. //------------------------------------------------------------------------------
  1007. typedef enum DXTFILTER_STATUS
  1008. {
  1009. DXTFILTER_STATUS_Stopped = 0,
  1010. DXTFILTER_STATUS_Applied,
  1011. DXTFILTER_STATUS_Playing,
  1012. DXTFILTER_STATUS_MAX
  1013. } DXTFILTER_STATUS;
  1014. typedef enum DXTFILTER_DISPID
  1015. {
  1016. DISPID_DXTFilter_Percent = 1,
  1017. DISPID_DXTFilter_Duration,
  1018. DISPID_DXTFilter_Enabled,
  1019. DISPID_DXTFilter_Status,
  1020. DISPID_DXTFilter_Apply,
  1021. DISPID_DXTFilter_Play,
  1022. DISPID_DXTFilter_Stop,
  1023. DISPID_DXTFilter_MAX
  1024. } DXTFILTER_DISPID;
  1025. [
  1026. object,
  1027. uuid(9519152B-9484-4A6C-B6A7-4F25E92D6C6B),
  1028. helpstring("ICSSFilterDispatch Interface"),
  1029. pointer_default(unique),
  1030. dual
  1031. ]
  1032. interface ICSSFilterDispatch : IDispatch
  1033. {
  1034. [propget, id(DISPID_DXTFilter_Percent)] HRESULT Percent( [out, retval] float *pVal);
  1035. [propput, id(DISPID_DXTFilter_Percent)] HRESULT Percent( [in] float newVal);
  1036. [propget, id(DISPID_DXTFilter_Duration)] HRESULT Duration([out, retval] float *pVal);
  1037. [propput, id(DISPID_DXTFilter_Duration)] HRESULT Duration([in] float newVal);
  1038. [propget, id(DISPID_DXTFilter_Enabled)] HRESULT Enabled( [out, retval] VARIANT_BOOL *pfVal);
  1039. [propput, id(DISPID_DXTFilter_Enabled)] HRESULT Enabled( [in] VARIANT_BOOL fVal);
  1040. [propget, id(DISPID_DXTFilter_Status)] HRESULT Status( [out, retval] DXTFILTER_STATUS * peVal);
  1041. [id(DISPID_DXTFilter_Apply)] HRESULT Apply();
  1042. [id(DISPID_DXTFilter_Play)] HRESULT Play([in, optional] VARIANT varDuration);
  1043. [id(DISPID_DXTFilter_Stop)] HRESULT Stop();
  1044. };
  1045. //=== CoClass definitions =================================================
  1046. [
  1047. uuid(54314D1D-35FE-11d1-81A1-0000F87557DB),
  1048. version(1.1),
  1049. helpstring("Microsoft DirectX Transforms Core Type Library")
  1050. ]
  1051. library DXTRANSLib
  1052. {
  1053. importlib("stdole2.tlb");
  1054. ///////////////////////////////
  1055. // DXTransformFactory CoClass
  1056. ///////////////////////////////
  1057. [
  1058. uuid(D1FE6762-FC48-11D0-883A-3C8B00C10000),
  1059. helpstring("DXTransformFactory Class")
  1060. ]
  1061. coclass DXTransformFactory
  1062. {
  1063. [default] interface IDXTransformFactory;
  1064. interface IDXSurfaceFactory;
  1065. };
  1066. ///////////////////////////////
  1067. // DXTaskManager CoClass
  1068. ///////////////////////////////
  1069. [
  1070. uuid(4CB26C03-FF93-11d0-817E-0000F87557DB),
  1071. helpstring("DXTaskManager Class")
  1072. ]
  1073. coclass DXTaskManager
  1074. {
  1075. [default] interface IDXTaskManager;
  1076. };
  1077. ///////////////////////////////
  1078. // DXTScale CoClass
  1079. ///////////////////////////////
  1080. [
  1081. uuid(555278E2-05DB-11D1-883A-3C8B00C10000),
  1082. helpstring("DXTScale Class")
  1083. ]
  1084. coclass DXTScale
  1085. {
  1086. [default] interface IDXTScale;
  1087. };
  1088. ///////////////////////////////
  1089. // DXSurface CoClass
  1090. ///////////////////////////////
  1091. [
  1092. uuid(0E890F83-5F79-11D1-9043-00C04FD9189D),
  1093. helpstring("DXSurface Class")
  1094. ]
  1095. coclass DXSurface
  1096. {
  1097. [default] interface IDXSurface;
  1098. };
  1099. ///////////////////////////////
  1100. // DXSurfaceModifier CoClass
  1101. ///////////////////////////////
  1102. [
  1103. uuid(3E669F1D-9C23-11d1-9053-00C04FD9189D),
  1104. helpstring("DXSurfaceModifier Class")
  1105. ]
  1106. coclass DXSurfaceModifier
  1107. {
  1108. [default] interface IDXSurfaceModifier;
  1109. };
  1110. ///////////////////////////////
  1111. // DXGradient CoClass
  1112. ///////////////////////////////
  1113. [
  1114. uuid(C6365470-F667-11d1-9067-00C04FD9189D),
  1115. helpstring("DXGradient Class")
  1116. ]
  1117. coclass DXGradient
  1118. {
  1119. [default] interface IDXGradient;
  1120. };
  1121. ///////////////////////////////
  1122. // DXTFilter CoClass
  1123. ///////////////////////////////
  1124. [
  1125. uuid(385A91BC-1E8A-4e4a-A7A6-F4FC1E6CA1BD),
  1126. helpstring("DXTFilter Class")
  1127. ]
  1128. coclass DXTFilter
  1129. {
  1130. [default] interface ICSSFilterDispatch;
  1131. };
  1132. };