Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 162 +++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index cec7de8c311..6838492c498 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -258,3 +258,165 @@ interface ID2D1TransformGraph : IUnknown [in] UINT32 index ); } + +[ + object, + uuid(ef1a287d-342a-4f76-8fdb-da0d6ea9f92b), + local, +] +interface ID2D1Transform : ID2D1TransformNode +{ + HRESULT MapOutputRectToInputRects( + [in] const D2D1_RECT_L *output_rect, + [out] D2D1_RECT_L *input_rects, + [in] UINT32 input_rects_count + ); + HRESULT MapInputRectsToOutputRect( + [in] const D2D1_RECT_L *input_rects, + [in] const D2D1_RECT_L *input_opaque_rects, + [in] UINT32 input_rect_count, + [out] D2D1_RECT_L *output_rect, + [out] D2D1_RECT_L *output_opaque_rect + ); + HRESULT MapInvalidRect( + [in] UINT32 index, + [in] D2D1_RECT_L input_rect, + [out] D2D1_RECT_L *output_rect + ); +} + +[ + object, + uuid(36bfdcb6-9739-435d-a30d-a653beff6a6f), + local, +] +interface ID2D1DrawTransform : ID2D1Transform +{ + HRESULT SetDrawInfo( + [in] ID2D1DrawInfo *info + ); +} + +[ + object, + uuid(0d85573c-01e3-4f7d-bfd9-0d60608bf3c3), + local, +] +interface ID2D1ComputeTransform : ID2D1Transform +{ + HRESULT SetComputeInfo( + [in] ID2D1ComputeInfo *info + ); + HRESULT CalculateThreadgroups( + [in] const D2D1_RECT_L *output_rect, + [out] UINT32 *dimension_x, + [out] UINT32 *dimension_y, + [out] UINT32 *dimension_z + ); +} + +[ + object, + uuid(0359dc30-95e6-4568-9055-27720d130e93), + local, +] +interface ID2D1AnalysisTransform : IUnknown +{ + HRESULT ProcessAnalysisResults( + [in] const BYTE *data, + [in] UINT32 size + ); +} + +[ + object, + uuid(db1800dd-0c34-4cf9-be90-31cc0a5653e1), + local, +] +interface ID2D1SourceTransform : ID2D1Transform +{ + HRESULT SetRenderInfo( + [in] ID2D1RenderInfo *info + ); + HRESULT Draw( + [in] ID2D1Bitmap1 *target, + [in] const D2D1_RECT_L *draw_rect, + [in] D2D1_POINT_2U target_origin + ); +} + +[ + object, + uuid(1a799d8a-69f7-4e4c-9fed-437ccc6684cc), + local, +] +interface ID2D1ConcreteTransform : ID2D1TransformNode +{ + HRESULT SetOutputBuffer( + [in] D2D1_BUFFER_PRECISION precision, + [in] D2D1_CHANNEL_DEPTH depth + ); + void SetCached( + [in] BOOL is_cached + ); +} + +[ + object, + uuid(63ac0b32-ba44-450f-8806-7f4ca1ff2f1b), + local, +] +interface ID2D1BlendTransform : ID2D1ConcreteTransform +{ + void SetDescription( + [in] const D2D1_BLEND_DESCRIPTION *description + ); + void GetDescription( + [out] D2D1_BLEND_DESCRIPTION *description + ); +} + +[ + object, + uuid(4998735c-3a19-473c-9781-656847e3a347), + local, +] +interface ID2D1BorderTransform : ID2D1ConcreteTransform +{ + void SetExtendModeX( + [in] D2D1_EXTEND_MODE mode + ); + void SetExtendModeY( + [in] D2D1_EXTEND_MODE mode + ); + D2D1_EXTEND_MODE GetExtendModeX(); + D2D1_EXTEND_MODE GetExtendModeY(); +} + +[ + object, + uuid(3fe6adea-7643-4f53-bd14-a0ce63f24042), + local, +] +interface ID2D1OffsetTransform : ID2D1TransformNode +{ + void SetOffset( + [in] D2D1_POINT_2L offset + ); + D2D1_POINT_2L GetOffset(); +} + +[ + object, + uuid(90f732e2-5092-4606-a819-8651970baccd), + local, +] +interface ID2D1BoundsAdjustmentTransform : ID2D1TransformNode +{ + void SetOutputBounds( + [in] const D2D1_RECT_L *bounds + ); + void GetOutputBounds( + [out] D2D1_RECT_L *bounds + ); +}
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 156 +++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index 6838492c498..60cff9cc277 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -32,6 +32,13 @@ typedef enum D2D1_FILTER D2D1_FILTER_FORCE_DWORD = 0xffffffff } D2D1_FILTER;
+typedef enum D2D1_FEATURE +{ + D2D1_FEATURE_DOUBLES = 0x0, + D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS = 0x1, + D2D1_FEATURE_FORCE_DWORD = 0xffffffff +} D2D1_FEATURE; + typedef enum D2D1_CHANNEL_DEPTH { D2D1_CHANNEL_DEPTH_DEFAULT = 0x0, @@ -56,6 +63,13 @@ typedef enum D2D1_VERTEX_OPTIONS D2D1_VERTEX_OPTIONS_FORCE_DWORD = 0xffffffff } D2D1_VERTEX_OPTIONS;
+typedef enum D2D1_VERTEX_USAGE +{ + D2D1_VERTEX_USAGE_STATIC = 0x0, + D2D1_VERTEX_USAGE_DYNAMIC = 0x1, + D2D1_VERTEX_USAGE_FORCE_DWORD = 0xffffffff +} D2D1_VERTEX_USAGE; + typedef enum D2D1_BLEND_OPERATION { D2D1_BLEND_OPERATION_ADD = 0x1, @@ -107,6 +121,42 @@ typedef struct D2D1_BLEND_DESCRIPTION float blendFactor[4]; } D2D1_BLEND_DESCRIPTION;
+typedef struct D2D1_RESOURCE_TEXTURE_PROPERTIES +{ + const UINT32 *extents; + UINT32 dimensions; + D2D1_BUFFER_PRECISION bufferPrecision; + D2D1_CHANNEL_DEPTH channelDepth; + D2D1_FILTER filter; + const D2D1_EXTEND_MODE *extendModes; +} D2D1_RESOURCE_TEXTURE_PROPERTIES; + +typedef struct D2D1_INPUT_ELEMENT_DESC +{ + const char *semanticName; + UINT32 semanticIndex; + DXGI_FORMAT format; + UINT32 inputSlot; + UINT32 alignedByteOffset; +} D2D1_INPUT_ELEMENT_DESC; + +typedef struct D2D1_VERTEX_BUFFER_PROPERTIES +{ + UINT32 inputCount; + D2D1_VERTEX_USAGE usage; + const BYTE *data; + UINT32 byteWidth; +} D2D1_VERTEX_BUFFER_PROPERTIES; + +typedef struct D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES +{ + const BYTE *shaderBufferWithInputSignature; + UINT32 shaderBufferSize; + const D2D1_INPUT_ELEMENT_DESC *inputElements; + UINT32 elementCount; + UINT32 stride; +} D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES; + [ object, uuid(9b8b1336-00a5-4668-92b7-ced5d8bf9b7b), @@ -420,3 +470,109 @@ interface ID2D1BoundsAdjustmentTransform : ID2D1TransformNode [out] D2D1_RECT_L *bounds ); } + +[ + object, + uuid(3d9f916b-27dc-4ad7-b4f1-64945340f563), + local, +] +interface ID2D1EffectContext : IUnknown +{ + void GetDpi( + [out] float *dpi_x, + [out] float *dpi_y + ); + HRESULT CreateEffect( + [in] REFCLSID clsid, + [out] ID2D1Effect **effect + ); + HRESULT GetMaximumSupportedFeatureLevel( + [in] const D3D_FEATURE_LEVEL *levels, + [in] UINT32 level_count, + [out] D3D_FEATURE_LEVEL *max_level + ); + HRESULT CreateTransformNodeFromEffect( + [in] ID2D1Effect *effect, + [out] ID2D1TransformNode **node + ); + HRESULT CreateBlendTransform( + [in] UINT32 num_inputs, + [in] const D2D1_BLEND_DESCRIPTION *description, + [out] ID2D1BlendTransform **transform + ); + HRESULT CreateBorderTransform( + [in] D2D1_EXTEND_MODE mode_x, + [in] D2D1_EXTEND_MODE mode_y, + [out] ID2D1BorderTransform **transform + ); + HRESULT CreateOffsetTransform( + [in] D2D1_POINT_2L offset, + [out] ID2D1OffsetTransform **transform + ); + HRESULT CreateBoundsAdjustmentTransform( + [in] const D2D1_RECT_L *output_rect, + [out] ID2D1BoundsAdjustmentTransform **transform + ); + HRESULT LoadPixelShader( + [in] REFGUID shader_id, + [in] const BYTE *buffer, + [in] UINT32 buffer_size + ); + HRESULT LoadVertexShader( + [in] REFGUID shader_id, + [in] const BYTE *buffer, + [in] UINT32 buffer_size + ); + HRESULT LoadComputeShader( + [in] REFGUID shader_id, + [in] const BYTE *buffer, + [in] UINT32 buffer_size + ); + BOOL IsShaderLoaded( + [in] REFGUID shader_id + ); + HRESULT CreateResourceTexture( + [in, optional] const GUID *id, + [in] const D2D1_RESOURCE_TEXTURE_PROPERTIES *texture_properties, + [in] const BYTE *data, + [in] const UINT32 *strides, + [in] UINT32 data_size, + [out] ID2D1ResourceTexture **texture + ); + HRESULT FindResourceTexture( + [in] const GUID *id, + [out] ID2D1ResourceTexture **texture + ); + HRESULT CreateVertexBuffer( + [in] const D2D1_VERTEX_BUFFER_PROPERTIES *buffer_properties, + [in, optional] const GUID *id, + [in, optional] const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES *custom_buffer_properties, + [out] ID2D1VertexBuffer **buffer + ); + HRESULT FindVertexBuffer( + [in] const GUID *id, + [out] ID2D1VertexBuffer **buffer + ); + HRESULT CreateColorContext( + [in] D2D1_COLOR_SPACE space, + [in] const BYTE *profile, + [in] UINT32 profile_size, + [out] ID2D1ColorContext **color_context + ); + HRESULT CreateColorContextFromFilename( + [in] const WCHAR *filename, + [out] ID2D1ColorContext **color_context + ); + HRESULT CreateColorContextFromWicColorContext( + [in] IWICColorContext *wic_color_context, + [out] ID2D1ColorContext **color_context + ); + HRESULT CheckFeatureSupport( + [in] D2D1_FEATURE feature, + [out] void *data, + [in] UINT32 data_size + ); + BOOL IsBufferPrecisionSupported( + [in] D2D1_BUFFER_PRECISION precision + ); +}
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index 60cff9cc277..b53aa515e85 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -47,6 +47,15 @@ typedef enum D2D1_CHANNEL_DEPTH D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff } D2D1_CHANNEL_DEPTH;
+typedef enum D2D1_CHANGE_TYPE +{ + D2D1_CHANGE_TYPE_NONE = 0x0, + D2D1_CHANGE_TYPE_PROPERTIES = 0x1, + D2D1_CHANGE_TYPE_CONTEXT = 0x2, + D2D1_CHANGE_TYPE_GRAPH = 0x3, + D2D1_CHANGE_TYPE_FORCE_DWORD = 0xffffffff +} D2D1_CHANGE_TYPE; + typedef enum D2D1_PIXEL_OPTIONS { D2D1_PIXEL_OPTIONS_NONE = 0x0, @@ -576,3 +585,22 @@ interface ID2D1EffectContext : IUnknown [in] D2D1_BUFFER_PRECISION precision ); } + +[ + object, + uuid(a248fd3f-3e6c-4e63-9f03-7f68ecc91db9), + local, +] +interface ID2D1EffectImpl : IUnknown +{ + HRESULT Initialize( + [in] ID2D1EffectContext *context, + [in] ID2D1TransformGraph *graph + ); + HRESULT PrepareForRender( + [in] D2D1_CHANGE_TYPE type + ); + HRESULT SetGraph( + [in] ID2D1TransformGraph *graph + ); +}
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com