Rémi Bernon : include: Add AggregateType / GetAbiType / GetLogicalType WinRT templates.

Alexandre Julliard julliard at winehq.org
Thu Feb 25 16:45:37 CST 2021


Module: wine
Branch: master
Commit: 2e262c59dfbd379232f9af93d5b1e79f3cf16b05
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2e262c59dfbd379232f9af93d5b1e79f3cf16b05

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Thu Feb 25 14:14:23 2021 +0100

include: Add AggregateType / GetAbiType / GetLogicalType WinRT templates.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/windows.foundation.collections.idl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/windows.foundation.collections.idl b/include/windows.foundation.collections.idl
index 9f7a59ab907..cf47adfa7e4 100644
--- a/include/windows.foundation.collections.idl
+++ b/include/windows.foundation.collections.idl
@@ -27,6 +27,19 @@ import "windowscontracts.idl";
 
 namespace Windows {
     namespace Foundation {
+
+cpp_quote("#ifdef __cplusplus")
+cpp_quote("} /* extern \"C\" */")
+cpp_quote("namespace ABI { namespace Windows { namespace Foundation { namespace Internal {")
+cpp_quote("template <class T> struct GetAbiType { typedef T type; };")
+cpp_quote("template <class T> struct GetLogicalType { typedef T type; };")
+cpp_quote("template <class L, class A> struct AggregateType {};")
+cpp_quote("template <class L, class A> struct GetAbiType<AggregateType<L, A>> { typedef A type; };")
+cpp_quote("template <class L, class A> struct GetLogicalType<AggregateType<L, A>> { typedef L type; };")
+cpp_quote("}}}}")
+cpp_quote("extern \"C\" {")
+cpp_quote("#endif")
+
 #ifdef __WIDL__
         [
             contract(Windows.Foundation.FoundationContract, 1.0),




More information about the wine-cvs mailing list