⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dxtrans.idl

📁 墨香最新私服
💻 IDL
📖 第 1 页 / 共 5 页
字号:
//
//  IDXSurfacePick
//
//------------------------------------------------------------------------------

    [
        object,
        uuid(30A5FB79-E11F-11d1-9064-00C04FD9189D),
        helpstring("IDXSurfacePick Interface"),
        pointer_default(unique),
        local
    ]
    interface IDXSurfacePick : IUnknown
    {
        HRESULT PointPick([in]const DXVEC *pPoint,
                          [out]ULONG * pulInputSurfaceIndex,
                          [out]DXVEC *pInputPoint);
    };


//+-----------------------------------------------------------------------------
//
//  IDXTBindHost
//
//  Overview:
//      This interface is used to set a site-specific bind host for a transform.
//      Only transforms that need access to a bind host need to implement this 
//      interface.
//
//      For some reason, MIDL does not like IBindHost, so we've declared this
//      interface local.
//
//------------------------------------------------------------------------------

    [
        object,
        uuid(D26BCE55-E9DC-11d1-9066-00C04FD9189D),
        helpstring("IDXTBindHost Interface"),
        pointer_default(unique),
        local
    ]
    interface IDXTBindHost : IUnknown
    {
        HRESULT SetBindHost([in] IBindHost * pBindHost);
    };


//+-----------------------------------------------------------------------------
//
//  IDXTaskManager
//
//  Overview:
//      This interface is used to implement a task managment service provider to
//      optimize thread usage.
//
//------------------------------------------------------------------------------

    typedef void (__stdcall DXTASKPROC)(void *pTaskData, BOOL* pbContinueProcessing );
    typedef DXTASKPROC *PFNDXTASKPROC;

    typedef void (__stdcall DXAPCPROC)(DWORD dwData);
    typedef DXAPCPROC *PFNDXAPCPROC;

cpp_quote("#ifdef __cplusplus")

    cpp_quote("typedef struct DXTMTASKINFO" )
    cpp_quote("{")
    cpp_quote("    PFNDXTASKPROC pfnTaskProc;       // Pointer to function to execute")
    cpp_quote("    PVOID         pTaskData;         // Pointer to argument data")
    cpp_quote("    PFNDXAPCPROC  pfnCompletionAPC;  // Pointer to completion APC proc")
    cpp_quote("    DWORD         dwCompletionData;  // Pointer to APC proc data")
    cpp_quote("    const GUID*   pRequestID;        // Used to identify groups of tasks")
    cpp_quote("} DXTMTASKINFO;")

cpp_quote("#else")

        typedef struct DXTMTASKINFO
        {
            PVOID       pfnTaskProc;       // Pointer to function to execute
            PVOID       pTaskData;         // Pointer to argument data
            PVOID       pfnCompletionAPC;  // Pointer to completion APC proc
            DWORD       dwCompletionData;  // Pointer to APC proc data
            const GUID* pRequestID;        // Used to identify groups of tasks
        } DXTMTASKINFO;

cpp_quote("#endif")

    [
        object,
        uuid(254DBBC1-F922-11d0-883A-3C8B00C10000),
        helpstring("IDXTaskManager Interface"),
        pointer_default(unique),
        local
    ]
    interface IDXTaskManager : IUnknown
    {
        HRESULT QueryNumProcessors( [out]ULONG* pulNumProc );
        HRESULT SetThreadPoolSize( [in]ULONG ulNumThreads );
        HRESULT GetThreadPoolSize( [out]ULONG* pulNumThreads );
        HRESULT SetConcurrencyLimit( [in]ULONG ulNumThreads );
        HRESULT GetConcurrencyLimit( [out]ULONG* pulNumThreads );
        HRESULT ScheduleTasks( [in]DXTMTASKINFO TaskInfo[],
                               [in]HANDLE Events[],
                               [out]DWORD TaskIDs[],
                               [in]ULONG ulNumTasks, [in]ULONG ulWaitPeriod );
        HRESULT TerminateTasks( [in]DWORD TaskIDs[], [in]ULONG ulCount,
                                [in]ULONG ulTimeOut );
        HRESULT TerminateRequest( [in]REFIID RequestID, [in]ULONG ulTimeOut );
    };


//+-----------------------------------------------------------------------------
//
//  Sample structures (C++)
//
//  Overview:
//      We want an operator so that we can cast from a DXSAMPLE to a DWORD, so 
//      for C++ we will define the structure a special way.
//
//------------------------------------------------------------------------------

cpp_quote("#ifdef __cplusplus")

    cpp_quote("/////////////////////////////////////////////////////")
    cpp_quote("")
    cpp_quote("class DXBASESAMPLE;")
    cpp_quote("class DXSAMPLE;")
    cpp_quote("class DXPMSAMPLE;")
    cpp_quote("")
    cpp_quote("/////////////////////////////////////////////////////")
    cpp_quote("")
    cpp_quote("class DXBASESAMPLE")
    cpp_quote("{")
    cpp_quote("public:")
    cpp_quote("    BYTE Blue;")
    cpp_quote("    BYTE Green;")
    cpp_quote("    BYTE Red;")
    cpp_quote("    BYTE Alpha;")
    cpp_quote("    DXBASESAMPLE() {}")
    cpp_quote("    DXBASESAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :")
    cpp_quote("        Alpha(alpha),")
    cpp_quote("        Red(red),")
    cpp_quote("        Green(green),")
    cpp_quote("        Blue(blue) {}")
    cpp_quote("    DXBASESAMPLE(const DWORD val) { *this = (*(DXBASESAMPLE *)&val); }")
    cpp_quote("    operator DWORD () const {return *((DWORD *)this); }")
    cpp_quote("    DWORD operator=(const DWORD val) { return *this = *((DXBASESAMPLE *)&val); }")
    cpp_quote("}; // DXBASESAMPLE")
    cpp_quote("")
    cpp_quote("/////////////////////////////////////////////////////")
    cpp_quote("")
    cpp_quote("class DXSAMPLE : public DXBASESAMPLE")
    cpp_quote("{")
    cpp_quote("public:")
    cpp_quote("    DXSAMPLE() {}")
    cpp_quote("    DXSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :")
    cpp_quote("         DXBASESAMPLE(alpha, red, green, blue) {}")
    cpp_quote("    DXSAMPLE(const DWORD val) { *this = (*(DXSAMPLE *)&val); }")
    cpp_quote("    operator DWORD () const {return *((DWORD *)this); }")
    cpp_quote("    DWORD operator=(const DWORD val) { return *this = *((DXSAMPLE *)&val); }")
    cpp_quote("    operator DXPMSAMPLE() const;")
    cpp_quote("}; // DXSAMPLE")
    cpp_quote("")
    cpp_quote("/////////////////////////////////////////////////////")
    cpp_quote("")
    cpp_quote("class DXPMSAMPLE : public DXBASESAMPLE")
    cpp_quote("{")
    cpp_quote("public:")
    cpp_quote("    DXPMSAMPLE() {}")
    cpp_quote("    DXPMSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :")
    cpp_quote("         DXBASESAMPLE(alpha, red, green, blue) {}")
    cpp_quote("    DXPMSAMPLE(const DWORD val) { *this = (*(DXPMSAMPLE *)&val); }")
    cpp_quote("    operator DWORD () const {return *((DWORD *)this); }")
    cpp_quote("    DWORD operator=(const DWORD val) { return *this = *((DXPMSAMPLE *)&val); }")
    cpp_quote("    operator DXSAMPLE() const;")
    cpp_quote("}; // DXPMSAMPLE")
    cpp_quote("")
    cpp_quote("//")
    cpp_quote("// The following cast operators are to prevent a direct assignment of a DXSAMPLE to a DXPMSAMPLE")
    cpp_quote("//")
    cpp_quote("inline DXSAMPLE::operator DXPMSAMPLE() const { return *((DXPMSAMPLE *)this); }")
    cpp_quote("inline DXPMSAMPLE::operator DXSAMPLE() const { return *((DXSAMPLE *)this); }")


//+-----------------------------------------------------------------------------
//
//  Sample structures (IDL, C)
//
//------------------------------------------------------------------------------

cpp_quote("#else // !__cplusplus")

    typedef struct DXBASESAMPLE
    {
        BYTE Blue;
        BYTE Green;
        BYTE Red; 
        BYTE Alpha;
    } DXBASESAMPLE;

    typedef struct DXSAMPLE
    {
        BYTE Blue;
        BYTE Green;
        BYTE Red; 
        BYTE Alpha;
    } DXSAMPLE;

    typedef struct DXPMSAMPLE
    {
        BYTE Blue;
        BYTE Green;
        BYTE Red; 
        BYTE Alpha;
    } DXPMSAMPLE;

cpp_quote("#endif // !__cplusplus")

//+-----------------------------------------------------------------------------
//
//  DXRUNINFO structures.
//
//------------------------------------------------------------------------------

    typedef enum DXRUNTYPE
    {
        DXRUNTYPE_CLEAR  = 0,        // The run is zero Alpha
        DXRUNTYPE_OPAQUE = 1,        // The run is full Alpha (i.e. 255)
        DXRUNTYPE_TRANS  = 2,        // The run is non-zero Alpha
        DXRUNTYPE_UNKNOWN= 3         // The run type is unknown.  Caller must inspect.
    } DXRUNTYPE;

    const ULONG DX_MAX_RUN_INFO_COUNT = 128; // Defines the maximum number of RUNINFOs in a single row


    cpp_quote("// Ignore the definition used by MIDL for TLB generation")
    cpp_quote("#if 0")

    typedef struct DXRUNINFO
    {
        ULONG Bitfields;
    } DXRUNINFO;

    cpp_quote("#endif // 0")

    // Emit the C definition to the H file directly, as bit fields are not
    // supported by MIDL.

    cpp_quote("typedef struct DXRUNINFO")
    cpp_quote("{")
    cpp_quote("    ULONG   Type  : 2;   // Type")
    cpp_quote("    ULONG   Count : 30;  // Number of samples in run")
    cpp_quote("} DXRUNINFO;")


    typedef enum DXSFCREATE
    {
        DXSF_FORMAT_IS_CLSID    = ( 1L << 0 ),
        DXSF_NO_LAZY_DDRAW_LOCK = ( 1L << 1 )
    } DXSFCREATE;

    typedef enum DXBLTOPTIONS
    {
        DXBOF_DO_OVER          = (1L << 0),
        DXBOF_DITHER           = (1L << 1)
    } DXBLTOPTIONS;


//+-----------------------------------------------------------------------------
//
//  IDXSurfaceModifier
//
//------------------------------------------------------------------------------

    [
        object,
        uuid(144946F5-C4D4-11d1-81D1-0000F87557DB),
        helpstring("IDXSurfaceFactory Interface"),
        pointer_default(unique),
        local
    ]
    interface IDXSurfaceFactory : IUnknown
    {
        HRESULT CreateSurface([in] IUnknown *pDirectDraw,
                              [in] const DDSURFACEDESC * pDDSurfaceDesc,
                              [in] const GUID * pFormatID,
                              [in] const DXBNDS *pBounds, 
                              [in] DWORD dwFlags,
                              [in] IUnknown *punkOuter,
                              [in] REFIID riid, 
                              [out, iid_is( riid )] void ** ppDXSurface);

        HRESULT CreateFromDDSurface([in] IUnknown *pDDrawSurface,
                              [in] const GUID *pFormatID,
                              [in] DWORD dwFlags,
                              [in] IUnknown *punkOuter,
                              [in] REFIID riid, 
                              [out, iid_is( riid )] void ** ppDXSurface);

        HRESULT LoadImage(
                          [in] const LPWSTR pszFileName,
                          [in] IUnknown *pDirectDraw,
                          [in] const DDSURFACEDESC * pDDSurfaceDesc,
                          [in] const GUID *pFormatID,
                          [in] REFIID riid, 
                          [out, iid_is( riid )] void ** ppDXSurface);

        HRESULT LoadImageFromStream([in] IStream *pStream,
                                    [in] IUnknown *pDirectDraw,
                                    [in] const DDSURFACEDESC * pDDSurfaceDesc,
                                    [in] const GUID *pFormatID,
                                    [in] REFIID riid, 
                                    [out, iid_is( riid )] void ** ppDXSurface);

        HRESULT CopySurfaceToNewFormat( [in]IDXSurface* pSrc,
                                        [in] IUnknown *pDirectDraw,
                                        [in] const DDSURFACEDESC * pDDSurfaceDesc,
                                        [in] const GUID *pDestFormatID,
                                        [out] IDXSurface** ppNewSurface );

        HRESULT CreateD3DRMTexture([in] IDXSurface *pSrc,
                                   [in] IUnknown *pDirectDraw,
                                   [in] IUnknown *pD3DRM3,
                                   [in] REFIID riid,
                                   [out, iid_is(riid)] void **ppTexture3);

        HRESULT BitBlt([in] IDXSurface *pDest,
                       [in] const DXVEC *pPlacement,
                       [in] IDXSurface *pSrc,
                       [in] const DXBNDS *pClipBounds,
                       [in] DWORD dwFlags);
    };


//+-----------------------------------------------------------------------------
//
//  IDXSurfaceModifier
//
//------------------------------------------------------------------------------

    typedef enum DXSURFMODCOMPOP
    {
        DXSURFMOD_COMP_OVER         = 0,
        DXSURFMOD_COMP_ALPHA_MASK   = 1,
        DXSURFMOD_COMP_MAX_VALID    = 1
    } DXSURFMODCOMPOP;
    
    [
        object,
        uuid(9EA3B637-C37D-11d1-905E-00C04FD9189D),
        helpstring("IDXSurfaceModifier Interface"),
        pointer_default(unique),
        local
    ]
    interface IDXSurfaceModifier : IUnknown
    {
        HRESULT SetFillColor([in] DXSAMPLE Color);
        HRESULT GetFillColor([out] DXSAMPLE *pColor);
        HRESULT SetBounds([in] const DXBNDS *pBounds ); // Get supported though IDXSurface interface
        HRESULT SetBackground([in] IDXSurface *pSurface);
        HRESULT GetBackground([out] IDXSurface **ppSurface);
        HRESULT SetCompositeOperation([in] DXSURFMODCOMPOP CompOp);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -