📄 dxtrans.idl
字号:
//------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation 1997-2001
// All rights reserved.
//
// File: dxtrans.idl
//
// Overview:
// This is the IDL file for DirectX installable transform coclass,
// interface, and type definitions.
//
//------------------------------------------------------------------------------
cpp_quote("#include <servprov.h>")
cpp_quote("#include <ddraw.h>")
cpp_quote("#include <d3d.h>")
cpp_quote("#include <d3drm.h>")
cpp_quote("#include <urlmon.h>")
//--- Import base idl
import "oaidl.idl";
import "ocidl.idl";
import "servprov.idl";
import "comcat.idl";
//
// Since direct draw does not have an IDL, we'll define DDSURFACEDESC to
// be a void, but include ddraw.h in the header file. This makes MIDL happy.
//
#ifndef DDSURFACEDESC
cpp_quote("#if 0")
cpp_quote("// Bogus definition used to make MIDL compiler happy")
typedef void DDSURFACEDESC;
typedef void D3DRMBOX;
typedef void D3DVECTOR;
typedef void D3DRMMATRIX4D;
typedef void* LPSECURITY_ATTRIBUTES;
cpp_quote("#endif")
#endif
//--- Additional includes
//--- Export
cpp_quote( "#ifdef _DXTRANSIMPL")
cpp_quote( " #define _DXTRANS_IMPL_EXT _declspec(dllexport)")
cpp_quote( "#else")
cpp_quote( " #define _DXTRANS_IMPL_EXT _declspec(dllimport)")
cpp_quote( "#endif")
//=== Forward References ====================================================
interface IDXTransformFactory;
interface IDXTransform;
interface IDXTaskManager;
interface IDXSurfaceFactory;
interface IDXSurface;
interface IDXARGBSurfaceInit;
interface IDXRawSurface;
interface IDXARGBReadPtr;
interface IDXARGBReadWritePtr;
interface IDXDCLock;
interface IDXTScale;
interface IDXLookupTable;
interface IDXTBindHost;
interface IBindHost;
interface IDXTScaleOutput;
interface IDXGradient;
/////////////////////////////////////////////////////////////////////////////
//
// Windows XP vs. DirectX 8.0 header merge
//
// Separate the updated Windows XP version of this header from the downlevel
// version that shipped with the DirectX 8.0 SDK. Since development
// on BDA technology continued for Windows XP, some changes were made to
// this file in order to improve the interface and functionality.
//
// To maintain compatibility with older applications which rely on the
// DirectX 8.0 versions of these files, the DirectX 8.1 version includes
// both the Windows XP content and the DirectX 8.0 content, which are
// separated by the #if (WINVER >= 0x501) preprocessor directive.
//
// Therefore, if you define WINVER to be 0x501 to specify Windows XP,
// the revised content will be compiled. Otherwise, the original
// DirectX 8.0 content will be used.
//
/////////////////////////////////////////////////////////////////////////////
#if (WINVER >= 0x501) // Windows XP content
//=== Constants =============================================================
cpp_quote("//")
cpp_quote("// All GUIDs for DXTransform are declared in DXTGUID.C in the SDK include directory")
cpp_quote("//")
cpp_quote("EXTERN_C const GUID DDPF_RGB1;")
cpp_quote("EXTERN_C const GUID DDPF_RGB2;")
cpp_quote("EXTERN_C const GUID DDPF_RGB4;")
cpp_quote("EXTERN_C const GUID DDPF_RGB8;")
cpp_quote("EXTERN_C const GUID DDPF_RGB332;")
cpp_quote("EXTERN_C const GUID DDPF_ARGB4444;")
cpp_quote("EXTERN_C const GUID DDPF_RGB565;")
cpp_quote("EXTERN_C const GUID DDPF_BGR565;")
cpp_quote("EXTERN_C const GUID DDPF_RGB555;")
cpp_quote("EXTERN_C const GUID DDPF_ARGB1555;")
cpp_quote("EXTERN_C const GUID DDPF_RGB24;")
cpp_quote("EXTERN_C const GUID DDPF_BGR24;")
cpp_quote("EXTERN_C const GUID DDPF_RGB32;")
cpp_quote("EXTERN_C const GUID DDPF_BGR32;")
cpp_quote("EXTERN_C const GUID DDPF_ABGR32;")
cpp_quote("EXTERN_C const GUID DDPF_ARGB32;")
cpp_quote("EXTERN_C const GUID DDPF_PMARGB32;")
cpp_quote("EXTERN_C const GUID DDPF_A1;")
cpp_quote("EXTERN_C const GUID DDPF_A2;")
cpp_quote("EXTERN_C const GUID DDPF_A4;")
cpp_quote("EXTERN_C const GUID DDPF_A8;")
cpp_quote("EXTERN_C const GUID DDPF_Z8;")
cpp_quote("EXTERN_C const GUID DDPF_Z16;")
cpp_quote("EXTERN_C const GUID DDPF_Z24;")
cpp_quote("EXTERN_C const GUID DDPF_Z32;")
cpp_quote("//")
cpp_quote("// Component categories")
cpp_quote("//")
cpp_quote("EXTERN_C const GUID CATID_DXImageTransform;")
cpp_quote("EXTERN_C const GUID CATID_DX3DTransform;")
cpp_quote("EXTERN_C const GUID CATID_DXAuthoringTransform;")
cpp_quote("EXTERN_C const GUID CATID_DXSurface;")
cpp_quote("//")
cpp_quote("// Service IDs")
cpp_quote("//")
cpp_quote("EXTERN_C const GUID SID_SDirectDraw;")
cpp_quote("EXTERN_C const GUID SID_SDirect3DRM;")
cpp_quote("#define SID_SDXTaskManager CLSID_DXTaskManager")
cpp_quote("#define SID_SDXSurfaceFactory IID_IDXSurfaceFactory")
cpp_quote("#define SID_SDXTransformFactory IID_IDXTransformFactory")
cpp_quote("//")
cpp_quote("// DXTransforms Core Type Library Version Info")
cpp_quote("//")
cpp_quote("#define DXTRANS_TLB_MAJOR_VER 1")
cpp_quote("#define DXTRANS_TLB_MINOR_VER 1")
//=== Struct & Enum definitions =============================================
//=== Interface definitions =================================================
//+-----------------------------------------------------------------------------
//
// IDXBaseObject
//
//------------------------------------------------------------------------------
[
object,
uuid(17B59B2B-9CC8-11d1-9053-00C04FD9189D),
helpstring("IDXBaseObject Interface"),
pointer_default(unique),
local
]
interface IDXBaseObject : IUnknown
{
HRESULT GetGenerationId( [out]ULONG *pID);
HRESULT IncrementGenerationId([in] BOOL bRefresh);
HRESULT GetObjectSize( [out] ULONG *pcbSize);
};
//+-----------------------------------------------------------------------------
//
// Bounding rectangle and vector structures.
//
//------------------------------------------------------------------------------
//--- Dimension identifiers
typedef enum DXBNDID
{
DXB_X = 0,
DXB_Y = 1,
DXB_Z = 2,
DXB_T = 3
} DXBNDID;
//--- Bound types
typedef enum DXBNDTYPE
{
DXBT_DISCRETE,
DXBT_DISCRETE64,
DXBT_CONTINUOUS,
DXBT_CONTINUOUS64
} DXBNDTYPE;
//--- Discrete bounds (image & sound)
typedef struct DXDBND
{
long Min;
long Max;
} DXDBND;
typedef DXDBND DXDBNDS[4];
typedef struct DXDBND64
{
LONGLONG Min;
LONGLONG Max;
} DXDBND64;
typedef DXDBND64 DXDBNDS64[4];
//--- Continuous bounds (geometry)
typedef struct DXCBND
{
float Min;
float Max;
} DXCBND;
typedef DXCBND DXCBNDS[4];
typedef struct DXCBND64
{
double Min;
double Max;
} DXCBND64;
typedef DXCBND64 DXCBNDS64[4];
//--- Combined space
typedef union DXBNDS switch( DXBNDTYPE eType ) u
{
case DXBT_DISCRETE:
DXDBND D[4];
case DXBT_DISCRETE64:
DXDBND64 LD[4];
case DXBT_CONTINUOUS:
DXCBND C[4];
case DXBT_CONTINUOUS64:
DXCBND64 LC[4];
} DXBNDS;
//--- Discrete 4D vector
typedef long DXDVEC[4];
typedef LONGLONG DXDVEC64[4];
//--- Continous 4D vector
typedef float DXCVEC[4];
typedef double DXCVEC64[4];
//--- Combined space vector
typedef union DXVEC switch( DXBNDTYPE eType ) u
{
case DXBT_DISCRETE:
long D[4];
case DXBT_DISCRETE64:
LONGLONG LD[4];
case DXBT_CONTINUOUS:
float C[4];
case DXBT_CONTINUOUS64:
double LC[4];
} DXVEC;
//+-----------------------------------------------------------------------------
//
// IDXTransformFactory
//
//------------------------------------------------------------------------------
[
object,
uuid(6A950B2B-A971-11d1-81C8-0000F87557DB),
helpstring("IDXTransformFactory Interface"),
pointer_default(unique),
local
]
interface IDXTransformFactory : IServiceProvider
{
HRESULT SetService( [in]REFGUID guidService,
[in]IUnknown *pUnkService,
[in]BOOL bWeakReference);
HRESULT CreateTransform( [in, size_is(ulNumInputs)]IUnknown** punkInputs,
[in]ULONG ulNumInputs,
[in, size_is(ulNumOutputs)]IUnknown** punkOutputs,
[in]ULONG ulNumOutputs,
[in]IPropertyBag* pInitProps, [in]IErrorLog* pErrLog,
[in]REFCLSID TransCLSID, [in]REFIID TransIID,
[out, iid_is(TransIID)]void** ppTransform );
HRESULT InitializeTransform( [in]IDXTransform* pTransform,
[in, size_is(ulNumInputs)]IUnknown** punkInputs,
[in]ULONG ulNumInputs,
[in, size_is(ulNumOutputs)]IUnknown** punkOutputs,
[in]ULONG ulNumOutputs,
[in]IPropertyBag* pInitProps, [in]IErrorLog* pErrLog );
};
//+-----------------------------------------------------------------------------
//
// IDXTransform
//
//------------------------------------------------------------------------------
typedef enum DXTMISCFLAGS
{
DXTMF_BLEND_WITH_OUTPUT = ( 1L << 0 ),
DXTMF_DITHER_OUTPUT = ( 1L << 1 ),
DXTMF_OPTION_MASK = (0x0000FFFF), // Low word is settable options
DXTMF_VALID_OPTIONS = (DXTMF_BLEND_WITH_OUTPUT | DXTMF_DITHER_OUTPUT),
//
// Status flags can not be changed by call to SetMiscFlags
//
DXTMF_BLEND_SUPPORTED = ( 1L << 16 ),
DXTMF_DITHER_SUPPORTED = ( 1L << 17 ),
DXTMF_INPLACE_OPERATION = ( 1L << 24 ),
DXTMF_BOUNDS_SUPPORTED = ( 1L << 25 ),
DXTMF_PLACEMENT_SUPPORTED = ( 1L << 26 ),
DXTMF_QUALITY_SUPPORTED = ( 1L << 27 ),
DXTMF_OPAQUE_RESULT = ( 1L << 28 )
} DXTMISCFLAGS;
typedef enum DXINOUTINFOFLAGS
{
DXINOUTF_OPTIONAL = ( 1L << 0)
} DXINOUTINFOFLAGS;
[
object,
uuid(30A5FB78-E11F-11d1-9064-00C04FD9189D),
helpstring("IDXTransform Interface"),
pointer_default(unique),
local
]
interface IDXTransform : IDXBaseObject
{
HRESULT Setup( [in, size_is(ulNumInputs)] IUnknown * const * punkInputs,
[in]ULONG ulNumInputs,
[in, size_is(ulNumOutputs)] IUnknown * const * punkOutputs,
[in]ULONG ulNumOutputs,
[in]DWORD dwFlags );
HRESULT Execute( [in]const GUID* pRequestID, [in]const DXBNDS *pClipBnds,
[in]const DXVEC *pPlacement );
HRESULT MapBoundsIn2Out( [in] const DXBNDS *pInBounds,
[in]ULONG ulNumInBnds,
[in]ULONG ulOutIndex,
[out]DXBNDS *pOutBounds );
HRESULT MapBoundsOut2In( [in] ULONG ulOutIndex,
[in] const DXBNDS *pOutBounds,
[in] ULONG ulInIndex,
[out]DXBNDS *pInBounds );
HRESULT SetMiscFlags( [in] DWORD dwMiscFlags);
HRESULT GetMiscFlags( [out]DWORD * pdwMiscFlags );
HRESULT GetInOutInfo( [in]BOOL bIsOutput, [in]ULONG ulIndex,
[out]DWORD *pdwFlags, [out, size_is(*pcIDs)] GUID *pIDs,
[in, out] ULONG *pcIDs,
[out] IUnknown **ppUnkCurrentObject);
HRESULT SetQuality( [in] float fQuality );
HRESULT GetQuality( [out] float * fQuality );
};
//+-----------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -