📄 dxtrans.idl
字号:
HRESULT GetCompositeOperation([out] DXSURFMODCOMPOP *pCompOp);
//
// The following methods only apply to the FOREGROUND surface
//
HRESULT SetForeground([in] IDXSurface *pSurface, [in] BOOL bTile, [in] const POINT * pOrigin);
HRESULT GetForeground([out] IDXSurface **ppSurface, [out] BOOL *pbTile, [out] POINT * pOrigin);
HRESULT SetOpacity([in] float Opacity);
HRESULT GetOpacity([out] float *pOpacity);
HRESULT SetLookup( [in]IDXLookupTable * pLookupTable );
HRESULT GetLookup( [out]IDXLookupTable ** ppLookupTable );
};
//+-----------------------------------------------------------------------------
//
// IDXSurface
//
//------------------------------------------------------------------------------
typedef enum DXSAMPLEFORMATENUM
{
DXPF_FLAGSMASK = (0xFFFF0000), // Top word is flags, low word is enum
DXPF_NONPREMULT = (0x00010000), // Flags to be OR'd with pixel formats
DXPF_TRANSPARENCY = (0x00020000), // Color key or one-bit alpha (alpha only 0 or 0xFF)
DXPF_TRANSLUCENCY = (0x00040000), // Alpha can be any value from 0->0xFF
//
// This 3-bit field is used to determine what type of dithering to be used
//
DXPF_2BITERROR = (0x00200000), // 2 bits of error term
DXPF_3BITERROR = (0x00300000), // 3 bits of error term for color (16-bit color)
DXPF_4BITERROR = (0x00400000), // 4 bits of error term (ARGB 4444)
DXPF_5BITERROR = (0x00500000), // 5 bits of error term for color (8-bit color)
DXPF_ERRORMASK = (0x00700000), // Mask of bits used for dithering
DXPF_NONSTANDARD = (0), // To be used for any surface that is not one of the following formats
// This can be combined with DXPFNONPREMULT if the surface can work
// better in non-premultiplied space.
DXPF_PMARGB32 = (1 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY),
DXPF_ARGB32 = (2 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY),
DXPF_ARGB4444 = (3 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY | DXPF_4BITERROR),
DXPF_A8 = (4 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY),
DXPF_RGB32 = (5),
DXPF_RGB24 = (6),
DXPF_RGB565 = (7 | DXPF_3BITERROR),
DXPF_RGB555 = (8 | DXPF_3BITERROR),
DXPF_RGB8 = (9 | DXPF_5BITERROR),
DXPF_ARGB1555 = (10 | DXPF_TRANSPARENCY | DXPF_3BITERROR),
DXPF_RGB32_CK = (DXPF_RGB32 | DXPF_TRANSPARENCY),
DXPF_RGB24_CK = (DXPF_RGB24 | DXPF_TRANSPARENCY),
DXPF_RGB555_CK = (DXPF_RGB555 | DXPF_TRANSPARENCY),
DXPF_RGB565_CK = (DXPF_RGB565 | DXPF_TRANSPARENCY),
DXPF_RGB8_CK = (DXPF_RGB8 | DXPF_TRANSPARENCY)
} DXSAMPLEFORMATENUM;
typedef enum DXLOCKSURF
{
DXLOCKF_READ = 0,
DXLOCKF_READWRITE = (1 << 0),
DXLOCKF_EXISTINGINFOONLY = (1 << 1), // If used in conjunction with WANTRUNINFO will prevent creation of a runmap if one does not exist
DXLOCKF_WANTRUNINFO = (1 << 2),
//
// The flags in the high word should be specific to the type of pointer that
// is requested. These flags define ARGB flags. These flags are advisory and
// are not required to be set for ARGB locks.
//
DXLOCKF_NONPREMULT = (1 << 16), // Caller will request non-premultiplied data
DXLOCKF_VALIDFLAGS = (DXLOCKF_READWRITE | DXLOCKF_EXISTINGINFOONLY | DXLOCKF_WANTRUNINFO | DXLOCKF_NONPREMULT)
} DXLOCKSURF;
typedef enum DXSURFSTATUS
{
DXSURF_TRANSIENT = (1 << 0), // Data in this surface changes often.
DXSURF_READONLY = (1 << 1), // Surface is read-only
DXSURF_VALIDFLAGS = (DXSURF_TRANSIENT | DXSURF_READONLY)
} DXSURFSTATUS;
[
object,
uuid(B39FD73F-E139-11d1-9065-00C04FD9189D),
helpstring("IDXSurface Interface"),
pointer_default(unique),
local
]
interface IDXSurface : IDXBaseObject
{
HRESULT GetPixelFormat([out] GUID * pFormatID, [out] DXSAMPLEFORMATENUM *pSampleFormatEnum);
HRESULT GetBounds( [out]DXBNDS *pBounds );
HRESULT GetStatusFlags([out] DWORD * pdwStatusFlags);
HRESULT SetStatusFlags([in] DWORD dwStatusFlags);
HRESULT LockSurface( [in]const DXBNDS *pBounds, [in]ULONG ulTimeOut, [in]DWORD dwFlags,
[in]REFIID riid, [out, iid_is(riid)] void **ppPointer,
[out]ULONG* pulGenerationId );
HRESULT GetDirectDrawSurface( [in] REFIID riid,
[out, iid_is(riid)] void ** ppSurface);
HRESULT GetColorKey(DXSAMPLE * pColorKey); // Can return E_NOTIMPL
HRESULT SetColorKey(DXSAMPLE ColorKey); // Set color of 0 to get rid of color key, can return E_NOTIMPL
HRESULT LockSurfaceDC( [in] const DXBNDS *pBounds, [in]ULONG ulTimeOut, [in] DWORD dwFlags,
[out] IDXDCLock **ppDCLock);
HRESULT SetAppData(DWORD_PTR dwAppData);
HRESULT GetAppData(DWORD_PTR *pdwAppData);
};
//+-----------------------------------------------------------------------------
//
// IDXSurfaceInit
//
//------------------------------------------------------------------------------
[
object,
uuid(9EA3B639-C37D-11d1-905E-00C04FD9189D),
helpstring("IDXSurfaceInit Interface"),
pointer_default(unique),
local
]
interface IDXSurfaceInit : IUnknown
{
HRESULT InitSurface([in] IUnknown *pDirectDraw,
[in] const DDSURFACEDESC *pDDSurfaceDesc,
[in] const GUID * pFormatID,
[in] const DXBNDS *pBounds,
[in] DWORD dwFlags);
};
//+-----------------------------------------------------------------------------
//
// IDXARGBSurfaceInit
//
//------------------------------------------------------------------------------
[
object,
uuid(9EA3B63A-C37D-11d1-905E-00C04FD9189D),
helpstring("IDXARGBSurfaceInit Interface"),
pointer_default(unique),
local
]
interface IDXARGBSurfaceInit : IDXSurfaceInit
{
HRESULT InitFromDDSurface( [in] IUnknown *pDDrawSurface,
[in] const GUID * pFormatID,
[in] DWORD dwFlags);
HRESULT InitFromRawSurface([in] IDXRawSurface *pRawSurface);
};
//+-----------------------------------------------------------------------------
//
// IDXARGBReadPtr
//
//------------------------------------------------------------------------------
typedef struct tagDXNATIVETYPEINFO
{
BYTE * pCurrentData;
BYTE * pFirstByte;
long lPitch;
DWORD dwColorKey;
} DXNATIVETYPEINFO;
typedef struct tagDXPACKEDRECTDESC
{
DXBASESAMPLE *pSamples;
BOOL bPremult;
RECT rect;
long lRowPadding;
} DXPACKEDRECTDESC;
typedef struct tagDXOVERSAMPLEDESC
{
POINT p;
DXPMSAMPLE Color;
} DXOVERSAMPLEDESC;
[
object,
uuid(EAAAC2D6-C290-11d1-905D-00C04FD9189D),
helpstring("IDXARGBReadPtr Interface"),
pointer_default(unique),
local
]
interface IDXARGBReadPtr : IUnknown
{
HRESULT GetSurface( [in]REFIID riid, [out, iid_is( riid )]void ** ppSurface);
DXSAMPLEFORMATENUM GetNativeType( [out]DXNATIVETYPEINFO *pInfo );
void Move( [in]long cSamples );
void MoveToRow( [in]ULONG y );
void MoveToXY( [in]ULONG x, [in]ULONG y);
ULONG MoveAndGetRunInfo( [in]ULONG Row, [out] const DXRUNINFO** ppInfo ); // Returns count of runs
DXSAMPLE * Unpack( [in]DXSAMPLE* pSamples, [in]ULONG cSamples, [in]BOOL bMove );
DXPMSAMPLE * UnpackPremult( [in]DXPMSAMPLE* pSamples, [in]ULONG cSamples, [in]BOOL bMove );
void UnpackRect([in] const DXPACKEDRECTDESC * pRectDesc);
};
//+-----------------------------------------------------------------------------
//
// IDXARGBReadWritePtr
//
//------------------------------------------------------------------------------
[
object,
uuid(EAAAC2D7-C290-11d1-905D-00C04FD9189D),
helpstring("IDXARGBReadWritePtr Interface"),
pointer_default(unique),
local
]
interface IDXARGBReadWritePtr : IDXARGBReadPtr
{
void PackAndMove( [in]const DXSAMPLE *pSamples, [in]ULONG cSamples );
void PackPremultAndMove( [in]const DXPMSAMPLE *pSamples, [in]ULONG cSamples );
void PackRect([in]const DXPACKEDRECTDESC *pRectDesc);
void CopyAndMoveBoth( [in]DXBASESAMPLE *pScratchBuffer, [in]IDXARGBReadPtr *pSrc,
[in]ULONG cSamples, [in]BOOL bIsOpaque );
void CopyRect( [in] DXBASESAMPLE *pScratchBuffer,
[in] const RECT *pDestRect, [in]IDXARGBReadPtr *pSrc,
[in] const POINT *pSrcOrigin, [in]BOOL bIsOpaque);
void FillAndMove( [in]DXBASESAMPLE *pScratchBuffer, [in]DXPMSAMPLE SampVal,
[in]ULONG cSamples, [in]BOOL bDoOver );
void FillRect( [in]const RECT *pRect, [in]DXPMSAMPLE SampVal, [in]BOOL bDoOver );
void OverSample( [in]const DXOVERSAMPLEDESC * pOverDesc);
void OverArrayAndMove([in]DXBASESAMPLE *pScratchBuffer,
[in] const DXPMSAMPLE *pSrc,
[in] ULONG cSamples);
};
//+-----------------------------------------------------------------------------
//
// IDXDCLock
//
//------------------------------------------------------------------------------
[
object,
uuid(0F619456-CF39-11d1-905E-00C04FD9189D),
helpstring("IDXDCLock Interface"),
pointer_default(unique),
local
]
interface IDXDCLock : IUnknown
{
HDC GetDC(void);
};
//+-----------------------------------------------------------------------------
//
// IDXTScaleOutput
//
// Overview:
// Generic interface that any transform can support which allows caller to
// specify the desired output bounds.
//------------------------------------------------------------------------------
[
object,
uuid(B2024B50-EE77-11d1-9066-00C04FD9189D),
helpstring("IDXTScaleOutput Interface"),
pointer_default(unique),
local
]
interface IDXTScaleOutput : IUnknown
{
HRESULT SetOutputSize([in] const SIZE OutSize, [in] BOOL bMaintainAspect);
};
//+-----------------------------------------------------------------------------
//
// IDXGradient
//
//------------------------------------------------------------------------------
[
object,
uuid(B2024B51-EE77-11d1-9066-00C04FD9189D),
helpstring("IDXGradient Interface"),
pointer_default(unique),
local
]
interface IDXGradient : IDXTScaleOutput
{
HRESULT SetGradient(DXSAMPLE StartColor, DXSAMPLE EndColor, BOOL bHorizontal);
HRESULT GetOutputSize([out] SIZE *pOutSize);
};
//+-----------------------------------------------------------------------------
//
// IDXTScale
//
// Overview:
// This is the control interface for the simple scale transform.
//
//------------------------------------------------------------------------------
[
object,
uuid(B39FD742-E139-11d1-9065-00C04FD9189D),
helpstring("IDXTScale Interface"),
pointer_default(unique),
local
]
interface IDXTScale : IUnknown
{
HRESULT SetScales( [in]float Scales[2] );
HRESULT GetScales( [out]float Scales[2] );
HRESULT ScaleFitToSize( [in,out]DXBNDS* pClipBounds,
[in]SIZE FitToSize, [in]BOOL bMaintainAspect );
};
//+-----------------------------------------------------------------------------
//
// IDXEffect
//
// Overview:
// This interface is used to generically control transforms that are
// transition effects.
//
//------------------------------------------------------------------------------
typedef enum DISPIDDXEFFECT
{
DISPID_DXECAPABILITIES = 10000, // Start at 10000 to avoid conflicts with inhereted interfaces
DISPID_DXEPROGRESS,
DISPID_DXESTEP,
DISPID_DXEDURATION,
DISPID_DXE_NEXT_ID
} DISPIDDXBOUNDEDEFFECT;
typedef enum DXEFFECTTYPE
{
DXTET_PERIODIC = (1 << 0), // Result at 1 is same as result at 0
DXTET_MORPH = (1 << 1) // Transition between 2 inputs (input 0 to input 1)
} DXEFFECTTYPE;
[
object,
uuid(E31FB81B-1335-11d1-8189-0000F87557DB),
helpstring("IDXEffect Interface"),
pointer_default(unique),
dual
]
interface IDXEffect : IDispatch
{
[propget, id(DISPID_DXECAPABILITIES)]
HRESULT Capabilities([out, retval] long *pVal);
[propget, id(DISPID_DXEPROGRESS)]
HRESULT Progress([out, retval] float *pVal);
[propput, id(DISPID_DXEPROGRESS)]
HRESULT Progress([in] float newVal);
[propget, id(DISPID_DXESTEP)]
HRESULT StepResolution([out, retval] float *pVal);
[propget, id(DISPID_DXEDURATION)]
HRESULT Duration([out, retval] float *pVal);
[propput, id(DISPID_DXEDURATION)]
HRESULT Duration([in] float newVal);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -