Supplementary to Biswapriyo Nath's recent patches updating the Direct2D
headers, this patch adds support for explicit aggregate returns for
newly added methods.
(Modelled on this:
<https://sourceforge.net/p/mingw-w64/mingw-w64/ci/ee9fc3d0b8c8868280e38384edd968067b8e71fc/>).From 12bc7c44d581481be26973044d914f6a06720648 Mon Sep 17 00:00:00 2001
From: Richard Copley <[email protected]>
Date: Fri, 22 Sep 2023 18:08:30 +0100
Subject: [PATCH] Explicit aggregate returns for new D2D methods
---
mingw-w64-headers/include/d2d1_3.h | 9 +++++++++
mingw-w64-headers/include/d2d1svg.h | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/mingw-w64-headers/include/d2d1_3.h
b/mingw-w64-headers/include/d2d1_3.h
index fbef408c9..18e233d15 100644
--- a/mingw-w64-headers/include/d2d1_3.h
+++ b/mingw-w64-headers/include/d2d1_3.h
@@ -188,7 +188,16 @@ __CRT_UUID_DECL(ID2D1InkStyle, 0xbae8b344, 0x23fc, 0x4071,
0x8c, 0xb5, 0xd0, 0x5
interface ID2D1Ink : public ID2D1Resource
{
STDMETHOD_(void, SetStartPoint)(const D2D1_INK_POINT *start_point) PURE;
+#ifndef WIDL_EXPLICIT_AGGREGATE_RETURNS
STDMETHOD_(D2D1_INK_POINT, GetStartPoint)() const PURE;
+#else
+ virtual D2D1_INK_POINT* STDMETHODCALLTYPE GetStartPoint(D2D1_INK_POINT*)
const = 0;
+ D2D1_INK_POINT STDMETHODCALLTYPE GetStartPoint() const {
+ D2D1_INK_POINT __ret;
+ GetStartPoint(&__ret);
+ return __ret;
+ }
+#endif
STDMETHOD(AddSegments)(const D2D1_INK_BEZIER_SEGMENT *segments, UINT32
segments_count) PURE;
STDMETHOD(RemoveSegmentsAtEnd)(UINT32 segments_count) PURE;
STDMETHOD(SetSegments)(UINT32 start_segment, const D2D1_INK_BEZIER_SEGMENT
*segments, UINT32 segments_count) PURE;
diff --git a/mingw-w64-headers/include/d2d1svg.h
b/mingw-w64-headers/include/d2d1svg.h
index 348e26b63..a0cf009e6 100644
--- a/mingw-w64-headers/include/d2d1svg.h
+++ b/mingw-w64-headers/include/d2d1svg.h
@@ -422,7 +422,16 @@ __CRT_UUID_DECL(ID2D1SvgElement, 0xac7b67a6, 0x183e,
0x49c1, 0xa8, 0x23, 0x0e, 0
interface ID2D1SvgDocument : public ID2D1Resource
{
STDMETHOD(SetViewportSize)(D2D1_SIZE_F viewport_size) PURE;
+#ifndef WIDL_EXPLICIT_AGGREGATE_RETURNS
STDMETHOD_(D2D1_SIZE_F, GetViewportSize)() const PURE;
+#else
+ virtual D2D1_SIZE_F* STDMETHODCALLTYPE GetViewportSize(D2D1_SIZE_F*) const =
0;
+ D2D1_SIZE_F STDMETHODCALLTYPE GetViewportSize() const {
+ D2D1_SIZE_F __ret;
+ GetViewportSize(&__ret);
+ return __ret;
+ }
+#endif
STDMETHOD(SetRoot)(ID2D1SvgElement *root) PURE;
STDMETHOD_(void, GetRoot)(ID2D1SvgElement **root) PURE;
STDMETHOD(FindElementById)(PCWSTR id, ID2D1SvgElement **svg_element) PURE;
--
2.42.0.windows.2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public