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.

1244 lines
42 KiB

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