diff --git a/External/gccxml/share/gccxml-0.9/vc12/overrides/um/d2d1_3.h b/External/gccxml/share/gccxml-0.9/vc12/overrides/um/d2d1_3.h index cde520bad..0bab1ed20 100644 --- a/External/gccxml/share/gccxml-0.9/vc12/overrides/um/d2d1_3.h +++ b/External/gccxml/share/gccxml-0.9/vc12/overrides/um/d2d1_3.h @@ -386,6 +386,31 @@ typedef struct D2D1_GRADIENT_MESH_PATCH } D2D1_GRADIENT_MESH_PATCH; +//+----------------------------------------------------------------------------- +// +// Flag: +// D2D1_SPRITE_OPTIONS +// +//------------------------------------------------------------------------------ +typedef enum D2D1_SPRITE_OPTIONS +{ + + // + // Use default sprite rendering behavior. + // + D2D1_SPRITE_OPTIONS_NONE = 0, + + // + // Bitmap interpolation will be clamped to the sprite's source rectangle. + // + D2D1_SPRITE_OPTIONS_CLAMP_TO_SOURCE_RECTANGLE = 1, + D2D1_SPRITE_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_SPRITE_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_SPRITE_OPTIONS); + + #ifndef D2D_USE_C_DEFINITIONS @@ -808,7 +833,7 @@ interface DX_DECLARE_INTERFACE("394ea6a3-0c34-4321-950b-6ca20f0be6c7") ID2D1Devi _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL ) PURE; - //using ID2D1DeviceContext::DrawGdiMetafile; + using ID2D1DeviceContext::DrawGdiMetafile; // @@ -916,9 +941,9 @@ interface DX_DECLARE_INTERFACE("a44472e1-8dfb-4e60-8492-6e2861c9ca8b") ID2D1Devi _Outptr_ ID2D1DeviceContext2 **deviceContext2 ) PURE; - //using ID2D1Device1::CreateDeviceContext; + using ID2D1Device1::CreateDeviceContext; - //using ID2D1Device::CreateDeviceContext; +// using ID2D1Device::CreateDeviceContext; // @@ -957,9 +982,9 @@ interface DX_DECLARE_INTERFACE("0869759f-4f00-413f-b03e-2bda45404d0f") ID2D1Fact _Outptr_ ID2D1Device2 **d2dDevice2 ) PURE; - //using ID2D1Factory2::CreateDevice; + using ID2D1Factory2::CreateDevice; - //using ID2D1Factory1::CreateDevice; +// using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory3 @@ -989,7 +1014,7 @@ interface DX_DECLARE_INTERFACE("3bab440e-417e-47df-a2e2-bc0be6a00916") ID2D1Comm _In_opt_ CONST D2D1_RECT_F *sourceRectangle ) PURE; - //using ID2D1CommandSink::DrawGdiMetafile; + using ID2D1CommandSink::DrawGdiMetafile; }; // interface ID2D1CommandSink2 @@ -1050,10 +1075,212 @@ interface DX_DECLARE_INTERFACE("fd0ecb6b-91e6-411e-8655-395e760f91b4") ID2D1GdiM UINT32 flags ) PURE; - //using ID2D1GdiMetafileSink::ProcessRecord; + using ID2D1GdiMetafileSink::ProcessRecord; }; // interface ID2D1GdiMetafileSink1 +//#if NTDDI_VERSION >= NTDDI_WIN10_TH2 + + + +//+----------------------------------------------------------------------------- +// +// Interface: +// ID2D1SpriteBatch +// +//------------------------------------------------------------------------------ +interface DX_DECLARE_INTERFACE("4dc583bf-3a10-438a-8722-e9765224f1f1") ID2D1SpriteBatch : public ID2D1Resource +{ + + + // + // Adds sprites to the end of the sprite batch. + // + STDMETHOD(AddSprites)( + UINT32 spriteCount, + _In_reads_bytes_(sizeof(D2D1_RECT_F) + (spriteCount - 1) * destinationRectanglesStride) CONST D2D1_RECT_F *destinationRectangles, + _In_reads_bytes_opt_(sizeof(D2D1_RECT_U) + (spriteCount - 1) * sourceRectanglesStride) CONST D2D1_RECT_U *sourceRectangles = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_COLOR_F) + (spriteCount - 1) * colorsStride) CONST D2D1_COLOR_F *colors = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_MATRIX_3X2_F) + (spriteCount - 1) * transformsStride) CONST D2D1_MATRIX_3X2_F *transforms = NULL, + UINT32 destinationRectanglesStride = sizeof(D2D1_RECT_F), + UINT32 sourceRectanglesStride = sizeof(D2D1_RECT_U), + UINT32 colorsStride = sizeof(D2D1_COLOR_F), + UINT32 transformsStride = sizeof(D2D1_MATRIX_3X2_F) + ) PURE; + + + // + // Set properties for existing sprites. All properties not specified are + // unmodified. + // + STDMETHOD(SetSprites)( + UINT32 startIndex, + UINT32 spriteCount, + _In_reads_bytes_opt_(sizeof(D2D1_RECT_F) + (spriteCount - 1) * destinationRectanglesStride) CONST D2D1_RECT_F *destinationRectangles = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_RECT_U) + (spriteCount - 1) * sourceRectanglesStride) CONST D2D1_RECT_U *sourceRectangles = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_COLOR_F) + (spriteCount - 1) * colorsStride) CONST D2D1_COLOR_F *colors = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_MATRIX_3X2_F) + (spriteCount - 1) * transformsStride) CONST D2D1_MATRIX_3X2_F *transforms = NULL, + UINT32 destinationRectanglesStride = sizeof(D2D1_RECT_F), + UINT32 sourceRectanglesStride = sizeof(D2D1_RECT_U), + UINT32 colorsStride = sizeof(D2D1_COLOR_F), + UINT32 transformsStride = sizeof(D2D1_MATRIX_3X2_F) + ) PURE; + + + // + // Retrieves sprite properties. + // + STDMETHOD(GetSprites)( + UINT32 startIndex, + UINT32 spriteCount, + _Out_writes_opt_(spriteCount) D2D1_RECT_F *destinationRectangles = NULL, + _Out_writes_opt_(spriteCount) D2D1_RECT_U *sourceRectangles = NULL, + _Out_writes_opt_(spriteCount) D2D1_COLOR_F *colors = NULL, + _Out_writes_opt_(spriteCount) D2D1_MATRIX_3X2_F *transforms = NULL + ) CONST PURE; + + + // + // Retrieves the number of sprites in the sprite batch. + // + STDMETHOD_(UINT32, GetSpriteCount)( + ) CONST PURE; + + + // + // Removes all sprites from the sprite batch. + // + STDMETHOD_(void, Clear)( + ) PURE; +}; // interface ID2D1SpriteBatch + + + +//+----------------------------------------------------------------------------- +// +// Interface: +// ID2D1DeviceContext3 +// +//------------------------------------------------------------------------------ +interface DX_DECLARE_INTERFACE("235a7496-8351-414c-bcd4-6672ab2d8e00") ID2D1DeviceContext3 : public ID2D1DeviceContext2 +{ + + + // + // Creates a new sprite batch. + // + STDMETHOD(CreateSpriteBatch)( + _Outptr_ ID2D1SpriteBatch **spriteBatch + ) PURE; + + + // + // Draws sprites in a sprite batch. + // + STDMETHOD_(void, DrawSpriteBatch)( + _In_ ID2D1SpriteBatch *spriteBatch, + UINT32 startIndex, + UINT32 spriteCount, + _In_ ID2D1Bitmap *bitmap, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, + D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS_NONE + ) PURE; + + + // + // Draws all sprites in a sprite batch. + // + COM_DECLSPEC_NOTHROW + void + DrawSpriteBatch( + _In_ ID2D1SpriteBatch *spriteBatch, + _In_ ID2D1Bitmap *bitmap, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, + D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS_NONE + ) + { + return DrawSpriteBatch(spriteBatch, 0, spriteBatch->GetSpriteCount(), bitmap, interpolationMode, spriteOptions); + } +}; // interface ID2D1DeviceContext3 + + + +//+----------------------------------------------------------------------------- +// +// Interface: +// ID2D1Device3 +// +//------------------------------------------------------------------------------ +interface DX_DECLARE_INTERFACE("852f2087-802c-4037-ab60-ff2e7ee6fc01") ID2D1Device3 : public ID2D1Device2 +{ + + + // + // Creates a new device context with no initially assigned target. + // + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _Outptr_ ID2D1DeviceContext3 **deviceContext3 + ) PURE; + + using ID2D1Device2::CreateDeviceContext; + +// using ID2D1Device1::CreateDeviceContext; + +// using ID2D1Device::CreateDeviceContext; +}; // interface ID2D1Device3 + + + +//+----------------------------------------------------------------------------- +// +// Interface: +// ID2D1Factory4 +// +//------------------------------------------------------------------------------ +interface DX_DECLARE_INTERFACE("bd4ec2d2-0662-4bee-ba8e-6f29f032e096") ID2D1Factory4 : public ID2D1Factory3 +{ + + + // + // This creates a new Direct2D device from the given IDXGIDevice. + // + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _Outptr_ ID2D1Device3 **d2dDevice3 + ) PURE; + + using ID2D1Factory3::CreateDevice; + +// using ID2D1Factory2::CreateDevice; + +// using ID2D1Factory1::CreateDevice; +}; // interface ID2D1Factory4 + + + +//+----------------------------------------------------------------------------- +// +// Interface: +// ID2D1CommandSink3 +// +//------------------------------------------------------------------------------ +interface DX_DECLARE_INTERFACE("18079135-4cf3-4868-bc8e-06067e6d242d") ID2D1CommandSink3 : public ID2D1CommandSink2 +{ + + STDMETHOD(DrawSpriteBatch)( + _In_ ID2D1SpriteBatch *spriteBatch, + UINT32 startIndex, + UINT32 spriteCount, + _In_ ID2D1Bitmap *bitmap, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode, + D2D1_SPRITE_OPTIONS spriteOptions + ) PURE; +}; // interface ID2D1CommandSink3 + + +//#endif // #if NTDDI_VERSION >= NTDDI_WIN10_TH2 + #endif @@ -1071,6 +1298,11 @@ EXTERN_C CONST IID IID_ID2D1Factory3; EXTERN_C CONST IID IID_ID2D1CommandSink2; EXTERN_C CONST IID IID_ID2D1GdiMetafile1; EXTERN_C CONST IID IID_ID2D1GdiMetafileSink1; +EXTERN_C CONST IID IID_ID2D1SpriteBatch; +EXTERN_C CONST IID IID_ID2D1DeviceContext3; +EXTERN_C CONST IID IID_ID2D1Device3; +EXTERN_C CONST IID IID_ID2D1Factory4; +EXTERN_C CONST IID IID_ID2D1CommandSink3; #ifdef D2D_USE_C_DEFINITIONS @@ -1112,27 +1344,35 @@ interface ID2D1InkStyle #define ID2D1InkStyle_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1InkStyle_QueryInterface") #define ID2D1InkStyle_AddRef(This) \ ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1InkStyle_AddRef") #define ID2D1InkStyle_Release(This) \ ((This)->lpVtbl->Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1InkStyle_Release") #define ID2D1InkStyle_GetFactory(This, factory) \ ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1InkStyle_GetFactory") #define ID2D1InkStyle_SetNibTransform(This, transform) \ ((This)->lpVtbl->SetNibTransform(This, transform)) +#pragma deprecated("ID2D1InkStyle_SetNibTransform") #define ID2D1InkStyle_GetNibTransform(This, transform) \ ((This)->lpVtbl->GetNibTransform(This, transform)) +#pragma deprecated("ID2D1InkStyle_GetNibTransform") #define ID2D1InkStyle_SetNibShape(This, nibShape) \ ((This)->lpVtbl->SetNibShape(This, nibShape)) +#pragma deprecated("ID2D1InkStyle_SetNibShape") #define ID2D1InkStyle_GetNibShape(This) \ ((This)->lpVtbl->GetNibShape(This)) +#pragma deprecated("ID2D1InkStyle_GetNibShape") typedef interface ID2D1Ink ID2D1Ink; @@ -1209,45 +1449,59 @@ interface ID2D1Ink #define ID2D1Ink_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1Ink_QueryInterface") #define ID2D1Ink_AddRef(This) \ ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1Ink_AddRef") #define ID2D1Ink_Release(This) \ ((This)->lpVtbl->Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1Ink_Release") #define ID2D1Ink_GetFactory(This, factory) \ ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1Ink_GetFactory") #define ID2D1Ink_SetStartPoint(This, startPoint) \ ((This)->lpVtbl->SetStartPoint(This, startPoint)) +#pragma deprecated("ID2D1Ink_SetStartPoint") #define ID2D1Ink_GetStartPoint(This) \ ((This)->lpVtbl->GetStartPoint(This)) +#pragma deprecated("ID2D1Ink_GetStartPoint") #define ID2D1Ink_AddSegments(This, segments, segmentsCount) \ ((This)->lpVtbl->AddSegments(This, segments, segmentsCount)) +#pragma deprecated("ID2D1Ink_AddSegments") #define ID2D1Ink_RemoveSegmentsAtEnd(This, segmentsCount) \ ((This)->lpVtbl->RemoveSegmentsAtEnd(This, segmentsCount)) +#pragma deprecated("ID2D1Ink_RemoveSegmentsAtEnd") #define ID2D1Ink_SetSegments(This, startSegment, segments, segmentsCount) \ ((This)->lpVtbl->SetSegments(This, startSegment, segments, segmentsCount)) +#pragma deprecated("ID2D1Ink_SetSegments") #define ID2D1Ink_SetSegmentAtEnd(This, segment) \ ((This)->lpVtbl->SetSegmentAtEnd(This, segment)) +#pragma deprecated("ID2D1Ink_SetSegmentAtEnd") #define ID2D1Ink_GetSegmentCount(This) \ ((This)->lpVtbl->GetSegmentCount(This)) +#pragma deprecated("ID2D1Ink_GetSegmentCount") #define ID2D1Ink_GetSegments(This, startSegment, segments, segmentsCount) \ ((This)->lpVtbl->GetSegments(This, startSegment, segments, segmentsCount)) +#pragma deprecated("ID2D1Ink_GetSegments") #define ID2D1Ink_StreamAsGeometry(This, inkStyle, worldTransform, flatteningTolerance, geometrySink) \ ((This)->lpVtbl->StreamAsGeometry(This, inkStyle, worldTransform, flatteningTolerance, geometrySink)) +#pragma deprecated("ID2D1Ink_StreamAsGeometry") #define ID2D1Ink_GetBounds(This, inkStyle, worldTransform, bounds) \ ((This)->lpVtbl->GetBounds(This, inkStyle, worldTransform, bounds)) +#pragma deprecated("ID2D1Ink_GetBounds") typedef interface ID2D1GradientMesh ID2D1GradientMesh; @@ -1277,21 +1531,27 @@ interface ID2D1GradientMesh #define ID2D1GradientMesh_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1GradientMesh_QueryInterface") #define ID2D1GradientMesh_AddRef(This) \ ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1GradientMesh_AddRef") #define ID2D1GradientMesh_Release(This) \ ((This)->lpVtbl->Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1GradientMesh_Release") #define ID2D1GradientMesh_GetFactory(This, factory) \ ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1GradientMesh_GetFactory") #define ID2D1GradientMesh_GetPatchCount(This) \ ((This)->lpVtbl->GetPatchCount(This)) +#pragma deprecated("ID2D1GradientMesh_GetPatchCount") #define ID2D1GradientMesh_GetPatches(This, startIndex, patches, patchesCount) \ ((This)->lpVtbl->GetPatches(This, startIndex, patches, patchesCount)) +#pragma deprecated("ID2D1GradientMesh_GetPatches") typedef interface ID2D1ImageSource ID2D1ImageSource; @@ -1319,21 +1579,27 @@ interface ID2D1ImageSource #define ID2D1ImageSource_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1ImageSource_QueryInterface") #define ID2D1ImageSource_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1ImageSource_AddRef") #define ID2D1ImageSource_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1ImageSource_Release") #define ID2D1ImageSource_GetFactory(This, factory) \ ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1ImageSource_GetFactory") #define ID2D1ImageSource_OfferResources(This) \ ((This)->lpVtbl->OfferResources(This)) +#pragma deprecated("ID2D1ImageSource_OfferResources") #define ID2D1ImageSource_TryReclaimResources(This, resourcesDiscarded) \ ((This)->lpVtbl->TryReclaimResources(This, resourcesDiscarded)) +#pragma deprecated("ID2D1ImageSource_TryReclaimResources") typedef interface ID2D1ImageSourceFromWic ID2D1ImageSourceFromWic; @@ -1367,30 +1633,39 @@ interface ID2D1ImageSourceFromWic #define ID2D1ImageSourceFromWic_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1ImageSourceFromWic_QueryInterface") #define ID2D1ImageSourceFromWic_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1ImageSourceFromWic_AddRef") #define ID2D1ImageSourceFromWic_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1ImageSourceFromWic_Release") #define ID2D1ImageSourceFromWic_GetFactory(This, factory) \ ((This)->lpVtbl->Base.Base.Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1ImageSourceFromWic_GetFactory") #define ID2D1ImageSourceFromWic_OfferResources(This) \ ((This)->lpVtbl->Base.OfferResources((ID2D1ImageSource *)This)) +#pragma deprecated("ID2D1ImageSourceFromWic_OfferResources") #define ID2D1ImageSourceFromWic_TryReclaimResources(This, resourcesDiscarded) \ ((This)->lpVtbl->Base.TryReclaimResources((ID2D1ImageSource *)This, resourcesDiscarded)) +#pragma deprecated("ID2D1ImageSourceFromWic_TryReclaimResources") #define ID2D1ImageSourceFromWic_EnsureCached(This, rectangleToFill) \ ((This)->lpVtbl->EnsureCached(This, rectangleToFill)) +#pragma deprecated("ID2D1ImageSourceFromWic_EnsureCached") #define ID2D1ImageSourceFromWic_TrimCache(This, rectangleToPreserve) \ ((This)->lpVtbl->TrimCache(This, rectangleToPreserve)) +#pragma deprecated("ID2D1ImageSourceFromWic_TrimCache") #define ID2D1ImageSourceFromWic_GetSource(This, wicBitmapSource) \ ((This)->lpVtbl->GetSource(This, wicBitmapSource)) +#pragma deprecated("ID2D1ImageSourceFromWic_GetSource") typedef interface ID2D1TransformedImageSource ID2D1TransformedImageSource; @@ -1419,21 +1694,27 @@ interface ID2D1TransformedImageSource #define ID2D1TransformedImageSource_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1TransformedImageSource_QueryInterface") #define ID2D1TransformedImageSource_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1TransformedImageSource_AddRef") #define ID2D1TransformedImageSource_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1TransformedImageSource_Release") #define ID2D1TransformedImageSource_GetFactory(This, factory) \ ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1TransformedImageSource_GetFactory") #define ID2D1TransformedImageSource_GetSource(This, imageSource) \ ((This)->lpVtbl->GetSource(This, imageSource)) +#pragma deprecated("ID2D1TransformedImageSource_GetSource") #define ID2D1TransformedImageSource_GetProperties(This, properties) \ ((This)->lpVtbl->GetProperties(This, properties)) +#pragma deprecated("ID2D1TransformedImageSource_GetProperties") typedef interface ID2D1LookupTable3D ID2D1LookupTable3D; @@ -1452,15 +1733,19 @@ interface ID2D1LookupTable3D #define ID2D1LookupTable3D_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1LookupTable3D_QueryInterface") #define ID2D1LookupTable3D_AddRef(This) \ ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1LookupTable3D_AddRef") #define ID2D1LookupTable3D_Release(This) \ ((This)->lpVtbl->Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1LookupTable3D_Release") #define ID2D1LookupTable3D_GetFactory(This, factory) \ ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1LookupTable3D_GetFactory") typedef interface ID2D1DeviceContext2 ID2D1DeviceContext2; @@ -1557,294 +1842,391 @@ interface ID2D1DeviceContext2 #define ID2D1DeviceContext2_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1DeviceContext2_QueryInterface") #define ID2D1DeviceContext2_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1DeviceContext2_AddRef") #define ID2D1DeviceContext2_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1DeviceContext2_Release") #define ID2D1DeviceContext2_GetFactory(This, factory) \ ((This)->lpVtbl->Base.Base.Base.Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1DeviceContext2_GetFactory") #define ID2D1DeviceContext2_CreateSharedBitmap(This, riid, data, bitmapProperties, bitmap) \ ((This)->lpVtbl->Base.Base.Base.CreateSharedBitmap((ID2D1RenderTarget *)This, riid, data, bitmapProperties, bitmap)) +#pragma deprecated("ID2D1DeviceContext2_CreateSharedBitmap") #define ID2D1DeviceContext2_CreateSolidColorBrush(This, color, brushProperties, solidColorBrush) \ ((This)->lpVtbl->Base.Base.Base.CreateSolidColorBrush((ID2D1RenderTarget *)This, color, brushProperties, solidColorBrush)) +#pragma deprecated("ID2D1DeviceContext2_CreateSolidColorBrush") #define ID2D1DeviceContext2_CreateLinearGradientBrush(This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush) \ ((This)->lpVtbl->Base.Base.Base.CreateLinearGradientBrush((ID2D1RenderTarget *)This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush)) +#pragma deprecated("ID2D1DeviceContext2_CreateLinearGradientBrush") #define ID2D1DeviceContext2_CreateRadialGradientBrush(This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush) \ ((This)->lpVtbl->Base.Base.Base.CreateRadialGradientBrush((ID2D1RenderTarget *)This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush)) +#pragma deprecated("ID2D1DeviceContext2_CreateRadialGradientBrush") #define ID2D1DeviceContext2_CreateCompatibleRenderTarget(This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget) \ ((This)->lpVtbl->Base.Base.Base.CreateCompatibleRenderTarget((ID2D1RenderTarget *)This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget)) +#pragma deprecated("ID2D1DeviceContext2_CreateCompatibleRenderTarget") #define ID2D1DeviceContext2_CreateLayer(This, size, layer) \ ((This)->lpVtbl->Base.Base.Base.CreateLayer((ID2D1RenderTarget *)This, size, layer)) +#pragma deprecated("ID2D1DeviceContext2_CreateLayer") #define ID2D1DeviceContext2_CreateMesh(This, mesh) \ ((This)->lpVtbl->Base.Base.Base.CreateMesh((ID2D1RenderTarget *)This, mesh)) +#pragma deprecated("ID2D1DeviceContext2_CreateMesh") #define ID2D1DeviceContext2_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.Base.DrawLine((ID2D1RenderTarget *)This, point0, point1, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1DeviceContext2_DrawLine") #define ID2D1DeviceContext2_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.Base.DrawRectangle((ID2D1RenderTarget *)This, rect, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1DeviceContext2_DrawRectangle") #define ID2D1DeviceContext2_FillRectangle(This, rect, brush) \ ((This)->lpVtbl->Base.Base.Base.FillRectangle((ID2D1RenderTarget *)This, rect, brush)) +#pragma deprecated("ID2D1DeviceContext2_FillRectangle") #define ID2D1DeviceContext2_DrawRoundedRectangle(This, roundedRect, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.Base.DrawRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1DeviceContext2_DrawRoundedRectangle") #define ID2D1DeviceContext2_FillRoundedRectangle(This, roundedRect, brush) \ ((This)->lpVtbl->Base.Base.Base.FillRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush)) +#pragma deprecated("ID2D1DeviceContext2_FillRoundedRectangle") #define ID2D1DeviceContext2_DrawEllipse(This, ellipse, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.Base.DrawEllipse((ID2D1RenderTarget *)This, ellipse, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1DeviceContext2_DrawEllipse") #define ID2D1DeviceContext2_FillEllipse(This, ellipse, brush) \ ((This)->lpVtbl->Base.Base.Base.FillEllipse((ID2D1RenderTarget *)This, ellipse, brush)) +#pragma deprecated("ID2D1DeviceContext2_FillEllipse") #define ID2D1DeviceContext2_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.Base.DrawGeometry((ID2D1RenderTarget *)This, geometry, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1DeviceContext2_DrawGeometry") #define ID2D1DeviceContext2_FillGeometry(This, geometry, brush, opacityBrush) \ ((This)->lpVtbl->Base.Base.Base.FillGeometry((ID2D1RenderTarget *)This, geometry, brush, opacityBrush)) +#pragma deprecated("ID2D1DeviceContext2_FillGeometry") #define ID2D1DeviceContext2_FillMesh(This, mesh, brush) \ ((This)->lpVtbl->Base.Base.Base.FillMesh((ID2D1RenderTarget *)This, mesh, brush)) +#pragma deprecated("ID2D1DeviceContext2_FillMesh") #define ID2D1DeviceContext2_DrawText(This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode) \ ((This)->lpVtbl->Base.Base.Base.DrawText((ID2D1RenderTarget *)This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode)) +#pragma deprecated("ID2D1DeviceContext2_DrawText") #define ID2D1DeviceContext2_DrawTextLayout(This, origin, textLayout, defaultForegroundBrush, options) \ ((This)->lpVtbl->Base.Base.Base.DrawTextLayout((ID2D1RenderTarget *)This, origin, textLayout, defaultForegroundBrush, options)) +#pragma deprecated("ID2D1DeviceContext2_DrawTextLayout") #define ID2D1DeviceContext2_SetTransform(This, transform) \ ((This)->lpVtbl->Base.Base.Base.SetTransform((ID2D1RenderTarget *)This, transform)) +#pragma deprecated("ID2D1DeviceContext2_SetTransform") #define ID2D1DeviceContext2_GetTransform(This, transform) \ ((This)->lpVtbl->Base.Base.Base.GetTransform((ID2D1RenderTarget *)This, transform)) +#pragma deprecated("ID2D1DeviceContext2_GetTransform") #define ID2D1DeviceContext2_SetAntialiasMode(This, antialiasMode) \ ((This)->lpVtbl->Base.Base.Base.SetAntialiasMode((ID2D1RenderTarget *)This, antialiasMode)) +#pragma deprecated("ID2D1DeviceContext2_SetAntialiasMode") #define ID2D1DeviceContext2_GetAntialiasMode(This) \ ((This)->lpVtbl->Base.Base.Base.GetAntialiasMode((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetAntialiasMode") #define ID2D1DeviceContext2_SetTextAntialiasMode(This, textAntialiasMode) \ ((This)->lpVtbl->Base.Base.Base.SetTextAntialiasMode((ID2D1RenderTarget *)This, textAntialiasMode)) +#pragma deprecated("ID2D1DeviceContext2_SetTextAntialiasMode") #define ID2D1DeviceContext2_GetTextAntialiasMode(This) \ ((This)->lpVtbl->Base.Base.Base.GetTextAntialiasMode((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetTextAntialiasMode") #define ID2D1DeviceContext2_SetTextRenderingParams(This, textRenderingParams) \ ((This)->lpVtbl->Base.Base.Base.SetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams)) +#pragma deprecated("ID2D1DeviceContext2_SetTextRenderingParams") #define ID2D1DeviceContext2_GetTextRenderingParams(This, textRenderingParams) \ ((This)->lpVtbl->Base.Base.Base.GetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams)) +#pragma deprecated("ID2D1DeviceContext2_GetTextRenderingParams") #define ID2D1DeviceContext2_SetTags(This, tag1, tag2) \ ((This)->lpVtbl->Base.Base.Base.SetTags((ID2D1RenderTarget *)This, tag1, tag2)) +#pragma deprecated("ID2D1DeviceContext2_SetTags") #define ID2D1DeviceContext2_GetTags(This, tag1, tag2) \ ((This)->lpVtbl->Base.Base.Base.GetTags((ID2D1RenderTarget *)This, tag1, tag2)) +#pragma deprecated("ID2D1DeviceContext2_GetTags") #define ID2D1DeviceContext2_PopLayer(This) \ ((This)->lpVtbl->Base.Base.Base.PopLayer((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_PopLayer") #define ID2D1DeviceContext2_Flush(This, tag1, tag2) \ ((This)->lpVtbl->Base.Base.Base.Flush((ID2D1RenderTarget *)This, tag1, tag2)) +#pragma deprecated("ID2D1DeviceContext2_Flush") #define ID2D1DeviceContext2_SaveDrawingState(This, drawingStateBlock) \ ((This)->lpVtbl->Base.Base.Base.SaveDrawingState((ID2D1RenderTarget *)This, drawingStateBlock)) +#pragma deprecated("ID2D1DeviceContext2_SaveDrawingState") #define ID2D1DeviceContext2_RestoreDrawingState(This, drawingStateBlock) \ ((This)->lpVtbl->Base.Base.Base.RestoreDrawingState((ID2D1RenderTarget *)This, drawingStateBlock)) +#pragma deprecated("ID2D1DeviceContext2_RestoreDrawingState") #define ID2D1DeviceContext2_PushAxisAlignedClip(This, clipRect, antialiasMode) \ ((This)->lpVtbl->Base.Base.Base.PushAxisAlignedClip((ID2D1RenderTarget *)This, clipRect, antialiasMode)) +#pragma deprecated("ID2D1DeviceContext2_PushAxisAlignedClip") #define ID2D1DeviceContext2_PopAxisAlignedClip(This) \ ((This)->lpVtbl->Base.Base.Base.PopAxisAlignedClip((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_PopAxisAlignedClip") #define ID2D1DeviceContext2_Clear(This, clearColor) \ ((This)->lpVtbl->Base.Base.Base.Clear((ID2D1RenderTarget *)This, clearColor)) +#pragma deprecated("ID2D1DeviceContext2_Clear") #define ID2D1DeviceContext2_BeginDraw(This) \ ((This)->lpVtbl->Base.Base.Base.BeginDraw((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_BeginDraw") #define ID2D1DeviceContext2_EndDraw(This, tag1, tag2) \ ((This)->lpVtbl->Base.Base.Base.EndDraw((ID2D1RenderTarget *)This, tag1, tag2)) +#pragma deprecated("ID2D1DeviceContext2_EndDraw") #define ID2D1DeviceContext2_GetPixelFormat(This) \ ((This)->lpVtbl->Base.Base.Base.GetPixelFormat((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetPixelFormat") #define ID2D1DeviceContext2_SetDpi(This, dpiX, dpiY) \ ((This)->lpVtbl->Base.Base.Base.SetDpi((ID2D1RenderTarget *)This, dpiX, dpiY)) +#pragma deprecated("ID2D1DeviceContext2_SetDpi") #define ID2D1DeviceContext2_GetDpi(This, dpiX, dpiY) \ ((This)->lpVtbl->Base.Base.Base.GetDpi((ID2D1RenderTarget *)This, dpiX, dpiY)) +#pragma deprecated("ID2D1DeviceContext2_GetDpi") #define ID2D1DeviceContext2_GetSize(This) \ ((This)->lpVtbl->Base.Base.Base.GetSize((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetSize") #define ID2D1DeviceContext2_GetPixelSize(This) \ ((This)->lpVtbl->Base.Base.Base.GetPixelSize((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetPixelSize") #define ID2D1DeviceContext2_GetMaximumBitmapSize(This) \ ((This)->lpVtbl->Base.Base.Base.GetMaximumBitmapSize((ID2D1RenderTarget *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetMaximumBitmapSize") #define ID2D1DeviceContext2_IsSupported(This, renderTargetProperties) \ ((This)->lpVtbl->Base.Base.Base.IsSupported((ID2D1RenderTarget *)This, renderTargetProperties)) +#pragma deprecated("ID2D1DeviceContext2_IsSupported") #define ID2D1DeviceContext2_CreateBitmap(This, size, sourceData, pitch, bitmapProperties, bitmap) \ ((This)->lpVtbl->Base.Base.CreateBitmap((ID2D1DeviceContext *)This, size, sourceData, pitch, bitmapProperties, bitmap)) +#pragma deprecated("ID2D1DeviceContext2_CreateBitmap") #define ID2D1DeviceContext2_CreateBitmapFromWicBitmap(This, wicBitmapSource, bitmapProperties, bitmap) \ ((This)->lpVtbl->Base.Base.CreateBitmapFromWicBitmap((ID2D1DeviceContext *)This, wicBitmapSource, bitmapProperties, bitmap)) +#pragma deprecated("ID2D1DeviceContext2_CreateBitmapFromWicBitmap") #define ID2D1DeviceContext2_CreateColorContext(This, space, profile, profileSize, colorContext) \ ((This)->lpVtbl->Base.Base.CreateColorContext((ID2D1DeviceContext *)This, space, profile, profileSize, colorContext)) +#pragma deprecated("ID2D1DeviceContext2_CreateColorContext") #define ID2D1DeviceContext2_CreateColorContextFromFilename(This, filename, colorContext) \ ((This)->lpVtbl->Base.Base.CreateColorContextFromFilename((ID2D1DeviceContext *)This, filename, colorContext)) +#pragma deprecated("ID2D1DeviceContext2_CreateColorContextFromFilename") #define ID2D1DeviceContext2_CreateColorContextFromWicColorContext(This, wicColorContext, colorContext) \ ((This)->lpVtbl->Base.Base.CreateColorContextFromWicColorContext((ID2D1DeviceContext *)This, wicColorContext, colorContext)) +#pragma deprecated("ID2D1DeviceContext2_CreateColorContextFromWicColorContext") #define ID2D1DeviceContext2_CreateBitmapFromDxgiSurface(This, surface, bitmapProperties, bitmap) \ ((This)->lpVtbl->Base.Base.CreateBitmapFromDxgiSurface((ID2D1DeviceContext *)This, surface, bitmapProperties, bitmap)) +#pragma deprecated("ID2D1DeviceContext2_CreateBitmapFromDxgiSurface") #define ID2D1DeviceContext2_CreateEffect(This, effectId, effect) \ ((This)->lpVtbl->Base.Base.CreateEffect((ID2D1DeviceContext *)This, effectId, effect)) +#pragma deprecated("ID2D1DeviceContext2_CreateEffect") #define ID2D1DeviceContext2_CreateGradientStopCollection(This, straightAlphaGradientStops, straightAlphaGradientStopsCount, preInterpolationSpace, postInterpolationSpace, bufferPrecision, extendMode, colorInterpolationMode, gradientStopCollection1) \ ((This)->lpVtbl->Base.Base.CreateGradientStopCollection((ID2D1DeviceContext *)This, straightAlphaGradientStops, straightAlphaGradientStopsCount, preInterpolationSpace, postInterpolationSpace, bufferPrecision, extendMode, colorInterpolationMode, gradientStopCollection1)) +#pragma deprecated("ID2D1DeviceContext2_CreateGradientStopCollection") #define ID2D1DeviceContext2_CreateImageBrush(This, image, imageBrushProperties, brushProperties, imageBrush) \ ((This)->lpVtbl->Base.Base.CreateImageBrush((ID2D1DeviceContext *)This, image, imageBrushProperties, brushProperties, imageBrush)) +#pragma deprecated("ID2D1DeviceContext2_CreateImageBrush") #define ID2D1DeviceContext2_CreateBitmapBrush(This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush) \ ((This)->lpVtbl->Base.Base.CreateBitmapBrush((ID2D1DeviceContext *)This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush)) +#pragma deprecated("ID2D1DeviceContext2_CreateBitmapBrush") #define ID2D1DeviceContext2_CreateCommandList(This, commandList) \ ((This)->lpVtbl->Base.Base.CreateCommandList((ID2D1DeviceContext *)This, commandList)) +#pragma deprecated("ID2D1DeviceContext2_CreateCommandList") #define ID2D1DeviceContext2_IsDxgiFormatSupported(This, format) \ ((This)->lpVtbl->Base.Base.IsDxgiFormatSupported((ID2D1DeviceContext *)This, format)) +#pragma deprecated("ID2D1DeviceContext2_IsDxgiFormatSupported") #define ID2D1DeviceContext2_IsBufferPrecisionSupported(This, bufferPrecision) \ ((This)->lpVtbl->Base.Base.IsBufferPrecisionSupported((ID2D1DeviceContext *)This, bufferPrecision)) +#pragma deprecated("ID2D1DeviceContext2_IsBufferPrecisionSupported") #define ID2D1DeviceContext2_GetImageLocalBounds(This, image, localBounds) \ ((This)->lpVtbl->Base.Base.GetImageLocalBounds((ID2D1DeviceContext *)This, image, localBounds)) +#pragma deprecated("ID2D1DeviceContext2_GetImageLocalBounds") #define ID2D1DeviceContext2_GetImageWorldBounds(This, image, worldBounds) \ ((This)->lpVtbl->Base.Base.GetImageWorldBounds((ID2D1DeviceContext *)This, image, worldBounds)) +#pragma deprecated("ID2D1DeviceContext2_GetImageWorldBounds") #define ID2D1DeviceContext2_GetGlyphRunWorldBounds(This, baselineOrigin, glyphRun, measuringMode, bounds) \ ((This)->lpVtbl->Base.Base.GetGlyphRunWorldBounds((ID2D1DeviceContext *)This, baselineOrigin, glyphRun, measuringMode, bounds)) +#pragma deprecated("ID2D1DeviceContext2_GetGlyphRunWorldBounds") #define ID2D1DeviceContext2_GetDevice(This, device) \ ((This)->lpVtbl->Base.Base.GetDevice((ID2D1DeviceContext *)This, device)) +#pragma deprecated("ID2D1DeviceContext2_GetDevice") #define ID2D1DeviceContext2_SetTarget(This, image) \ ((This)->lpVtbl->Base.Base.SetTarget((ID2D1DeviceContext *)This, image)) +#pragma deprecated("ID2D1DeviceContext2_SetTarget") #define ID2D1DeviceContext2_GetTarget(This, image) \ ((This)->lpVtbl->Base.Base.GetTarget((ID2D1DeviceContext *)This, image)) +#pragma deprecated("ID2D1DeviceContext2_GetTarget") #define ID2D1DeviceContext2_SetRenderingControls(This, renderingControls) \ ((This)->lpVtbl->Base.Base.SetRenderingControls((ID2D1DeviceContext *)This, renderingControls)) +#pragma deprecated("ID2D1DeviceContext2_SetRenderingControls") #define ID2D1DeviceContext2_GetRenderingControls(This, renderingControls) \ ((This)->lpVtbl->Base.Base.GetRenderingControls((ID2D1DeviceContext *)This, renderingControls)) +#pragma deprecated("ID2D1DeviceContext2_GetRenderingControls") #define ID2D1DeviceContext2_SetPrimitiveBlend(This, primitiveBlend) \ ((This)->lpVtbl->Base.Base.SetPrimitiveBlend((ID2D1DeviceContext *)This, primitiveBlend)) +#pragma deprecated("ID2D1DeviceContext2_SetPrimitiveBlend") #define ID2D1DeviceContext2_GetPrimitiveBlend(This) \ ((This)->lpVtbl->Base.Base.GetPrimitiveBlend((ID2D1DeviceContext *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetPrimitiveBlend") #define ID2D1DeviceContext2_SetUnitMode(This, unitMode) \ ((This)->lpVtbl->Base.Base.SetUnitMode((ID2D1DeviceContext *)This, unitMode)) +#pragma deprecated("ID2D1DeviceContext2_SetUnitMode") #define ID2D1DeviceContext2_GetUnitMode(This) \ ((This)->lpVtbl->Base.Base.GetUnitMode((ID2D1DeviceContext *)This)) +#pragma deprecated("ID2D1DeviceContext2_GetUnitMode") #define ID2D1DeviceContext2_DrawGlyphRun(This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode) \ ((This)->lpVtbl->Base.Base.DrawGlyphRun((ID2D1DeviceContext *)This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode)) +#pragma deprecated("ID2D1DeviceContext2_DrawGlyphRun") #define ID2D1DeviceContext2_DrawImage(This, image, targetOffset, imageRectangle, interpolationMode, compositeMode) \ ((This)->lpVtbl->Base.Base.DrawImage((ID2D1DeviceContext *)This, image, targetOffset, imageRectangle, interpolationMode, compositeMode)) +#pragma deprecated("ID2D1DeviceContext2_DrawImage") #define ID2D1DeviceContext2_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform) \ ((This)->lpVtbl->Base.Base.DrawBitmap((ID2D1DeviceContext *)This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform)) +#pragma deprecated("ID2D1DeviceContext2_DrawBitmap") #define ID2D1DeviceContext2_PushLayer(This, layerParameters, layer) \ ((This)->lpVtbl->Base.Base.PushLayer((ID2D1DeviceContext *)This, layerParameters, layer)) +#pragma deprecated("ID2D1DeviceContext2_PushLayer") #define ID2D1DeviceContext2_InvalidateEffectInputRectangle(This, effect, input, inputRectangle) \ ((This)->lpVtbl->Base.Base.InvalidateEffectInputRectangle((ID2D1DeviceContext *)This, effect, input, inputRectangle)) +#pragma deprecated("ID2D1DeviceContext2_InvalidateEffectInputRectangle") #define ID2D1DeviceContext2_GetEffectInvalidRectangleCount(This, effect, rectangleCount) \ ((This)->lpVtbl->Base.Base.GetEffectInvalidRectangleCount((ID2D1DeviceContext *)This, effect, rectangleCount)) +#pragma deprecated("ID2D1DeviceContext2_GetEffectInvalidRectangleCount") #define ID2D1DeviceContext2_GetEffectInvalidRectangles(This, effect, rectangles, rectanglesCount) \ ((This)->lpVtbl->Base.Base.GetEffectInvalidRectangles((ID2D1DeviceContext *)This, effect, rectangles, rectanglesCount)) +#pragma deprecated("ID2D1DeviceContext2_GetEffectInvalidRectangles") #define ID2D1DeviceContext2_GetEffectRequiredInputRectangles(This, renderEffect, renderImageRectangle, inputDescriptions, requiredInputRects, inputCount) \ ((This)->lpVtbl->Base.Base.GetEffectRequiredInputRectangles((ID2D1DeviceContext *)This, renderEffect, renderImageRectangle, inputDescriptions, requiredInputRects, inputCount)) +#pragma deprecated("ID2D1DeviceContext2_GetEffectRequiredInputRectangles") #define ID2D1DeviceContext2_FillOpacityMask(This, opacityMask, brush, destinationRectangle, sourceRectangle) \ ((This)->lpVtbl->Base.Base.FillOpacityMask((ID2D1DeviceContext *)This, opacityMask, brush, destinationRectangle, sourceRectangle)) +#pragma deprecated("ID2D1DeviceContext2_FillOpacityMask") #define ID2D1DeviceContext2_CreateFilledGeometryRealization(This, geometry, flatteningTolerance, geometryRealization) \ ((This)->lpVtbl->Base.CreateFilledGeometryRealization((ID2D1DeviceContext1 *)This, geometry, flatteningTolerance, geometryRealization)) +#pragma deprecated("ID2D1DeviceContext2_CreateFilledGeometryRealization") #define ID2D1DeviceContext2_CreateStrokedGeometryRealization(This, geometry, flatteningTolerance, strokeWidth, strokeStyle, geometryRealization) \ ((This)->lpVtbl->Base.CreateStrokedGeometryRealization((ID2D1DeviceContext1 *)This, geometry, flatteningTolerance, strokeWidth, strokeStyle, geometryRealization)) +#pragma deprecated("ID2D1DeviceContext2_CreateStrokedGeometryRealization") #define ID2D1DeviceContext2_DrawGeometryRealization(This, geometryRealization, brush) \ ((This)->lpVtbl->Base.DrawGeometryRealization((ID2D1DeviceContext1 *)This, geometryRealization, brush)) +#pragma deprecated("ID2D1DeviceContext2_DrawGeometryRealization") #define ID2D1DeviceContext2_CreateInk(This, startPoint, ink) \ ((This)->lpVtbl->CreateInk(This, startPoint, ink)) +#pragma deprecated("ID2D1DeviceContext2_CreateInk") #define ID2D1DeviceContext2_CreateInkStyle(This, inkStyleProperties, inkStyle) \ ((This)->lpVtbl->CreateInkStyle(This, inkStyleProperties, inkStyle)) +#pragma deprecated("ID2D1DeviceContext2_CreateInkStyle") #define ID2D1DeviceContext2_CreateGradientMesh(This, patches, patchesCount, gradientMesh) \ ((This)->lpVtbl->CreateGradientMesh(This, patches, patchesCount, gradientMesh)) +#pragma deprecated("ID2D1DeviceContext2_CreateGradientMesh") #define ID2D1DeviceContext2_CreateImageSourceFromWic(This, wicBitmapSource, loadingOptions, alphaMode, imageSource) \ ((This)->lpVtbl->CreateImageSourceFromWic(This, wicBitmapSource, loadingOptions, alphaMode, imageSource)) +#pragma deprecated("ID2D1DeviceContext2_CreateImageSourceFromWic") #define ID2D1DeviceContext2_CreateLookupTable3D(This, precision, extents, data, dataCount, strides, lookupTable) \ ((This)->lpVtbl->CreateLookupTable3D(This, precision, extents, data, dataCount, strides, lookupTable)) +#pragma deprecated("ID2D1DeviceContext2_CreateLookupTable3D") #define ID2D1DeviceContext2_CreateImageSourceFromDxgi(This, surfaces, surfaceCount, colorSpace, options, imageSource) \ ((This)->lpVtbl->CreateImageSourceFromDxgi(This, surfaces, surfaceCount, colorSpace, options, imageSource)) +#pragma deprecated("ID2D1DeviceContext2_CreateImageSourceFromDxgi") #define ID2D1DeviceContext2_GetGradientMeshWorldBounds(This, gradientMesh, pBounds) \ ((This)->lpVtbl->GetGradientMeshWorldBounds(This, gradientMesh, pBounds)) +#pragma deprecated("ID2D1DeviceContext2_GetGradientMeshWorldBounds") #define ID2D1DeviceContext2_DrawInk(This, ink, brush, inkStyle) \ ((This)->lpVtbl->DrawInk(This, ink, brush, inkStyle)) +#pragma deprecated("ID2D1DeviceContext2_DrawInk") #define ID2D1DeviceContext2_DrawGradientMesh(This, gradientMesh) \ ((This)->lpVtbl->DrawGradientMesh(This, gradientMesh)) +#pragma deprecated("ID2D1DeviceContext2_DrawGradientMesh") #define ID2D1DeviceContext2_DrawGdiMetafile(This, gdiMetafile, destinationRectangle, sourceRectangle) \ ((This)->lpVtbl->DrawGdiMetafile(This, gdiMetafile, destinationRectangle, sourceRectangle)) +#pragma deprecated("ID2D1DeviceContext2_DrawGdiMetafile") #define ID2D1DeviceContext2_CreateTransformedImageSource(This, imageSource, properties, transformedImageSource) \ ((This)->lpVtbl->CreateTransformedImageSource(This, imageSource, properties, transformedImageSource)) +#pragma deprecated("ID2D1DeviceContext2_CreateTransformedImageSource") typedef interface ID2D1Device2 ID2D1Device2; @@ -1879,42 +2261,55 @@ interface ID2D1Device2 #define ID2D1Device2_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1Device2_QueryInterface") #define ID2D1Device2_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1Device2_AddRef") #define ID2D1Device2_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1Device2_Release") #define ID2D1Device2_GetFactory(This, factory) \ ((This)->lpVtbl->Base.Base.Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1Device2_GetFactory") #define ID2D1Device2_CreatePrintControl(This, wicFactory, documentTarget, printControlProperties, printControl) \ ((This)->lpVtbl->Base.Base.CreatePrintControl((ID2D1Device *)This, wicFactory, documentTarget, printControlProperties, printControl)) +#pragma deprecated("ID2D1Device2_CreatePrintControl") #define ID2D1Device2_SetMaximumTextureMemory(This, maximumInBytes) \ ((This)->lpVtbl->Base.Base.SetMaximumTextureMemory((ID2D1Device *)This, maximumInBytes)) +#pragma deprecated("ID2D1Device2_SetMaximumTextureMemory") #define ID2D1Device2_GetMaximumTextureMemory(This) \ ((This)->lpVtbl->Base.Base.GetMaximumTextureMemory((ID2D1Device *)This)) +#pragma deprecated("ID2D1Device2_GetMaximumTextureMemory") #define ID2D1Device2_ClearResources(This, millisecondsSinceUse) \ ((This)->lpVtbl->Base.Base.ClearResources((ID2D1Device *)This, millisecondsSinceUse)) +#pragma deprecated("ID2D1Device2_ClearResources") #define ID2D1Device2_GetRenderingPriority(This) \ ((This)->lpVtbl->Base.GetRenderingPriority((ID2D1Device1 *)This)) +#pragma deprecated("ID2D1Device2_GetRenderingPriority") #define ID2D1Device2_SetRenderingPriority(This, renderingPriority) \ ((This)->lpVtbl->Base.SetRenderingPriority((ID2D1Device1 *)This, renderingPriority)) +#pragma deprecated("ID2D1Device2_SetRenderingPriority") #define ID2D1Device2_CreateDeviceContext(This, options, deviceContext2) \ ((This)->lpVtbl->CreateDeviceContext(This, options, deviceContext2)) +#pragma deprecated("ID2D1Device2_CreateDeviceContext") #define ID2D1Device2_FlushDeviceContexts(This, bitmap) \ ((This)->lpVtbl->FlushDeviceContexts(This, bitmap)) +#pragma deprecated("ID2D1Device2_FlushDeviceContexts") #define ID2D1Device2_GetDxgiDevice(This, dxgiDevice) \ ((This)->lpVtbl->GetDxgiDevice(This, dxgiDevice)) +#pragma deprecated("ID2D1Device2_GetDxgiDevice") typedef interface ID2D1Factory3 ID2D1Factory3; @@ -1939,75 +2334,99 @@ interface ID2D1Factory3 #define ID2D1Factory3_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1Factory3_QueryInterface") #define ID2D1Factory3_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1Factory3_AddRef") #define ID2D1Factory3_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1Factory3_Release") #define ID2D1Factory3_ReloadSystemMetrics(This) \ ((This)->lpVtbl->Base.Base.Base.ReloadSystemMetrics((ID2D1Factory *)This)) +#pragma deprecated("ID2D1Factory3_ReloadSystemMetrics") #define ID2D1Factory3_GetDesktopDpi(This, dpiX, dpiY) \ ((This)->lpVtbl->Base.Base.Base.GetDesktopDpi((ID2D1Factory *)This, dpiX, dpiY)) +#pragma deprecated("ID2D1Factory3_GetDesktopDpi") #define ID2D1Factory3_CreateRectangleGeometry(This, rectangle, rectangleGeometry) \ ((This)->lpVtbl->Base.Base.Base.CreateRectangleGeometry((ID2D1Factory *)This, rectangle, rectangleGeometry)) +#pragma deprecated("ID2D1Factory3_CreateRectangleGeometry") #define ID2D1Factory3_CreateRoundedRectangleGeometry(This, roundedRectangle, roundedRectangleGeometry) \ ((This)->lpVtbl->Base.Base.Base.CreateRoundedRectangleGeometry((ID2D1Factory *)This, roundedRectangle, roundedRectangleGeometry)) +#pragma deprecated("ID2D1Factory3_CreateRoundedRectangleGeometry") #define ID2D1Factory3_CreateEllipseGeometry(This, ellipse, ellipseGeometry) \ ((This)->lpVtbl->Base.Base.Base.CreateEllipseGeometry((ID2D1Factory *)This, ellipse, ellipseGeometry)) +#pragma deprecated("ID2D1Factory3_CreateEllipseGeometry") #define ID2D1Factory3_CreateGeometryGroup(This, fillMode, geometries, geometriesCount, geometryGroup) \ ((This)->lpVtbl->Base.Base.Base.CreateGeometryGroup((ID2D1Factory *)This, fillMode, geometries, geometriesCount, geometryGroup)) +#pragma deprecated("ID2D1Factory3_CreateGeometryGroup") #define ID2D1Factory3_CreateTransformedGeometry(This, sourceGeometry, transform, transformedGeometry) \ ((This)->lpVtbl->Base.Base.Base.CreateTransformedGeometry((ID2D1Factory *)This, sourceGeometry, transform, transformedGeometry)) +#pragma deprecated("ID2D1Factory3_CreateTransformedGeometry") #define ID2D1Factory3_CreateWicBitmapRenderTarget(This, target, renderTargetProperties, renderTarget) \ ((This)->lpVtbl->Base.Base.Base.CreateWicBitmapRenderTarget((ID2D1Factory *)This, target, renderTargetProperties, renderTarget)) +#pragma deprecated("ID2D1Factory3_CreateWicBitmapRenderTarget") #define ID2D1Factory3_CreateHwndRenderTarget(This, renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget) \ ((This)->lpVtbl->Base.Base.Base.CreateHwndRenderTarget((ID2D1Factory *)This, renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget)) +#pragma deprecated("ID2D1Factory3_CreateHwndRenderTarget") #define ID2D1Factory3_CreateDxgiSurfaceRenderTarget(This, dxgiSurface, renderTargetProperties, renderTarget) \ ((This)->lpVtbl->Base.Base.Base.CreateDxgiSurfaceRenderTarget((ID2D1Factory *)This, dxgiSurface, renderTargetProperties, renderTarget)) +#pragma deprecated("ID2D1Factory3_CreateDxgiSurfaceRenderTarget") #define ID2D1Factory3_CreateDCRenderTarget(This, renderTargetProperties, dcRenderTarget) \ ((This)->lpVtbl->Base.Base.Base.CreateDCRenderTarget((ID2D1Factory *)This, renderTargetProperties, dcRenderTarget)) +#pragma deprecated("ID2D1Factory3_CreateDCRenderTarget") #define ID2D1Factory3_CreateStrokeStyle(This, strokeStyleProperties, dashes, dashesCount, strokeStyle) \ ((This)->lpVtbl->Base.Base.CreateStrokeStyle((ID2D1Factory1 *)This, strokeStyleProperties, dashes, dashesCount, strokeStyle)) +#pragma deprecated("ID2D1Factory3_CreateStrokeStyle") #define ID2D1Factory3_CreatePathGeometry(This, pathGeometry) \ ((This)->lpVtbl->Base.Base.CreatePathGeometry((ID2D1Factory1 *)This, pathGeometry)) +#pragma deprecated("ID2D1Factory3_CreatePathGeometry") #define ID2D1Factory3_CreateDrawingStateBlock(This, drawingStateDescription, textRenderingParams, drawingStateBlock) \ ((This)->lpVtbl->Base.Base.CreateDrawingStateBlock((ID2D1Factory1 *)This, drawingStateDescription, textRenderingParams, drawingStateBlock)) +#pragma deprecated("ID2D1Factory3_CreateDrawingStateBlock") #define ID2D1Factory3_CreateGdiMetafile(This, metafileStream, metafile) \ ((This)->lpVtbl->Base.Base.CreateGdiMetafile((ID2D1Factory1 *)This, metafileStream, metafile)) +#pragma deprecated("ID2D1Factory3_CreateGdiMetafile") #define ID2D1Factory3_RegisterEffectFromStream(This, classId, propertyXml, bindings, bindingsCount, effectFactory) \ ((This)->lpVtbl->Base.Base.RegisterEffectFromStream((ID2D1Factory1 *)This, classId, propertyXml, bindings, bindingsCount, effectFactory)) +#pragma deprecated("ID2D1Factory3_RegisterEffectFromStream") #define ID2D1Factory3_RegisterEffectFromString(This, classId, propertyXml, bindings, bindingsCount, effectFactory) \ ((This)->lpVtbl->Base.Base.RegisterEffectFromString((ID2D1Factory1 *)This, classId, propertyXml, bindings, bindingsCount, effectFactory)) +#pragma deprecated("ID2D1Factory3_RegisterEffectFromString") #define ID2D1Factory3_UnregisterEffect(This, classId) \ ((This)->lpVtbl->Base.Base.UnregisterEffect((ID2D1Factory1 *)This, classId)) +#pragma deprecated("ID2D1Factory3_UnregisterEffect") #define ID2D1Factory3_GetRegisteredEffects(This, effects, effectsCount, effectsReturned, effectsRegistered) \ ((This)->lpVtbl->Base.Base.GetRegisteredEffects((ID2D1Factory1 *)This, effects, effectsCount, effectsReturned, effectsRegistered)) +#pragma deprecated("ID2D1Factory3_GetRegisteredEffects") #define ID2D1Factory3_GetEffectProperties(This, effectId, properties) \ ((This)->lpVtbl->Base.Base.GetEffectProperties((ID2D1Factory1 *)This, effectId, properties)) +#pragma deprecated("ID2D1Factory3_GetEffectProperties") #define ID2D1Factory3_CreateDevice(This, dxgiDevice, d2dDevice2) \ ((This)->lpVtbl->CreateDevice(This, dxgiDevice, d2dDevice2)) +#pragma deprecated("ID2D1Factory3_CreateDevice") typedef interface ID2D1CommandSink2 ID2D1CommandSink2; @@ -2045,96 +2464,127 @@ interface ID2D1CommandSink2 #define ID2D1CommandSink2_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1CommandSink2_QueryInterface") #define ID2D1CommandSink2_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1CommandSink2_AddRef") #define ID2D1CommandSink2_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1CommandSink2_Release") #define ID2D1CommandSink2_BeginDraw(This) \ ((This)->lpVtbl->Base.Base.BeginDraw((ID2D1CommandSink *)This)) +#pragma deprecated("ID2D1CommandSink2_BeginDraw") #define ID2D1CommandSink2_EndDraw(This) \ ((This)->lpVtbl->Base.Base.EndDraw((ID2D1CommandSink *)This)) +#pragma deprecated("ID2D1CommandSink2_EndDraw") #define ID2D1CommandSink2_SetAntialiasMode(This, antialiasMode) \ ((This)->lpVtbl->Base.Base.SetAntialiasMode((ID2D1CommandSink *)This, antialiasMode)) +#pragma deprecated("ID2D1CommandSink2_SetAntialiasMode") #define ID2D1CommandSink2_SetTags(This, tag1, tag2) \ ((This)->lpVtbl->Base.Base.SetTags((ID2D1CommandSink *)This, tag1, tag2)) +#pragma deprecated("ID2D1CommandSink2_SetTags") #define ID2D1CommandSink2_SetTextAntialiasMode(This, textAntialiasMode) \ ((This)->lpVtbl->Base.Base.SetTextAntialiasMode((ID2D1CommandSink *)This, textAntialiasMode)) +#pragma deprecated("ID2D1CommandSink2_SetTextAntialiasMode") #define ID2D1CommandSink2_SetTextRenderingParams(This, textRenderingParams) \ ((This)->lpVtbl->Base.Base.SetTextRenderingParams((ID2D1CommandSink *)This, textRenderingParams)) +#pragma deprecated("ID2D1CommandSink2_SetTextRenderingParams") #define ID2D1CommandSink2_SetTransform(This, transform) \ ((This)->lpVtbl->Base.Base.SetTransform((ID2D1CommandSink *)This, transform)) +#pragma deprecated("ID2D1CommandSink2_SetTransform") #define ID2D1CommandSink2_SetPrimitiveBlend(This, primitiveBlend) \ ((This)->lpVtbl->Base.Base.SetPrimitiveBlend((ID2D1CommandSink *)This, primitiveBlend)) +#pragma deprecated("ID2D1CommandSink2_SetPrimitiveBlend") #define ID2D1CommandSink2_SetUnitMode(This, unitMode) \ ((This)->lpVtbl->Base.Base.SetUnitMode((ID2D1CommandSink *)This, unitMode)) +#pragma deprecated("ID2D1CommandSink2_SetUnitMode") #define ID2D1CommandSink2_Clear(This, color) \ ((This)->lpVtbl->Base.Base.Clear((ID2D1CommandSink *)This, color)) +#pragma deprecated("ID2D1CommandSink2_Clear") #define ID2D1CommandSink2_DrawGlyphRun(This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode) \ ((This)->lpVtbl->Base.Base.DrawGlyphRun((ID2D1CommandSink *)This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode)) +#pragma deprecated("ID2D1CommandSink2_DrawGlyphRun") #define ID2D1CommandSink2_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.DrawLine((ID2D1CommandSink *)This, point0, point1, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1CommandSink2_DrawLine") #define ID2D1CommandSink2_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.DrawGeometry((ID2D1CommandSink *)This, geometry, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1CommandSink2_DrawGeometry") #define ID2D1CommandSink2_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \ ((This)->lpVtbl->Base.Base.DrawRectangle((ID2D1CommandSink *)This, rect, brush, strokeWidth, strokeStyle)) +#pragma deprecated("ID2D1CommandSink2_DrawRectangle") #define ID2D1CommandSink2_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform) \ ((This)->lpVtbl->Base.Base.DrawBitmap((ID2D1CommandSink *)This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform)) +#pragma deprecated("ID2D1CommandSink2_DrawBitmap") #define ID2D1CommandSink2_DrawImage(This, image, targetOffset, imageRectangle, interpolationMode, compositeMode) \ ((This)->lpVtbl->Base.Base.DrawImage((ID2D1CommandSink *)This, image, targetOffset, imageRectangle, interpolationMode, compositeMode)) +#pragma deprecated("ID2D1CommandSink2_DrawImage") #define ID2D1CommandSink2_FillMesh(This, mesh, brush) \ ((This)->lpVtbl->Base.Base.FillMesh((ID2D1CommandSink *)This, mesh, brush)) +#pragma deprecated("ID2D1CommandSink2_FillMesh") #define ID2D1CommandSink2_FillOpacityMask(This, opacityMask, brush, destinationRectangle, sourceRectangle) \ ((This)->lpVtbl->Base.Base.FillOpacityMask((ID2D1CommandSink *)This, opacityMask, brush, destinationRectangle, sourceRectangle)) +#pragma deprecated("ID2D1CommandSink2_FillOpacityMask") #define ID2D1CommandSink2_FillGeometry(This, geometry, brush, opacityBrush) \ ((This)->lpVtbl->Base.Base.FillGeometry((ID2D1CommandSink *)This, geometry, brush, opacityBrush)) +#pragma deprecated("ID2D1CommandSink2_FillGeometry") #define ID2D1CommandSink2_FillRectangle(This, rect, brush) \ ((This)->lpVtbl->Base.Base.FillRectangle((ID2D1CommandSink *)This, rect, brush)) +#pragma deprecated("ID2D1CommandSink2_FillRectangle") #define ID2D1CommandSink2_PushAxisAlignedClip(This, clipRect, antialiasMode) \ ((This)->lpVtbl->Base.Base.PushAxisAlignedClip((ID2D1CommandSink *)This, clipRect, antialiasMode)) +#pragma deprecated("ID2D1CommandSink2_PushAxisAlignedClip") #define ID2D1CommandSink2_PushLayer(This, layerParameters1, layer) \ ((This)->lpVtbl->Base.Base.PushLayer((ID2D1CommandSink *)This, layerParameters1, layer)) +#pragma deprecated("ID2D1CommandSink2_PushLayer") #define ID2D1CommandSink2_PopAxisAlignedClip(This) \ ((This)->lpVtbl->Base.Base.PopAxisAlignedClip((ID2D1CommandSink *)This)) +#pragma deprecated("ID2D1CommandSink2_PopAxisAlignedClip") #define ID2D1CommandSink2_PopLayer(This) \ ((This)->lpVtbl->Base.Base.PopLayer((ID2D1CommandSink *)This)) +#pragma deprecated("ID2D1CommandSink2_PopLayer") #define ID2D1CommandSink2_SetPrimitiveBlend1(This, primitiveBlend) \ ((This)->lpVtbl->Base.SetPrimitiveBlend1((ID2D1CommandSink1 *)This, primitiveBlend)) +#pragma deprecated("ID2D1CommandSink2_SetPrimitiveBlend1") #define ID2D1CommandSink2_DrawInk(This, ink, brush, inkStyle) \ ((This)->lpVtbl->DrawInk(This, ink, brush, inkStyle)) +#pragma deprecated("ID2D1CommandSink2_DrawInk") #define ID2D1CommandSink2_DrawGradientMesh(This, gradientMesh) \ ((This)->lpVtbl->DrawGradientMesh(This, gradientMesh)) +#pragma deprecated("ID2D1CommandSink2_DrawGradientMesh") #define ID2D1CommandSink2_DrawGdiMetafile(This, gdiMetafile, destinationRectangle, sourceRectangle) \ ((This)->lpVtbl->DrawGdiMetafile(This, gdiMetafile, destinationRectangle, sourceRectangle)) +#pragma deprecated("ID2D1CommandSink2_DrawGdiMetafile") typedef interface ID2D1GdiMetafile1 ID2D1GdiMetafile1; @@ -2164,27 +2614,35 @@ interface ID2D1GdiMetafile1 #define ID2D1GdiMetafile1_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1GdiMetafile1_QueryInterface") #define ID2D1GdiMetafile1_AddRef(This) \ ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1GdiMetafile1_AddRef") #define ID2D1GdiMetafile1_Release(This) \ ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1GdiMetafile1_Release") #define ID2D1GdiMetafile1_GetFactory(This, factory) \ ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory)) +#pragma deprecated("ID2D1GdiMetafile1_GetFactory") #define ID2D1GdiMetafile1_Stream(This, sink) \ ((This)->lpVtbl->Base.Stream((ID2D1GdiMetafile *)This, sink)) +#pragma deprecated("ID2D1GdiMetafile1_Stream") #define ID2D1GdiMetafile1_GetBounds(This, bounds) \ ((This)->lpVtbl->Base.GetBounds((ID2D1GdiMetafile *)This, bounds)) +#pragma deprecated("ID2D1GdiMetafile1_GetBounds") #define ID2D1GdiMetafile1_GetDpi(This, dpiX, dpiY) \ ((This)->lpVtbl->GetDpi(This, dpiX, dpiY)) +#pragma deprecated("ID2D1GdiMetafile1_GetDpi") #define ID2D1GdiMetafile1_GetSourceBounds(This, bounds) \ ((This)->lpVtbl->GetSourceBounds(This, bounds)) +#pragma deprecated("ID2D1GdiMetafile1_GetSourceBounds") typedef interface ID2D1GdiMetafileSink1 ID2D1GdiMetafileSink1; @@ -2211,15 +2669,19 @@ interface ID2D1GdiMetafileSink1 #define ID2D1GdiMetafileSink1_QueryInterface(This, riid, ppv) \ ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv)) +#pragma deprecated("ID2D1GdiMetafileSink1_QueryInterface") #define ID2D1GdiMetafileSink1_AddRef(This) \ ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This)) +#pragma deprecated("ID2D1GdiMetafileSink1_AddRef") #define ID2D1GdiMetafileSink1_Release(This) \ ((This)->lpVtbl->Base.Base.Release((IUnknown *)This)) +#pragma deprecated("ID2D1GdiMetafileSink1_Release") #define ID2D1GdiMetafileSink1_ProcessRecord(This, recordType, recordData, recordDataSize, flags) \ ((This)->lpVtbl->ProcessRecord(This, recordType, recordData, recordDataSize, flags)) +#pragma deprecated("ID2D1GdiMetafileSink1_ProcessRecord") #endif @@ -2230,7 +2692,7 @@ extern "C" { #endif -#if NTDDI_VERSION >= NTDDI_WINTHRESHOLD +//#if NTDDI_VERSION >= NTDDI_WINTHRESHOLD void WINAPI D2D1GetGradientMeshInteriorPointsFromCoonsPatch( _In_ CONST D2D1_POINT_2F *pPoint0, @@ -2250,7 +2712,7 @@ extern "C" _Out_ D2D1_POINT_2F *pTensorPoint21, _Out_ D2D1_POINT_2F *pTensorPoint22 ); -#endif // #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD +//#endif // #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD #ifdef __cplusplus } diff --git a/External/gccxml/share/gccxml-0.9/vc12/overrides/um/dwrite_2.h b/External/gccxml/share/gccxml-0.9/vc12/overrides/um/dwrite_2.h new file mode 100644 index 000000000..b183e79ca --- /dev/null +++ b/External/gccxml/share/gccxml-0.9/vc12/overrides/um/dwrite_2.h @@ -0,0 +1,965 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// DirectX Typography Services public API definitions. +// +//---------------------------------------------------------------------------- + +#ifndef DWRITE_2_H_INCLUDED +#define DWRITE_2_H_INCLUDED + +#if _MSC_VER > 1000 +#pragma once +#endif + +#include + + +interface IDWriteFontFallback; + + +/// +/// How to align glyphs to the margin. +/// +enum DWRITE_OPTICAL_ALIGNMENT +{ + /// + /// Align to the default metrics of the glyph. + /// + DWRITE_OPTICAL_ALIGNMENT_NONE, + + /// + /// Align glyphs to the margins. Without this, some small whitespace + /// may be present between the text and the margin from the glyph's side + /// bearing values. Note that glyphs may still overhang outside the + /// margin, such as flourishes or italic slants. + /// + DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS, +}; + + +/// +/// Whether to enable grid-fitting of glyph outlines (a.k.a. hinting). +/// +enum DWRITE_GRID_FIT_MODE +{ + /// + /// Choose grid fitting base on the font's gasp table information. + /// + DWRITE_GRID_FIT_MODE_DEFAULT, + + /// + /// Always disable grid fitting, using the ideal glyph outlines. + /// + DWRITE_GRID_FIT_MODE_DISABLED, + + /// + /// Enable grid fitting, adjusting glyph outlines for device pixel display. + /// + DWRITE_GRID_FIT_MODE_ENABLED +}; + + +/// +/// Overall metrics associated with text after layout. +/// All coordinates are in device independent pixels (DIPs). +/// +struct DWRITE_TEXT_METRICS1 : DWRITE_TEXT_METRICS +{ + /// + /// The height of the formatted text taking into account the + /// trailing whitespace at the end of each line, which will + /// matter for vertical reading directions. + /// + FLOAT heightIncludingTrailingWhitespace; +}; + + +/// +/// The text renderer interface represents a set of application-defined +/// callbacks that perform rendering of text, inline objects, and decorations +/// such as underlines. +/// +interface DWRITE_DECLARE_INTERFACE("D3E0E934-22A0-427E-AAE4-7D9574B59DB1") IDWriteTextRenderer1 : public IDWriteTextRenderer +{ + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to + /// render a run of glyphs. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Orientation of the glyph run. + /// Specifies measuring method for glyphs in + /// the run. Renderer implementations may choose different rendering + /// modes for given measuring methods, but best results are seen when + /// the rendering mode matches the corresponding measuring mode: + /// DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL for DWRITE_MEASURING_MODE_NATURAL + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC for DWRITE_MEASURING_MODE_GDI_CLASSIC + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL for DWRITE_MEASURING_MODE_GDI_NATURAL + /// + /// The glyph run to draw. + /// Properties of the characters + /// associated with this run. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// If a non-identity orientation is passed, the glyph run should be + /// rotated around the given baseline x and y coordinates. The function + /// IDWriteAnalyzer2::GetGlyphOrientationTransform will return the + /// necessary transform for you, which can be combined with any existing + /// world transform on the drawing context. + /// + STDMETHOD(DrawGlyphRun)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + DWRITE_MEASURING_MODE measuringMode, + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_ DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to draw + /// an underline. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Orientation of the underline. + /// Underline logical information. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// A single underline can be broken into multiple calls, depending on + /// how the formatting changes attributes. If font sizes/styles change + /// within an underline, the thickness and offset will be averaged + /// weighted according to characters. + /// + /// To get the correct top coordinate of the underline rect, add + /// underline::offset to the baseline's Y. Otherwise the underline will + /// be immediately under the text. The x coordinate will always be passed + /// as the left side, regardless of text directionality. This simplifies + /// drawing and reduces the problem of round-off that could potentially + /// cause gaps or a double stamped alpha blend. To avoid alpha overlap, + /// round the end points to the nearest device pixel. + /// + STDMETHOD(DrawUnderline)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + _In_ DWRITE_UNDERLINE const* underline, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to draw + /// a strikethrough. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Orientation of the strikethrough. + /// Strikethrough logical information. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// A single strikethrough can be broken into multiple calls, depending on + /// how the formatting changes attributes. Strikethrough is not averaged + /// across font sizes/styles changes. + /// To get the correct top coordinate of the strikethrough rect, + /// add strikethrough::offset to the baseline's Y. + /// Like underlines, the x coordinate will always be passed as the left side, + /// regardless of text directionality. + /// + STDMETHOD(DrawStrikethrough)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + _In_ DWRITE_STRIKETHROUGH const* strikethrough, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this application callback when it needs to + /// draw an inline object. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate at the top-left corner of the + /// inline object. + /// Y-coordinate at the top-left corner of the + /// inline object. + /// Orientation of the inline object. + /// The object set using IDWriteTextLayout::SetInlineObject. + /// The object should be drawn on its side. + /// The object is in an right-to-left context + /// and should be drawn flipped. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// The right-to-left flag is a hint to draw the appropriate visual for + /// that reading direction. For example, it would look strange to draw an + /// arrow pointing to the right to indicate a submenu. The sideways flag + /// similarly hints that the object is drawn in a different orientation. + /// If a non-identity orientation is passed, the top left of the inline + /// object should be rotated around the given x and y coordinates. + /// IDWriteAnalyzer2::GetGlyphOrientationTransform returns the necessary + /// transform for this. + /// + STDMETHOD(DrawInlineObject)( + _In_opt_ void* clientDrawingContext, + FLOAT originX, + FLOAT originY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + _In_ IDWriteInlineObject* inlineObject, + BOOL isSideways, + BOOL isRightToLeft, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; +}; + + +/// +/// The format of text used for text layout. +/// +/// +/// This object may not be thread-safe and it may carry the state of text format change. +/// +interface DWRITE_DECLARE_INTERFACE("5F174B49-0D8B-4CFB-8BCA-F1CCE9D06C67") IDWriteTextFormat1 : public IDWriteTextFormat +{ + /// + /// Set the preferred orientation of glyphs when using a vertical reading direction. + /// + /// Preferred glyph orientation. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetVerticalGlyphOrientation)( + DWRITE_VERTICAL_GLYPH_ORIENTATION glyphOrientation + ) PURE; + + /// + /// Get the preferred orientation of glyphs when using a vertical reading + /// direction. + /// + STDMETHOD_(DWRITE_VERTICAL_GLYPH_ORIENTATION, GetVerticalGlyphOrientation)() PURE; + + /// + /// Set whether or not the last word on the last line is wrapped. + /// + /// Line wrapping option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLastLineWrapping)( + BOOL isLastLineWrappingEnabled + ) PURE; + + /// + /// Get whether or not the last word on the last line is wrapped. + /// + STDMETHOD_(BOOL, GetLastLineWrapping)() PURE; + + /// + /// Set how the glyphs align to the edges the margin. Default behavior is + /// to align glyphs using their default glyphs metrics which include side + /// bearings. + /// + /// Optical alignment option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetOpticalAlignment)( + DWRITE_OPTICAL_ALIGNMENT opticalAlignment + ) PURE; + + /// + /// Get how the glyphs align to the edges the margin. + /// + STDMETHOD_(DWRITE_OPTICAL_ALIGNMENT, GetOpticalAlignment)() PURE; + + /// + /// Apply a custom font fallback onto layout. If none is specified, + /// layout uses the system fallback list. + /// + /// Custom font fallback created from + /// IDWriteFontFallbackBuilder::CreateFontFallback or from + /// IDWriteFactory2::GetSystemFontFallback. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontFallback)( + IDWriteFontFallback* fontFallback + ) PURE; + + /// + /// Get the current font fallback object. + /// + STDMETHOD(GetFontFallback)( + __out IDWriteFontFallback** fontFallback + ) PURE; +}; + + +/// +/// The text layout interface represents a block of text after it has +/// been fully analyzed and formatted. +/// +/// All coordinates are in device independent pixels (DIPs). +/// +interface DWRITE_DECLARE_INTERFACE("1093C18F-8D5E-43F0-B064-0917311B525E") IDWriteTextLayout2 : public IDWriteTextLayout1 +{ + /// + /// GetMetrics retrieves overall metrics for the formatted string. + /// + /// The returned metrics. + /// + /// Standard HRESULT error code. + /// + /// + /// Drawing effects like underline and strikethrough do not contribute + /// to the text size, which is essentially the sum of advance widths and + /// line heights. Additionally, visible swashes and other graphic + /// adornments may extend outside the returned width and height. + /// + STDMETHOD(GetMetrics)( + _Out_ DWRITE_TEXT_METRICS1* textMetrics + ) PURE; + + using IDWriteTextLayout::GetMetrics; + + /// + /// Set the preferred orientation of glyphs when using a vertical reading direction. + /// + /// Preferred glyph orientation. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetVerticalGlyphOrientation)( + DWRITE_VERTICAL_GLYPH_ORIENTATION glyphOrientation + ) PURE; + + /// + /// Get the preferred orientation of glyphs when using a vertical reading + /// direction. + /// + STDMETHOD_(DWRITE_VERTICAL_GLYPH_ORIENTATION, GetVerticalGlyphOrientation)() PURE; + + /// + /// Set whether or not the last word on the last line is wrapped. + /// + /// Line wrapping option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLastLineWrapping)( + BOOL isLastLineWrappingEnabled + ) PURE; + + /// + /// Get whether or not the last word on the last line is wrapped. + /// + STDMETHOD_(BOOL, GetLastLineWrapping)() PURE; + + /// + /// Set how the glyphs align to the edges the margin. Default behavior is + /// to align glyphs using their default glyphs metrics which include side + /// bearings. + /// + /// Optical alignment option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetOpticalAlignment)( + DWRITE_OPTICAL_ALIGNMENT opticalAlignment + ) PURE; + + /// + /// Get how the glyphs align to the edges the margin. + /// + STDMETHOD_(DWRITE_OPTICAL_ALIGNMENT, GetOpticalAlignment)() PURE; + + /// + /// Apply a custom font fallback onto layout. If none is specified, + /// layout uses the system fallback list. + /// + /// Custom font fallback created from + /// IDWriteFontFallbackBuilder::CreateFontFallback or + /// IDWriteFactory2::GetSystemFontFallback. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontFallback)( + IDWriteFontFallback* fontFallback + ) PURE; + + /// + /// Get the current font fallback object. + /// + STDMETHOD(GetFontFallback)( + __out IDWriteFontFallback** fontFallback + ) PURE; +}; + + +/// +/// The text analyzer interface represents a set of application-defined +/// callbacks that perform rendering of text, inline objects, and decorations +/// such as underlines. +/// +interface DWRITE_DECLARE_INTERFACE("553A9FF3-5693-4DF7-B52B-74806F7F2EB9") IDWriteTextAnalyzer2 : public IDWriteTextAnalyzer1 +{ + /// + /// Returns 2x3 transform matrix for the respective angle to draw the + /// glyph run or other object. + /// + /// The angle reported to one of the application callbacks, + /// including IDWriteTextAnalysisSink1::SetGlyphOrientation and IDWriteTextRenderer1::Draw*. + /// Whether the run's glyphs are sideways or not. + /// X origin of the element, be it a glyph run or underline or other. + /// Y origin of the element, be it a glyph run or underline or other. + /// Returned transform. + /// + /// Standard HRESULT error code. + /// + /// + /// This rotates around the given origin x and y, returning a translation component + /// such that the glyph run, text decoration, or inline object is drawn with the + /// right orientation at the expected coordinate. + /// + STDMETHOD(GetGlyphOrientationTransform)( + DWRITE_GLYPH_ORIENTATION_ANGLE glyphOrientationAngle, + BOOL isSideways, + FLOAT originX, + FLOAT originY, + _Out_ DWRITE_MATRIX* transform + ) PURE; + + /// + /// Returns a list of typographic feature tags for the given script and language. + /// + /// The font face to get features from. + /// Script analysis result from AnalyzeScript. + /// The locale to use when selecting the feature, + /// such en-us or ja-jp. + /// Maximum tag count. + /// Actual tag count. If greater than + /// maxTagCount, E_NOT_SUFFICIENT_BUFFER is returned, and the call + /// should be retried with a larger buffer. + /// Feature tag list. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetTypographicFeatures)( + IDWriteFontFace* fontFace, + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + UINT32 maxTagCount, + _Out_ UINT32* actualTagCount, + _Out_writes_(maxTagCount) DWRITE_FONT_FEATURE_TAG* tags + ) PURE; + + /// + /// Returns an array of which glyphs are affected by a given feature. + /// + /// The font face to read glyph information from. + /// Script analysis result from AnalyzeScript. + /// The locale to use when selecting the feature, + /// such en-us or ja-jp. + /// OpenType feature name to use, which may be one + /// of the DWRITE_FONT_FEATURE_TAG values or a custom feature using + /// DWRITE_MAKE_OPENTYPE_TAG. + /// Number of glyph indices to check. + /// Glyph indices to check for feature application. + /// Output of which glyphs are affected by the + /// feature, where for each glyph affected, the respective array index + /// will be 1. The result is returned per-glyph without regard to + /// neighboring context of adjacent glyphs. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CheckTypographicFeature)( + IDWriteFontFace* fontFace, + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + DWRITE_FONT_FEATURE_TAG featureTag, + UINT32 glyphCount, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _Out_writes_(glyphCount) UINT8* featureApplies + ) PURE; +}; + + +/// +/// A font fallback definition used for mapping characters to fonts capable of +/// supporting them. +/// +interface DWRITE_DECLARE_INTERFACE("EFA008F9-F7A1-48BF-B05C-F224713CC0FF") IDWriteFontFallback : public IUnknown +{ + /// + /// Determines an appropriate font to use to render the range of text. + /// + /// The text source implementation holds the text and + /// locale. + /// Length of the text to analyze. + /// Default font collection to use. + /// Base font to check (optional). + /// Family name of the base font. If you pass + /// null, no matching will be done against the family. + /// Desired weight. + /// Desired style. + /// Desired stretch. + /// Length of text mapped to the mapped font. + /// This will always be less or equal to the input text length and + /// greater than zero (if the text length is non-zero) so that the + /// caller advances at least one character each call. + /// The font that should be used to render the + /// first mappedLength characters of the text. If it returns NULL, + /// then no known font can render the text, and mappedLength is the + /// number of unsupported characters to skip. + /// Scale factor to multiply the em size of the + /// returned font by. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(MapCharacters)( + IDWriteTextAnalysisSource* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_opt_ IDWriteFontCollection* baseFontCollection, + _In_opt_z_ wchar_t const* baseFamilyName, + DWRITE_FONT_WEIGHT baseWeight, + DWRITE_FONT_STYLE baseStyle, + DWRITE_FONT_STRETCH baseStretch, + _Deref_out_range_(0, textLength) UINT32* mappedLength, + _COM_Outptr_ IDWriteFont** mappedFont, + _Out_ FLOAT* scale + ) PURE; +}; + + +/// +/// Builder used to create a font fallback definition by appending a series of +/// fallback mappings, followed by a creation call. +/// +/// +/// This object may not be thread-safe. +/// +interface DWRITE_DECLARE_INTERFACE("FD882D06-8ABA-4FB8-B849-8BE8B73E14DE") IDWriteFontFallbackBuilder : public IUnknown +{ + /// + /// Appends a single mapping to the list. Call this once for each additional mapping. + /// + /// Unicode ranges that apply to this mapping. + /// Number of Unicode ranges. + /// Locale of the context (e.g. document locale). + /// Base family name to match against, if applicable. + /// Explicit font collection for this mapping (optional). + /// List of target family name strings. + /// Number of target family names. + /// Scale factor to multiply the result target font by. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddMapping)( + _In_reads_(rangesCount) DWRITE_UNICODE_RANGE const* ranges, + UINT32 rangesCount, + _In_reads_(targetFamilyNamesCount) WCHAR const** targetFamilyNames, + UINT32 targetFamilyNamesCount, + _In_opt_ IDWriteFontCollection* fontCollection = NULL, + _In_opt_z_ WCHAR const* localeName = NULL, + _In_opt_z_ WCHAR const* baseFamilyName = NULL, + FLOAT scale = 1.0f + ) PURE; + + /// + /// Appends all the mappings from an existing font fallback object. + /// + /// Font fallback to read mappings from. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddMappings)( + IDWriteFontFallback* fontFallback + ) PURE; + + /// + /// Creates the finalized fallback object from the mappings added. + /// + /// Created fallback list. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFallback)( + _COM_Outptr_ IDWriteFontFallback** fontFallback + ) PURE; +}; + +/// +/// DWRITE_COLOR_F +/// +#ifndef D3DCOLORVALUE_DEFINED + +typedef struct _D3DCOLORVALUE { + union { + FLOAT r; + FLOAT dvR; + }; + union { + FLOAT g; + FLOAT dvG; + }; + union { + FLOAT b; + FLOAT dvB; + }; + union { + FLOAT a; + FLOAT dvA; + }; +} D3DCOLORVALUE; + +#define D3DCOLORVALUE_DEFINED +#endif D3DCOLORVALUE_DEFINED + +typedef D3DCOLORVALUE DWRITE_COLOR_F; + +/// +/// The IDWriteFont interface represents a physical font in a font collection. +/// +interface DWRITE_DECLARE_INTERFACE("29748ed6-8c9c-4a6a-be0b-d912e8538944") IDWriteFont2 : public IDWriteFont1 +{ + /// + /// Returns TRUE if the font contains color information (COLR and CPAL tables), + /// or FALSE if not. + /// + STDMETHOD_(BOOL, IsColorFont)() PURE; +}; + +/// +/// The interface that represents an absolute reference to a font face. +/// It contains font face type, appropriate file references and face identification data. +/// Various font data such as metrics, names and glyph outlines is obtained from IDWriteFontFace. +/// +interface DWRITE_DECLARE_INTERFACE("d8b768ff-64bc-4e66-982b-ec8e87f693f7") IDWriteFontFace2 : public IDWriteFontFace1 +{ + /// + /// Returns TRUE if the font contains color information (COLR and CPAL tables), + /// or FALSE if not. + /// + STDMETHOD_(BOOL, IsColorFont)() PURE; + + /// + /// Returns the number of color palettes defined by the font. The return + /// value is zero if the font has no color information. Color fonts must + /// have at least one palette, with palette index zero being the default. + /// + STDMETHOD_(UINT32, GetColorPaletteCount)() PURE; + + /// + /// Returns the number of entries in each color palette. All color palettes + /// in a font have the same number of palette entries. The return value is + /// zero if the font has no color information. + /// + STDMETHOD_(UINT32, GetPaletteEntryCount)() PURE; + + /// + /// Reads color values from the font's color palette. + /// + /// Zero-based index of the color palette. If the + /// font does not have a palette with the specified index, the method returns + /// DWRITE_E_NOCOLOR. + /// Zero-based index of the first palette entry + /// to read. + /// Number of palette entries to read. + /// Array that receives the color values. + /// + /// Standard HRESULT error code. + /// The return value is E_INVALIDARG if firstEntryIndex + entryCount is greater + /// than the actual number of palette entries as returned by GetPaletteEntryCount. + /// The return value is DWRITE_E_NOCOLOR if the font does not have a palette + /// with the specified palette index. + /// + STDMETHOD(GetPaletteEntries)( + UINT32 colorPaletteIndex, + UINT32 firstEntryIndex, + UINT32 entryCount, + _Out_writes_(entryCount) DWRITE_COLOR_F* paletteEntries + ) PURE; + + /// + /// Determines the recommended text rendering and grid-fit mode to be used based on the + /// font, size, world transform, and measuring mode. + /// + /// Logical font size in DIPs. + /// Number of pixels per logical inch in the horizontal direction. + /// Number of pixels per logical inch in the vertical direction. + /// Specifies the world transform. + /// Specifies the quality of the graphics system's outline rendering, + /// affects the size threshold above which outline rendering is used. + /// Specifies the method used to measure during text layout. For proper + /// glyph spacing, the function returns a rendering mode that is compatible with the specified + /// measuring mode. + /// Rendering parameters object. This parameter is necessary in case the rendering parameters + /// object overrides the rendering mode. + /// Receives the recommended rendering mode. + /// Receives the recommended grid-fit mode. + /// + /// This method should be used to determine the actual rendering mode in cases where the rendering + /// mode of the rendering params object is DWRITE_RENDERING_MODE_DEFAULT, and the actual grid-fit + /// mode when the rendering params object is DWRITE_GRID_FIT_MODE_DEFAULT. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetRecommendedRenderingMode)( + FLOAT fontEmSize, + FLOAT dpiX, + FLOAT dpiY, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL isSideways, + DWRITE_OUTLINE_THRESHOLD outlineThreshold, + DWRITE_MEASURING_MODE measuringMode, + _In_opt_ IDWriteRenderingParams* renderingParams, + _Out_ DWRITE_RENDERING_MODE* renderingMode, + _Out_ DWRITE_GRID_FIT_MODE* gridFitMode + ) PURE; +}; + +/// +/// Represents a color glyph run. The IDWriteFactory2::TranslateColorGlyphRun +/// method returns an ordered collection of color glyph runs, which can be +/// layered on top of each other to produce a color representation of the +/// given base glyph run. +/// +struct DWRITE_COLOR_GLYPH_RUN +{ + /// + /// Glyph run to render. + /// + DWRITE_GLYPH_RUN glyphRun; + + /// + /// Optional glyph run description. + /// + _Maybenull_ DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription; + + /// + /// Location at which to draw this glyph run. + /// + FLOAT baselineOriginX; + FLOAT baselineOriginY; + + /// + /// Color to use for this layer, if any. This is the same color that + /// IDWriteFontFace2::GetPaletteEntries would return for the current + /// palette index if the paletteIndex member is less than 0xFFFF. If + /// the paletteIndex member is 0xFFFF then there is no associated + /// palette entry, this member is set to { 0, 0, 0, 0 }, and the client + /// should use the current foreground brush. + /// + DWRITE_COLOR_F runColor; + + /// + /// Zero-based index of this layer's color entry in the current color + /// palette, or 0xFFFF if this layer is to be rendered using + /// the current foreground brush. + /// + UINT16 paletteIndex; +}; + +/// +/// Enumerator for an ordered collection of color glyph runs. +/// +interface DWRITE_DECLARE_INTERFACE("d31fbe17-f157-41a2-8d24-cb779e0560e8") IDWriteColorGlyphRunEnumerator : public IUnknown +{ + /// + /// Advances to the first or next color run. The runs are enumerated + /// in order from back to front. + /// + /// Receives TRUE if there is a current run or + /// FALSE if the end of the sequence has been reached. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(MoveNext)( + _Out_ BOOL* hasRun + ) PURE; + + /// + /// Gets the current color glyph run. + /// + /// Receives a pointer to the color + /// glyph run. The pointer remains valid until the next call to + /// MoveNext or until the interface is released. + /// + /// Standard HRESULT error code. An error is returned if there is + /// no current glyph run, i.e., if MoveNext has not yet been called + /// or if the end of the sequence has been reached. + /// + STDMETHOD(GetCurrentRun)( + _Outptr_ DWRITE_COLOR_GLYPH_RUN const** colorGlyphRun + ) PURE; +}; + +/// +/// The interface that represents text rendering settings for glyph rasterization and filtering. +/// +interface DWRITE_DECLARE_INTERFACE("F9D711C3-9777-40AE-87E8-3E5AF9BF0948") IDWriteRenderingParams2 : public IDWriteRenderingParams1 +{ + /// + /// Gets the grid fitting mode. + /// + STDMETHOD_(DWRITE_GRID_FIT_MODE, GetGridFitMode)() PURE; +}; + +/// +/// The root factory interface for all DWrite objects. +/// +interface DWRITE_DECLARE_INTERFACE("0439fc60-ca44-4994-8dee-3a9af7b732ec") IDWriteFactory2 : public IDWriteFactory1 +{ + /// + /// Get the system-appropriate font fallback mapping list. + /// + /// The system fallback list. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontFallback)( + _COM_Outptr_ IDWriteFontFallback** fontFallback + ) PURE; + + /// + /// Create a custom font fallback builder. + /// + /// Empty font fallback builder. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFallbackBuilder)( + _COM_Outptr_ IDWriteFontFallbackBuilder** fontFallbackBuilder + ) PURE; + + /// + /// Translates a glyph run to a sequence of color glyph runs, which can be + /// rendered to produce a color representation of the original "base" run. + /// + /// Horizontal origin of the base glyph run in + /// pre-transform coordinates. + /// Vertical origin of the base glyph run in + /// pre-transform coordinates. + /// Pointer to the original "base" glyph run. + /// Optional glyph run description. + /// Measuring mode, needed to compute the origins + /// of each glyph. + /// Matrix converting from the client's + /// coordinate space to device coordinates (pixels), i.e., the world transform + /// multiplied by any DPI scaling. + /// Zero-based index of the color palette to use. + /// Valid indices are less than the number of palettes in the font, as returned + /// by IDWriteFontFace2::GetColorPaletteCount. + /// If the function succeeds, receives a pointer + /// to an enumerator object that can be used to obtain the color glyph runs. + /// If the base run has no color glyphs, then the output pointer is NULL + /// and the method returns DWRITE_E_NOCOLOR. + /// + /// Returns DWRITE_E_NOCOLOR if the font has no color information, the base + /// glyph run does not contain any color glyphs, or the specified color palette + /// index is out of range. In this case, the client should render the base glyph + /// run. Otherwise, returns a standard HRESULT error code. + /// + STDMETHOD(TranslateColorGlyphRun)( + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_opt_ DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, + DWRITE_MEASURING_MODE measuringMode, + _In_opt_ DWRITE_MATRIX const* worldToDeviceTransform, + UINT32 colorPaletteIndex, + _COM_Outptr_ IDWriteColorGlyphRunEnumerator** colorLayers + ) PURE; + + /// + /// Creates a rendering parameters object with the specified properties. + /// + /// The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256. + /// The amount of contrast enhancement, zero or greater. + /// The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType). + /// The geometry of a device pixel. + /// Method of rendering glyphs. In most cases, this should be DWRITE_RENDERING_MODE_DEFAULT to automatically use an appropriate mode. + /// How to grid fit glyph outlines. In most cases, this should be DWRITE_GRID_FIT_DEFAULT to automatically choose an appropriate mode. + /// Holds the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateCustomRenderingParams)( + FLOAT gamma, + FLOAT enhancedContrast, + FLOAT grayscaleEnhancedContrast, + FLOAT clearTypeLevel, + DWRITE_PIXEL_GEOMETRY pixelGeometry, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_GRID_FIT_MODE gridFitMode, + _COM_Outptr_ IDWriteRenderingParams2** renderingParams + ) PURE; + + using IDWriteFactory::CreateCustomRenderingParams; +// using IDWriteFactory1::CreateCustomRenderingParams; + + /// + /// Creates a glyph run analysis object, which encapsulates information + /// used to render a glyph run. + /// + /// Structure specifying the properties of the glyph run. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the emSize and pixelsPerDip. + /// Specifies the rendering mode, which must be one of the raster rendering modes (i.e., not default + /// and not outline). + /// Specifies the method to measure glyphs. + /// How to grid-fit glyph outlines. This must be non-default. + /// Horizontal position of the baseline origin, in DIPs. + /// Vertical position of the baseline origin, in DIPs. + /// Receives a pointer to the newly created object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateGlyphRunAnalysis)( + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_opt_ DWRITE_MATRIX const* transform, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_MEASURING_MODE measuringMode, + DWRITE_GRID_FIT_MODE gridFitMode, + DWRITE_TEXT_ANTIALIAS_MODE antialiasMode, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _COM_Outptr_ IDWriteGlyphRunAnalysis** glyphRunAnalysis + ) PURE; + + using IDWriteFactory::CreateGlyphRunAnalysis; +}; + + +#endif /* DWRITE_2_H_INCLUDED */ diff --git a/External/gccxml/share/gccxml-0.9/vc12/overrides/um/dwrite_3.h b/External/gccxml/share/gccxml-0.9/vc12/overrides/um/dwrite_3.h new file mode 100644 index 000000000..93a62b675 --- /dev/null +++ b/External/gccxml/share/gccxml-0.9/vc12/overrides/um/dwrite_3.h @@ -0,0 +1,1743 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// DirectX Typography Services public API definitions. +// +//---------------------------------------------------------------------------- + +#ifndef DWRITE_3_H_INCLUDED +#define DWRITE_3_H_INCLUDED + +#if _MSC_VER > 1000 +#pragma once +#endif + +#include + +interface IDWriteFontFaceReference; +interface IDWriteFont3; +interface IDWriteFontFace3; +interface IDWriteFontFaceReference; +interface IDWriteFontSet; +interface IDWriteFontSetBuilder; +interface IDWriteFontCollection1; +interface IDWriteFontFamily1; +interface IDWriteStringList; +interface IDWriteFontDownloadQueue; + + +/// +/// A font resource could not be accessed because it was remote. This can happen +/// when calling CreateFontFace on a non-local font or trying to measure/draw +/// glyphs that are not downloaded yet. +/// +#ifndef DWRITE_E_REMOTEFONT +#define DWRITE_E_REMOTEFONT _HRESULT_TYPEDEF_(0x8898500DL) +#endif + +/// +/// The download was canceled, which happens if the application calls +/// IDWriteFontDownloadQueue::CancelDownload before they finish. +/// +#ifndef DWRITE_E_DOWNLOADCANCELLED +#define DWRITE_E_DOWNLOADCANCELLED _HRESULT_TYPEDEF_(0x8898500EL) +#endif + +/// +/// The download failed to complete because the remote resource is missing +/// or the network is down. +/// +#ifndef DWRITE_E_DOWNLOADFAILED +#define DWRITE_E_DOWNLOADFAILED _HRESULT_TYPEDEF_(0x8898500FL) +#endif + +/// +/// A download request was not added or a download failed because there +/// are too many active downloads. +/// +#ifndef DWRITE_E_TOOMANYDOWNLOADS +#define DWRITE_E_TOOMANYDOWNLOADS _HRESULT_TYPEDEF_(0x88985010L) +#endif + +/// +/// The font property enumeration identifies a string in a font. +/// +enum DWRITE_FONT_PROPERTY_ID +{ + /// + /// Unspecified font property identifier. + /// + DWRITE_FONT_PROPERTY_ID_NONE, + + /// + /// Family name for the weight-width-slope model. + /// + DWRITE_FONT_PROPERTY_ID_FAMILY_NAME, + + /// + /// Family name preferred by the designer. This enables font designers to group more than four fonts in a single family without losing compatibility with + /// GDI. This name is typically only present if it differs from the GDI-compatible family name. + /// + DWRITE_FONT_PROPERTY_ID_PREFERRED_FAMILY_NAME, + + /// + /// Face name of the (e.g., Regular or Bold). + /// + DWRITE_FONT_PROPERTY_ID_FACE_NAME, + + /// + /// The full name of the font, e.g. "Arial Bold", from name id 4 in the name table. + /// + DWRITE_FONT_PROPERTY_ID_FULL_NAME, + + /// + /// GDI-compatible family name. Because GDI allows a maximum of four fonts per family, fonts in the same family may have different GDI-compatible family names + /// (e.g., "Arial", "Arial Narrow", "Arial Black"). + /// + DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME, + + /// + /// The postscript name of the font, e.g. "GillSans-Bold" from name id 6 in the name table. + /// + DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME, + + /// + /// Script/language tag to identify the scripts or languages that the font was + /// primarily designed to support. + /// + /// + /// The design script/language tag is meant to be understood from the perspective of + /// users. For example, a font is considered designed for English if it is considered + /// useful for English users. Note that this is different from what a font might be + /// capable of supporting. For example, the Meiryo font was primarily designed for + /// Japanese users. While it is capable of displaying English well, it was not + /// meant to be offered for the benefit of non-Japanese-speaking English users. + /// + /// As another example, a font designed for Chinese may be capable of displaying + /// Japanese text, but would likely look incorrect to Japanese users. + /// + /// The valid values for this property are "ScriptLangTag" values. These are adapted + /// from the IETF BCP 47 specification, "Tags for Identifying Languages" (see + /// http://tools.ietf.org/html/bcp47). In a BCP 47 language tag, a language subtag + /// element is mandatory and other subtags are optional. In a ScriptLangTag, a + /// script subtag is mandatory and other subtags are option. The following + /// augmented BNF syntax, adapted from BCP 47, is used: + /// + /// ScriptLangTag = [language "-"] + /// script + /// ["-" region] + /// *("-" variant) + /// *("-" extension) + /// ["-" privateuse] + /// + /// The expansion of the elements and the intended semantics associated with each + /// are as defined in BCP 47. Script subtags are taken from ISO 15924. At present, + /// no extensions are defined, and any extension should be ignored. Private use + /// subtags are defined by private agreement between the source and recipient and + /// may be ignored. + /// + /// Subtags must be valid for use in BCP 47 and contained in the Language Subtag + /// Registry maintained by IANA. (See + /// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry + /// and section 3 of BCP 47 for details. + /// + /// Any ScriptLangTag value not conforming to these specifications is ignored. + /// + /// Examples: + /// "Latn" denotes Latin script (and any language or writing system using Latin) + /// "Cyrl" denotes Cyrillic script + /// "sr-Cyrl" denotes Cyrillic script as used for writing the Serbian language; + /// a font that has this property value may not be suitable for displaying + /// text in Russian or other languages written using Cyrillic script + /// "Jpan" denotes Japanese writing (Han + Hiragana + Katakana) + /// + /// When passing this property to GetPropertyValues, use the overload which does + /// not take a language parameter, since this property has no specific language. + /// + DWRITE_FONT_PROPERTY_ID_DESIGN_SCRIPT_LANGUAGE_TAG, + + /// + /// Script/language tag to identify the scripts or languages that the font declares + /// it is able to support. + /// + DWRITE_FONT_PROPERTY_ID_SUPPORTED_SCRIPT_LANGUAGE_TAG, + + /// + /// Semantic tag to describe the font (e.g. Fancy, Decorative, Handmade, Sans-serif, Swiss, Pixel, Futuristic). + /// + DWRITE_FONT_PROPERTY_ID_SEMANTIC_TAG, + + /// + /// Weight of the font represented as a decimal string in the range 1-999. + /// + DWRITE_FONT_PROPERTY_ID_WEIGHT, + + /// + /// Stretch of the font represented as a decimal string in the range 1-9. + /// + DWRITE_FONT_PROPERTY_ID_STRETCH, + + /// + /// Stretch of the font represented as a decimal string in the range 0-2. + /// + DWRITE_FONT_PROPERTY_ID_STYLE, + + /// + /// Total number of properties. + /// + /// + /// DWRITE_FONT_PROPERTY_ID_TOTAL cannot be used as a property ID. + /// + DWRITE_FONT_PROPERTY_ID_TOTAL, +}; + + +/// +/// Font property used for filtering font sets and +/// building a font set with explicit properties. +/// +struct DWRITE_FONT_PROPERTY +{ + /// + /// Specifies the requested font property, such as DWRITE_FONT_PROPERTY_ID_FAMILY_NAME. + /// + DWRITE_FONT_PROPERTY_ID propertyId; + + /// + /// Specifies the property value, such as "Segoe UI". + /// + _Field_z_ WCHAR const* propertyValue; + + /// + /// Specifies the language / locale to use, such as "en-US". + /// + /// + /// When passing property information to AddFontFaceReference, localeName indicates + /// the language of the property value. BCP 47 language tags should be used. If a + /// property value is inherently non-linguistic, this can be left empty. + /// + /// When used for font set filtering, leave this empty: a match will be found + /// regardless of language associated with property values. + /// + _Field_z_ _Maybenull_ WCHAR const* localeName; +}; + + +/// +/// Specifies the locality of a resource. +/// +enum DWRITE_LOCALITY +{ + /// + /// The resource is remote, and information is unknown yet, including the file size and date. + /// Attempting to create a font or file stream will fail until locality becomes at least partial. + /// + DWRITE_LOCALITY_REMOTE, + + /// + /// The resource is partially local, meaning you can query the size and date of the file + /// stream, and you may be able to create a font face and retrieve the particular glyphs + /// for metrics and drawing, but not all the glyphs will be present. + /// + DWRITE_LOCALITY_PARTIAL, + + /// + /// The resource is completely local, and all font functions can be called + /// without concern of missing data or errors related to network connectivity. + /// + DWRITE_LOCALITY_LOCAL, +}; + + +/// +/// Represents a method of rendering glyphs. +/// +enum DWRITE_RENDERING_MODE1 +{ + /// + /// Specifies that the rendering mode is determined automatically based on the font and size. + /// + DWRITE_RENDERING_MODE1_DEFAULT = DWRITE_RENDERING_MODE_DEFAULT, + + /// + /// Specifies that no antialiasing is performed. Each pixel is either set to the foreground + /// color of the text or retains the color of the background. + /// + DWRITE_RENDERING_MODE1_ALIASED = DWRITE_RENDERING_MODE_ALIASED, + + /// + /// Specifies that antialiasing is performed in the horizontal direction and the appearance + /// of glyphs is layout-compatible with GDI using CLEARTYPE_QUALITY. Use DWRITE_MEASURING_MODE_GDI_CLASSIC + /// to get glyph advances. The antialiasing may be either ClearType or grayscale depending on + /// the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC, + + /// + /// Specifies that antialiasing is performed in the horizontal direction and the appearance + /// of glyphs is layout-compatible with GDI using CLEARTYPE_NATURAL_QUALITY. Glyph advances + /// are close to the font design advances, but are still rounded to whole pixels. Use + /// DWRITE_MEASURING_MODE_GDI_NATURAL to get glyph advances. The antialiasing may be either + /// ClearType or grayscale depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL, + + /// + /// Specifies that antialiasing is performed in the horizontal direction. This rendering + /// mode allows glyphs to be positioned with subpixel precision and is therefore suitable + /// for natural (i.e., resolution-independent) layout. The antialiasing may be either + /// ClearType or grayscale depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_NATURAL = DWRITE_RENDERING_MODE_NATURAL, + + /// + /// Similar to natural mode except that antialiasing is performed in both the horizontal + /// and vertical directions. This is typically used at larger sizes to make curves and + /// diagonal lines look smoother. The antialiasing may be either ClearType or grayscale + /// depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, + + /// + /// Specifies that rendering should bypass the rasterizer and use the outlines directly. + /// This is typically used at very large sizes. + /// + DWRITE_RENDERING_MODE1_OUTLINE = DWRITE_RENDERING_MODE_OUTLINE, + + /// + /// Similar to natural symmetric mode except that when possible, text should be rasterized + /// in a downsampled form. + /// + DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED, +}; + + +/// +/// The interface that represents text rendering settings for glyph rasterization and filtering. +/// +interface DWRITE_DECLARE_INTERFACE("b7924baa-391b-412a-8c5c-e44cc2d867dc") IDWriteRenderingParams3 : public IDWriteRenderingParams2 +{ + /// + /// Gets the rendering mode. + /// + STDMETHOD_(DWRITE_RENDERING_MODE1, GetRenderingMode1)() PURE; +}; + + +/// +/// The root factory interface for all DWrite objects. +/// +interface DWRITE_DECLARE_INTERFACE("9a1b41c3-d3bb-466a-87fc-fe67556a3b65") IDWriteFactory3 : public IDWriteFactory2 +{ + /// + /// Creates a glyph run analysis object, which encapsulates information + /// used to render a glyph run. + /// + /// Structure specifying the properties of the glyph run. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the emSize. + /// Specifies the rendering mode, which must be one of the raster rendering modes (i.e., not default + /// and not outline). + /// Specifies the method to measure glyphs. + /// How to grid-fit glyph outlines. This must be non-default. + /// Horizontal position of the baseline origin, in DIPs. + /// Vertical position of the baseline origin, in DIPs. + /// Receives a pointer to the newly created object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateGlyphRunAnalysis)( + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_opt_ DWRITE_MATRIX const* transform, + DWRITE_RENDERING_MODE1 renderingMode, + DWRITE_MEASURING_MODE measuringMode, + DWRITE_GRID_FIT_MODE gridFitMode, + DWRITE_TEXT_ANTIALIAS_MODE antialiasMode, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _COM_Outptr_ IDWriteGlyphRunAnalysis** glyphRunAnalysis + ) PURE; + + using IDWriteFactory::CreateGlyphRunAnalysis; +// using IDWriteFactory2::CreateGlyphRunAnalysis; + + /// + /// Creates a rendering parameters object with the specified properties. + /// + /// The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256. + /// The amount of contrast enhancement, zero or greater. + /// The amount of contrast enhancement to use for grayscale antialiasing, zero or greater. + /// The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType). + /// The geometry of a device pixel. + /// Method of rendering glyphs. In most cases, this should be DWRITE_RENDERING_MODE_DEFAULT to automatically use an appropriate mode. + /// How to grid fit glyph outlines. In most cases, this should be DWRITE_GRID_FIT_DEFAULT to automatically choose an appropriate mode. + /// Holds the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateCustomRenderingParams)( + FLOAT gamma, + FLOAT enhancedContrast, + FLOAT grayscaleEnhancedContrast, + FLOAT clearTypeLevel, + DWRITE_PIXEL_GEOMETRY pixelGeometry, + DWRITE_RENDERING_MODE1 renderingMode, + DWRITE_GRID_FIT_MODE gridFitMode, + _COM_Outptr_ IDWriteRenderingParams3** renderingParams + ) PURE; + + using IDWriteFactory::CreateCustomRenderingParams; +// using IDWriteFactory1::CreateCustomRenderingParams; +// using IDWriteFactory2::CreateCustomRenderingParams; + + /// + /// Creates a reference to a font given a full path. + /// + /// Absolute file path. Subsequent operations on the constructed object may fail + /// if the user provided filePath doesn't correspond to a valid file on the disk. + /// Last modified time of the input file path. If the parameter is omitted, + /// the function will access the font file to obtain its last write time, so the clients are encouraged to specify this value + /// to avoid extra disk access. Subsequent operations on the constructed object may fail + /// if the user provided lastWriteTime doesn't match the file on the disk. + /// The zero based index of a font face in cases when the font files contain a collection of font faces. + /// If the font files contain a single face, this value should be zero. + /// Font face simulation flags for algorithmic emboldening and italicization. + /// Contains newly created font face reference object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFaceReference)( + _In_z_ WCHAR const* filePath, + _In_opt_ FILETIME const* lastWriteTime, + UINT32 faceIndex, + DWRITE_FONT_SIMULATIONS fontSimulations, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Creates a reference to a font given a file. + /// + /// User provided font file representing the font face. + /// The zero based index of a font face in cases when the font files contain a collection of font faces. + /// If the font files contain a single face, this value should be zero. + /// Font face simulation flags for algorithmic emboldening and italicization. + /// Contains newly created font face reference object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFaceReference)( + _In_ IDWriteFontFile* fontFile, + UINT32 faceIndex, + DWRITE_FONT_SIMULATIONS fontSimulations, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Retrieves the list of system fonts. + /// + /// Holds the newly created font set object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontSet)( + _COM_Outptr_ IDWriteFontSet** fontSet + ) PURE; + + /// + /// Creates an empty font set builder to add font face references + /// and create a custom font set. + /// + /// Holds the newly created font set builder object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontSetBuilder)( + _COM_Outptr_ IDWriteFontSetBuilder** fontSetBuilder + ) PURE; + + /// + /// Create a weight/width/slope tree from a set of fonts. + /// + /// A set of fonts to use to build the collection. + /// Holds the newly created font collection object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontCollectionFromFontSet)( + IDWriteFontSet* fontSet, + _COM_Outptr_ IDWriteFontCollection1** fontCollection + ) PURE; + + /// + /// Retrieves a weight/width/slope tree of system fonts. + /// + /// Include cloud fonts or only locally installed ones. + /// Holds the newly created font collection object, or NULL in + /// case of failure. + /// If this parameter is nonzero, the function performs an immediate check for changes + /// to the set of system fonts. If this parameter is FALSE, the function will still detect changes if the font + /// cache service is running, but there may be some latency. For example, an application might specify TRUE if + /// it has itself just installed a font and wants to be sure the font collection contains that font. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontCollection)( + BOOL includeDownloadableFonts, + _COM_Outptr_ IDWriteFontCollection1** fontCollection, + BOOL checkForUpdates = FALSE + ) PURE; + + using IDWriteFactory2::GetSystemFontCollection; + + /// + /// Gets the font download queue associated with this factory object. + /// + /// Receives a pointer to the font download queue interface. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontDownloadQueue)( + _COM_Outptr_ IDWriteFontDownloadQueue** fontDownloadQueue + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("53585141-D9F8-4095-8321-D73CF6BD116B") IDWriteFontSet : public IUnknown +{ + /// + /// Get the number of total fonts in the set. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD_(UINT32, GetFontCount)() PURE; + + /// + /// Get a reference to the font at this index, which may be local or remote. + /// + /// Zero-based index of the font. + /// Receives a pointer the font face reference object, or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations. + /// + /// Font face reference object that specifies the physical font. + /// Receives the zero-based index of the matching font if the font was found, or UINT_MAX otherwise. + /// Receives TRUE if the font exists or FALSE otherwise. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(FindFontFaceReference)( + IDWriteFontFaceReference* fontFaceReference, + _Out_ UINT32* listIndex, + _Out_ BOOL* exists + ) PURE; + + /// + /// Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations. + /// + /// Font face object that specifies the physical font. + /// Receives the zero-based index of the matching font if the font was found, or UINT_MAX otherwise. + /// Receives TRUE if the font exists or FALSE otherwise. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(FindFontFace)( + IDWriteFontFace* fontFace, + _Out_ UINT32* listIndex, + _Out_ BOOL* exists + ) PURE; + + /// + /// Returns the property values of a specific font item index. + /// + /// Zero-based index of the font. + /// Font property of interest. + /// Receives the value TRUE if the font contains the specified property identifier or FALSE if not. + /// Receives a pointer to the newly created localized strings object, or nullptr on failure or non-existent property. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetPropertyValues)( + UINT32 listIndex, + DWRITE_FONT_PROPERTY_ID propertyId, + _Out_ BOOL* exists, + _COM_Outptr_result_maybenull_ IDWriteLocalizedStrings** values + ) PURE; + + /// + /// Returns all unique property values in the set, which can be used + /// for purposes such as displaying a family list or tag cloud. Values are + /// returned in priority order according to the language list, such that if + /// a font contains more than one localized name, the preferred one will be + /// returned. + /// + /// Font property of interest. + /// List of semicolon delimited language names in preferred + /// order. When a particular string like font family has more than one localized name, + /// the first match is returned. + /// Receives a pointer to the newly created strings list. + /// + /// Standard HRESULT error code. + /// + /// + /// For example, suppose the font set includes the Meiryo family, which has both Japanese and English family names. + /// The returned list of distinct family names would include either the Japanese name (if "ja-jp" was specified as + /// a preferred locale) or the English name (in all other cases). + /// + STDMETHOD(GetPropertyValues)( + DWRITE_FONT_PROPERTY_ID propertyID, + _In_z_ WCHAR const* preferredLocaleNames, + _COM_Outptr_ IDWriteStringList** values + ) PURE; + + /// + /// Returns all unique property values in the set, which can be used + /// for purposes such as displaying a family list or tag cloud. All values + /// are returned regardless of language, including all localized names. + /// + /// Font property of interest. + /// Receives a pointer to the newly created strings list. + /// + /// Standard HRESULT error code. + /// + /// + /// For example, suppose the font set includes the Meiryo family, which has both Japanese and English family names. + /// The returned list of distinct family names would include both the Japanese and English names. + /// + STDMETHOD(GetPropertyValues)( + DWRITE_FONT_PROPERTY_ID propertyID, + _COM_Outptr_ IDWriteStringList** values + ) PURE; + + /// + /// Returns how many times a given property value occurs in the set. + /// + /// Font property of interest. + /// How many times that property occurs. + /// + /// Standard HRESULT error code. + /// + /// + /// For example, the family name "Segoe UI" may return a count of 12, + /// whereas Harrington only has 1. + /// + STDMETHOD(GetPropertyOccurrenceCount)( + _In_ DWRITE_FONT_PROPERTY const* property, + _Out_ UINT32* propertyOccurrenceCount + ) PURE; + + /// + /// Returns a subset of fonts filtered by the given properties. + /// + /// List of properties to filter using. + /// How many properties to filter. + /// Subset of fonts that match the properties, + /// or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// If no fonts matched the filter, the subset will be empty (GetFontCount + /// returns 0), but the function does not return an error. The subset will + /// always be equal to or less than the original set. + /// + STDMETHOD(GetMatchingFonts)( + _In_reads_(propertyCount) DWRITE_FONT_PROPERTY const* properties, + UINT32 propertyCount, + _COM_Outptr_ IDWriteFontSet** filteredSet + ) PURE; + + /// + /// Returns a list of fonts within the given WWS family prioritized by + /// WWS distance. + /// + /// Neutral or localized family name of font. + /// Weight of font. + /// Stretch of font. + /// Slope of font. + /// Subset of fonts that match the properties, + /// or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// The returned list can include simulated bold and oblique variants, + /// which would be useful for font fallback selection. + /// + STDMETHOD(GetMatchingFonts)( + _In_z_ WCHAR const* familyName, + DWRITE_FONT_WEIGHT fontWeight, + DWRITE_FONT_STRETCH fontStretch, + DWRITE_FONT_STYLE fontStyle, + _COM_Outptr_ IDWriteFontSet** filteredSet + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("2F642AFE-9C68-4F40-B8BE-457401AFCB3D") IDWriteFontSetBuilder : public IUnknown +{ + /// + /// Adds a reference to a font to the set being built. The necessary + /// metadata will automatically be extracted from the font upon calling + /// CreateFontSet. + /// + /// Font face reference object to add to the set. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontFaceReference)( + _In_ IDWriteFontFaceReference* fontFaceReference + ) PURE; + + /// + /// Adds a reference to a font to the set being built. The caller + /// supplies enough information to search on, avoiding the need to open + /// the potentially non-local font. Any properties not supplied by the + /// caller will be missing, and those properties will not be available as + /// filters in GetMatchingFonts. GetPropertyValues for missing properties + /// will return an empty string list. The properties passed should generally + /// be consistent with the actual font contents, but they need not be. You + /// could, for example, alias a font using a different name or unique + /// identifier, or you could set custom tags not present in the actual + /// font. + /// + /// Reference to the font. + /// List of properties to associate with the reference. + /// How many properties are defined. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontFaceReference)( + _In_ IDWriteFontFaceReference* fontFaceReference, + _In_reads_(propertyCount) DWRITE_FONT_PROPERTY const* properties, + UINT32 propertyCount + ) PURE; + + /// + /// Appends an existing font set to the one being built, allowing + /// one to aggregate two sets or to essentially extend an existing one. + /// + /// Font set to append font face references from. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontSet)( + _In_ IDWriteFontSet* fontSet + ) PURE; + + /// + /// Creates a font set from all the font face references added so + /// far via AddFontFaceReference. + /// + /// Contains newly created font set object, + /// or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// Creating a font set takes less time if the references were added + /// with metadata rather than needing to extract the metadata from the + /// font file. + /// + STDMETHOD(CreateFontSet)( + _COM_Outptr_ IDWriteFontSet** fontSet + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("53585141-D9F8-4095-8321-D73CF6BD116C") IDWriteFontCollection1 : public IDWriteFontCollection +{ + /// + /// Get the underlying font set used by this collection. + /// + /// Contains font set used by the collection. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSet)( + _COM_Outptr_ IDWriteFontSet** fontSet + ) PURE; + + /// + /// Creates a font family object given a zero-based font family index. + /// + /// Zero-based index of the font family. + /// Receives a pointer the newly created font family object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamily)( + UINT32 index, + _COM_Outptr_ IDWriteFontFamily1** fontFamily + ) PURE; + + using IDWriteFontCollection::GetFontFamily; +}; + + +/// +/// The IDWriteFontFamily interface represents a set of fonts that share the same design but are differentiated +/// by weight, stretch, and style. +/// +interface DWRITE_DECLARE_INTERFACE("DA20D8EF-812A-4C43-9802-62EC4ABD7ADF") IDWriteFontFamily1 : public IDWriteFontFamily +{ + /// + /// Gets the current locality of a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// + /// The locality enumeration. For fully local files, the result will always + /// be DWRITE_LOCALITY_LOCAL. For downloadable files, the result depends on how + /// much of the file has been downloaded, and GetFont() fails if the locality + /// is REMOTE and potentially fails if PARTIAL. The application can explicitly + /// ask for the font to be enqueued for download via EnqueueFontDownloadRequest + /// followed by BeginDownload(). + /// + /// + /// The locality enumeration. + /// + STDMETHOD_(DWRITE_LOCALITY, GetFontLocality)(UINT32 listIndex) PURE; + + /// + /// Gets a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFont)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFont3** font + ) PURE; + + using IDWriteFontFamily::GetFont; + + /// + /// Gets a font face reference given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font face reference object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; +}; + + +/// +/// The IDWriteFontList interface represents a list of fonts. +/// +interface DWRITE_DECLARE_INTERFACE("DA20D8EF-812A-4C43-9802-62EC4ABD7ADE") IDWriteFontList1 : public IDWriteFontList +{ + /// + /// Gets the current locality of a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// + /// The locality enumeration. For fully local files, the result will always + /// be DWRITE_LOCALITY_LOCAL. For downloadable files, the result depends on how + /// much of the file has been downloaded, and GetFont() fails if the locality + /// is REMOTE and potentially fails if PARTIAL. The application can explicitly + /// ask for the font to be enqueued for download via EnqueueFontDownloadRequest + /// followed by BeginDownload(). + /// + /// + /// The locality enumeration. + /// + STDMETHOD_(DWRITE_LOCALITY, GetFontLocality)(UINT32 listIndex) PURE; + + /// + /// Gets a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font object. + /// + /// Standard HRESULT error code. The function returns DWRITE_E_REMOTEFONT if it could not construct a remote font. + /// + STDMETHOD(GetFont)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFont3** font + ) PURE; + + using IDWriteFontList::GetFont; + + /// + /// Gets a font face reference given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font face reference object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; +}; + + +/// +/// A uniquely identifying reference to a font, from which you can create a font +/// face to query font metrics and use for rendering. A font face reference +/// consists of a font file, font face index, and font face simulation. The file +/// data may or may not be physically present on the local machine yet. +/// +interface DWRITE_DECLARE_INTERFACE("5E7FA7CA-DDE3-424C-89F0-9FCD6FED58CD") IDWriteFontFaceReference : public IUnknown +{ + /// + /// Creates a font face from the reference for use with layout, + /// shaping, or rendering. + /// + /// Newly created font face object, or nullptr in the case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// This function can fail with DWRITE_E_REMOTEFONT if the font is not local. + /// + STDMETHOD(CreateFontFace)( + _COM_Outptr_ IDWriteFontFace3** fontFace + ) PURE; + + /// + /// Creates a font face with alternate font simulations, for example, to + /// explicitly simulate a bold font face out of a regular variant. + /// + /// Font face simulation flags for algorithmic emboldening and italicization. + /// Newly created font face object, or nullptr in the case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// This function can fail with DWRITE_E_REMOTEFONT if the font is not local. + /// + STDMETHOD(CreateFontFaceWithSimulations)( + DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags, + _COM_Outptr_ IDWriteFontFace3** fontFace + ) PURE; + + /// + /// Compares two instances of a font face references for equality. + /// + STDMETHOD_(BOOL, Equals)(IDWriteFontFaceReference* fontFaceReference) PURE; + + /// + /// Obtains the zero-based index of the font face in its font file or files. If the font files contain a single face, + /// the return value is zero. + /// + STDMETHOD_(UINT32, GetFontFaceIndex)() PURE; + + /// + /// Obtains the algorithmic style simulation flags of a font face. + /// + STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)() PURE; + + /// + /// Obtains the font file representing a font face. + /// + STDMETHOD(GetFontFile)( + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; + + /// + /// Get the local size of the font face in bytes. + /// + /// + /// The value returned by GetLocalFileSize will always be less than or + /// equal to the value returned by GetFullSize. If the locality is remote, + /// the GetLocalFileSize value is zero. If the locality is local, this + /// value will equal the value returned by GetFileSize. If the locality is + /// partial, this value will equal the size of the portions of the font + /// data that have been downloaded, which will be greater than zero and + /// less than or equal to the GetFileSize value. + /// + STDMETHOD_(UINT64, GetLocalFileSize)() PURE; + + /// + /// Get the total size of the font face in bytes. + /// + /// + /// If the locality is remote, this value is unknown and will be zero. + /// If the locality is partial or local, the value is the full size of + /// the font face. + /// + STDMETHOD_(UINT64, GetFileSize)() PURE; + + /// + /// Get the last modified date. + /// + /// + /// The time may be zero if the font file loader does not expose file time. + /// + STDMETHOD(GetFileTime)(_Out_ FILETIME* lastWriteTime) PURE; + + /// + /// Get the locality of this font face reference. You can always successfully + /// create a font face from a fully local font. Attempting to create a font + /// face on a remote or partially local font may fail with DWRITE_E_REMOTEFONT. + /// This function may change between calls depending on background downloads + /// and whether cached data expires. + /// + STDMETHOD_(DWRITE_LOCALITY, GetLocality)() PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(EnqueueFontDownloadRequest)() PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// Array of characters to download. + /// The number of elements in the character array. + /// + /// Standard HRESULT error code. + /// + /// + /// Downloading a character involves downloading every glyph it depends on + /// directly or indirectly, via font tables (cmap, GSUB, COLR, glyf). + /// + STDMETHOD(EnqueueCharacterDownloadRequest)( + _In_reads_(characterCount) WCHAR const* characters, + UINT32 characterCount + ) PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// Array of glyph indices to download. + /// The number of elements in the glyph index array. + /// + /// Standard HRESULT error code. + /// + /// + /// Downloading a glyph involves downloading any other glyphs it depends on + /// from the font tables (GSUB, COLR, glyf). + /// + STDMETHOD(EnqueueGlyphDownloadRequest)( + _In_reads_(glyphCount) UINT16 const* glyphIndices, + UINT32 glyphCount + ) PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// Offset of the fragment from the beginning of the font file. + /// Size of the fragment in bytes. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(EnqueueFileFragmentDownloadRequest)( + UINT64 fileOffset, + UINT64 fragmentSize + ) PURE; +}; + + +/// +/// The IDWriteFont interface represents a font in a font collection. +/// +interface DWRITE_DECLARE_INTERFACE("29748ED6-8C9C-4A6A-BE0B-D912E8538944") IDWriteFont3 : public IDWriteFont2 +{ + /// + /// Creates a font face object for the font. + /// + /// Receives a pointer to the newly created font face object. + /// + /// Standard HRESULT error code. The function returns DWRITE_E_REMOTEFONT if it could not construct a remote font. + /// + STDMETHOD(CreateFontFace)( + _COM_Outptr_ IDWriteFontFace3** fontFace + ) PURE; + + using IDWriteFont::CreateFontFace; + + /// + /// Compares two instances of a font references for equality. + /// + STDMETHOD_(BOOL, Equals)(IDWriteFont* font) PURE; + + /// + /// Return a font face reference identifying this font. + /// + /// A uniquely identifying reference to a font face. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Determines whether the font supports the specified character. + /// + /// Unicode (UCS-4) character value. + /// + /// Returns TRUE if the font has the specified character, FALSE if not. + /// + STDMETHOD_(BOOL, HasCharacter)( + UINT32 unicodeValue + ) PURE; + + using IDWriteFont::HasCharacter; + + /// + /// Gets the current locality of the font. + /// + /// + /// The locality enumeration. For fully local files, the result will always + /// be DWRITE_LOCALITY_LOCAL. A downloadable file may be any of the states, + /// and this function may change between calls. + /// + /// + /// The locality enumeration. + /// + STDMETHOD_(DWRITE_LOCALITY, GetLocality)() PURE; +}; + + +/// +/// The interface that represents an absolute reference to a font face. +/// It contains font face type, appropriate file references and face identification data. +/// Various font data such as metrics, names and glyph outlines is obtained from IDWriteFontFace. +/// +interface DWRITE_DECLARE_INTERFACE("D37D7598-09BE-4222-A236-2081341CC1F2") IDWriteFontFace3 : public IDWriteFontFace2 +{ + /// + /// Return a font face reference identifying this font. + /// + /// A uniquely identifying reference to a font face. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Gets the PANOSE values from the font, used for font selection and + /// matching. + /// + /// PANOSE structure to fill in. + /// + /// The function does not simulate these, such as substituting a weight or + /// proportion inferred on other values. If the font does not specify them, + /// they are all set to 'any' (0). + /// + STDMETHOD_(void, GetPanose)( + _Out_ DWRITE_PANOSE* panose + ) PURE; + + /// + /// Gets the weight of the specified font. + /// + STDMETHOD_(DWRITE_FONT_WEIGHT, GetWeight)() PURE; + + /// + /// Gets the stretch (aka. width) of the specified font. + /// + STDMETHOD_(DWRITE_FONT_STRETCH, GetStretch)() PURE; + + /// + /// Gets the style (aka. slope) of the specified font. + /// + STDMETHOD_(DWRITE_FONT_STYLE, GetStyle)() PURE; + + /// + /// Creates an localized strings object that contains the family names for the font family, indexed by locale name. + /// + /// Receives a pointer to the newly created localized strings object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFamilyNames)( + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Gets a localized strings collection containing the face names for the font (e.g., Regular or Bold), indexed by locale name. + /// + /// Receives a pointer to the newly created localized strings object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFaceNames)( + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Gets a localized strings collection containing the specified informational strings, indexed by locale name. + /// + /// Identifies the string to get. + /// Receives a pointer to the newly created localized strings object. + /// Receives the value TRUE if the font contains the specified string ID or FALSE if not. + /// + /// Standard HRESULT error code. If the font does not contain the specified string, the return value is S_OK but + /// informationalStrings receives a NULL pointer and exists receives the value FALSE. + /// + STDMETHOD(GetInformationalStrings)( + DWRITE_INFORMATIONAL_STRING_ID informationalStringID, + _COM_Outptr_result_maybenull_ IDWriteLocalizedStrings** informationalStrings, + _Out_ BOOL* exists + ) PURE; + + /// + /// Determines whether the font supports the specified character. + /// + /// Unicode (UCS-4) character value. + /// + /// Returns TRUE if the font has the specified character, FALSE if not. + /// + STDMETHOD_(BOOL, HasCharacter)( + UINT32 unicodeValue + ) PURE; + + /// + /// Determines the recommended text rendering and grid-fit mode to be used based on the + /// font, size, world transform, and measuring mode. + /// + /// Logical font size in DIPs. + /// Number of pixels per logical inch in the horizontal direction. + /// Number of pixels per logical inch in the vertical direction. + /// Specifies the world transform. + /// Specifies the quality of the graphics system's outline rendering, + /// affects the size threshold above which outline rendering is used. + /// Specifies the method used to measure during text layout. For proper + /// glyph spacing, the function returns a rendering mode that is compatible with the specified + /// measuring mode. + /// Rendering parameters object. This parameter is necessary in case the rendering parameters + /// object overrides the rendering mode. + /// Receives the recommended rendering mode. + /// Receives the recommended grid-fit mode. + /// + /// This method should be used to determine the actual rendering mode in cases where the rendering + /// mode of the rendering params object is DWRITE_RENDERING_MODE_DEFAULT, and the actual grid-fit + /// mode when the rendering params object is DWRITE_GRID_FIT_MODE_DEFAULT. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetRecommendedRenderingMode)( + FLOAT fontEmSize, + FLOAT dpiX, + FLOAT dpiY, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL isSideways, + DWRITE_OUTLINE_THRESHOLD outlineThreshold, + DWRITE_MEASURING_MODE measuringMode, + _In_opt_ IDWriteRenderingParams* renderingParams, + _Out_ DWRITE_RENDERING_MODE1* renderingMode, + _Out_ DWRITE_GRID_FIT_MODE* gridFitMode + ) PURE; + + /// + /// Determines whether the character is locally downloaded from the font. + /// + /// Unicode (UCS-4) character value. + /// + /// Returns TRUE if the font has the specified character locally available, + /// FALSE if not or if the font does not support that character. + /// + STDMETHOD_(BOOL, IsCharacterLocal)( + UINT32 unicodeValue + ) PURE; + + /// + /// Determines whether the glyph is locally downloaded from the font. + /// + /// Glyph identifier. + /// + /// Returns TRUE if the font has the specified glyph locally available. + /// + STDMETHOD_(BOOL, IsGlyphLocal)( + UINT16 glyphId + ) PURE; + + /// + /// Determines whether the specified characters are local. + /// + /// Array of characters. + /// The number of elements in the character array. + /// Specifies whether to enqueue a download request + /// if any of the specified characters are not local. + /// Receives TRUE if all of the specified characters are local, + /// FALSE if any of the specified characters are remote. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AreCharactersLocal)( + _In_reads_(characterCount) WCHAR const* characters, + UINT32 characterCount, + BOOL enqueueIfNotLocal, + _Out_ BOOL* isLocal + ) PURE; + + /// + /// Determines whether the specified glyphs are local. + /// + /// Array of glyph indices. + /// The number of elements in the glyph index array. + /// Specifies whether to enqueue a download request + /// if any of the specified glyphs are not local. + /// Receives TRUE if all of the specified glyphs are local, + /// FALSE if any of the specified glyphs are remote. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AreGlyphsLocal)( + _In_reads_(glyphCount) UINT16 const* glyphIndices, + UINT32 glyphCount, + BOOL enqueueIfNotLocal, + _Out_ BOOL* isLocal + ) PURE; +}; + + +/// +/// Represents a collection of strings indexed by number. +/// An IDWriteStringList is otherwise identical to IDWriteLocalizedStrings except +/// for the semantics, where localized strings are indexed on language (each +/// language has one string property) whereas a string list may contain multiple +/// strings of the same language, such as a string list of family names from a +/// font set. You can QueryInterface from an IDWriteLocalizedStrings to an +/// IDWriteStringList. +/// +interface DWRITE_DECLARE_INTERFACE("CFEE3140-1157-47CA-8B85-31BFCF3F2D0E") IDWriteStringList : public IUnknown +{ + /// + /// Gets the number of strings. + /// + STDMETHOD_(UINT32, GetCount)() PURE; + + /// + /// Gets the length in characters (not including the null terminator) of the locale name with the specified index. + /// + /// Zero-based index of the locale name. + /// Receives the length in characters, not including the null terminator. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleNameLength)( + UINT32 listIndex, + _Out_ UINT32* length + ) PURE; + + /// + /// Copies the locale name with the specified index to the specified array. + /// + /// Zero-based index of the locale name. + /// Character array that receives the locale name. + /// Size of the array in characters. The size must include space for the terminating + /// null character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleName)( + UINT32 listIndex, + _Out_writes_z_(size) WCHAR* localeName, + UINT32 size + ) PURE; + + /// + /// Gets the length in characters (not including the null terminator) of the string with the specified index. + /// + /// Zero-based index of the string. + /// Receives the length in characters, not including the null terminator. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetStringLength)( + UINT32 listIndex, + _Out_ UINT32* length + ) PURE; + + /// + /// Copies the string with the specified index to the specified array. + /// + /// Zero-based index of the string. + /// Character array that receives the string. + /// Size of the array in characters. The size must include space for the terminating + /// null character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetString)( + UINT32 listIndex, + _Out_writes_z_(stringBufferSize) WCHAR* stringBuffer, + UINT32 stringBufferSize + ) PURE; +}; + + +/// +/// Application-defined callback interface that receives notifications from the font +/// download queue (IDWriteFontDownloadQueue interface). Callbacks will occur on the +/// downloading thread, and objects must be prepared to handle calls on their methods +/// from other threads at any time. +/// +interface DWRITE_DECLARE_INTERFACE("B06FE5B9-43EC-4393-881B-DBE4DC72FDA7") IDWriteFontDownloadListener : public IUnknown +{ + /// + /// The DownloadCompleted method is called back on an arbitrary thread when a + /// download operation ends. + /// + /// Pointer to the download queue interface on which + /// the BeginDownload method was called. + /// Optional context object that was passed to BeginDownload. + /// AddRef is called on the context object by BeginDownload and Release is called + /// after the DownloadCompleted method returns. + /// Result of the download operation. + STDMETHOD_(void, DownloadCompleted)( + _In_ IDWriteFontDownloadQueue* downloadQueue, + _In_opt_ IUnknown* context, + HRESULT downloadResult + ) PURE; +}; + + +/// +/// Interface that enqueues download requests for remote fonts, characters, glyphs, and font fragments. +/// Provides methods to asynchronously execute a download, cancel pending downloads, and be notified of +/// download completion. Callbacks to listeners will occur on the downloading thread, and objects must +/// be must be able to handle calls on their methods from other threads at any time. +/// +interface DWRITE_DECLARE_INTERFACE("B71E6052-5AEA-4FA3-832E-F60D431F7E91") IDWriteFontDownloadQueue : public IUnknown +{ + /// + /// Registers a client-defined listener object that receives download notifications. + /// All registered listener's DownloadCompleted will be called after BeginDownload + /// completes. + /// + /// Listener object to add. + /// Receives a token value, which the caller must subsequently + /// pass to RemoveListener. + /// + /// Standard HRESULT error code. + /// + /// + /// An IDWriteFontDownloadListener can also be passed to BeginDownload via the + /// context parameter, rather than globally registered to the queue. + /// + STDMETHOD(AddListener)( + IDWriteFontDownloadListener* listener, + _Out_ UINT32* token + ) PURE; + + /// + /// Unregisters a notification handler that was previously registered using + /// AddListener. + /// + /// Token value previously returned by AddListener. + /// + /// Returns S_OK if successful or E_INVALIDARG if the specified token does not + /// correspond to a registered listener. + /// + STDMETHOD(RemoveListener)( + UINT32 token + ) PURE; + + /// + /// Determines whether the download queue is empty. Note that the queue does not + /// include requests that are already being downloaded. In other words, BeginDownload + /// clears the queue. + /// + /// + /// TRUE if the queue is empty, FALSE if there are requests pending for BeginDownload. + /// + STDMETHOD_(BOOL, IsEmpty)() PURE; + + /// + /// Begins an asynchronous download operation. The download operation executes + /// in the background until it completes or is cancelled by a CancelDownload call. + /// + /// Optional context object that is passed back to the + /// download notification handler's DownloadCompleted method. If the context object + /// implements IDWriteFontDownloadListener, its DownloadCompleted will be called + /// when done. + /// + /// Returns S_OK if a download was successfully begun, S_FALSE if the queue was + /// empty, or a standard HRESULT error code. + /// + /// + /// BeginDownload removes all download requests from the queue, transferring them + /// to a background download operation. If any previous downloads are still ongoing + /// when BeginDownload is called again, the new download does not complete until + /// the previous downloads have finished. If the queue is empty and no active + /// downloads are pending, the DownloadCompleted callback is called immediately with + /// DWRITE_DOWNLOAD_RESULT_NONE. + /// + STDMETHOD(BeginDownload)( + _In_opt_ IUnknown* context = nullptr + ) PURE; + + /// + /// Removes all download requests from the queue and cancels any active download + /// operations. This calls DownloadCompleted with DWRITE_E_DOWNLOADCANCELLED. + /// Applications should call this when shutting down if they started any + /// downloads that have not finished yet with a call to DownloadCompleted. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CancelDownload)() PURE; + + /// + /// Get the current generation number of the download queue, which is incremented + /// every time after a download completes, whether failed or successful. This cookie + /// comparison value may be used to compared against cached data to know when it is + /// stale. + /// + /// + /// The number of download queue generations. + /// + STDMETHOD_(UINT64, GetGenerationCount)() PURE; +}; + + +/// +/// The GDI interop interface provides interoperability with GDI. +/// +interface DWRITE_DECLARE_INTERFACE("4556BE70-3ABD-4F70-90BE-421780A6F515") IDWriteGdiInterop1 : public IDWriteGdiInterop +{ + /// + /// Creates a font object that matches the properties specified by the LOGFONT structure. + /// + /// Structure containing a GDI-compatible font description. + /// The font collection to search. If NULL, the local system font collection is used. + /// Receives a newly created font object if successful, or NULL in case of error. + /// + /// Standard HRESULT error code. + /// + /// + /// The only fields that matter include: lfFaceName, lfCharSet, lfWeight, lfItalic. + /// Font size and rendering mode are a rendering time property, not a font property, + /// and text decorations like underline are drawn separately from the text. If no + /// font matches the given weight, slope, and character set, the best match within + /// the given GDI family name will be returned. DWRITE_E_NOFONT is returned if there + /// is no matching font name using either the GDI family name (e.g. Arial) or the + /// full font name (e.g. Arial Bold Italic). + /// + STDMETHOD(CreateFontFromLOGFONT)( + _In_ LOGFONTW const* logFont, + _In_opt_ IDWriteFontCollection* fontCollection, + _COM_Outptr_ IDWriteFont** font + ) PURE; + + /// + /// Reads the font signature from the given font. + /// + /// Font to read font signature from. + /// Font signature from the OS/2 table, ulUnicodeRange and ulCodePageRange. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSignature)( + _In_ IDWriteFont* font, + _Out_ FONTSIGNATURE* fontSignature + ) PURE; + + /// + /// Reads the font signature from the given font. + /// + /// Font to read font signature from. + /// Font signature from the OS/2 table, ulUnicodeRange and ulCodePageRange. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSignature)( + _In_ IDWriteFontFace* fontFace, + _Out_ FONTSIGNATURE* fontSignature + ) PURE; + + /// + /// Get a list of matching fonts based on the LOGFONT values. Only fonts + /// of that family name will be returned. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetMatchingFontsByLOGFONT)( + _In_ LOGFONT const* logFont, + _In_ IDWriteFontSet* fontSet, + _COM_Outptr_ IDWriteFontSet** filteredSet + ) PURE; +}; + +/// +/// Information about a formatted line of text. +/// +struct DWRITE_LINE_METRICS1 : DWRITE_LINE_METRICS +{ + /// + /// White space before the content of the line. This is included in the line height and baseline distances. + /// If the line is formatted horizontally either with a uniform line spacing or with proportional + /// line spacing, this value represents the extra space above the content. + /// + FLOAT leadingBefore; + + /// + /// White space after the content of the line. This is included in the height of the line. + /// If the line is formatted horizontally either with a uniform line spacing or with proportional + /// line spacing, this value represents the extra space below the content. + /// + FLOAT leadingAfter; +}; + +/// +/// Specify whether DWRITE_FONT_METRICS::lineGap value should be part of the line metrics. +/// +enum DWRITE_FONT_LINE_GAP_USAGE +{ + /// + /// The usage of the font line gap depends on the method used for text layout. + /// + DWRITE_FONT_LINE_GAP_USAGE_DEFAULT, + + /// + /// The font line gap is excluded from line spacing + /// + DWRITE_FONT_LINE_GAP_USAGE_DISABLED, + + /// + /// The font line gap is included in line spacing + /// + DWRITE_FONT_LINE_GAP_USAGE_ENABLED +}; + +/// +/// The DWRITE_LINE_SPACING structure specifies the parameters used to specify how to manage space between lines. +/// +struct DWRITE_LINE_SPACING +{ + /// + /// Method used to determine line spacing. + /// + DWRITE_LINE_SPACING_METHOD method; + + /// + /// Spacing between lines. + /// The interpretation of this parameter depends upon the line spacing method, as follows: + /// - default line spacing: ignored + /// - uniform line spacing: explicit distance in DIPs between lines + /// - proportional line spacing: a scaling factor to be applied to the computed line height; + /// for each line, the height of the line is computed as for default line spacing, and the scaling factor is applied to that value. + /// + FLOAT height; + + /// + /// Distance from top of line to baseline. + /// The interpretation of this parameter depends upon the line spacing method, as follows: + /// - default line spacing: ignored + /// - uniform line spacing: explicit distance in DIPs from the top of the line to the baseline + /// - proportional line spacing: a scaling factor applied to the computed baseline; for each line, + /// the baseline distance is computed as for default line spacing, and the scaling factor is applied to that value. + /// + FLOAT baseline; + + /// + /// Proportion of the entire leading distributed before the line. The allowed value is between 0 and 1.0. The remaining + /// leading is distributed after the line. It is ignored for the default and uniform line spacing methods. + /// The leading that is available to distribute before or after the line depends on the values of the height and + /// baseline parameters. + /// + FLOAT leadingBefore; + + /// + /// Specify whether DWRITE_FONT_METRICS::lineGap value should be part of the line metrics. + /// + DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage; +}; + +interface DWRITE_DECLARE_INTERFACE("F67E0EDD-9E3D-4ECC-8C32-4183253DFE70") IDWriteTextFormat2 : public IDWriteTextFormat1 +{ + /// + /// Set line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLineSpacing)(_In_ DWRITE_LINE_SPACING const* lineSpacingOptions) PURE; + + /// + /// Get line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLineSpacing)(_Out_ DWRITE_LINE_SPACING* lineSpacingOptions) PURE; +}; + +interface DWRITE_DECLARE_INTERFACE("07DDCD52-020E-4DE8-AC33-6C953D83F92D") IDWriteTextLayout3 : public IDWriteTextLayout2 +{ + /// + /// Invalidates the layout, forcing layout to remeasure before calling the + /// metrics or drawing functions. This is useful if the locality of a font + /// changes, and layout should be redrawn, or if the size of a client + /// implemented IDWriteInlineObject changes. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(InvalidateLayout)() PURE; + + /// + /// Set line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLineSpacing)(_In_ DWRITE_LINE_SPACING const* lineSpacingOptions) PURE; + + /// + /// Get line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLineSpacing)(_Out_ DWRITE_LINE_SPACING* lineSpacingOptions) PURE; + + /// + /// GetLineMetrics returns properties of each line. + /// + /// The array to fill with line information. + /// The maximum size of the lineMetrics array. + /// The actual size of the lineMetrics + /// array that is needed. + /// + /// Standard HRESULT error code. + /// + /// + /// If maxLineCount is not large enough E_NOT_SUFFICIENT_BUFFER, + /// which is equivalent to HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), + /// is returned and *actualLineCount is set to the number of lines + /// needed. + /// + STDMETHOD(GetLineMetrics)( + _Out_writes_to_opt_(maxLineCount, *actualLineCount) DWRITE_LINE_METRICS1* lineMetrics, + UINT32 maxLineCount, + _Out_ UINT32* actualLineCount + ) PURE; +}; + +#endif /* DWRITE_3_H_INCLUDED */ diff --git a/Source/SharpDX.Direct2D1/CommandSink3.cs b/Source/SharpDX.Direct2D1/CommandSink3.cs new file mode 100644 index 000000000..6b9f090c6 --- /dev/null +++ b/Source/SharpDX.Direct2D1/CommandSink3.cs @@ -0,0 +1,47 @@ +// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +namespace SharpDX.Direct2D1 +{ + public partial interface CommandSink3 + { + /// + ///

Renders part or all of the given sprite batch to the device context using the specified drawing options.

+ ///
+ ///

The sprite batch to draw.

+ ///

The index of the first sprite in the sprite batch to draw.

+ ///

The number of sprites to draw.

+ ///

The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.

+ ///

The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.

+ ///

The additional drawing options, if any, to be used for this sprite batch.

+ ///

If this method succeeds, it returns . Otherwise, it returns an error code.

+ /// + /// mt619823 + /// HRESULT ID2D1CommandSink3::DrawSpriteBatch([In] ID2D1SpriteBatch* spriteBatch,[In] unsigned int startIndex,[In] unsigned int spriteCount,[In] ID2D1Bitmap* bitmap,[In] D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,[In] D2D1_SPRITE_OPTIONS spriteOptions) + /// ID2D1CommandSink3::DrawSpriteBatch + void DrawSpriteBatch(SharpDX.Direct2D1.SpriteBatch spriteBatch, + int startIndex, + int spriteCount, + SharpDX.Direct2D1.Bitmap bitmap, + SharpDX.Direct2D1.BitmapInterpolationMode interpolationMode, + SharpDX.Direct2D1.SpriteOptions spriteOptions); + + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct2D1/CommandSink3Native.cs b/Source/SharpDX.Direct2D1/CommandSink3Native.cs new file mode 100644 index 000000000..4d6ac91d2 --- /dev/null +++ b/Source/SharpDX.Direct2D1/CommandSink3Native.cs @@ -0,0 +1,49 @@ +// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +namespace SharpDX.Direct2D1 +{ + internal partial class CommandSink3Native + { + /// + ///

