include: Add AggregateType / GetAbiType / GetLogicalType WinRT templates.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-02-25 14:14:23 +01:00 committed by Alexandre Julliard
parent e680cc53e0
commit 2e262c59df
1 changed files with 13 additions and 0 deletions

View File

@ -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),