/[cvs]/api/include/DShowIDL/dxtrans.idl
ViewVC logotype

Annotation of /api/include/DShowIDL/dxtrans.idl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (23 years, 5 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
First import

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

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26