Renders part or all of the given sprite batch to the device context using the specified drawing options.

+ ///
+ ///

The sprite batch to draw.

+ ///

The index of the first sprite in the sprite batch to draw.

+ ///

The number of sprites to draw.

+ ///

The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.

+ ///

The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.

+ ///

The additional drawing options, if any, to be used for this sprite batch.

+ ///

If this method succeeds, it returns . Otherwise, it returns an error code.

+ /// + /// mt619823 + /// HRESULT ID2D1CommandSink3::DrawSpriteBatch([In] ID2D1SpriteBatch* spriteBatch,[In] unsigned int startIndex,[In] unsigned int spriteCount,[In] ID2D1Bitmap* bitmap,[In] D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,[In] D2D1_SPRITE_OPTIONS spriteOptions) + /// ID2D1CommandSink3::DrawSpriteBatch + public void DrawSpriteBatch(SpriteBatch spriteBatch, + int startIndex, + int spriteCount, + Bitmap bitmap, + BitmapInterpolationMode interpolationMode, + SpriteOptions spriteOptions) + { + DrawSpriteBatch_(spriteBatch, startIndex, spriteCount, bitmap, interpolationMode, spriteOptions); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct2D1/Device3.cs b/Source/SharpDX.Direct2D1/Device3.cs new file mode 100644 index 000000000..555f0d7bf --- /dev/null +++ b/Source/SharpDX.Direct2D1/Device3.cs @@ -0,0 +1,42 @@ +// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +namespace SharpDX.Direct2D1 +{ + public partial class Device3 + { + /// + /// Initializes a new instance of the class. + /// + /// The object used when creating the . + /// The object used when creating the . + /// + /// Each call to CreateDevice returns a unique object.The object is obtained by calling QueryInterface on an ID3D10Device or an ID3D11Device. + /// + /// HRESULT ID2D1Factory3::CreateDevice([In] IDXGIDevice* dxgiDevice,[Out] ID2D1Device2** d2dDevice2) + public Device3(Factory4 factory, SharpDX.DXGI.Device3 device) + : base(IntPtr.Zero) + { + factory.CreateDevice(device, this); + } + } +} diff --git a/Source/SharpDX.Direct2D1/DeviceContext3.cs b/Source/SharpDX.Direct2D1/DeviceContext3.cs new file mode 100644 index 000000000..1392b6c11 --- /dev/null +++ b/Source/SharpDX.Direct2D1/DeviceContext3.cs @@ -0,0 +1,42 @@ +// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +namespace SharpDX.Direct2D1 +{ + public partial class DeviceContext3 + { + /// + /// Initializes a new instance of the class using an existing . + /// + /// The device. + /// The options to be applied to the created device context. + /// + /// The new device context will not have a selected target bitmap. The caller must create and select a bitmap as the target surface of the context. + /// + /// HRESULT ID2D1Device3::CreateDeviceContext([In] D2D1_DEVICE_CONTEXT_OPTIONS options,[Out] ID2D1DeviceContext3** deviceContext3) + public DeviceContext3(Device3 device, DeviceContextOptions options) + : base(IntPtr.Zero) + { + device.CreateDeviceContext(options, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct2D1/DirectWrite/GdiInterop.cs b/Source/SharpDX.Direct2D1/DirectWrite/GdiInterop.cs index 549bd7d56..4e288b774 100644 --- a/Source/SharpDX.Direct2D1/DirectWrite/GdiInterop.cs +++ b/Source/SharpDX.Direct2D1/DirectWrite/GdiInterop.cs @@ -46,6 +46,17 @@ public class LogFont public string lfFaceName; } + [StructLayout(LayoutKind.Sequential)] + public struct FontSignature + { + public int fsUsb1; + public int fsUsb2; + public int fsUsb3; + public int fsUsb4; + public int fsCsb1; + public int fsCsb2; + } + /// /// Creates a font object that matches the properties specified by the LOGFONT structure. /// diff --git a/Source/SharpDX.Direct2D1/DirectWrite/Mapping.xml b/Source/SharpDX.Direct2D1/DirectWrite/Mapping.xml index 184f14cf8..485372e83 100644 --- a/Source/SharpDX.Direct2D1/DirectWrite/Mapping.xml +++ b/Source/SharpDX.Direct2D1/DirectWrite/Mapping.xml @@ -29,6 +29,8 @@ + + @@ -43,6 +45,8 @@ dwrite dwrite_1 + dwrite_2 + dwrite_3 diff --git a/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj b/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj index ec939c895..6d0ff3a7a 100644 --- a/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj +++ b/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj @@ -26,6 +26,8 @@ + + @@ -36,7 +38,9 @@ + + @@ -51,6 +55,14 @@ + + + + + + + + diff --git a/Source/SharpDX.Direct2D1/SpriteBatch.cs b/Source/SharpDX.Direct2D1/SpriteBatch.cs new file mode 100644 index 000000000..067651fb1 --- /dev/null +++ b/Source/SharpDX.Direct2D1/SpriteBatch.cs @@ -0,0 +1,36 @@ +// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +namespace SharpDX.Direct2D1 +{ + public partial class SpriteBatch + { + /// + /// Initializes a new instance of the . + /// + public SpriteBatch(DeviceContext3 context3) + : this(IntPtr.Zero) + { + context3.CreateSpriteBatch(this); + } + } +} diff --git a/Source/SharpDX.Direct2D1/TransformedImageSource.cs b/Source/SharpDX.Direct2D1/TransformedImageSource.cs new file mode 100644 index 000000000..ad6f6b40e --- /dev/null +++ b/Source/SharpDX.Direct2D1/TransformedImageSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +namespace SharpDX.Direct2D1 +{ + public partial class TransformedImageSource + { + /// + /// Initializes a new instance of the . + /// + public TransformedImageSource(DeviceContext2 context2, ImageSource imageSource, ref TransformedImageSourceProperties ropertiesRef) + : this(IntPtr.Zero) + { + context2.CreateTransformedImageSource(imageSource, ref ropertiesRef, this); + } + } +}