Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1_3.idl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index a33292882df..643212e1a27 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -166,3 +166,21 @@ interface ID2D1ImageSource : ID2D1Image [out] BOOL *resources_discarded ); }; + +[ + object, + uuid(77395441-1c8f-4555-8683-f50dab0fe792), + local, +] +interface ID2D1ImageSourceFromWic : ID2D1ImageSource +{ + HRESULT EnsureCached( + [in, optional] const D2D1_RECT_U *rect_to_fill + ); + HRESULT TrimCache( + [in, optional] const D2D1_RECT_U *rect_to_preserve + ); + void GetSource( + [out] IWICBitmapSource **source + ); +};
Signed-off-by: Ziqing Hui zhui@codeweavers.com ---
D2D1_PATCH_EDGE_MODE are moved to make all enums together.
include/d2d1_3.idl | 60 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 8 deletions(-)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index 643212e1a27..d1030d19d9e 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -25,6 +25,34 @@ typedef enum D2D1_INK_NIB_SHAPE D2D1_INK_NIB_SHAPE_FORCE_DWORD = 0xffffffff } D2D1_INK_NIB_SHAPE;
+typedef enum D2D1_PATCH_EDGE_MODE +{ + D2D1_PATCH_EDGE_MODE_ALIASED = 0x0, + D2D1_PATCH_EDGE_MODE_ANTIALIASED = 0x1, + D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED = 0x2, + D2D1_PATCH_EDGE_MODE_FORCE_DWORD = 0xffffffff +} D2D1_PATCH_EDGE_MODE; + +typedef enum D2D1_ORIENTATION +{ + D2D1_ORIENTATION_DEFAULT = 0x1, + D2D1_ORIENTATION_FLIP_HORIZONTAL = 0x2, + D2D1_ORIENTATION_ROTATE_CLOCKWISE180 = 0x3, + D2D1_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 0x4, + D2D1_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 0x5, + D2D1_ORIENTATION_ROTATE_CLOCKWISE270 = 0x6, + D2D1_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 0x7, + D2D1_ORIENTATION_ROTATE_CLOCKWISE90 = 0x8, + D2D1_ORIENTATION_FORCE_DWORD = 0xffffffff +} D2D1_ORIENTATION; + +typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS +{ + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_NONE = 0x0, + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_DISABLE_DPI_SCALE = 0x1, + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_FORCE_DWORD = 0xffffffff +} D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS; + typedef struct D2D1_INK_POINT { float x; @@ -39,14 +67,6 @@ typedef struct D2D1_INK_BEZIER_SEGMENT D2D1_INK_POINT point3; } D2D1_INK_BEZIER_SEGMENT;
-typedef enum D2D1_PATCH_EDGE_MODE -{ - D2D1_PATCH_EDGE_MODE_ALIASED = 0x0, - D2D1_PATCH_EDGE_MODE_ANTIALIASED = 0x1, - D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED = 0x2, - D2D1_PATCH_EDGE_MODE_FORCE_DWORD = 0xffffffff -} D2D1_PATCH_EDGE_MODE; - typedef struct D2D1_GRADIENT_MESH_PATCH { D2D1_POINT_2F point00; @@ -75,6 +95,15 @@ typedef struct D2D1_GRADIENT_MESH_PATCH D2D1_PATCH_EDGE_MODE rightEdgeMode; } D2D1_GRADIENT_MESH_PATCH;
+typedef struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES +{ + D2D1_ORIENTATION orientation; + float scaleX; + float scaleY; + D2D1_INTERPOLATION_MODE interpolationMode; + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS options; +} D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES; + [ object, uuid(bae8b344-23fc-4071-8cb5-d05d6f073848), @@ -184,3 +213,18 @@ interface ID2D1ImageSourceFromWic : ID2D1ImageSource [out] IWICBitmapSource **source ); }; + +[ + object, + uuid(7f1f79e5-2796-416c-8f55-700f911445e5), + local, +] +interface ID2D1TransformedImageSource : ID2D1Image +{ + void GetSource( + [out] ID2D1ImageSource **source + ); + void GetProperties( + [out] D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *out + ); +};
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1_3.idl | 90 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index d1030d19d9e..c64f353b60c 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -53,6 +53,21 @@ typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_FORCE_DWORD = 0xffffffff } D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS;
+typedef enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS +{ + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE = 0x0, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_RELEASE_SOURCE = 0x1, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND = 0x2, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_FORCE_DWORD = 0xffffffff +} D2D1_IMAGE_SOURCE_LOADING_OPTIONS; + +typedef enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS +{ + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_NONE = 0x0, + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_LOW_QUALITY_PRIMARY_CONVERSION = 0x1, + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_FORCE_DWORD = 0xffffffff +} D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS; + typedef struct D2D1_INK_POINT { float x; @@ -67,6 +82,12 @@ typedef struct D2D1_INK_BEZIER_SEGMENT D2D1_INK_POINT point3; } D2D1_INK_BEZIER_SEGMENT;
+typedef struct D2D1_INK_STYLE_PROPERTIES +{ + D2D1_INK_NIB_SHAPE nibShape; + D2D1_MATRIX_3X2_F nibTransform; +} D2D1_INK_STYLE_PROPERTIES; + typedef struct D2D1_GRADIENT_MESH_PATCH { D2D1_POINT_2F point00; @@ -228,3 +249,72 @@ interface ID2D1TransformedImageSource : ID2D1Image [out] D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *out ); }; + +[ + object, + uuid(53dd9855-a3b0-4d5b-82e1-26e25c5e5797), + local, +] +interface ID2D1LookupTable3D : ID2D1Resource +{ +} + +[ + object, + uuid(394ea6a3-0c34-4321-950b-6ca20f0be6c7), + local, +] +interface ID2D1DeviceContext2 : ID2D1DeviceContext1 +{ + HRESULT CreateInk( + [in] const D2D1_INK_POINT *start_point, + [out] ID2D1Ink **ink + ); + HRESULT CreateInkStyle( + [in, optional] const D2D1_INK_STYLE_PROPERTIES *ink_style_properties, + [out] ID2D1InkStyle **ink_style + ); + HRESULT CreateGradientMesh( + [in] const D2D1_GRADIENT_MESH_PATCH *patches, + [in] UINT32 patches_count, + [out] ID2D1GradientMesh **gradient_mesh + ); + HRESULT CreateImageSourceFromWic( + [in] IWICBitmapSource *wic_bitmap_source, + [in] D2D1_IMAGE_SOURCE_LOADING_OPTIONS loading_options, + [in] D2D1_ALPHA_MODE alpha_mode, + [out] ID2D1ImageSourceFromWic **image_source + ); + HRESULT CreateLookupTable3D( + [in] D2D1_BUFFER_PRECISION precision, + [in] const UINT32 *extents, + [in] const BYTE *data, + [in] UINT32 data_count, + [in] const UINT32 *strides, + [out] ID2D1LookupTable3D **lookup_table + ); + HRESULT CreateImageSourceFromDxgi( + [in] IDXGISurface **surfaces, + [in] UINT32 surface_count, + [in] DXGI_COLOR_SPACE_TYPE color_space, + [in] D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options, + [out] ID2D1ImageSource **image_source + ); + HRESULT GetGradientMeshWorldBounds( + [in] ID2D1GradientMesh *gradient_mesh, + [out] D2D1_RECT_F *bounds + ); + void DrawInk( + [in] ID2D1Ink *ink, + [in] ID2D1Brush *brush, + [in, optional] ID2D1InkStyle *ink_style + ); + void DrawGradientMesh( + [in] ID2D1GradientMesh *gradient_mesh + ); + void DrawGdiMetafile( + [in] ID2D1GdiMetafile *gdi_metafile, + [in, optional] const D2D1_RECT_F *dst_rect, + [in, optional] const D2D1_RECT_F *src_rect + ); +}
On Wed, 30 Mar 2022 at 05:58, Ziqing Hui zhui@codeweavers.com wrote:
+[
- object,
- uuid(394ea6a3-0c34-4321-950b-6ca20f0be6c7),
- local,
+] +interface ID2D1DeviceContext2 : ID2D1DeviceContext1 +{
- HRESULT CreateInk(
[in] const D2D1_INK_POINT *start_point,
[out] ID2D1Ink **ink
- );
- HRESULT CreateInkStyle(
[in, optional] const D2D1_INK_STYLE_PROPERTIES *ink_style_properties,
[out] ID2D1InkStyle **ink_style
- );
- HRESULT CreateGradientMesh(
[in] const D2D1_GRADIENT_MESH_PATCH *patches,
[in] UINT32 patches_count,
[out] ID2D1GradientMesh **gradient_mesh
- );
- HRESULT CreateImageSourceFromWic(
[in] IWICBitmapSource *wic_bitmap_source,
[in] D2D1_IMAGE_SOURCE_LOADING_OPTIONS loading_options,
[in] D2D1_ALPHA_MODE alpha_mode,
[out] ID2D1ImageSourceFromWic **image_source
- );
- HRESULT CreateLookupTable3D(
[in] D2D1_BUFFER_PRECISION precision,
[in] const UINT32 *extents,
[in] const BYTE *data,
[in] UINT32 data_count,
[in] const UINT32 *strides,
[out] ID2D1LookupTable3D **lookup_table
- );
- HRESULT CreateImageSourceFromDxgi(
[in] IDXGISurface **surfaces,
[in] UINT32 surface_count,
[in] DXGI_COLOR_SPACE_TYPE color_space,
[in] D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options,
[out] ID2D1ImageSource **image_source
- );
- HRESULT GetGradientMeshWorldBounds(
[in] ID2D1GradientMesh *gradient_mesh,
[out] D2D1_RECT_F *bounds
- );
- void DrawInk(
[in] ID2D1Ink *ink,
[in] ID2D1Brush *brush,
[in, optional] ID2D1InkStyle *ink_style
- );
- void DrawGradientMesh(
[in] ID2D1GradientMesh *gradient_mesh
- );
- void DrawGdiMetafile(
[in] ID2D1GdiMetafile *gdi_metafile,
[in, optional] const D2D1_RECT_F *dst_rect,
[in, optional] const D2D1_RECT_F *src_rect
- );
+}
I think this is missing CreateTransformedImageSource().
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1_3.idl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index c64f353b60c..e4e9f48f5ff 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -318,3 +318,22 @@ interface ID2D1DeviceContext2 : ID2D1DeviceContext1 [in, optional] const D2D1_RECT_F *src_rect ); } + +[ + object, + uuid(a44472e1-8dfb-4e60-8492-6e2861c9ca8b), + local, +] +interface ID2D1Device2 : ID2D1Device1 +{ + HRESULT CreateDeviceContext( + [in] D2D1_DEVICE_CONTEXT_OPTIONS options, + [out] ID2D1DeviceContext2 **context + ); + void FlushDeviceContexts( + [in] ID2D1Bitmap *bitmap + ); + HRESULT GetDxgiDevice( + [out] IDXGIDevice **dxgi_device + ); +}
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1_3.idl | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index e4e9f48f5ff..7109dee1494 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -337,3 +337,16 @@ interface ID2D1Device2 : ID2D1Device1 [out] IDXGIDevice **dxgi_device ); } + +[ + object, + uuid(0869759f-4f00-413f-b03e-2bda45404d0f), + local, +] +interface ID2D1Factory3 : ID2D1Factory2 +{ + HRESULT CreateDevice( + [in] IDXGIDevice *dxgi_device, + [out] ID2D1Device2 **d2d_device + ); +}