From b553c3c89b9c11ff3584c77745b6caa8d5102e13 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Wed, 12 Oct 2022 17:33:50 -0400 Subject: [PATCH 01/14] Port IIterable --- .../IIterable`1.Manual.cs | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.collections/IIterable`1.Manual.cs diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.collections/IIterable`1.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.collections/IIterable`1.Manual.cs new file mode 100644 index 0000000000..d6cfa10d3c --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.collections/IIterable`1.Manual.cs @@ -0,0 +1,62 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.collections.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; + +namespace TerraFX.Interop.WinRT; + +[Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3")] +public unsafe partial struct IIterable + where T : unmanaged +{ + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged*, Guid*, void**, int>)(lpVtbl[0]))((IIterable*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged*, uint>)(lpVtbl[1]))((IIterable*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged*, uint>)(lpVtbl[2]))((IIterable*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged*, uint*, Guid**, int>)(lpVtbl[3]))((IIterable*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged*, HSTRING*, int>)(lpVtbl[4]))((IIterable*)Unsafe.AsPointer(ref this), className); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public HRESULT GetTrustLevel([NativeTypeName("TrustLevel *")] TrustLevel* trustLevel) + { + return ((delegate* unmanaged*, TrustLevel*, int>)(lpVtbl[5]))((IIterable*)Unsafe.AsPointer(ref this), trustLevel); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public HRESULT First([NativeTypeName("IIterator **")] IIterator** first) + { + return ((delegate* unmanaged*, IIterator**, int>)(lpVtbl[6]))((IIterable*)Unsafe.AsPointer(ref this), first); + } +} From b23a9eb4a83de703748dda255f55c72e8f6ce73f Mon Sep 17 00:00:00 2001 From: reflectronic Date: Thu, 13 Oct 2022 13:43:28 -0400 Subject: [PATCH 02/14] Add windows.foundation.h --- TerraFX.Interop.Windows.sln | 8 + .../winrt/windows.foundation/generate.rsp | 19 + .../WinRT/winrt/windows.foundation/header.txt | 4 + .../winrt-windows.foundation.h | 2 + .../winrt/windows.foundation/DateTime.cs | 14 + .../winrt/windows.foundation/IAsyncAction.cs | 140 ++++ .../IAsyncActionCompletedHandler.cs | 79 +++ .../winrt/windows.foundation/IClosable.cs | 112 +++ .../winrt/windows.foundation/IDeferral.cs | 112 +++ .../IDeferralCompletedHandler.cs | 79 +++ .../windows.foundation/IDeferralFactory.cs | 112 +++ .../IGetActivationFactory.cs | 112 +++ .../windows.foundation/IGuidHelperStatics.cs | 140 ++++ .../WinRT/winrt/windows.foundation/IID.cs | 520 ++++++++++++++ .../winrt/windows.foundation/IMemoryBuffer.cs | 112 +++ .../IMemoryBufferFactory.cs | 112 +++ .../IMemoryBufferReference.cs | 140 ++++ .../winrt/windows.foundation/IPropertySet.cs | 99 +++ .../windows.foundation/IPropertyValue.cs | 644 ++++++++++++++++++ .../IPropertyValueStatics.cs | 644 ++++++++++++++++++ .../winrt/windows.foundation/IStringable.cs | 112 +++ .../windows.foundation/IUriEscapeStatics.cs | 126 ++++ .../windows.foundation/IUriRuntimeClass.cs | 336 +++++++++ .../IUriRuntimeClassFactory.cs | 126 ++++ ...UriRuntimeClassWithAbsoluteCanonicalUri.cs | 126 ++++ .../IWwwFormUrlDecoderEntry.cs | 126 ++++ .../IWwwFormUrlDecoderRuntimeClass.cs | 112 +++ .../IWwwFormUrlDecoderRuntimeClassFactory.cs | 112 +++ .../WinRT/winrt/windows.foundation/Point.cs | 16 + .../winrt/windows.foundation/PropertyType.cs | 133 ++++ .../WinRT/winrt/windows.foundation/Rect.cs | 22 + .../WinRT/winrt/windows.foundation/Size.cs | 16 + .../winrt/windows.foundation/TimeSpan.cs | 14 + .../WinRT/winrt/windows.foundation/WinRT.cs | 99 +++ .../winrt/windows.foundation/DateTimeTests.cs | 34 + .../IAsyncActionCompletedHandlerTests.cs | 50 ++ .../windows.foundation/IAsyncActionTests.cs | 50 ++ .../windows.foundation/IClosableTests.cs | 50 ++ .../IDeferralCompletedHandlerTests.cs | 50 ++ .../IDeferralFactoryTests.cs | 50 ++ .../windows.foundation/IDeferralTests.cs | 50 ++ .../IGetActivationFactoryTests.cs | 50 ++ .../IGuidHelperStaticsTests.cs | 50 ++ .../IMemoryBufferFactoryTests.cs | 50 ++ .../IMemoryBufferReferenceTests.cs | 50 ++ .../windows.foundation/IMemoryBufferTests.cs | 50 ++ .../windows.foundation/IPropertySetTests.cs | 50 ++ .../IPropertyValueStaticsTests.cs | 50 ++ .../windows.foundation/IPropertyValueTests.cs | 50 ++ .../windows.foundation/IStringableTests.cs | 50 ++ .../IUriEscapeStaticsTests.cs | 50 ++ .../IUriRuntimeClassFactoryTests.cs | 50 ++ .../IUriRuntimeClassTests.cs | 50 ++ ...ntimeClassWithAbsoluteCanonicalUriTests.cs | 50 ++ .../IWwwFormUrlDecoderEntryTests.cs | 50 ++ ...wFormUrlDecoderRuntimeClassFactoryTests.cs | 50 ++ .../IWwwFormUrlDecoderRuntimeClassTests.cs | 50 ++ .../winrt/windows.foundation/PointTests.cs | 34 + .../winrt/windows.foundation/RectTests.cs | 34 + .../winrt/windows.foundation/SizeTests.cs | 34 + .../winrt/windows.foundation/TimeSpanTests.cs | 34 + 61 files changed, 5950 insertions(+) create mode 100644 generation/WinRT/winrt/windows.foundation/generate.rsp create mode 100644 generation/WinRT/winrt/windows.foundation/header.txt create mode 100644 generation/WinRT/winrt/windows.foundation/winrt-windows.foundation.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/DateTime.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/Point.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/PropertyType.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/Rect.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/Size.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpan.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation/WinRT.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 60592f240f..91722169b8 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3060,6 +3060,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "d3d12compatibility", "d3d12 generation\DirectX\headers\d3d12compatibility\headers-d3d12compatibility.h = generation\DirectX\headers\d3d12compatibility\headers-d3d12compatibility.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.foundation", "windows.foundation", "{0A6C98CF-2561-439D-A78D-C8C1E7F19B75}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.foundation\generate.rsp = generation\WinRT\winrt\windows.foundation\generate.rsp + generation\WinRT\winrt\windows.foundation\header.txt = generation\WinRT\winrt\windows.foundation\header.txt + generation\WinRT\winrt\windows.foundation\winrt-windows.foundation.h = generation\WinRT\winrt\windows.foundation\winrt-windows.foundation.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3529,6 +3536,7 @@ Global {EA5B695A-5F25-401E-9FD9-23BFDEFBA01B} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {5E5D7257-3F63-45F9-899B-CE0DFEFCC2D1} = {D9638FEE-50A4-44FF-B1F6-72E59548490B} {566C5B1B-E5DC-420D-8740-A991751A5D09} = {65954CB3-F28F-4CF0-BC77-0FFD6E858BCE} + {0A6C98CF-2561-439D-A78D-C8C1E7F19B75} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.foundation/generate.rsp b/generation/WinRT/winrt/windows.foundation/generate.rsp new file mode 100644 index 0000000000..e9518b4cfe --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.foundation.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.foundation +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.foundation +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.foundation.h diff --git a/generation/WinRT/winrt/windows.foundation/header.txt b/generation/WinRT/winrt/windows.foundation/header.txt new file mode 100644 index 0000000000..b97f620088 --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.foundation/winrt-windows.foundation.h b/generation/WinRT/winrt/windows.foundation/winrt-windows.foundation.h new file mode 100644 index 0000000000..38ac401aaf --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation/winrt-windows.foundation.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/DateTime.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/DateTime.cs new file mode 100644 index 0000000000..f5d9dbcb84 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/DateTime.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct DateTime +{ + /// + [NativeTypeName("INT64")] + public long UniversalTime; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs new file mode 100644 index 0000000000..5d7fea202c --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs @@ -0,0 +1,140 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("5A648006-843A-4DA9-865B-9D26E5DFAD7B")] +[NativeTypeName("struct IAsyncAction : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IAsyncAction : IAsyncAction.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IAsyncAction)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IAsyncAction*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IAsyncAction*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IAsyncAction*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IAsyncAction*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IAsyncAction*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IAsyncAction*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT put_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncActionCompletedHandler *")] IAsyncActionCompletedHandler* handler) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IAsyncAction*)Unsafe.AsPointer(ref this), handler); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncActionCompletedHandler **")] IAsyncActionCompletedHandler** handler) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IAsyncAction*)Unsafe.AsPointer(ref this), handler); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT GetResults() + { + return ((delegate* unmanaged)(lpVtbl[8]))((IAsyncAction*)Unsafe.AsPointer(ref this)); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT put_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncActionCompletedHandler *")] IAsyncActionCompletedHandler* handler); + + [VtblIndex(7)] + HRESULT get_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncActionCompletedHandler **")] IAsyncActionCompletedHandler** handler); + + [VtblIndex(8)] + HRESULT GetResults(); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IAsyncActionCompletedHandler *) __attribute__((stdcall))")] + public delegate* unmanaged put_Completed; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IAsyncActionCompletedHandler **) __attribute__((stdcall))")] + public delegate* unmanaged get_Completed; + + [NativeTypeName("HRESULT () __attribute__((stdcall))")] + public delegate* unmanaged GetResults; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs new file mode 100644 index 0000000000..e59fb8bec6 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs @@ -0,0 +1,79 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("A4ED5C81-76C9-40BD-8BE6-B1D90FB20AE7")] +[NativeTypeName("struct IAsyncActionCompletedHandler : IUnknown")] +[NativeInheritance("IUnknown")] +public unsafe partial struct IAsyncActionCompletedHandler : IAsyncActionCompletedHandler.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IAsyncActionCompletedHandler)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT Invoke([NativeTypeName("ABI::Windows::Foundation::IAsyncAction *")] IAsyncAction* asyncInfo, [NativeTypeName("ABI::Windows::Foundation::AsyncStatus")] AsyncStatus asyncStatus) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this), asyncInfo, asyncStatus); + } + + public interface Interface : IUnknown.Interface + { + [VtblIndex(3)] + HRESULT Invoke([NativeTypeName("ABI::Windows::Foundation::IAsyncAction *")] IAsyncAction* asyncInfo, [NativeTypeName("ABI::Windows::Foundation::AsyncStatus")] AsyncStatus asyncStatus); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IAsyncAction *, ABI::Windows::Foundation::AsyncStatus) __attribute__((stdcall))")] + public delegate* unmanaged Invoke; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs new file mode 100644 index 0000000000..b6beeac25a --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("30D5A829-7FA4-4026-83BB-D75BAE4EA99E")] +[NativeTypeName("struct IClosable : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IClosable : IClosable.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IClosable)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IClosable*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IClosable*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IClosable*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IClosable*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IClosable*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IClosable*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT Close() + { + return ((delegate* unmanaged)(lpVtbl[6]))((IClosable*)Unsafe.AsPointer(ref this)); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT Close(); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT () __attribute__((stdcall))")] + public delegate* unmanaged Close; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs new file mode 100644 index 0000000000..f0c1117c41 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("D6269732-3B7F-46A7-B40B-4FDCA2A2C693")] +[NativeTypeName("struct IDeferral : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IDeferral : IDeferral.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDeferral)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IDeferral*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IDeferral*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IDeferral*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IDeferral*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IDeferral*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IDeferral*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT Complete() + { + return ((delegate* unmanaged)(lpVtbl[6]))((IDeferral*)Unsafe.AsPointer(ref this)); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT Complete(); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT () __attribute__((stdcall))")] + public delegate* unmanaged Complete; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs new file mode 100644 index 0000000000..3e1a9bad98 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs @@ -0,0 +1,79 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("ED32A372-F3C8-4FAA-9CFB-470148DA3888")] +[NativeTypeName("struct IDeferralCompletedHandler : IUnknown")] +[NativeInheritance("IUnknown")] +public unsafe partial struct IDeferralCompletedHandler : IDeferralCompletedHandler.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDeferralCompletedHandler)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT Invoke() + { + return ((delegate* unmanaged)(lpVtbl[3]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); + } + + public interface Interface : IUnknown.Interface + { + [VtblIndex(3)] + HRESULT Invoke(); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT () __attribute__((stdcall))")] + public delegate* unmanaged Invoke; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs new file mode 100644 index 0000000000..aae791ee18 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("65A1ECC5-3FB5-4832-8CA9-F061B281D13A")] +[NativeTypeName("struct IDeferralFactory : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IDeferralFactory : IDeferralFactory.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDeferralFactory)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IDeferralFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IDeferralFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IDeferralFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IDeferralFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IDeferralFactory*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IDeferralFactory*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT Create([NativeTypeName("ABI::Windows::Foundation::IDeferralCompletedHandler *")] IDeferralCompletedHandler* handler, [NativeTypeName("ABI::Windows::Foundation::IDeferral **")] IDeferral** result) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IDeferralFactory*)Unsafe.AsPointer(ref this), handler, result); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT Create([NativeTypeName("ABI::Windows::Foundation::IDeferralCompletedHandler *")] IDeferralCompletedHandler* handler, [NativeTypeName("ABI::Windows::Foundation::IDeferral **")] IDeferral** result); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IDeferralCompletedHandler *, ABI::Windows::Foundation::IDeferral **) __attribute__((stdcall))")] + public delegate* unmanaged Create; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs new file mode 100644 index 0000000000..d47a444639 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("4EDB8EE2-96DD-49A7-94F7-4607DDAB8E3C")] +[NativeTypeName("struct IGetActivationFactory : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IGetActivationFactory : IGetActivationFactory.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IGetActivationFactory)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IGetActivationFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IGetActivationFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT GetActivationFactory(HSTRING activatableClassId, IInspectable** factory) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), activatableClassId, factory); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT GetActivationFactory(HSTRING activatableClassId, IInspectable** factory); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged GetActivationFactory; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs new file mode 100644 index 0000000000..7070f0dc86 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs @@ -0,0 +1,140 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("59C7966B-AE52-5283-AD7F-A1B9E9678ADD")] +[NativeTypeName("struct IGuidHelperStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IGuidHelperStatics : IGuidHelperStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IGuidHelperStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT CreateNewGuid(Guid* result) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_Empty(Guid* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT Equals([NativeTypeName("const GUID *")] Guid* target, [NativeTypeName("const GUID *")] Guid* value, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), target, value, result); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT CreateNewGuid(Guid* result); + + [VtblIndex(7)] + HRESULT get_Empty(Guid* value); + + [VtblIndex(8)] + HRESULT Equals([NativeTypeName("const GUID *")] Guid* target, [NativeTypeName("const GUID *")] Guid* value, [NativeTypeName("boolean *")] byte* result); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] + public delegate* unmanaged CreateNewGuid; + + [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] + public delegate* unmanaged get_Empty; + + [NativeTypeName("HRESULT (const GUID *, const GUID *, boolean *) __attribute__((stdcall))")] + public new delegate* unmanaged Equals; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.cs new file mode 100644 index 0000000000..42429e9006 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.cs @@ -0,0 +1,520 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IAsyncActionCompletedHandler + { + get + { + ReadOnlySpan data = new byte[] { + 0x81, 0x5C, 0xED, 0xA4, + 0xC9, 0x76, + 0xBD, 0x40, + 0x8B, + 0xE6, + 0xB1, + 0xD9, + 0x0F, + 0xB2, + 0x0A, + 0xE7 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IDeferralCompletedHandler + { + get + { + ReadOnlySpan data = new byte[] { + 0x72, 0xA3, 0x32, 0xED, + 0xC8, 0xF3, + 0xAA, 0x4F, + 0x9C, + 0xFB, + 0x47, + 0x01, + 0x48, + 0xDA, + 0x38, + 0x88 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IPropertySet + { + get + { + ReadOnlySpan data = new byte[] { + 0x9F, 0xED, 0x43, 0x8A, + 0xE6, 0xF4, + 0x21, 0x44, + 0xAC, + 0xF9, + 0x1D, + 0xAB, + 0x29, + 0x86, + 0x82, + 0x0C + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IAsyncAction + { + get + { + ReadOnlySpan data = new byte[] { + 0x06, 0x80, 0x64, 0x5A, + 0x3A, 0x84, + 0xA9, 0x4D, + 0x86, + 0x5B, + 0x9D, + 0x26, + 0xE5, + 0xDF, + 0xAD, + 0x7B + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IClosable + { + get + { + ReadOnlySpan data = new byte[] { + 0x29, 0xA8, 0xD5, 0x30, + 0xA4, 0x7F, + 0x26, 0x40, + 0x83, + 0xBB, + 0xD7, + 0x5B, + 0xAE, + 0x4E, + 0xA9, + 0x9E + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IDeferral + { + get + { + ReadOnlySpan data = new byte[] { + 0x32, 0x97, 0x26, 0xD6, + 0x7F, 0x3B, + 0xA7, 0x46, + 0xB4, + 0x0B, + 0x4F, + 0xDC, + 0xA2, + 0xA2, + 0xC6, + 0x93 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IDeferralFactory + { + get + { + ReadOnlySpan data = new byte[] { + 0xC5, 0xEC, 0xA1, 0x65, + 0xB5, 0x3F, + 0x32, 0x48, + 0x8C, + 0xA9, + 0xF0, + 0x61, + 0xB2, + 0x81, + 0xD1, + 0x3A + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IGetActivationFactory + { + get + { + ReadOnlySpan data = new byte[] { + 0xE2, 0x8E, 0xDB, 0x4E, + 0xDD, 0x96, + 0xA7, 0x49, + 0x94, + 0xF7, + 0x46, + 0x07, + 0xDD, + 0xAB, + 0x8E, + 0x3C + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IGuidHelperStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0x6B, 0x96, 0xC7, 0x59, + 0x52, 0xAE, + 0x83, 0x52, + 0xAD, + 0x7F, + 0xA1, + 0xB9, + 0xE9, + 0x67, + 0x8A, + 0xDD + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IMemoryBuffer + { + get + { + ReadOnlySpan data = new byte[] { + 0x2A, 0xDD, 0xC4, 0xFB, + 0x5B, 0x24, + 0xE4, 0x11, + 0xAF, + 0x98, + 0x68, + 0x94, + 0x23, + 0x26, + 0x0C, + 0xF8 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IMemoryBufferFactory + { + get + { + ReadOnlySpan data = new byte[] { + 0x2B, 0xDD, 0xC4, 0xFB, + 0x5B, 0x24, + 0xE4, 0x11, + 0xAF, + 0x98, + 0x68, + 0x94, + 0x23, + 0x26, + 0x0C, + 0xF8 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IMemoryBufferReference + { + get + { + ReadOnlySpan data = new byte[] { + 0x29, 0xDD, 0xC4, 0xFB, + 0x5B, 0x24, + 0xE4, 0x11, + 0xAF, + 0x98, + 0x68, + 0x94, + 0x23, + 0x26, + 0x0C, + 0xF8 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IPropertyValue + { + get + { + ReadOnlySpan data = new byte[] { + 0xDD, 0x82, 0xD6, 0x4B, + 0x54, 0x75, + 0xE9, 0x40, + 0x9A, + 0x9B, + 0x82, + 0x65, + 0x4E, + 0xDE, + 0x7E, + 0x62 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IPropertyValueStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0xC8, 0xDB, 0x9B, 0x62, + 0x32, 0xD9, + 0xF4, 0x4F, + 0x96, + 0xB9, + 0x8D, + 0x96, + 0xC5, + 0xC1, + 0xE8, + 0x58 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IStringable + { + get + { + ReadOnlySpan data = new byte[] { + 0x54, 0x9F, 0x36, 0x96, + 0xB6, 0x8E, + 0xF0, 0x48, + 0xAB, + 0xCE, + 0xC1, + 0xB2, + 0x11, + 0xE6, + 0x27, + 0xC3 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IUriEscapeStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0xBA, 0x32, 0xD4, 0xC1, + 0x24, 0xC8, + 0x52, 0x44, + 0xA7, + 0xFD, + 0x51, + 0x2B, + 0xC3, + 0xBB, + 0xE9, + 0xA1 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IUriRuntimeClass + { + get + { + ReadOnlySpan data = new byte[] { + 0x57, 0x5E, 0x36, 0x9E, + 0xB2, 0x48, + 0x60, 0x41, + 0x95, + 0x6F, + 0xC7, + 0x38, + 0x51, + 0x20, + 0xBB, + 0xFC + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IUriRuntimeClassFactory + { + get + { + ReadOnlySpan data = new byte[] { + 0x6F, 0x79, 0xA9, 0x44, + 0x3E, 0x72, + 0xDF, 0x4F, + 0xA2, + 0x18, + 0x03, + 0x3E, + 0x75, + 0xB0, + 0xC0, + 0x84 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IUriRuntimeClassWithAbsoluteCanonicalUri + { + get + { + ReadOnlySpan data = new byte[] { + 0x61, 0x96, 0x8D, 0x75, + 0x1C, 0x22, + 0x0F, 0x48, + 0xA3, + 0x39, + 0x50, + 0x65, + 0x66, + 0x73, + 0xF4, + 0x6F + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IWwwFormUrlDecoderEntry + { + get + { + ReadOnlySpan data = new byte[] { + 0x31, 0x74, 0x5E, 0x12, + 0x78, 0xF6, + 0x8E, 0x4E, + 0xB6, + 0x70, + 0x20, + 0xA9, + 0xB0, + 0x6C, + 0x51, + 0x2D + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IWwwFormUrlDecoderRuntimeClass + { + get + { + ReadOnlySpan data = new byte[] { + 0x51, 0x04, 0x5A, 0xD4, + 0x25, 0xF2, + 0x42, 0x45, + 0x92, + 0x96, + 0x0E, + 0x1D, + 0xF5, + 0xD2, + 0x54, + 0xDF + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IWwwFormUrlDecoderRuntimeClassFactory + { + get + { + ReadOnlySpan data = new byte[] { + 0x3D, 0x6B, 0x8C, 0x5B, + 0xAE, 0x24, + 0xB5, 0x41, + 0xA1, + 0xBF, + 0xF0, + 0xC3, + 0xD5, + 0x44, + 0x84, + 0x5B + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs new file mode 100644 index 0000000000..0380f93cec --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("FBC4DD2A-245B-11E4-AF98-689423260CF8")] +[NativeTypeName("struct IMemoryBuffer : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IMemoryBuffer : IMemoryBuffer.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IMemoryBuffer)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IMemoryBuffer*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IMemoryBuffer*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT CreateReference([NativeTypeName("ABI::Windows::Foundation::IMemoryBufferReference **")] IMemoryBufferReference** reference) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), reference); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT CreateReference([NativeTypeName("ABI::Windows::Foundation::IMemoryBufferReference **")] IMemoryBufferReference** reference); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IMemoryBufferReference **) __attribute__((stdcall))")] + public delegate* unmanaged CreateReference; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs new file mode 100644 index 0000000000..62594be3ec --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("FBC4DD2B-245B-11E4-AF98-689423260CF8")] +[NativeTypeName("struct IMemoryBufferFactory : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IMemoryBufferFactory : IMemoryBufferFactory.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IMemoryBufferFactory)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT Create([NativeTypeName("UINT32")] uint capacity, [NativeTypeName("ABI::Windows::Foundation::IMemoryBuffer **")] IMemoryBuffer** value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), capacity, value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT Create([NativeTypeName("UINT32")] uint capacity, [NativeTypeName("ABI::Windows::Foundation::IMemoryBuffer **")] IMemoryBuffer** value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::IMemoryBuffer **) __attribute__((stdcall))")] + public delegate* unmanaged Create; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs new file mode 100644 index 0000000000..9012d339cf --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs @@ -0,0 +1,140 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("FBC4DD29-245B-11E4-AF98-689423260CF8")] +[NativeTypeName("struct IMemoryBufferReference : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IMemoryBufferReference : IMemoryBufferReference.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IMemoryBufferReference)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Capacity([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT add_Closed([NativeTypeName("ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CFoundation__CIMemoryBufferReference_IInspectable_t *")] ITypedEventHandler* handler, EventRegistrationToken* cookie) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[7]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), handler, cookie); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT remove_Closed(EventRegistrationToken cookie) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), cookie); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Capacity([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(7)] + HRESULT add_Closed([NativeTypeName("ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CFoundation__CIMemoryBufferReference_IInspectable_t *")] ITypedEventHandler* handler, EventRegistrationToken* cookie); + + [VtblIndex(8)] + HRESULT remove_Closed(EventRegistrationToken cookie); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Capacity; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CFoundation__CIMemoryBufferReference_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_Closed; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + public delegate* unmanaged remove_Closed; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs new file mode 100644 index 0000000000..1bbafdc91b --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs @@ -0,0 +1,99 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("8A43ED9F-F4E6-4421-ACF9-1DAB2986820C")] +[NativeTypeName("struct IPropertySet : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IPropertySet : IPropertySet.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IPropertySet)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IPropertySet*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IPropertySet*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IPropertySet*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IPropertySet*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IPropertySet*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IPropertySet*)Unsafe.AsPointer(ref this), trustLevel); + } + + public interface Interface : IInspectable.Interface + { + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs new file mode 100644 index 0000000000..bc5f80b003 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs @@ -0,0 +1,644 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("4BD682DD-7554-40E9-9A9B-82654EDE7E62")] +[NativeTypeName("struct IPropertyValue : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IPropertyValue : IPropertyValue.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IPropertyValue)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IPropertyValue*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IPropertyValue*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IPropertyValue*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IPropertyValue*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IPropertyValue*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IPropertyValue*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Type([NativeTypeName("ABI::Windows::Foundation::PropertyType *")] PropertyType* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_IsNumericScalar([NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT GetUInt8(byte* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT GetInt16([NativeTypeName("INT16 *")] short* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT GetUInt16([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT GetInt32([NativeTypeName("INT32 *")] int* value) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT GetUInt32([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT GetInt64([NativeTypeName("INT64 *")] long* value) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT GetUInt64([NativeTypeName("UINT64 *")] ulong* value) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT GetSingle(float* value) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HRESULT GetDouble(double* value) + { + return ((delegate* unmanaged)(lpVtbl[16]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public HRESULT GetChar16([NativeTypeName("WCHAR *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public HRESULT GetBoolean([NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] + public HRESULT GetString(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[19]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] + public HRESULT GetGuid(Guid* value) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] + public HRESULT GetDateTime([NativeTypeName("ABI::Windows::Foundation::DateTime *")] DateTime* value) + { + return ((delegate* unmanaged)(lpVtbl[21]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] + public HRESULT GetTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value) + { + return ((delegate* unmanaged)(lpVtbl[22]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(23)] + public HRESULT GetPoint([NativeTypeName("ABI::Windows::Foundation::Point *")] Point* value) + { + return ((delegate* unmanaged)(lpVtbl[23]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(24)] + public HRESULT GetSize([NativeTypeName("ABI::Windows::Foundation::Size *")] Size* value) + { + return ((delegate* unmanaged)(lpVtbl[24]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(25)] + public HRESULT GetRect([NativeTypeName("ABI::Windows::Foundation::Rect *")] Rect* value) + { + return ((delegate* unmanaged)(lpVtbl[25]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(26)] + public HRESULT GetUInt8Array([NativeTypeName("UINT32 *")] uint* valueLength, byte** value) + { + return ((delegate* unmanaged)(lpVtbl[26]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(27)] + public HRESULT GetInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT16 **")] short** value) + { + return ((delegate* unmanaged)(lpVtbl[27]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(28)] + public HRESULT GetUInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT16 **")] ushort** value) + { + return ((delegate* unmanaged)(lpVtbl[28]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(29)] + public HRESULT GetInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT32 **")] int** value) + { + return ((delegate* unmanaged)(lpVtbl[29]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(30)] + public HRESULT GetUInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT32 **")] uint** value) + { + return ((delegate* unmanaged)(lpVtbl[30]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(31)] + public HRESULT GetInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT64 **")] long** value) + { + return ((delegate* unmanaged)(lpVtbl[31]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(32)] + public HRESULT GetUInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT64 **")] ulong** value) + { + return ((delegate* unmanaged)(lpVtbl[32]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(33)] + public HRESULT GetSingleArray([NativeTypeName("UINT32 *")] uint* valueLength, float** value) + { + return ((delegate* unmanaged)(lpVtbl[33]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(34)] + public HRESULT GetDoubleArray([NativeTypeName("UINT32 *")] uint* valueLength, double** value) + { + return ((delegate* unmanaged)(lpVtbl[34]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(35)] + public HRESULT GetChar16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("WCHAR **")] ushort** value) + { + return ((delegate* unmanaged)(lpVtbl[35]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(36)] + public HRESULT GetBooleanArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("boolean **")] byte** value) + { + return ((delegate* unmanaged)(lpVtbl[36]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(37)] + public HRESULT GetStringArray([NativeTypeName("UINT32 *")] uint* valueLength, HSTRING** value) + { + return ((delegate* unmanaged)(lpVtbl[37]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(38)] + public HRESULT GetInspectableArray([NativeTypeName("UINT32 *")] uint* valueLength, IInspectable*** value) + { + return ((delegate* unmanaged)(lpVtbl[38]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(39)] + public HRESULT GetGuidArray([NativeTypeName("UINT32 *")] uint* valueLength, Guid** value) + { + return ((delegate* unmanaged)(lpVtbl[39]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(40)] + public HRESULT GetDateTimeArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::DateTime **")] DateTime** value) + { + return ((delegate* unmanaged)(lpVtbl[40]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(41)] + public HRESULT GetTimeSpanArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::TimeSpan **")] TimeSpan** value) + { + return ((delegate* unmanaged)(lpVtbl[41]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(42)] + public HRESULT GetPointArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Point **")] Point** value) + { + return ((delegate* unmanaged)(lpVtbl[42]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(43)] + public HRESULT GetSizeArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Size **")] Size** value) + { + return ((delegate* unmanaged)(lpVtbl[43]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(44)] + public HRESULT GetRectArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Rect **")] Rect** value) + { + return ((delegate* unmanaged)(lpVtbl[44]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Type([NativeTypeName("ABI::Windows::Foundation::PropertyType *")] PropertyType* value); + + [VtblIndex(7)] + HRESULT get_IsNumericScalar([NativeTypeName("boolean *")] byte* value); + + [VtblIndex(8)] + HRESULT GetUInt8(byte* value); + + [VtblIndex(9)] + HRESULT GetInt16([NativeTypeName("INT16 *")] short* value); + + [VtblIndex(10)] + HRESULT GetUInt16([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(11)] + HRESULT GetInt32([NativeTypeName("INT32 *")] int* value); + + [VtblIndex(12)] + HRESULT GetUInt32([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(13)] + HRESULT GetInt64([NativeTypeName("INT64 *")] long* value); + + [VtblIndex(14)] + HRESULT GetUInt64([NativeTypeName("UINT64 *")] ulong* value); + + [VtblIndex(15)] + HRESULT GetSingle(float* value); + + [VtblIndex(16)] + HRESULT GetDouble(double* value); + + [VtblIndex(17)] + HRESULT GetChar16([NativeTypeName("WCHAR *")] ushort* value); + + [VtblIndex(18)] + HRESULT GetBoolean([NativeTypeName("boolean *")] byte* value); + + [VtblIndex(19)] + HRESULT GetString(HSTRING* value); + + [VtblIndex(20)] + HRESULT GetGuid(Guid* value); + + [VtblIndex(21)] + HRESULT GetDateTime([NativeTypeName("ABI::Windows::Foundation::DateTime *")] DateTime* value); + + [VtblIndex(22)] + HRESULT GetTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value); + + [VtblIndex(23)] + HRESULT GetPoint([NativeTypeName("ABI::Windows::Foundation::Point *")] Point* value); + + [VtblIndex(24)] + HRESULT GetSize([NativeTypeName("ABI::Windows::Foundation::Size *")] Size* value); + + [VtblIndex(25)] + HRESULT GetRect([NativeTypeName("ABI::Windows::Foundation::Rect *")] Rect* value); + + [VtblIndex(26)] + HRESULT GetUInt8Array([NativeTypeName("UINT32 *")] uint* valueLength, byte** value); + + [VtblIndex(27)] + HRESULT GetInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT16 **")] short** value); + + [VtblIndex(28)] + HRESULT GetUInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT16 **")] ushort** value); + + [VtblIndex(29)] + HRESULT GetInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT32 **")] int** value); + + [VtblIndex(30)] + HRESULT GetUInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT32 **")] uint** value); + + [VtblIndex(31)] + HRESULT GetInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT64 **")] long** value); + + [VtblIndex(32)] + HRESULT GetUInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT64 **")] ulong** value); + + [VtblIndex(33)] + HRESULT GetSingleArray([NativeTypeName("UINT32 *")] uint* valueLength, float** value); + + [VtblIndex(34)] + HRESULT GetDoubleArray([NativeTypeName("UINT32 *")] uint* valueLength, double** value); + + [VtblIndex(35)] + HRESULT GetChar16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("WCHAR **")] ushort** value); + + [VtblIndex(36)] + HRESULT GetBooleanArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("boolean **")] byte** value); + + [VtblIndex(37)] + HRESULT GetStringArray([NativeTypeName("UINT32 *")] uint* valueLength, HSTRING** value); + + [VtblIndex(38)] + HRESULT GetInspectableArray([NativeTypeName("UINT32 *")] uint* valueLength, IInspectable*** value); + + [VtblIndex(39)] + HRESULT GetGuidArray([NativeTypeName("UINT32 *")] uint* valueLength, Guid** value); + + [VtblIndex(40)] + HRESULT GetDateTimeArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::DateTime **")] DateTime** value); + + [VtblIndex(41)] + HRESULT GetTimeSpanArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::TimeSpan **")] TimeSpan** value); + + [VtblIndex(42)] + HRESULT GetPointArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Point **")] Point** value); + + [VtblIndex(43)] + HRESULT GetSizeArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Size **")] Size** value); + + [VtblIndex(44)] + HRESULT GetRectArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Rect **")] Rect** value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::PropertyType *) __attribute__((stdcall))")] + public delegate* unmanaged get_Type; + + [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] + public delegate* unmanaged get_IsNumericScalar; + + [NativeTypeName("HRESULT (BYTE *) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt8; + + [NativeTypeName("HRESULT (INT16 *) __attribute__((stdcall))")] + public delegate* unmanaged GetInt16; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt16; + + [NativeTypeName("HRESULT (INT32 *) __attribute__((stdcall))")] + public delegate* unmanaged GetInt32; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt32; + + [NativeTypeName("HRESULT (INT64 *) __attribute__((stdcall))")] + public delegate* unmanaged GetInt64; + + [NativeTypeName("HRESULT (UINT64 *) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt64; + + [NativeTypeName("HRESULT (FLOAT *) __attribute__((stdcall))")] + public delegate* unmanaged GetSingle; + + [NativeTypeName("HRESULT (DOUBLE *) __attribute__((stdcall))")] + public delegate* unmanaged GetDouble; + + [NativeTypeName("HRESULT (WCHAR *) __attribute__((stdcall))")] + public delegate* unmanaged GetChar16; + + [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] + public delegate* unmanaged GetBoolean; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetString; + + [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] + public delegate* unmanaged GetGuid; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::DateTime *) __attribute__((stdcall))")] + public delegate* unmanaged GetDateTime; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan *) __attribute__((stdcall))")] + public delegate* unmanaged GetTimeSpan; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::Point *) __attribute__((stdcall))")] + public delegate* unmanaged GetPoint; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::Size *) __attribute__((stdcall))")] + public delegate* unmanaged GetSize; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::Rect *) __attribute__((stdcall))")] + public delegate* unmanaged GetRect; + + [NativeTypeName("HRESULT (UINT32 *, BYTE **) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt8Array; + + [NativeTypeName("HRESULT (UINT32 *, INT16 **) __attribute__((stdcall))")] + public delegate* unmanaged GetInt16Array; + + [NativeTypeName("HRESULT (UINT32 *, UINT16 **) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt16Array; + + [NativeTypeName("HRESULT (UINT32 *, INT32 **) __attribute__((stdcall))")] + public delegate* unmanaged GetInt32Array; + + [NativeTypeName("HRESULT (UINT32 *, UINT32 **) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt32Array; + + [NativeTypeName("HRESULT (UINT32 *, INT64 **) __attribute__((stdcall))")] + public delegate* unmanaged GetInt64Array; + + [NativeTypeName("HRESULT (UINT32 *, UINT64 **) __attribute__((stdcall))")] + public delegate* unmanaged GetUInt64Array; + + [NativeTypeName("HRESULT (UINT32 *, FLOAT **) __attribute__((stdcall))")] + public delegate* unmanaged GetSingleArray; + + [NativeTypeName("HRESULT (UINT32 *, DOUBLE **) __attribute__((stdcall))")] + public delegate* unmanaged GetDoubleArray; + + [NativeTypeName("HRESULT (UINT32 *, WCHAR **) __attribute__((stdcall))")] + public delegate* unmanaged GetChar16Array; + + [NativeTypeName("HRESULT (UINT32 *, boolean **) __attribute__((stdcall))")] + public delegate* unmanaged GetBooleanArray; + + [NativeTypeName("HRESULT (UINT32 *, HSTRING **) __attribute__((stdcall))")] + public delegate* unmanaged GetStringArray; + + [NativeTypeName("HRESULT (UINT32 *, IInspectable ***) __attribute__((stdcall))")] + public delegate* unmanaged GetInspectableArray; + + [NativeTypeName("HRESULT (UINT32 *, GUID **) __attribute__((stdcall))")] + public delegate* unmanaged GetGuidArray; + + [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::DateTime **) __attribute__((stdcall))")] + public delegate* unmanaged GetDateTimeArray; + + [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::TimeSpan **) __attribute__((stdcall))")] + public delegate* unmanaged GetTimeSpanArray; + + [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::Point **) __attribute__((stdcall))")] + public delegate* unmanaged GetPointArray; + + [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::Size **) __attribute__((stdcall))")] + public delegate* unmanaged GetSizeArray; + + [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::Rect **) __attribute__((stdcall))")] + public delegate* unmanaged GetRectArray; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs new file mode 100644 index 0000000000..f251925ea2 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs @@ -0,0 +1,644 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("629BDBC8-D932-4FF4-96B9-8D96C5C1E858")] +[NativeTypeName("struct IPropertyValueStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IPropertyValueStatics : IPropertyValueStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IPropertyValueStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT CreateEmpty(IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT CreateUInt8(byte value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT CreateInt16([NativeTypeName("INT16")] short value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT CreateUInt16([NativeTypeName("UINT16")] ushort value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT CreateInt32([NativeTypeName("INT32")] int value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT CreateUInt32([NativeTypeName("UINT32")] uint value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT CreateInt64([NativeTypeName("INT64")] long value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT CreateUInt64([NativeTypeName("UINT64")] ulong value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT CreateSingle(float value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT CreateDouble(double value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HRESULT CreateChar16([NativeTypeName("WCHAR")] ushort value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[16]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public HRESULT CreateBoolean([NativeTypeName("boolean")] byte value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public HRESULT CreateString(HSTRING value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] + public HRESULT CreateInspectable(IInspectable* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[19]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] + public HRESULT CreateGuid(Guid value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] + public HRESULT CreateDateTime([NativeTypeName("ABI::Windows::Foundation::DateTime")] DateTime value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[21]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] + public HRESULT CreateTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[22]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(23)] + public HRESULT CreatePoint([NativeTypeName("ABI::Windows::Foundation::Point")] Point value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[23]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(24)] + public HRESULT CreateSize([NativeTypeName("ABI::Windows::Foundation::Size")] Size value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[24]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(25)] + public HRESULT CreateRect([NativeTypeName("ABI::Windows::Foundation::Rect")] Rect value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[25]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(26)] + public HRESULT CreateUInt8Array([NativeTypeName("UINT32")] uint valueLength, byte* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[26]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(27)] + public HRESULT CreateInt16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT16 *")] short* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[27]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(28)] + public HRESULT CreateUInt16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT16 *")] ushort* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[28]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(29)] + public HRESULT CreateInt32Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT32 *")] int* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[29]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(30)] + public HRESULT CreateUInt32Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT32 *")] uint* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[30]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(31)] + public HRESULT CreateInt64Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT64 *")] long* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[31]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(32)] + public HRESULT CreateUInt64Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT64 *")] ulong* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[32]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(33)] + public HRESULT CreateSingleArray([NativeTypeName("UINT32")] uint valueLength, float* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[33]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(34)] + public HRESULT CreateDoubleArray([NativeTypeName("UINT32")] uint valueLength, double* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[34]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(35)] + public HRESULT CreateChar16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("WCHAR *")] ushort* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[35]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(36)] + public HRESULT CreateBooleanArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("boolean *")] byte* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[36]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(37)] + public HRESULT CreateStringArray([NativeTypeName("UINT32")] uint valueLength, HSTRING* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[37]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(38)] + public HRESULT CreateInspectableArray([NativeTypeName("UINT32")] uint valueLength, IInspectable** value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[38]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(39)] + public HRESULT CreateGuidArray([NativeTypeName("UINT32")] uint valueLength, Guid* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[39]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(40)] + public HRESULT CreateDateTimeArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::DateTime *")] DateTime* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[40]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(41)] + public HRESULT CreateTimeSpanArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[41]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(42)] + public HRESULT CreatePointArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Point *")] Point* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[42]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(43)] + public HRESULT CreateSizeArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Size *")] Size* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[43]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(44)] + public HRESULT CreateRectArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Rect *")] Rect* value, IInspectable** propertyValue) + { + return ((delegate* unmanaged)(lpVtbl[44]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT CreateEmpty(IInspectable** propertyValue); + + [VtblIndex(7)] + HRESULT CreateUInt8(byte value, IInspectable** propertyValue); + + [VtblIndex(8)] + HRESULT CreateInt16([NativeTypeName("INT16")] short value, IInspectable** propertyValue); + + [VtblIndex(9)] + HRESULT CreateUInt16([NativeTypeName("UINT16")] ushort value, IInspectable** propertyValue); + + [VtblIndex(10)] + HRESULT CreateInt32([NativeTypeName("INT32")] int value, IInspectable** propertyValue); + + [VtblIndex(11)] + HRESULT CreateUInt32([NativeTypeName("UINT32")] uint value, IInspectable** propertyValue); + + [VtblIndex(12)] + HRESULT CreateInt64([NativeTypeName("INT64")] long value, IInspectable** propertyValue); + + [VtblIndex(13)] + HRESULT CreateUInt64([NativeTypeName("UINT64")] ulong value, IInspectable** propertyValue); + + [VtblIndex(14)] + HRESULT CreateSingle(float value, IInspectable** propertyValue); + + [VtblIndex(15)] + HRESULT CreateDouble(double value, IInspectable** propertyValue); + + [VtblIndex(16)] + HRESULT CreateChar16([NativeTypeName("WCHAR")] ushort value, IInspectable** propertyValue); + + [VtblIndex(17)] + HRESULT CreateBoolean([NativeTypeName("boolean")] byte value, IInspectable** propertyValue); + + [VtblIndex(18)] + HRESULT CreateString(HSTRING value, IInspectable** propertyValue); + + [VtblIndex(19)] + HRESULT CreateInspectable(IInspectable* value, IInspectable** propertyValue); + + [VtblIndex(20)] + HRESULT CreateGuid(Guid value, IInspectable** propertyValue); + + [VtblIndex(21)] + HRESULT CreateDateTime([NativeTypeName("ABI::Windows::Foundation::DateTime")] DateTime value, IInspectable** propertyValue); + + [VtblIndex(22)] + HRESULT CreateTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan value, IInspectable** propertyValue); + + [VtblIndex(23)] + HRESULT CreatePoint([NativeTypeName("ABI::Windows::Foundation::Point")] Point value, IInspectable** propertyValue); + + [VtblIndex(24)] + HRESULT CreateSize([NativeTypeName("ABI::Windows::Foundation::Size")] Size value, IInspectable** propertyValue); + + [VtblIndex(25)] + HRESULT CreateRect([NativeTypeName("ABI::Windows::Foundation::Rect")] Rect value, IInspectable** propertyValue); + + [VtblIndex(26)] + HRESULT CreateUInt8Array([NativeTypeName("UINT32")] uint valueLength, byte* value, IInspectable** propertyValue); + + [VtblIndex(27)] + HRESULT CreateInt16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT16 *")] short* value, IInspectable** propertyValue); + + [VtblIndex(28)] + HRESULT CreateUInt16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT16 *")] ushort* value, IInspectable** propertyValue); + + [VtblIndex(29)] + HRESULT CreateInt32Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT32 *")] int* value, IInspectable** propertyValue); + + [VtblIndex(30)] + HRESULT CreateUInt32Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT32 *")] uint* value, IInspectable** propertyValue); + + [VtblIndex(31)] + HRESULT CreateInt64Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT64 *")] long* value, IInspectable** propertyValue); + + [VtblIndex(32)] + HRESULT CreateUInt64Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT64 *")] ulong* value, IInspectable** propertyValue); + + [VtblIndex(33)] + HRESULT CreateSingleArray([NativeTypeName("UINT32")] uint valueLength, float* value, IInspectable** propertyValue); + + [VtblIndex(34)] + HRESULT CreateDoubleArray([NativeTypeName("UINT32")] uint valueLength, double* value, IInspectable** propertyValue); + + [VtblIndex(35)] + HRESULT CreateChar16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("WCHAR *")] ushort* value, IInspectable** propertyValue); + + [VtblIndex(36)] + HRESULT CreateBooleanArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("boolean *")] byte* value, IInspectable** propertyValue); + + [VtblIndex(37)] + HRESULT CreateStringArray([NativeTypeName("UINT32")] uint valueLength, HSTRING* value, IInspectable** propertyValue); + + [VtblIndex(38)] + HRESULT CreateInspectableArray([NativeTypeName("UINT32")] uint valueLength, IInspectable** value, IInspectable** propertyValue); + + [VtblIndex(39)] + HRESULT CreateGuidArray([NativeTypeName("UINT32")] uint valueLength, Guid* value, IInspectable** propertyValue); + + [VtblIndex(40)] + HRESULT CreateDateTimeArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::DateTime *")] DateTime* value, IInspectable** propertyValue); + + [VtblIndex(41)] + HRESULT CreateTimeSpanArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value, IInspectable** propertyValue); + + [VtblIndex(42)] + HRESULT CreatePointArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Point *")] Point* value, IInspectable** propertyValue); + + [VtblIndex(43)] + HRESULT CreateSizeArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Size *")] Size* value, IInspectable** propertyValue); + + [VtblIndex(44)] + HRESULT CreateRectArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Rect *")] Rect* value, IInspectable** propertyValue); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateEmpty; + + [NativeTypeName("HRESULT (BYTE, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt8; + + [NativeTypeName("HRESULT (INT16, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInt16; + + [NativeTypeName("HRESULT (UINT16, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt16; + + [NativeTypeName("HRESULT (INT32, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInt32; + + [NativeTypeName("HRESULT (UINT32, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt32; + + [NativeTypeName("HRESULT (INT64, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInt64; + + [NativeTypeName("HRESULT (UINT64, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt64; + + [NativeTypeName("HRESULT (FLOAT, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateSingle; + + [NativeTypeName("HRESULT (DOUBLE, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateDouble; + + [NativeTypeName("HRESULT (WCHAR, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateChar16; + + [NativeTypeName("HRESULT (boolean, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateBoolean; + + [NativeTypeName("HRESULT (HSTRING, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateString; + + [NativeTypeName("HRESULT (IInspectable *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInspectable; + + [NativeTypeName("HRESULT (GUID, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateGuid; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::DateTime, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateDateTime; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateTimeSpan; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::Point, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreatePoint; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::Size, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateSize; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::Rect, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateRect; + + [NativeTypeName("HRESULT (UINT32, BYTE *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt8Array; + + [NativeTypeName("HRESULT (UINT32, INT16 *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInt16Array; + + [NativeTypeName("HRESULT (UINT32, UINT16 *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt16Array; + + [NativeTypeName("HRESULT (UINT32, INT32 *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInt32Array; + + [NativeTypeName("HRESULT (UINT32, UINT32 *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt32Array; + + [NativeTypeName("HRESULT (UINT32, INT64 *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInt64Array; + + [NativeTypeName("HRESULT (UINT32, UINT64 *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUInt64Array; + + [NativeTypeName("HRESULT (UINT32, FLOAT *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateSingleArray; + + [NativeTypeName("HRESULT (UINT32, DOUBLE *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateDoubleArray; + + [NativeTypeName("HRESULT (UINT32, WCHAR *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateChar16Array; + + [NativeTypeName("HRESULT (UINT32, boolean *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateBooleanArray; + + [NativeTypeName("HRESULT (UINT32, HSTRING *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateStringArray; + + [NativeTypeName("HRESULT (UINT32, IInspectable **, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateInspectableArray; + + [NativeTypeName("HRESULT (UINT32, GUID *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateGuidArray; + + [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::DateTime *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateDateTimeArray; + + [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::TimeSpan *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateTimeSpanArray; + + [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::Point *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreatePointArray; + + [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::Size *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateSizeArray; + + [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::Rect *, IInspectable **) __attribute__((stdcall))")] + public delegate* unmanaged CreateRectArray; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs new file mode 100644 index 0000000000..e8ffe43345 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("96369F54-8EB6-48F0-ABCE-C1B211E627C3")] +[NativeTypeName("struct IStringable : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IStringable : IStringable.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IStringable)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IStringable*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IStringable*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IStringable*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IStringable*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IStringable*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IStringable*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT ToString(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IStringable*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT ToString(HSTRING* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public new delegate* unmanaged ToString; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs new file mode 100644 index 0000000000..3d872b87da --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs @@ -0,0 +1,126 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("C1D432BA-C824-4452-A7FD-512BC3BBE9A1")] +[NativeTypeName("struct IUriEscapeStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IUriEscapeStatics : IUriEscapeStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IUriEscapeStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT UnescapeComponent(HSTRING toUnescape, HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), toUnescape, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT EscapeComponent(HSTRING toEscape, HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), toEscape, value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT UnescapeComponent(HSTRING toUnescape, HSTRING* value); + + [VtblIndex(7)] + HRESULT EscapeComponent(HSTRING toEscape, HSTRING* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING, HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged UnescapeComponent; + + [NativeTypeName("HRESULT (HSTRING, HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged EscapeComponent; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs new file mode 100644 index 0000000000..0d9f52020e --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs @@ -0,0 +1,336 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("9E365E57-48B2-4160-956F-C7385120BBFC")] +[NativeTypeName("struct IUriRuntimeClass : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IUriRuntimeClass : IUriRuntimeClass.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IUriRuntimeClass)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_AbsoluteUri(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_DisplayUri(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT get_Domain(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT get_Extension(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT get_Fragment(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT get_Host(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT get_Password(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT get_Path(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT get_Query(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT get_QueryParsed([NativeTypeName("ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **")] IWwwFormUrlDecoderRuntimeClass** ppWwwFormUrlDecoder) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), ppWwwFormUrlDecoder); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HRESULT get_RawUri(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[16]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public HRESULT get_SchemeName(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public HRESULT get_UserName(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] + public HRESULT get_Port([NativeTypeName("INT32 *")] int* value) + { + return ((delegate* unmanaged)(lpVtbl[19]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] + public HRESULT get_Suspicious([NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] + public HRESULT Equals([NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass *")] IUriRuntimeClass* pUri, [NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[21]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), pUri, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] + public HRESULT CombineUri(HSTRING relativeUri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance) + { + return ((delegate* unmanaged)(lpVtbl[22]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), relativeUri, instance); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_AbsoluteUri(HSTRING* value); + + [VtblIndex(7)] + HRESULT get_DisplayUri(HSTRING* value); + + [VtblIndex(8)] + HRESULT get_Domain(HSTRING* value); + + [VtblIndex(9)] + HRESULT get_Extension(HSTRING* value); + + [VtblIndex(10)] + HRESULT get_Fragment(HSTRING* value); + + [VtblIndex(11)] + HRESULT get_Host(HSTRING* value); + + [VtblIndex(12)] + HRESULT get_Password(HSTRING* value); + + [VtblIndex(13)] + HRESULT get_Path(HSTRING* value); + + [VtblIndex(14)] + HRESULT get_Query(HSTRING* value); + + [VtblIndex(15)] + HRESULT get_QueryParsed([NativeTypeName("ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **")] IWwwFormUrlDecoderRuntimeClass** ppWwwFormUrlDecoder); + + [VtblIndex(16)] + HRESULT get_RawUri(HSTRING* value); + + [VtblIndex(17)] + HRESULT get_SchemeName(HSTRING* value); + + [VtblIndex(18)] + HRESULT get_UserName(HSTRING* value); + + [VtblIndex(19)] + HRESULT get_Port([NativeTypeName("INT32 *")] int* value); + + [VtblIndex(20)] + HRESULT get_Suspicious([NativeTypeName("boolean *")] byte* value); + + [VtblIndex(21)] + HRESULT Equals([NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass *")] IUriRuntimeClass* pUri, [NativeTypeName("boolean *")] byte* value); + + [VtblIndex(22)] + HRESULT CombineUri(HSTRING relativeUri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_AbsoluteUri; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_DisplayUri; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Domain; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Extension; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Fragment; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Host; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Password; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Path; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Query; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **) __attribute__((stdcall))")] + public delegate* unmanaged get_QueryParsed; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_RawUri; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_SchemeName; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_UserName; + + [NativeTypeName("HRESULT (INT32 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Port; + + [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] + public delegate* unmanaged get_Suspicious; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IUriRuntimeClass *, boolean *) __attribute__((stdcall))")] + public new delegate* unmanaged Equals; + + [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::IUriRuntimeClass **) __attribute__((stdcall))")] + public delegate* unmanaged CombineUri; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs new file mode 100644 index 0000000000..08d0acefbe --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs @@ -0,0 +1,126 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("44A9796F-723E-4FDF-A218-033E75B0C084")] +[NativeTypeName("struct IUriRuntimeClassFactory : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IUriRuntimeClassFactory : IUriRuntimeClassFactory.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IUriRuntimeClassFactory)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT CreateUri(HSTRING uri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), uri, instance); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT CreateWithRelativeUri(HSTRING baseUri, HSTRING relativeUri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), baseUri, relativeUri, instance); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT CreateUri(HSTRING uri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance); + + [VtblIndex(7)] + HRESULT CreateWithRelativeUri(HSTRING baseUri, HSTRING relativeUri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::IUriRuntimeClass **) __attribute__((stdcall))")] + public delegate* unmanaged CreateUri; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, ABI::Windows::Foundation::IUriRuntimeClass **) __attribute__((stdcall))")] + public delegate* unmanaged CreateWithRelativeUri; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs new file mode 100644 index 0000000000..2657c8ece5 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs @@ -0,0 +1,126 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("758D9661-221C-480F-A339-50656673F46F")] +[NativeTypeName("struct IUriRuntimeClassWithAbsoluteCanonicalUri : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IUriRuntimeClassWithAbsoluteCanonicalUri : IUriRuntimeClassWithAbsoluteCanonicalUri.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IUriRuntimeClassWithAbsoluteCanonicalUri)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_AbsoluteCanonicalUri(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_DisplayIri(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_AbsoluteCanonicalUri(HSTRING* value); + + [VtblIndex(7)] + HRESULT get_DisplayIri(HSTRING* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_AbsoluteCanonicalUri; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_DisplayIri; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs new file mode 100644 index 0000000000..f9b7b0e8e5 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs @@ -0,0 +1,126 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("125E7431-F678-4E8E-B670-20A9B06C512D")] +[NativeTypeName("struct IWwwFormUrlDecoderEntry : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IWwwFormUrlDecoderEntry : IWwwFormUrlDecoderEntry.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IWwwFormUrlDecoderEntry)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Name(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_Value(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Name(HSTRING* value); + + [VtblIndex(7)] + HRESULT get_Value(HSTRING* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Name; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Value; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs new file mode 100644 index 0000000000..a7d337ce3f --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("D45A0451-F225-4542-9296-0E1DF5D254DF")] +[NativeTypeName("struct IWwwFormUrlDecoderRuntimeClass : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IWwwFormUrlDecoderRuntimeClass : IWwwFormUrlDecoderRuntimeClass.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IWwwFormUrlDecoderRuntimeClass)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT GetFirstValueByName(HSTRING name, HSTRING* phstrValue) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), name, phstrValue); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT GetFirstValueByName(HSTRING name, HSTRING* phstrValue); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING, HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetFirstValueByName; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs new file mode 100644 index 0000000000..ca559a2bf1 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("5B8C6B3D-24AE-41B5-A1BF-F0C3D544845B")] +[NativeTypeName("struct IWwwFormUrlDecoderRuntimeClassFactory : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IWwwFormUrlDecoderRuntimeClassFactory : IWwwFormUrlDecoderRuntimeClassFactory.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IWwwFormUrlDecoderRuntimeClassFactory)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT CreateWwwFormUrlDecoder(HSTRING query, [NativeTypeName("ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **")] IWwwFormUrlDecoderRuntimeClass** instance) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), query, instance); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT CreateWwwFormUrlDecoder(HSTRING query, [NativeTypeName("ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **")] IWwwFormUrlDecoderRuntimeClass** instance); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **) __attribute__((stdcall))")] + public delegate* unmanaged CreateWwwFormUrlDecoder; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/Point.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/Point.cs new file mode 100644 index 0000000000..96ec635e3f --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/Point.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Point +{ + /// + public float X; + + /// + public float Y; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/PropertyType.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/PropertyType.cs new file mode 100644 index 0000000000..1f75ae6220 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/PropertyType.cs @@ -0,0 +1,133 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum PropertyType +{ + /// + PropertyType_Empty = 0, + + /// + PropertyType_UInt8 = 1, + + /// + PropertyType_Int16 = 2, + + /// + PropertyType_UInt16 = 3, + + /// + PropertyType_Int32 = 4, + + /// + PropertyType_UInt32 = 5, + + /// + PropertyType_Int64 = 6, + + /// + PropertyType_UInt64 = 7, + + /// + PropertyType_Single = 8, + + /// + PropertyType_Double = 9, + + /// + PropertyType_Char16 = 10, + + /// + PropertyType_Boolean = 11, + + /// + PropertyType_String = 12, + + /// + PropertyType_Inspectable = 13, + + /// + PropertyType_DateTime = 14, + + /// + PropertyType_TimeSpan = 15, + + /// + PropertyType_Guid = 16, + + /// + PropertyType_Point = 17, + + /// + PropertyType_Size = 18, + + /// + PropertyType_Rect = 19, + + /// + PropertyType_OtherType = 20, + + /// + PropertyType_UInt8Array = 1025, + + /// + PropertyType_Int16Array = 1026, + + /// + PropertyType_UInt16Array = 1027, + + /// + PropertyType_Int32Array = 1028, + + /// + PropertyType_UInt32Array = 1029, + + /// + PropertyType_Int64Array = 1030, + + /// + PropertyType_UInt64Array = 1031, + + /// + PropertyType_SingleArray = 1032, + + /// + PropertyType_DoubleArray = 1033, + + /// + PropertyType_Char16Array = 1034, + + /// + PropertyType_BooleanArray = 1035, + + /// + PropertyType_StringArray = 1036, + + /// + PropertyType_InspectableArray = 1037, + + /// + PropertyType_DateTimeArray = 1038, + + /// + PropertyType_TimeSpanArray = 1039, + + /// + PropertyType_GuidArray = 1040, + + /// + PropertyType_PointArray = 1041, + + /// + PropertyType_SizeArray = 1042, + + /// + PropertyType_RectArray = 1043, + + /// + PropertyType_OtherTypeArray = 1044, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/Rect.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/Rect.cs new file mode 100644 index 0000000000..43e251677b --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/Rect.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Rect +{ + /// + public float X; + + /// + public float Y; + + /// + public float Width; + + /// + public float Height; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/Size.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/Size.cs new file mode 100644 index 0000000000..25f6a76d91 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/Size.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Size +{ + /// + public float Width; + + /// + public float Height; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpan.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpan.cs new file mode 100644 index 0000000000..9f4b508b12 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpan.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct TimeSpan +{ + /// + [NativeTypeName("INT64")] + public long Duration; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/WinRT.cs new file mode 100644 index 0000000000..0adaf39594 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/WinRT.cs @@ -0,0 +1,99 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[44]")] + public const string InterfaceName_Windows_Foundation_Collections_IPropertySet = "Windows.Foundation.Collections.IPropertySet"; + + [NativeTypeName("const WCHAR[32]")] + public const string InterfaceName_Windows_Foundation_IAsyncAction = "Windows.Foundation.IAsyncAction"; + + [NativeTypeName("const WCHAR[29]")] + public const string InterfaceName_Windows_Foundation_IClosable = "Windows.Foundation.IClosable"; + + [NativeTypeName("const WCHAR[29]")] + public const string InterfaceName_Windows_Foundation_IDeferral = "Windows.Foundation.IDeferral"; + + [NativeTypeName("const WCHAR[36]")] + public const string InterfaceName_Windows_Foundation_IDeferralFactory = "Windows.Foundation.IDeferralFactory"; + + [NativeTypeName("const WCHAR[41]")] + public const string InterfaceName_Windows_Foundation_IGetActivationFactory = "Windows.Foundation.IGetActivationFactory"; + + [NativeTypeName("const WCHAR[38]")] + public const string InterfaceName_Windows_Foundation_IGuidHelperStatics = "Windows.Foundation.IGuidHelperStatics"; + + [NativeTypeName("const WCHAR[33]")] + public const string InterfaceName_Windows_Foundation_IMemoryBuffer = "Windows.Foundation.IMemoryBuffer"; + + [NativeTypeName("const WCHAR[40]")] + public const string InterfaceName_Windows_Foundation_IMemoryBufferFactory = "Windows.Foundation.IMemoryBufferFactory"; + + [NativeTypeName("const WCHAR[42]")] + public const string InterfaceName_Windows_Foundation_IMemoryBufferReference = "Windows.Foundation.IMemoryBufferReference"; + + [NativeTypeName("const WCHAR[34]")] + public const string InterfaceName_Windows_Foundation_IPropertyValue = "Windows.Foundation.IPropertyValue"; + + [NativeTypeName("const WCHAR[41]")] + public const string InterfaceName_Windows_Foundation_IPropertyValueStatics = "Windows.Foundation.IPropertyValueStatics"; + + [NativeTypeName("const WCHAR[31]")] + public const string InterfaceName_Windows_Foundation_IStringable = "Windows.Foundation.IStringable"; + + [NativeTypeName("const WCHAR[37]")] + public const string InterfaceName_Windows_Foundation_IUriEscapeStatics = "Windows.Foundation.IUriEscapeStatics"; + + [NativeTypeName("const WCHAR[36]")] + public const string InterfaceName_Windows_Foundation_IUriRuntimeClass = "Windows.Foundation.IUriRuntimeClass"; + + [NativeTypeName("const WCHAR[43]")] + public const string InterfaceName_Windows_Foundation_IUriRuntimeClassFactory = "Windows.Foundation.IUriRuntimeClassFactory"; + + [NativeTypeName("const WCHAR[60]")] + public const string InterfaceName_Windows_Foundation_IUriRuntimeClassWithAbsoluteCanonicalUri = "Windows.Foundation.IUriRuntimeClassWithAbsoluteCanonicalUri"; + + [NativeTypeName("const WCHAR[43]")] + public const string InterfaceName_Windows_Foundation_IWwwFormUrlDecoderEntry = "Windows.Foundation.IWwwFormUrlDecoderEntry"; + + [NativeTypeName("const WCHAR[50]")] + public const string InterfaceName_Windows_Foundation_IWwwFormUrlDecoderRuntimeClass = "Windows.Foundation.IWwwFormUrlDecoderRuntimeClass"; + + [NativeTypeName("const WCHAR[57]")] + public const string InterfaceName_Windows_Foundation_IWwwFormUrlDecoderRuntimeClassFactory = "Windows.Foundation.IWwwFormUrlDecoderRuntimeClassFactory"; + + [NativeTypeName("const WCHAR[43]")] + public const string RuntimeClass_Windows_Foundation_Collections_PropertySet = "Windows.Foundation.Collections.PropertySet"; + + [NativeTypeName("const WCHAR[41]")] + public const string RuntimeClass_Windows_Foundation_Collections_StringMap = "Windows.Foundation.Collections.StringMap"; + + [NativeTypeName("const WCHAR[40]")] + public const string RuntimeClass_Windows_Foundation_Collections_ValueSet = "Windows.Foundation.Collections.ValueSet"; + + [NativeTypeName("const WCHAR[28]")] + public const string RuntimeClass_Windows_Foundation_Deferral = "Windows.Foundation.Deferral"; + + [NativeTypeName("const WCHAR[30]")] + public const string RuntimeClass_Windows_Foundation_GuidHelper = "Windows.Foundation.GuidHelper"; + + [NativeTypeName("const WCHAR[32]")] + public const string RuntimeClass_Windows_Foundation_MemoryBuffer = "Windows.Foundation.MemoryBuffer"; + + [NativeTypeName("const WCHAR[33]")] + public const string RuntimeClass_Windows_Foundation_PropertyValue = "Windows.Foundation.PropertyValue"; + + [NativeTypeName("const WCHAR[23]")] + public const string RuntimeClass_Windows_Foundation_Uri = "Windows.Foundation.Uri"; + + [NativeTypeName("const WCHAR[37]")] + public const string RuntimeClass_Windows_Foundation_WwwFormUrlDecoder = "Windows.Foundation.WwwFormUrlDecoder"; + + [NativeTypeName("const WCHAR[42]")] + public const string RuntimeClass_Windows_Foundation_WwwFormUrlDecoderEntry = "Windows.Foundation.WwwFormUrlDecoderEntry"; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs new file mode 100644 index 0000000000..b739e332ed --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class DateTimeTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DateTime))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DateTime).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(DateTime), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs new file mode 100644 index 0000000000..7c73b60cd6 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IAsyncActionCompletedHandlerTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IAsyncActionCompletedHandler).GUID, Is.EqualTo(IID_IAsyncActionCompletedHandler)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IAsyncActionCompletedHandler))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IAsyncActionCompletedHandler).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IAsyncActionCompletedHandler), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IAsyncActionCompletedHandler), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs new file mode 100644 index 0000000000..dae9ab7300 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IAsyncActionTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IAsyncAction).GUID, Is.EqualTo(IID_IAsyncAction)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IAsyncAction))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IAsyncAction).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IAsyncAction), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IAsyncAction), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs new file mode 100644 index 0000000000..6e52847f59 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IClosableTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IClosable).GUID, Is.EqualTo(IID_IClosable)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IClosable))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IClosable).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IClosable), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IClosable), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs new file mode 100644 index 0000000000..3b33f8095e --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IDeferralCompletedHandlerTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IDeferralCompletedHandler).GUID, Is.EqualTo(IID_IDeferralCompletedHandler)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDeferralCompletedHandler))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IDeferralCompletedHandler).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IDeferralCompletedHandler), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IDeferralCompletedHandler), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs new file mode 100644 index 0000000000..bbd5da6e2a --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IDeferralFactoryTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IDeferralFactory).GUID, Is.EqualTo(IID_IDeferralFactory)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDeferralFactory))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IDeferralFactory).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IDeferralFactory), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IDeferralFactory), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs new file mode 100644 index 0000000000..939e4fef23 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IDeferralTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IDeferral).GUID, Is.EqualTo(IID_IDeferral)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDeferral))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IDeferral).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IDeferral), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IDeferral), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs new file mode 100644 index 0000000000..9a766c5502 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IGetActivationFactoryTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IGetActivationFactory).GUID, Is.EqualTo(IID_IGetActivationFactory)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGetActivationFactory))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IGetActivationFactory).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IGetActivationFactory), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IGetActivationFactory), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs new file mode 100644 index 0000000000..7012cc1d99 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IGuidHelperStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IGuidHelperStatics).GUID, Is.EqualTo(IID_IGuidHelperStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGuidHelperStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IGuidHelperStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IGuidHelperStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IGuidHelperStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs new file mode 100644 index 0000000000..5608c25966 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IMemoryBufferFactoryTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IMemoryBufferFactory).GUID, Is.EqualTo(IID_IMemoryBufferFactory)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IMemoryBufferFactory))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IMemoryBufferFactory).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IMemoryBufferFactory), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IMemoryBufferFactory), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs new file mode 100644 index 0000000000..54bf530728 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IMemoryBufferReferenceTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IMemoryBufferReference).GUID, Is.EqualTo(IID_IMemoryBufferReference)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IMemoryBufferReference))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IMemoryBufferReference).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IMemoryBufferReference), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IMemoryBufferReference), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs new file mode 100644 index 0000000000..ecd94db8a9 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IMemoryBufferTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IMemoryBuffer).GUID, Is.EqualTo(IID_IMemoryBuffer)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IMemoryBuffer))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IMemoryBuffer).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IMemoryBuffer), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IMemoryBuffer), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs new file mode 100644 index 0000000000..0f320a6acc --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IPropertySetTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IPropertySet).GUID, Is.EqualTo(IID_IPropertySet)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPropertySet))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IPropertySet).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IPropertySet), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IPropertySet), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs new file mode 100644 index 0000000000..e7356ce04b --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IPropertyValueStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IPropertyValueStatics).GUID, Is.EqualTo(IID_IPropertyValueStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPropertyValueStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IPropertyValueStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IPropertyValueStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IPropertyValueStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs new file mode 100644 index 0000000000..fcbc78d5d0 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IPropertyValueTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IPropertyValue).GUID, Is.EqualTo(IID_IPropertyValue)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPropertyValue))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IPropertyValue).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IPropertyValue), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IPropertyValue), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs new file mode 100644 index 0000000000..89983171f1 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IStringableTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IStringable).GUID, Is.EqualTo(IID_IStringable)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IStringable))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IStringable).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IStringable), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IStringable), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs new file mode 100644 index 0000000000..d886061ca1 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IUriEscapeStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IUriEscapeStatics).GUID, Is.EqualTo(IID_IUriEscapeStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriEscapeStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IUriEscapeStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IUriEscapeStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IUriEscapeStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs new file mode 100644 index 0000000000..172cb86496 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IUriRuntimeClassFactoryTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IUriRuntimeClassFactory).GUID, Is.EqualTo(IID_IUriRuntimeClassFactory)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriRuntimeClassFactory))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IUriRuntimeClassFactory).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IUriRuntimeClassFactory), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IUriRuntimeClassFactory), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs new file mode 100644 index 0000000000..794c6e48fe --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IUriRuntimeClassTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IUriRuntimeClass).GUID, Is.EqualTo(IID_IUriRuntimeClass)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriRuntimeClass))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IUriRuntimeClass).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IUriRuntimeClass), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IUriRuntimeClass), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs new file mode 100644 index 0000000000..900bab9711 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IUriRuntimeClassWithAbsoluteCanonicalUriTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IUriRuntimeClassWithAbsoluteCanonicalUri).GUID, Is.EqualTo(IID_IUriRuntimeClassWithAbsoluteCanonicalUri)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriRuntimeClassWithAbsoluteCanonicalUri))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IUriRuntimeClassWithAbsoluteCanonicalUri).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IUriRuntimeClassWithAbsoluteCanonicalUri), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IUriRuntimeClassWithAbsoluteCanonicalUri), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs new file mode 100644 index 0000000000..959ac107eb --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IWwwFormUrlDecoderEntryTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IWwwFormUrlDecoderEntry).GUID, Is.EqualTo(IID_IWwwFormUrlDecoderEntry)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IWwwFormUrlDecoderEntry))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IWwwFormUrlDecoderEntry).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IWwwFormUrlDecoderEntry), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IWwwFormUrlDecoderEntry), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs new file mode 100644 index 0000000000..90ce0e856c --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IWwwFormUrlDecoderRuntimeClassFactoryTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IWwwFormUrlDecoderRuntimeClassFactory).GUID, Is.EqualTo(IID_IWwwFormUrlDecoderRuntimeClassFactory)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IWwwFormUrlDecoderRuntimeClassFactory))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IWwwFormUrlDecoderRuntimeClassFactory).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClassFactory), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClassFactory), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs new file mode 100644 index 0000000000..0aeb65da86 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IWwwFormUrlDecoderRuntimeClassTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IWwwFormUrlDecoderRuntimeClass).GUID, Is.EqualTo(IID_IWwwFormUrlDecoderRuntimeClass)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IWwwFormUrlDecoderRuntimeClass))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IWwwFormUrlDecoderRuntimeClass).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClass), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClass), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs new file mode 100644 index 0000000000..9e44e50f02 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class PointTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Point))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Point).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Point), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs new file mode 100644 index 0000000000..429772f421 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class RectTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Rect))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Rect).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Rect), Is.EqualTo(16)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs new file mode 100644 index 0000000000..50e6ab4501 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class SizeTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Size))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Size).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Size), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs new file mode 100644 index 0000000000..3bed91950e --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class TimeSpanTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(TimeSpan))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(TimeSpan).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(TimeSpan), Is.EqualTo(8)); + } +} From 06be2762984a767616b7ea33f9bad7d345265abc Mon Sep 17 00:00:00 2001 From: reflectronic Date: Thu, 13 Oct 2022 13:53:49 -0400 Subject: [PATCH 03/14] Add windows.foundation.metadata.h --- TerraFX.Interop.Windows.sln | 8 + .../windows.foundation.metadata/generate.rsp | 19 ++ .../windows.foundation.metadata/header.txt | 4 + .../winrt-windows.foundation.metadata.h | 2 + .../GCPressureAmount.cs | 19 ++ .../IApiInformationStatics.cs | 238 ++++++++++++++++++ .../winrt/windows.foundation.metadata/IID.cs | 37 +++ .../windows.foundation.metadata/WinRT.cs | 15 ++ .../IApiInformationStaticsTests.cs | 50 ++++ 9 files changed, 392 insertions(+) create mode 100644 generation/WinRT/winrt/windows.foundation.metadata/generate.rsp create mode 100644 generation/WinRT/winrt/windows.foundation.metadata/header.txt create mode 100644 generation/WinRT/winrt/windows.foundation.metadata/winrt-windows.foundation.metadata.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/GCPressureAmount.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/WinRT.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 91722169b8..8f24b441cf 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3067,6 +3067,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.foundation", "windo generation\WinRT\winrt\windows.foundation\winrt-windows.foundation.h = generation\WinRT\winrt\windows.foundation\winrt-windows.foundation.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.foundation.metadata", "windows.foundation.metadata", "{BBCA5500-FE50-4970-A019-830C912D9ABE}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.foundation.metadata\generate.rsp = generation\WinRT\winrt\windows.foundation.metadata\generate.rsp + generation\WinRT\winrt\windows.foundation.metadata\header.txt = generation\WinRT\winrt\windows.foundation.metadata\header.txt + generation\WinRT\winrt\windows.foundation.metadata\winrt-windows.foundation.metadata.h = generation\WinRT\winrt\windows.foundation.metadata\winrt-windows.foundation.metadata.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3537,6 +3544,7 @@ Global {5E5D7257-3F63-45F9-899B-CE0DFEFCC2D1} = {D9638FEE-50A4-44FF-B1F6-72E59548490B} {566C5B1B-E5DC-420D-8740-A991751A5D09} = {65954CB3-F28F-4CF0-BC77-0FFD6E858BCE} {0A6C98CF-2561-439D-A78D-C8C1E7F19B75} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {BBCA5500-FE50-4970-A019-830C912D9ABE} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.foundation.metadata/generate.rsp b/generation/WinRT/winrt/windows.foundation.metadata/generate.rsp new file mode 100644 index 0000000000..ee93a57ccb --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation.metadata/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.foundation.metadata.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.foundation.metadata.h diff --git a/generation/WinRT/winrt/windows.foundation.metadata/header.txt b/generation/WinRT/winrt/windows.foundation.metadata/header.txt new file mode 100644 index 0000000000..ef01ba99ab --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation.metadata/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.metadata.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.foundation.metadata/winrt-windows.foundation.metadata.h b/generation/WinRT/winrt/windows.foundation.metadata/winrt-windows.foundation.metadata.h new file mode 100644 index 0000000000..84c716eec0 --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation.metadata/winrt-windows.foundation.metadata.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/GCPressureAmount.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/GCPressureAmount.cs new file mode 100644 index 0000000000..af188e8bd2 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/GCPressureAmount.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.metadata.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum GCPressureAmount +{ + /// + GCPressureAmount_Low = 0, + + /// + GCPressureAmount_Medium = 1, + + /// + GCPressureAmount_High = 2, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs new file mode 100644 index 0000000000..46c9220b68 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs @@ -0,0 +1,238 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.metadata.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("997439FE-F681-4A11-B416-C13A47E8BA36")] +[NativeTypeName("struct IApiInformationStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IApiInformationStatics : IApiInformationStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IApiInformationStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IApiInformationStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IApiInformationStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT IsTypePresent(HSTRING typeName, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT IsMethodPresent(HSTRING typeName, HSTRING methodName, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, methodName, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT IsMethodPresentWithArity(HSTRING typeName, HSTRING methodName, [NativeTypeName("UINT32")] uint inputParameterCount, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, methodName, inputParameterCount, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT IsEventPresent(HSTRING typeName, HSTRING eventName, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, eventName, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT IsPropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT IsReadOnlyPropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT IsWriteablePropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT IsEnumNamedValuePresent(HSTRING enumTypeName, HSTRING valueName, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), enumTypeName, valueName, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT IsApiContractPresentByMajor(HSTRING contractName, [NativeTypeName("UINT16")] ushort majorVersion, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), contractName, majorVersion, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT IsApiContractPresentByMajorAndMinor(HSTRING contractName, [NativeTypeName("UINT16")] ushort majorVersion, [NativeTypeName("UINT16")] ushort minorVersion, [NativeTypeName("boolean *")] byte* result) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), contractName, majorVersion, minorVersion, result); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT IsTypePresent(HSTRING typeName, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(7)] + HRESULT IsMethodPresent(HSTRING typeName, HSTRING methodName, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(8)] + HRESULT IsMethodPresentWithArity(HSTRING typeName, HSTRING methodName, [NativeTypeName("UINT32")] uint inputParameterCount, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(9)] + HRESULT IsEventPresent(HSTRING typeName, HSTRING eventName, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(10)] + HRESULT IsPropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(11)] + HRESULT IsReadOnlyPropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(12)] + HRESULT IsWriteablePropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(13)] + HRESULT IsEnumNamedValuePresent(HSTRING enumTypeName, HSTRING valueName, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(14)] + HRESULT IsApiContractPresentByMajor(HSTRING contractName, [NativeTypeName("UINT16")] ushort majorVersion, [NativeTypeName("boolean *")] byte* result); + + [VtblIndex(15)] + HRESULT IsApiContractPresentByMajorAndMinor(HSTRING contractName, [NativeTypeName("UINT16")] ushort majorVersion, [NativeTypeName("UINT16")] ushort minorVersion, [NativeTypeName("boolean *")] byte* result); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsTypePresent; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsMethodPresent; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, UINT32, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsMethodPresentWithArity; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsEventPresent; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsPropertyPresent; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsReadOnlyPropertyPresent; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsWriteablePropertyPresent; + + [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsEnumNamedValuePresent; + + [NativeTypeName("HRESULT (HSTRING, UINT16, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsApiContractPresentByMajor; + + [NativeTypeName("HRESULT (HSTRING, UINT16, UINT16, boolean *) __attribute__((stdcall))")] + public delegate* unmanaged IsApiContractPresentByMajorAndMinor; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.cs new file mode 100644 index 0000000000..5de19cbfa0 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.cs @@ -0,0 +1,37 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.metadata.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IApiInformationStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0xFE, 0x39, 0x74, 0x99, + 0x81, 0xF6, + 0x11, 0x4A, + 0xB4, + 0x16, + 0xC1, + 0x3A, + 0x47, + 0xE8, + 0xBA, + 0x36 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/WinRT.cs new file mode 100644 index 0000000000..c287bb39b1 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/WinRT.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.metadata.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[51]")] + public const string InterfaceName_Windows_Foundation_Metadata_IApiInformationStatics = "Windows.Foundation.Metadata.IApiInformationStatics"; + + [NativeTypeName("const WCHAR[43]")] + public const string RuntimeClass_Windows_Foundation_Metadata_ApiInformation = "Windows.Foundation.Metadata.ApiInformation"; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs new file mode 100644 index 0000000000..590ef591b8 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.metadata.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IApiInformationStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IApiInformationStatics).GUID, Is.EqualTo(IID_IApiInformationStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IApiInformationStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IApiInformationStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IApiInformationStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IApiInformationStatics), Is.EqualTo(4)); + } + } +} From fa7c3bc053a829976594c5be743586d7112f0554 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Thu, 13 Oct 2022 13:58:30 -0400 Subject: [PATCH 04/14] Add WindowsContracts.h --- TerraFX.Interop.Windows.sln | 8 +++++ .../WinRT/winrt/WindowsContracts/generate.rsp | 16 ++++++++++ .../WinRT/winrt/WindowsContracts/header.txt | 4 +++ .../WindowsContracts/winrt-WindowsContracts.h | 2 ++ .../WinRT/winrt/WindowsContracts/WinRT.cs | 30 +++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 generation/WinRT/winrt/WindowsContracts/generate.rsp create mode 100644 generation/WinRT/winrt/WindowsContracts/header.txt create mode 100644 generation/WinRT/winrt/WindowsContracts/winrt-WindowsContracts.h create mode 100644 sources/Interop/Windows/WinRT/winrt/WindowsContracts/WinRT.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 8f24b441cf..9e58b50926 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3074,6 +3074,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.foundation.metadata generation\WinRT\winrt\windows.foundation.metadata\winrt-windows.foundation.metadata.h = generation\WinRT\winrt\windows.foundation.metadata\winrt-windows.foundation.metadata.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsContracts", "WindowsContracts", "{65B229A2-8DDE-40CB-B600-7A4EE052DD60}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\WindowsContracts\generate.rsp = generation\WinRT\winrt\WindowsContracts\generate.rsp + generation\WinRT\winrt\WindowsContracts\header.txt = generation\WinRT\winrt\WindowsContracts\header.txt + generation\WinRT\winrt\WindowsContracts\winrt-WindowsContracts.h = generation\WinRT\winrt\WindowsContracts\winrt-WindowsContracts.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3545,6 +3552,7 @@ Global {566C5B1B-E5DC-420D-8740-A991751A5D09} = {65954CB3-F28F-4CF0-BC77-0FFD6E858BCE} {0A6C98CF-2561-439D-A78D-C8C1E7F19B75} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {BBCA5500-FE50-4970-A019-830C912D9ABE} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {65B229A2-8DDE-40CB-B600-7A4EE052DD60} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/WindowsContracts/generate.rsp b/generation/WinRT/winrt/WindowsContracts/generate.rsp new file mode 100644 index 0000000000..0266034741 --- /dev/null +++ b/generation/WinRT/winrt/WindowsContracts/generate.rsp @@ -0,0 +1,16 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +--file +winrt-WindowsContracts.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/WindowsContracts +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/WindowsContracts +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/WindowsContracts.h diff --git a/generation/WinRT/winrt/WindowsContracts/header.txt b/generation/WinRT/winrt/WindowsContracts/header.txt new file mode 100644 index 0000000000..504c664a18 --- /dev/null +++ b/generation/WinRT/winrt/WindowsContracts/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/WindowsContracts.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/WindowsContracts/winrt-WindowsContracts.h b/generation/WinRT/winrt/WindowsContracts/winrt-WindowsContracts.h new file mode 100644 index 0000000000..32fea79a57 --- /dev/null +++ b/generation/WinRT/winrt/WindowsContracts/winrt-WindowsContracts.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/WindowsContracts/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/WindowsContracts/WinRT.cs new file mode 100644 index 0000000000..b35bcfbc22 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/WindowsContracts/WinRT.cs @@ -0,0 +1,30 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/WindowsContracts.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("#define WINDOWS_APPLICATIONMODEL_CALLS_CALLSPHONECONTRACT_VERSION 0x70000")] + public const int WINDOWS_APPLICATIONMODEL_CALLS_CALLSPHONECONTRACT_VERSION = 0x70000; + + [NativeTypeName("#define WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION 0x40000")] + public const int WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION = 0x40000; + + [NativeTypeName("#define WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION 0xf0000")] + public const int WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION = 0xf0000; + + [NativeTypeName("#define WINDOWS_NETWORKING_SOCKETS_CONTROLCHANNELTRIGGERCONTRACT_VERSION 0x30000")] + public const int WINDOWS_NETWORKING_SOCKETS_CONTROLCHANNELTRIGGERCONTRACT_VERSION = 0x30000; + + [NativeTypeName("#define WINDOWS_PHONE_PHONECONTRACT_VERSION 0x10000")] + public const int WINDOWS_PHONE_PHONECONTRACT_VERSION = 0x10000; + + [NativeTypeName("#define WINDOWS_PHONE_PHONEINTERNALCONTRACT_VERSION 0x10000")] + public const int WINDOWS_PHONE_PHONEINTERNALCONTRACT_VERSION = 0x10000; + + [NativeTypeName("#define WINDOWS_UI_WEBUI_CORE_WEBUICOMMANDBARCONTRACT_VERSION 0x10000")] + public const int WINDOWS_UI_WEBUI_CORE_WEBUICOMMANDBARCONTRACT_VERSION = 0x10000; +} From 84977df06721ac3f53683670b5754f49f88d55ac Mon Sep 17 00:00:00 2001 From: reflectronic Date: Thu, 13 Oct 2022 14:09:21 -0400 Subject: [PATCH 05/14] Add windows.foundation.numerics.h --- TerraFX.Interop.Windows.sln | 8 +++ .../windows.foundation.numerics/generate.rsp | 19 ++++++ .../windows.foundation.numerics/header.txt | 4 ++ .../winrt-windows.foundation.numerics.h | 2 + .../windows.foundation.numerics/Matrix3x2.cs | 28 +++++++++ .../windows.foundation.numerics/Matrix4x4.cs | 58 +++++++++++++++++++ .../windows.foundation.numerics/Plane.cs | 17 ++++++ .../windows.foundation.numerics/Quaternion.cs | 22 +++++++ .../windows.foundation.numerics/Rational.cs | 18 ++++++ .../windows.foundation.numerics/Vector2.cs | 16 +++++ .../windows.foundation.numerics/Vector3.cs | 19 ++++++ .../windows.foundation.numerics/Vector4.cs | 22 +++++++ .../Matrix3x2Tests.cs | 34 +++++++++++ .../Matrix4x4Tests.cs | 34 +++++++++++ .../windows.foundation.numerics/PlaneTests.cs | 34 +++++++++++ .../QuaternionTests.cs | 34 +++++++++++ .../RationalTests.cs | 34 +++++++++++ .../Vector2Tests.cs | 34 +++++++++++ .../Vector3Tests.cs | 34 +++++++++++ .../Vector4Tests.cs | 34 +++++++++++ 20 files changed, 505 insertions(+) create mode 100644 generation/WinRT/winrt/windows.foundation.numerics/generate.rsp create mode 100644 generation/WinRT/winrt/windows.foundation.numerics/header.txt create mode 100644 generation/WinRT/winrt/windows.foundation.numerics/winrt-windows.foundation.numerics.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Plane.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Quaternion.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Rational.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 9e58b50926..c775831fbe 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3081,6 +3081,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsContracts", "Windows generation\WinRT\winrt\WindowsContracts\winrt-WindowsContracts.h = generation\WinRT\winrt\WindowsContracts\winrt-WindowsContracts.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.foundation.numerics", "windows.foundation.numerics", "{11D48099-EDE0-4F6F-884E-45B0DC0AA6AD}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.foundation.numerics\generate.rsp = generation\WinRT\winrt\windows.foundation.numerics\generate.rsp + generation\WinRT\winrt\windows.foundation.numerics\header.txt = generation\WinRT\winrt\windows.foundation.numerics\header.txt + generation\WinRT\winrt\windows.foundation.numerics\winrt-windows.foundation.numerics.h = generation\WinRT\winrt\windows.foundation.numerics\winrt-windows.foundation.numerics.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3553,6 +3560,7 @@ Global {0A6C98CF-2561-439D-A78D-C8C1E7F19B75} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {BBCA5500-FE50-4970-A019-830C912D9ABE} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {65B229A2-8DDE-40CB-B600-7A4EE052DD60} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {11D48099-EDE0-4F6F-884E-45B0DC0AA6AD} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.foundation.numerics/generate.rsp b/generation/WinRT/winrt/windows.foundation.numerics/generate.rsp new file mode 100644 index 0000000000..d9d3b30919 --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation.numerics/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.foundation.numerics.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.foundation.numerics.h diff --git a/generation/WinRT/winrt/windows.foundation.numerics/header.txt b/generation/WinRT/winrt/windows.foundation.numerics/header.txt new file mode 100644 index 0000000000..1acb4c6753 --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation.numerics/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.foundation.numerics/winrt-windows.foundation.numerics.h b/generation/WinRT/winrt/windows.foundation.numerics/winrt-windows.foundation.numerics.h new file mode 100644 index 0000000000..6d954aed7f --- /dev/null +++ b/generation/WinRT/winrt/windows.foundation.numerics/winrt-windows.foundation.numerics.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2.cs new file mode 100644 index 0000000000..f7fb0a301c --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2.cs @@ -0,0 +1,28 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Matrix3x2 +{ + /// + public float M11; + + /// + public float M12; + + /// + public float M21; + + /// + public float M22; + + /// + public float M31; + + /// + public float M32; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4.cs new file mode 100644 index 0000000000..5a0e73e552 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4.cs @@ -0,0 +1,58 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Matrix4x4 +{ + /// + public float M11; + + /// + public float M12; + + /// + public float M13; + + /// + public float M14; + + /// + public float M21; + + /// + public float M22; + + /// + public float M23; + + /// + public float M24; + + /// + public float M31; + + /// + public float M32; + + /// + public float M33; + + /// + public float M34; + + /// + public float M41; + + /// + public float M42; + + /// + public float M43; + + /// + public float M44; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Plane.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Plane.cs new file mode 100644 index 0000000000..75de232477 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Plane.cs @@ -0,0 +1,17 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Plane +{ + /// + [NativeTypeName("ABI::Windows::Foundation::Numerics::Vector3")] + public Vector3 Normal; + + /// + public float D; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Quaternion.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Quaternion.cs new file mode 100644 index 0000000000..d7e402e0d6 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Quaternion.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Quaternion +{ + /// + public float X; + + /// + public float Y; + + /// + public float Z; + + /// + public float W; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Rational.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Rational.cs new file mode 100644 index 0000000000..6d5dbeda29 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Rational.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Rational +{ + /// + [NativeTypeName("UINT32")] + public uint Numerator; + + /// + [NativeTypeName("UINT32")] + public uint Denominator; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2.cs new file mode 100644 index 0000000000..0f118f0f66 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Vector2 +{ + /// + public float X; + + /// + public float Y; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3.cs new file mode 100644 index 0000000000..ec855d32d3 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Vector3 +{ + /// + public float X; + + /// + public float Y; + + /// + public float Z; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4.cs new file mode 100644 index 0000000000..a625b8a5cf --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Vector4 +{ + /// + public float X; + + /// + public float Y; + + /// + public float Z; + + /// + public float W; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs new file mode 100644 index 0000000000..47e92eba36 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class Matrix3x2Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Matrix3x2))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Matrix3x2).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Matrix3x2), Is.EqualTo(24)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs new file mode 100644 index 0000000000..72c39172ca --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class Matrix4x4Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Matrix4x4))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Matrix4x4).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Matrix4x4), Is.EqualTo(64)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs new file mode 100644 index 0000000000..d18c8f5e44 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class PlaneTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Plane))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Plane).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Plane), Is.EqualTo(16)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs new file mode 100644 index 0000000000..ecefae53aa --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class QuaternionTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Quaternion))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Quaternion).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Quaternion), Is.EqualTo(16)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs new file mode 100644 index 0000000000..399b959144 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class RationalTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Rational))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Rational).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Rational), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs new file mode 100644 index 0000000000..6b247ce533 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class Vector2Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Vector2))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Vector2).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Vector2), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs new file mode 100644 index 0000000000..0df4ab0c47 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class Vector3Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Vector3))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Vector3).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Vector3), Is.EqualTo(12)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs new file mode 100644 index 0000000000..7872969b43 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class Vector4Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Vector4))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Vector4).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Vector4), Is.EqualTo(16)); + } +} From 96757830f5ace6e7b091a801b1807e478693dd99 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 16 Oct 2022 13:12:49 -0400 Subject: [PATCH 06/14] Add windows.graphics.h --- TerraFX.Interop.Windows.sln | 8 ++ .../WinRT/winrt/windows.graphics/generate.rsp | 19 ++++ .../WinRT/winrt/windows.graphics/header.txt | 4 + .../windows.graphics/winrt-windows.graphics.h | 2 + .../windows.graphics/DisplayAdapterId.cs | 18 ++++ .../WinRT/winrt/windows.graphics/DisplayId.cs | 14 +++ .../windows.graphics/IGeometrySource2D.cs | 99 +++++++++++++++++++ .../WinRT/winrt/windows.graphics/IID.cs | 37 +++++++ .../winrt/windows.graphics/PointInt32.cs | 18 ++++ .../WinRT/winrt/windows.graphics/RectInt32.cs | 26 +++++ .../WinRT/winrt/windows.graphics/SizeInt32.cs | 18 ++++ .../WinRT/winrt/windows.graphics/WinRT.cs | 12 +++ .../windows.graphics/DisplayAdapterIdTests.cs | 34 +++++++ .../winrt/windows.graphics/DisplayIdTests.cs | 34 +++++++ .../IGeometrySource2DTests.cs | 50 ++++++++++ .../winrt/windows.graphics/PointInt32Tests.cs | 34 +++++++ .../winrt/windows.graphics/RectInt32Tests.cs | 34 +++++++ .../winrt/windows.graphics/SizeInt32Tests.cs | 34 +++++++ 18 files changed, 495 insertions(+) create mode 100644 generation/WinRT/winrt/windows.graphics/generate.rsp create mode 100644 generation/WinRT/winrt/windows.graphics/header.txt create mode 100644 generation/WinRT/winrt/windows.graphics/winrt-windows.graphics.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterId.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayId.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics/WinRT.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index c775831fbe..427b5fff46 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3088,6 +3088,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.foundation.numerics generation\WinRT\winrt\windows.foundation.numerics\winrt-windows.foundation.numerics.h = generation\WinRT\winrt\windows.foundation.numerics\winrt-windows.foundation.numerics.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.graphics", "windows.graphics", "{32CFDE8C-7D38-4549-B08E-7271102D6503}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.graphics\generate.rsp = generation\WinRT\winrt\windows.graphics\generate.rsp + generation\WinRT\winrt\windows.graphics\header.txt = generation\WinRT\winrt\windows.graphics\header.txt + generation\WinRT\winrt\windows.graphics\winrt-windows.graphics.h = generation\WinRT\winrt\windows.graphics\winrt-windows.graphics.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3561,6 +3568,7 @@ Global {BBCA5500-FE50-4970-A019-830C912D9ABE} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {65B229A2-8DDE-40CB-B600-7A4EE052DD60} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {11D48099-EDE0-4F6F-884E-45B0DC0AA6AD} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {32CFDE8C-7D38-4549-B08E-7271102D6503} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.graphics/generate.rsp b/generation/WinRT/winrt/windows.graphics/generate.rsp new file mode 100644 index 0000000000..6b0d283681 --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.graphics.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.graphics +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.graphics +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.graphics.h diff --git a/generation/WinRT/winrt/windows.graphics/header.txt b/generation/WinRT/winrt/windows.graphics/header.txt new file mode 100644 index 0000000000..5af3eaf43f --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.graphics/winrt-windows.graphics.h b/generation/WinRT/winrt/windows.graphics/winrt-windows.graphics.h new file mode 100644 index 0000000000..8381338654 --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics/winrt-windows.graphics.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterId.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterId.cs new file mode 100644 index 0000000000..9737e13e62 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterId.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct DisplayAdapterId +{ + /// + [NativeTypeName("UINT32")] + public uint LowPart; + + /// + [NativeTypeName("INT32")] + public int HighPart; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayId.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayId.cs new file mode 100644 index 0000000000..f2cfd5b21f --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/DisplayId.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct DisplayId +{ + /// + [NativeTypeName("UINT64")] + public ulong Value; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs new file mode 100644 index 0000000000..757df65a43 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs @@ -0,0 +1,99 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("CAFF7902-670C-4181-A624-DA977203B845")] +[NativeTypeName("struct IGeometrySource2D : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IGeometrySource2D : IGeometrySource2D.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IGeometrySource2D)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IGeometrySource2D*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IGeometrySource2D*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), trustLevel); + } + + public interface Interface : IInspectable.Interface + { + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.cs new file mode 100644 index 0000000000..522ab3140e --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.cs @@ -0,0 +1,37 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IGeometrySource2D + { + get + { + ReadOnlySpan data = new byte[] { + 0x02, 0x79, 0xFF, 0xCA, + 0x0C, 0x67, + 0x81, 0x41, + 0xA6, + 0x24, + 0xDA, + 0x97, + 0x72, + 0x03, + 0xB8, + 0x45 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32.cs new file mode 100644 index 0000000000..b30fbaeb63 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct PointInt32 +{ + /// + [NativeTypeName("INT32")] + public int X; + + /// + [NativeTypeName("INT32")] + public int Y; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32.cs new file mode 100644 index 0000000000..47ab38854f --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32.cs @@ -0,0 +1,26 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct RectInt32 +{ + /// + [NativeTypeName("INT32")] + public int X; + + /// + [NativeTypeName("INT32")] + public int Y; + + /// + [NativeTypeName("INT32")] + public int Width; + + /// + [NativeTypeName("INT32")] + public int Height; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32.cs new file mode 100644 index 0000000000..548ee7d848 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct SizeInt32 +{ + /// + [NativeTypeName("INT32")] + public int Width; + + /// + [NativeTypeName("INT32")] + public int Height; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/WinRT.cs new file mode 100644 index 0000000000..5d381a23ed --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/WinRT.cs @@ -0,0 +1,12 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[35]")] + public const string InterfaceName_Windows_Graphics_IGeometrySource2D = "Windows.Graphics.IGeometrySource2D"; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs new file mode 100644 index 0000000000..a5788881ac --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class DisplayAdapterIdTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DisplayAdapterId))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DisplayAdapterId).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(DisplayAdapterId), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs new file mode 100644 index 0000000000..24a67ba2c3 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class DisplayIdTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DisplayId))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DisplayId).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(DisplayId), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs new file mode 100644 index 0000000000..4d10c99402 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IGeometrySource2DTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IGeometrySource2D).GUID, Is.EqualTo(IID_IGeometrySource2D)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGeometrySource2D))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IGeometrySource2D).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IGeometrySource2D), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IGeometrySource2D), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs new file mode 100644 index 0000000000..e87280134c --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class PointInt32Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PointInt32))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PointInt32).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(PointInt32), Is.EqualTo(8)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs new file mode 100644 index 0000000000..3a8440b8a1 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class RectInt32Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(RectInt32))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(RectInt32).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(RectInt32), Is.EqualTo(16)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs new file mode 100644 index 0000000000..5f4a29c7ba --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class SizeInt32Tests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(SizeInt32))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(SizeInt32).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(SizeInt32), Is.EqualTo(8)); + } +} From 95b4a3cb4a7bd89af6764383dac91a1ed9c43bcb Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 16 Oct 2022 13:15:46 -0400 Subject: [PATCH 07/14] Add windows.graphics.directx --- TerraFX.Interop.Windows.sln | 8 + .../windows.graphics.directx/generate.rsp | 19 + .../winrt/windows.graphics.directx/header.txt | 4 + .../winrt-windows.graphics.directx.h | 2 + .../DirectXAlphaMode.cs | 22 ++ .../DirectXColorSpace.cs | 85 ++++ .../DirectXPixelFormat.cs | 373 ++++++++++++++++++ .../DirectXPrimitiveTopology.cs | 28 ++ 8 files changed, 541 insertions(+) create mode 100644 generation/WinRT/winrt/windows.graphics.directx/generate.rsp create mode 100644 generation/WinRT/winrt/windows.graphics.directx/header.txt create mode 100644 generation/WinRT/winrt/windows.graphics.directx/winrt-windows.graphics.directx.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXAlphaMode.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXColorSpace.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPixelFormat.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPrimitiveTopology.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 427b5fff46..7e70d2a16b 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3095,6 +3095,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.graphics", "windows generation\WinRT\winrt\windows.graphics\winrt-windows.graphics.h = generation\WinRT\winrt\windows.graphics\winrt-windows.graphics.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.graphics.directx", "windows.graphics.directx", "{D9631DB3-5394-4D28-B687-C0524ABC80FC}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.graphics.directx\generate.rsp = generation\WinRT\winrt\windows.graphics.directx\generate.rsp + generation\WinRT\winrt\windows.graphics.directx\header.txt = generation\WinRT\winrt\windows.graphics.directx\header.txt + generation\WinRT\winrt\windows.graphics.directx\winrt-windows.graphics.directx.h = generation\WinRT\winrt\windows.graphics.directx\winrt-windows.graphics.directx.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3569,6 +3576,7 @@ Global {65B229A2-8DDE-40CB-B600-7A4EE052DD60} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {11D48099-EDE0-4F6F-884E-45B0DC0AA6AD} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {32CFDE8C-7D38-4549-B08E-7271102D6503} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {D9631DB3-5394-4D28-B687-C0524ABC80FC} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.graphics.directx/generate.rsp b/generation/WinRT/winrt/windows.graphics.directx/generate.rsp new file mode 100644 index 0000000000..897f7b2e98 --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics.directx/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.graphics.directx.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.graphics.directx +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.graphics.directx +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.graphics.directx.h diff --git a/generation/WinRT/winrt/windows.graphics.directx/header.txt b/generation/WinRT/winrt/windows.graphics.directx/header.txt new file mode 100644 index 0000000000..f552abe66f --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics.directx/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.directx.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.graphics.directx/winrt-windows.graphics.directx.h b/generation/WinRT/winrt/windows.graphics.directx/winrt-windows.graphics.directx.h new file mode 100644 index 0000000000..ff17d23ea8 --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics.directx/winrt-windows.graphics.directx.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXAlphaMode.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXAlphaMode.cs new file mode 100644 index 0000000000..bf856354da --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXAlphaMode.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.directx.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum DirectXAlphaMode +{ + /// + DirectXAlphaMode_Unspecified = 0, + + /// + DirectXAlphaMode_Premultiplied = 1, + + /// + DirectXAlphaMode_Straight = 2, + + /// + DirectXAlphaMode_Ignore = 3, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXColorSpace.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXColorSpace.cs new file mode 100644 index 0000000000..ab7633afa2 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXColorSpace.cs @@ -0,0 +1,85 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.directx.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum DirectXColorSpace +{ + /// + DirectXColorSpace_RgbFullG22NoneP709 = 0, + + /// + DirectXColorSpace_RgbFullG10NoneP709 = 1, + + /// + DirectXColorSpace_RgbStudioG22NoneP709 = 2, + + /// + DirectXColorSpace_RgbStudioG22NoneP2020 = 3, + + /// + DirectXColorSpace_Reserved = 4, + + /// + DirectXColorSpace_YccFullG22NoneP709X601 = 5, + + /// + DirectXColorSpace_YccStudioG22LeftP601 = 6, + + /// + DirectXColorSpace_YccFullG22LeftP601 = 7, + + /// + DirectXColorSpace_YccStudioG22LeftP709 = 8, + + /// + DirectXColorSpace_YccFullG22LeftP709 = 9, + + /// + DirectXColorSpace_YccStudioG22LeftP2020 = 10, + + /// + DirectXColorSpace_YccFullG22LeftP2020 = 11, + + /// + DirectXColorSpace_RgbFullG2084NoneP2020 = 12, + + /// + DirectXColorSpace_YccStudioG2084LeftP2020 = 13, + + /// + DirectXColorSpace_RgbStudioG2084NoneP2020 = 14, + + /// + DirectXColorSpace_YccStudioG22TopLeftP2020 = 15, + + /// + DirectXColorSpace_YccStudioG2084TopLeftP2020 = 16, + + /// + DirectXColorSpace_RgbFullG22NoneP2020 = 17, + + /// + DirectXColorSpace_YccStudioGHlgTopLeftP2020 = 18, + + /// + DirectXColorSpace_YccFullGHlgTopLeftP2020 = 19, + + /// + DirectXColorSpace_RgbStudioG24NoneP709 = 20, + + /// + DirectXColorSpace_RgbStudioG24NoneP2020 = 21, + + /// + DirectXColorSpace_YccStudioG24LeftP709 = 22, + + /// + DirectXColorSpace_YccStudioG24LeftP2020 = 23, + + /// + DirectXColorSpace_YccStudioG24TopLeftP2020 = 24, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPixelFormat.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPixelFormat.cs new file mode 100644 index 0000000000..79b64549c5 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPixelFormat.cs @@ -0,0 +1,373 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.directx.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum DirectXPixelFormat +{ + /// + DirectXPixelFormat_Unknown = 0, + + /// + DirectXPixelFormat_R32G32B32A32Typeless = 1, + + /// + DirectXPixelFormat_R32G32B32A32Float = 2, + + /// + DirectXPixelFormat_R32G32B32A32UInt = 3, + + /// + DirectXPixelFormat_R32G32B32A32Int = 4, + + /// + DirectXPixelFormat_R32G32B32Typeless = 5, + + /// + DirectXPixelFormat_R32G32B32Float = 6, + + /// + DirectXPixelFormat_R32G32B32UInt = 7, + + /// + DirectXPixelFormat_R32G32B32Int = 8, + + /// + DirectXPixelFormat_R16G16B16A16Typeless = 9, + + /// + DirectXPixelFormat_R16G16B16A16Float = 10, + + /// + DirectXPixelFormat_R16G16B16A16UIntNormalized = 11, + + /// + DirectXPixelFormat_R16G16B16A16UInt = 12, + + /// + DirectXPixelFormat_R16G16B16A16IntNormalized = 13, + + /// + DirectXPixelFormat_R16G16B16A16Int = 14, + + /// + DirectXPixelFormat_R32G32Typeless = 15, + + /// + DirectXPixelFormat_R32G32Float = 16, + + /// + DirectXPixelFormat_R32G32UInt = 17, + + /// + DirectXPixelFormat_R32G32Int = 18, + + /// + DirectXPixelFormat_R32G8X24Typeless = 19, + + /// + DirectXPixelFormat_D32FloatS8X24UInt = 20, + + /// + DirectXPixelFormat_R32FloatX8X24Typeless = 21, + + /// + DirectXPixelFormat_X32TypelessG8X24UInt = 22, + + /// + DirectXPixelFormat_R10G10B10A2Typeless = 23, + + /// + DirectXPixelFormat_R10G10B10A2UIntNormalized = 24, + + /// + DirectXPixelFormat_R10G10B10A2UInt = 25, + + /// + DirectXPixelFormat_R11G11B10Float = 26, + + /// + DirectXPixelFormat_R8G8B8A8Typeless = 27, + + /// + DirectXPixelFormat_R8G8B8A8UIntNormalized = 28, + + /// + DirectXPixelFormat_R8G8B8A8UIntNormalizedSrgb = 29, + + /// + DirectXPixelFormat_R8G8B8A8UInt = 30, + + /// + DirectXPixelFormat_R8G8B8A8IntNormalized = 31, + + /// + DirectXPixelFormat_R8G8B8A8Int = 32, + + /// + DirectXPixelFormat_R16G16Typeless = 33, + + /// + DirectXPixelFormat_R16G16Float = 34, + + /// + DirectXPixelFormat_R16G16UIntNormalized = 35, + + /// + DirectXPixelFormat_R16G16UInt = 36, + + /// + DirectXPixelFormat_R16G16IntNormalized = 37, + + /// + DirectXPixelFormat_R16G16Int = 38, + + /// + DirectXPixelFormat_R32Typeless = 39, + + /// + DirectXPixelFormat_D32Float = 40, + + /// + DirectXPixelFormat_R32Float = 41, + + /// + DirectXPixelFormat_R32UInt = 42, + + /// + DirectXPixelFormat_R32Int = 43, + + /// + DirectXPixelFormat_R24G8Typeless = 44, + + /// + DirectXPixelFormat_D24UIntNormalizedS8UInt = 45, + + /// + DirectXPixelFormat_R24UIntNormalizedX8Typeless = 46, + + /// + DirectXPixelFormat_X24TypelessG8UInt = 47, + + /// + DirectXPixelFormat_R8G8Typeless = 48, + + /// + DirectXPixelFormat_R8G8UIntNormalized = 49, + + /// + DirectXPixelFormat_R8G8UInt = 50, + + /// + DirectXPixelFormat_R8G8IntNormalized = 51, + + /// + DirectXPixelFormat_R8G8Int = 52, + + /// + DirectXPixelFormat_R16Typeless = 53, + + /// + DirectXPixelFormat_R16Float = 54, + + /// + DirectXPixelFormat_D16UIntNormalized = 55, + + /// + DirectXPixelFormat_R16UIntNormalized = 56, + + /// + DirectXPixelFormat_R16UInt = 57, + + /// + DirectXPixelFormat_R16IntNormalized = 58, + + /// + DirectXPixelFormat_R16Int = 59, + + /// + DirectXPixelFormat_R8Typeless = 60, + + /// + DirectXPixelFormat_R8UIntNormalized = 61, + + /// + DirectXPixelFormat_R8UInt = 62, + + /// + DirectXPixelFormat_R8IntNormalized = 63, + + /// + DirectXPixelFormat_R8Int = 64, + + /// + DirectXPixelFormat_A8UIntNormalized = 65, + + /// + DirectXPixelFormat_R1UIntNormalized = 66, + + /// + DirectXPixelFormat_R9G9B9E5SharedExponent = 67, + + /// + DirectXPixelFormat_R8G8B8G8UIntNormalized = 68, + + /// + DirectXPixelFormat_G8R8G8B8UIntNormalized = 69, + + /// + DirectXPixelFormat_BC1Typeless = 70, + + /// + DirectXPixelFormat_BC1UIntNormalized = 71, + + /// + DirectXPixelFormat_BC1UIntNormalizedSrgb = 72, + + /// + DirectXPixelFormat_BC2Typeless = 73, + + /// + DirectXPixelFormat_BC2UIntNormalized = 74, + + /// + DirectXPixelFormat_BC2UIntNormalizedSrgb = 75, + + /// + DirectXPixelFormat_BC3Typeless = 76, + + /// + DirectXPixelFormat_BC3UIntNormalized = 77, + + /// + DirectXPixelFormat_BC3UIntNormalizedSrgb = 78, + + /// + DirectXPixelFormat_BC4Typeless = 79, + + /// + DirectXPixelFormat_BC4UIntNormalized = 80, + + /// + DirectXPixelFormat_BC4IntNormalized = 81, + + /// + DirectXPixelFormat_BC5Typeless = 82, + + /// + DirectXPixelFormat_BC5UIntNormalized = 83, + + /// + DirectXPixelFormat_BC5IntNormalized = 84, + + /// + DirectXPixelFormat_B5G6R5UIntNormalized = 85, + + /// + DirectXPixelFormat_B5G5R5A1UIntNormalized = 86, + + /// + DirectXPixelFormat_B8G8R8A8UIntNormalized = 87, + + /// + DirectXPixelFormat_B8G8R8X8UIntNormalized = 88, + + /// + DirectXPixelFormat_R10G10B10XRBiasA2UIntNormalized = 89, + + /// + DirectXPixelFormat_B8G8R8A8Typeless = 90, + + /// + DirectXPixelFormat_B8G8R8A8UIntNormalizedSrgb = 91, + + /// + DirectXPixelFormat_B8G8R8X8Typeless = 92, + + /// + DirectXPixelFormat_B8G8R8X8UIntNormalizedSrgb = 93, + + /// + DirectXPixelFormat_BC6HTypeless = 94, + + /// + DirectXPixelFormat_BC6H16UnsignedFloat = 95, + + /// + DirectXPixelFormat_BC6H16Float = 96, + + /// + DirectXPixelFormat_BC7Typeless = 97, + + /// + DirectXPixelFormat_BC7UIntNormalized = 98, + + /// + DirectXPixelFormat_BC7UIntNormalizedSrgb = 99, + + /// + DirectXPixelFormat_Ayuv = 100, + + /// + DirectXPixelFormat_Y410 = 101, + + /// + DirectXPixelFormat_Y416 = 102, + + /// + DirectXPixelFormat_NV12 = 103, + + /// + DirectXPixelFormat_P010 = 104, + + /// + DirectXPixelFormat_P016 = 105, + + /// + DirectXPixelFormat_Opaque420 = 106, + + /// + DirectXPixelFormat_Yuy2 = 107, + + /// + DirectXPixelFormat_Y210 = 108, + + /// + DirectXPixelFormat_Y216 = 109, + + /// + DirectXPixelFormat_NV11 = 110, + + /// + DirectXPixelFormat_AI44 = 111, + + /// + DirectXPixelFormat_IA44 = 112, + + /// + DirectXPixelFormat_P8 = 113, + + /// + DirectXPixelFormat_A8P8 = 114, + + /// + DirectXPixelFormat_B4G4R4A4UIntNormalized = 115, + + /// + DirectXPixelFormat_P208 = 130, + + /// + DirectXPixelFormat_V208 = 131, + + /// + DirectXPixelFormat_V408 = 132, + + /// + DirectXPixelFormat_SamplerFeedbackMinMipOpaque = 189, + + /// + DirectXPixelFormat_SamplerFeedbackMipRegionUsedOpaque = 190, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPrimitiveTopology.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPrimitiveTopology.cs new file mode 100644 index 0000000000..10d1ad76fa --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.directx/DirectXPrimitiveTopology.cs @@ -0,0 +1,28 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.directx.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum DirectXPrimitiveTopology +{ + /// + DirectXPrimitiveTopology_Undefined = 0, + + /// + DirectXPrimitiveTopology_PointList = 1, + + /// + DirectXPrimitiveTopology_LineList = 2, + + /// + DirectXPrimitiveTopology_LineStrip = 3, + + /// + DirectXPrimitiveTopology_TriangleList = 4, + + /// + DirectXPrimitiveTopology_TriangleStrip = 5, +} From c81802a9cba00256bcc2b1410fc592bd096cd358 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 16 Oct 2022 13:18:08 -0400 Subject: [PATCH 08/14] Add windows.graphics.effects.h --- TerraFX.Interop.Windows.sln | 8 ++ .../windows.graphics.effects/generate.rsp | 19 +++ .../winrt/windows.graphics.effects/header.txt | 4 + .../winrt-windows.graphics.effects.h | 2 + .../IGraphicsEffect.cs | 126 ++++++++++++++++++ .../IGraphicsEffectSource.cs | 99 ++++++++++++++ .../winrt/windows.graphics.effects/IID.cs | 60 +++++++++ .../winrt/windows.graphics.effects/WinRT.cs | 15 +++ .../IGraphicsEffectSourceTests.cs | 50 +++++++ .../IGraphicsEffectTests.cs | 50 +++++++ 10 files changed, 433 insertions(+) create mode 100644 generation/WinRT/winrt/windows.graphics.effects/generate.rsp create mode 100644 generation/WinRT/winrt/windows.graphics.effects/header.txt create mode 100644 generation/WinRT/winrt/windows.graphics.effects/winrt-windows.graphics.effects.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/WinRT.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 7e70d2a16b..6f43300601 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3102,6 +3102,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.graphics.directx", generation\WinRT\winrt\windows.graphics.directx\winrt-windows.graphics.directx.h = generation\WinRT\winrt\windows.graphics.directx\winrt-windows.graphics.directx.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.graphics.effects", "windows.graphics.effects", "{E1CE167B-DD40-4955-84F0-64D55CAACA00}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.graphics.effects\generate.rsp = generation\WinRT\winrt\windows.graphics.effects\generate.rsp + generation\WinRT\winrt\windows.graphics.effects\header.txt = generation\WinRT\winrt\windows.graphics.effects\header.txt + generation\WinRT\winrt\windows.graphics.effects\winrt-windows.graphics.effects.h = generation\WinRT\winrt\windows.graphics.effects\winrt-windows.graphics.effects.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3577,6 +3584,7 @@ Global {11D48099-EDE0-4F6F-884E-45B0DC0AA6AD} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {32CFDE8C-7D38-4549-B08E-7271102D6503} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {D9631DB3-5394-4D28-B687-C0524ABC80FC} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {E1CE167B-DD40-4955-84F0-64D55CAACA00} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.graphics.effects/generate.rsp b/generation/WinRT/winrt/windows.graphics.effects/generate.rsp new file mode 100644 index 0000000000..c724f88d6b --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics.effects/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.graphics.effects.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.graphics.effects +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.graphics.effects +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.graphics.effects.h diff --git a/generation/WinRT/winrt/windows.graphics.effects/header.txt b/generation/WinRT/winrt/windows.graphics.effects/header.txt new file mode 100644 index 0000000000..1f82a3ada1 --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics.effects/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.effects.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.graphics.effects/winrt-windows.graphics.effects.h b/generation/WinRT/winrt/windows.graphics.effects/winrt-windows.graphics.effects.h new file mode 100644 index 0000000000..9ebf5151db --- /dev/null +++ b/generation/WinRT/winrt/windows.graphics.effects/winrt-windows.graphics.effects.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs new file mode 100644 index 0000000000..41696e5a6b --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs @@ -0,0 +1,126 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.effects.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("CB51C0CE-8FE6-4636-B202-861FAA07D8F3")] +[NativeTypeName("struct IGraphicsEffect : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IGraphicsEffect : IGraphicsEffect.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IGraphicsEffect)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IGraphicsEffect*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IGraphicsEffect*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Name(HSTRING* name) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), name); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT put_Name(HSTRING name) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), name); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Name(HSTRING* name); + + [VtblIndex(7)] + HRESULT put_Name(HSTRING name); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Name; + + [NativeTypeName("HRESULT (HSTRING) __attribute__((stdcall))")] + public delegate* unmanaged put_Name; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs new file mode 100644 index 0000000000..cf4602b025 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs @@ -0,0 +1,99 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.effects.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("2D8F9DDC-4339-4EB9-9216-F9DEB75658A2")] +[NativeTypeName("struct IGraphicsEffectSource : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IGraphicsEffectSource : IGraphicsEffectSource.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IGraphicsEffectSource)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), trustLevel); + } + + public interface Interface : IInspectable.Interface + { + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.cs new file mode 100644 index 0000000000..d6615fa086 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.cs @@ -0,0 +1,60 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.effects.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IGraphicsEffect + { + get + { + ReadOnlySpan data = new byte[] { + 0xCE, 0xC0, 0x51, 0xCB, + 0xE6, 0x8F, + 0x36, 0x46, + 0xB2, + 0x02, + 0x86, + 0x1F, + 0xAA, + 0x07, + 0xD8, + 0xF3 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IGraphicsEffectSource + { + get + { + ReadOnlySpan data = new byte[] { + 0xDC, 0x9D, 0x8F, 0x2D, + 0x39, 0x43, + 0xB9, 0x4E, + 0x92, + 0x16, + 0xF9, + 0xDE, + 0xB7, + 0x56, + 0x58, + 0xA2 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/WinRT.cs new file mode 100644 index 0000000000..cc5079f170 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/WinRT.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.effects.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[41]")] + public const string InterfaceName_Windows_Graphics_Effects_IGraphicsEffect = "Windows.Graphics.Effects.IGraphicsEffect"; + + [NativeTypeName("const WCHAR[47]")] + public const string InterfaceName_Windows_Graphics_Effects_IGraphicsEffectSource = "Windows.Graphics.Effects.IGraphicsEffectSource"; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs new file mode 100644 index 0000000000..aa82598a3c --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.effects.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IGraphicsEffectSourceTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IGraphicsEffectSource).GUID, Is.EqualTo(IID_IGraphicsEffectSource)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGraphicsEffectSource))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IGraphicsEffectSource).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IGraphicsEffectSource), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IGraphicsEffectSource), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs new file mode 100644 index 0000000000..7a5e0bfe7a --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.graphics.effects.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IGraphicsEffectTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IGraphicsEffect).GUID, Is.EqualTo(IID_IGraphicsEffect)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGraphicsEffect))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IGraphicsEffect).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IGraphicsEffect), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IGraphicsEffect), Is.EqualTo(4)); + } + } +} From 6b3a4a372837d00780d931f83d55d26788a1c77c Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 16 Oct 2022 13:22:23 -0400 Subject: [PATCH 09/14] Add windows.ui.h --- TerraFX.Interop.Windows.sln | 8 + .../WinRT/winrt/windows.ui/generate.rsp | 19 + generation/WinRT/winrt/windows.ui/header.txt | 4 + .../WinRT/winrt/windows.ui/winrt-windows.ui.h | 2 + .../Windows/WinRT/winrt/windows.ui/Color.cs | 22 + .../WinRT/winrt/windows.ui/IColorHelper.cs | 99 + .../winrt/windows.ui/IColorHelperStatics.cs | 112 + .../winrt/windows.ui/IColorHelperStatics2.cs | 112 + .../Windows/WinRT/winrt/windows.ui/IColors.cs | 99 + .../WinRT/winrt/windows.ui/IColorsStatics.cs | 2072 +++++++++++++++++ .../Windows/WinRT/winrt/windows.ui/IID.cs | 175 ++ .../WinRT/winrt/windows.ui/IUIContentRoot.cs | 112 + .../WinRT/winrt/windows.ui/IUIContext.cs | 99 + .../Windows/WinRT/winrt/windows.ui/WinRT.cs | 42 + .../WinRT/winrt/windows.ui/WindowId.cs | 14 + .../WinRT/winrt/windows.ui/ColorTests.cs | 34 + .../windows.ui/IColorHelperStatics2Tests.cs | 50 + .../windows.ui/IColorHelperStaticsTests.cs | 50 + .../winrt/windows.ui/IColorHelperTests.cs | 50 + .../winrt/windows.ui/IColorsStaticsTests.cs | 50 + .../WinRT/winrt/windows.ui/IColorsTests.cs | 50 + .../winrt/windows.ui/IUIContentRootTests.cs | 50 + .../WinRT/winrt/windows.ui/IUIContextTests.cs | 50 + .../WinRT/winrt/windows.ui/WindowIdTests.cs | 34 + 24 files changed, 3409 insertions(+) create mode 100644 generation/WinRT/winrt/windows.ui/generate.rsp create mode 100644 generation/WinRT/winrt/windows.ui/header.txt create mode 100644 generation/WinRT/winrt/windows.ui/winrt-windows.ui.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/Color.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/WinRT.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.ui/WindowId.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 6f43300601..39967b7ea8 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3109,6 +3109,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.graphics.effects", generation\WinRT\winrt\windows.graphics.effects\winrt-windows.graphics.effects.h = generation\WinRT\winrt\windows.graphics.effects\winrt-windows.graphics.effects.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.ui", "windows.ui", "{7523C542-E0CD-42F9-93C4-B593179B378C}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.ui\generate.rsp = generation\WinRT\winrt\windows.ui\generate.rsp + generation\WinRT\winrt\windows.ui\header.txt = generation\WinRT\winrt\windows.ui\header.txt + generation\WinRT\winrt\windows.ui\winrt-windows.ui.h = generation\WinRT\winrt\windows.ui\winrt-windows.ui.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3585,6 +3592,7 @@ Global {32CFDE8C-7D38-4549-B08E-7271102D6503} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {D9631DB3-5394-4D28-B687-C0524ABC80FC} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {E1CE167B-DD40-4955-84F0-64D55CAACA00} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {7523C542-E0CD-42F9-93C4-B593179B378C} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.ui/generate.rsp b/generation/WinRT/winrt/windows.ui/generate.rsp new file mode 100644 index 0000000000..2f2086619e --- /dev/null +++ b/generation/WinRT/winrt/windows.ui/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.ui.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.ui +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.ui +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.ui.h diff --git a/generation/WinRT/winrt/windows.ui/header.txt b/generation/WinRT/winrt/windows.ui/header.txt new file mode 100644 index 0000000000..194c710b1c --- /dev/null +++ b/generation/WinRT/winrt/windows.ui/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.ui/winrt-windows.ui.h b/generation/WinRT/winrt/windows.ui/winrt-windows.ui.h new file mode 100644 index 0000000000..f5a796c16a --- /dev/null +++ b/generation/WinRT/winrt/windows.ui/winrt-windows.ui.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/Color.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/Color.cs new file mode 100644 index 0000000000..01bfc5adee --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/Color.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct Color +{ + /// + public byte A; + + /// + public byte R; + + /// + public byte G; + + /// + public byte B; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs new file mode 100644 index 0000000000..fa61301c72 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs @@ -0,0 +1,99 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("193CFBE7-65C7-4540-AD08-6283BA76879A")] +[NativeTypeName("struct IColorHelper : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IColorHelper : IColorHelper.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IColorHelper)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IColorHelper*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IColorHelper*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IColorHelper*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IColorHelper*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IColorHelper*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IColorHelper*)Unsafe.AsPointer(ref this), trustLevel); + } + + public interface Interface : IInspectable.Interface + { + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs new file mode 100644 index 0000000000..3cc02506e5 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("8504DBEA-FB6A-4144-A6C2-33499C9284F5")] +[NativeTypeName("struct IColorHelperStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IColorHelperStatics : IColorHelperStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IColorHelperStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IColorHelperStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IColorHelperStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT FromArgb(byte a, byte r, byte g, byte b, [NativeTypeName("ABI::Windows::UI::Color *")] Color* returnValue) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), a, r, g, b, returnValue); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT FromArgb(byte a, byte r, byte g, byte b, [NativeTypeName("ABI::Windows::UI::Color *")] Color* returnValue); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (BYTE, BYTE, BYTE, BYTE, ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged FromArgb; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs new file mode 100644 index 0000000000..935c806592 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("24D9AF02-6EB0-4B94-855C-FCF0818D9A16")] +[NativeTypeName("struct IColorHelperStatics2 : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IColorHelperStatics2 : IColorHelperStatics2.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IColorHelperStatics2)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT ToDisplayName([NativeTypeName("ABI::Windows::UI::Color")] Color color, HSTRING* returnValue) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), color, returnValue); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT ToDisplayName([NativeTypeName("ABI::Windows::UI::Color")] Color color, HSTRING* returnValue); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color, HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged ToDisplayName; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs new file mode 100644 index 0000000000..e7cd571765 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs @@ -0,0 +1,99 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("9B8C9326-4CA6-4CE5-8994-9EFF65CABDCC")] +[NativeTypeName("struct IColors : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IColors : IColors.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IColors)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IColors*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IColors*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IColors*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IColors*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IColors*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IColors*)Unsafe.AsPointer(ref this), trustLevel); + } + + public interface Interface : IInspectable.Interface + { + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs new file mode 100644 index 0000000000..6af6323631 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs @@ -0,0 +1,2072 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("CFF52E04-CCA6-4614-A17E-754910C84A99")] +[NativeTypeName("struct IColorsStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IColorsStatics : IColorsStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IColorsStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IColorsStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IColorsStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IColorsStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IColorsStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IColorsStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IColorsStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_AliceBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_AntiqueWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT get_Aqua([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT get_Aquamarine([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT get_Azure([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT get_Beige([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT get_Bisque([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT get_Black([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT get_BlanchedAlmond([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT get_Blue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HRESULT get_BlueViolet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[16]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public HRESULT get_Brown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public HRESULT get_BurlyWood([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] + public HRESULT get_CadetBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[19]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] + public HRESULT get_Chartreuse([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] + public HRESULT get_Chocolate([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[21]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] + public HRESULT get_Coral([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[22]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(23)] + public HRESULT get_CornflowerBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[23]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(24)] + public HRESULT get_Cornsilk([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[24]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(25)] + public HRESULT get_Crimson([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[25]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(26)] + public HRESULT get_Cyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[26]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(27)] + public HRESULT get_DarkBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[27]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(28)] + public HRESULT get_DarkCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[28]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(29)] + public HRESULT get_DarkGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[29]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(30)] + public HRESULT get_DarkGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[30]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(31)] + public HRESULT get_DarkGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[31]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(32)] + public HRESULT get_DarkKhaki([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[32]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(33)] + public HRESULT get_DarkMagenta([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[33]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(34)] + public HRESULT get_DarkOliveGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[34]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(35)] + public HRESULT get_DarkOrange([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[35]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(36)] + public HRESULT get_DarkOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[36]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(37)] + public HRESULT get_DarkRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[37]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(38)] + public HRESULT get_DarkSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[38]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(39)] + public HRESULT get_DarkSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[39]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(40)] + public HRESULT get_DarkSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[40]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(41)] + public HRESULT get_DarkSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[41]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(42)] + public HRESULT get_DarkTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[42]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(43)] + public HRESULT get_DarkViolet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[43]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(44)] + public HRESULT get_DeepPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[44]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(45)] + public HRESULT get_DeepSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[45]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(46)] + public HRESULT get_DimGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[46]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(47)] + public HRESULT get_DodgerBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[47]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(48)] + public HRESULT get_Firebrick([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[48]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(49)] + public HRESULT get_FloralWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[49]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(50)] + public HRESULT get_ForestGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[50]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(51)] + public HRESULT get_Fuchsia([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[51]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(52)] + public HRESULT get_Gainsboro([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[52]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(53)] + public HRESULT get_GhostWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[53]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(54)] + public HRESULT get_Gold([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[54]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(55)] + public HRESULT get_Goldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[55]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(56)] + public HRESULT get_Gray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[56]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(57)] + public HRESULT get_Green([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[57]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(58)] + public HRESULT get_GreenYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[58]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(59)] + public HRESULT get_Honeydew([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[59]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(60)] + public HRESULT get_HotPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[60]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(61)] + public HRESULT get_IndianRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[61]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(62)] + public HRESULT get_Indigo([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[62]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(63)] + public HRESULT get_Ivory([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[63]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(64)] + public HRESULT get_Khaki([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[64]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(65)] + public HRESULT get_Lavender([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[65]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(66)] + public HRESULT get_LavenderBlush([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[66]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(67)] + public HRESULT get_LawnGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[67]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(68)] + public HRESULT get_LemonChiffon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[68]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(69)] + public HRESULT get_LightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[69]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(70)] + public HRESULT get_LightCoral([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[70]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(71)] + public HRESULT get_LightCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[71]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(72)] + public HRESULT get_LightGoldenrodYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[72]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(73)] + public HRESULT get_LightGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[73]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(74)] + public HRESULT get_LightGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[74]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(75)] + public HRESULT get_LightPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[75]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(76)] + public HRESULT get_LightSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[76]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(77)] + public HRESULT get_LightSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[77]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(78)] + public HRESULT get_LightSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[78]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(79)] + public HRESULT get_LightSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[79]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(80)] + public HRESULT get_LightSteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[80]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(81)] + public HRESULT get_LightYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[81]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(82)] + public HRESULT get_Lime([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[82]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(83)] + public HRESULT get_LimeGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[83]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(84)] + public HRESULT get_Linen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[84]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(85)] + public HRESULT get_Magenta([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[85]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(86)] + public HRESULT get_Maroon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[86]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(87)] + public HRESULT get_MediumAquamarine([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[87]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(88)] + public HRESULT get_MediumBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[88]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(89)] + public HRESULT get_MediumOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[89]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(90)] + public HRESULT get_MediumPurple([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[90]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(91)] + public HRESULT get_MediumSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[91]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(92)] + public HRESULT get_MediumSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[92]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(93)] + public HRESULT get_MediumSpringGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[93]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(94)] + public HRESULT get_MediumTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[94]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(95)] + public HRESULT get_MediumVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[95]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(96)] + public HRESULT get_MidnightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[96]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(97)] + public HRESULT get_MintCream([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[97]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(98)] + public HRESULT get_MistyRose([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[98]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(99)] + public HRESULT get_Moccasin([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[99]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(100)] + public HRESULT get_NavajoWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[100]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(101)] + public HRESULT get_Navy([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[101]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(102)] + public HRESULT get_OldLace([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[102]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(103)] + public HRESULT get_Olive([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[103]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(104)] + public HRESULT get_OliveDrab([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[104]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(105)] + public HRESULT get_Orange([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[105]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(106)] + public HRESULT get_OrangeRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[106]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(107)] + public HRESULT get_Orchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[107]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(108)] + public HRESULT get_PaleGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[108]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(109)] + public HRESULT get_PaleGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[109]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(110)] + public HRESULT get_PaleTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[110]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(111)] + public HRESULT get_PaleVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[111]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(112)] + public HRESULT get_PapayaWhip([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[112]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(113)] + public HRESULT get_PeachPuff([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[113]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(114)] + public HRESULT get_Peru([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[114]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(115)] + public HRESULT get_Pink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[115]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(116)] + public HRESULT get_Plum([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[116]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(117)] + public HRESULT get_PowderBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[117]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(118)] + public HRESULT get_Purple([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[118]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(119)] + public HRESULT get_Red([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[119]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(120)] + public HRESULT get_RosyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[120]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(121)] + public HRESULT get_RoyalBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[121]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(122)] + public HRESULT get_SaddleBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[122]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(123)] + public HRESULT get_Salmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[123]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(124)] + public HRESULT get_SandyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[124]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(125)] + public HRESULT get_SeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[125]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(126)] + public HRESULT get_SeaShell([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[126]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(127)] + public HRESULT get_Sienna([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[127]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(128)] + public HRESULT get_Silver([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[128]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(129)] + public HRESULT get_SkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[129]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(130)] + public HRESULT get_SlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[130]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(131)] + public HRESULT get_SlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[131]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(132)] + public HRESULT get_Snow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[132]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(133)] + public HRESULT get_SpringGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[133]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(134)] + public HRESULT get_SteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[134]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(135)] + public HRESULT get_Tan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[135]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(136)] + public HRESULT get_Teal([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[136]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(137)] + public HRESULT get_Thistle([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[137]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(138)] + public HRESULT get_Tomato([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[138]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(139)] + public HRESULT get_Transparent([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[139]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(140)] + public HRESULT get_Turquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[140]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(141)] + public HRESULT get_Violet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[141]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(142)] + public HRESULT get_Wheat([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[142]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(143)] + public HRESULT get_White([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[143]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(144)] + public HRESULT get_WhiteSmoke([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[144]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(145)] + public HRESULT get_Yellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[145]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(146)] + public HRESULT get_YellowGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) + { + return ((delegate* unmanaged)(lpVtbl[146]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_AliceBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(7)] + HRESULT get_AntiqueWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(8)] + HRESULT get_Aqua([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(9)] + HRESULT get_Aquamarine([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(10)] + HRESULT get_Azure([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(11)] + HRESULT get_Beige([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(12)] + HRESULT get_Bisque([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(13)] + HRESULT get_Black([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(14)] + HRESULT get_BlanchedAlmond([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(15)] + HRESULT get_Blue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(16)] + HRESULT get_BlueViolet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(17)] + HRESULT get_Brown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(18)] + HRESULT get_BurlyWood([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(19)] + HRESULT get_CadetBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(20)] + HRESULT get_Chartreuse([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(21)] + HRESULT get_Chocolate([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(22)] + HRESULT get_Coral([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(23)] + HRESULT get_CornflowerBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(24)] + HRESULT get_Cornsilk([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(25)] + HRESULT get_Crimson([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(26)] + HRESULT get_Cyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(27)] + HRESULT get_DarkBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(28)] + HRESULT get_DarkCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(29)] + HRESULT get_DarkGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(30)] + HRESULT get_DarkGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(31)] + HRESULT get_DarkGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(32)] + HRESULT get_DarkKhaki([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(33)] + HRESULT get_DarkMagenta([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(34)] + HRESULT get_DarkOliveGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(35)] + HRESULT get_DarkOrange([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(36)] + HRESULT get_DarkOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(37)] + HRESULT get_DarkRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(38)] + HRESULT get_DarkSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(39)] + HRESULT get_DarkSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(40)] + HRESULT get_DarkSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(41)] + HRESULT get_DarkSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(42)] + HRESULT get_DarkTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(43)] + HRESULT get_DarkViolet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(44)] + HRESULT get_DeepPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(45)] + HRESULT get_DeepSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(46)] + HRESULT get_DimGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(47)] + HRESULT get_DodgerBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(48)] + HRESULT get_Firebrick([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(49)] + HRESULT get_FloralWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(50)] + HRESULT get_ForestGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(51)] + HRESULT get_Fuchsia([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(52)] + HRESULT get_Gainsboro([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(53)] + HRESULT get_GhostWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(54)] + HRESULT get_Gold([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(55)] + HRESULT get_Goldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(56)] + HRESULT get_Gray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(57)] + HRESULT get_Green([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(58)] + HRESULT get_GreenYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(59)] + HRESULT get_Honeydew([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(60)] + HRESULT get_HotPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(61)] + HRESULT get_IndianRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(62)] + HRESULT get_Indigo([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(63)] + HRESULT get_Ivory([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(64)] + HRESULT get_Khaki([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(65)] + HRESULT get_Lavender([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(66)] + HRESULT get_LavenderBlush([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(67)] + HRESULT get_LawnGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(68)] + HRESULT get_LemonChiffon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(69)] + HRESULT get_LightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(70)] + HRESULT get_LightCoral([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(71)] + HRESULT get_LightCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(72)] + HRESULT get_LightGoldenrodYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(73)] + HRESULT get_LightGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(74)] + HRESULT get_LightGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(75)] + HRESULT get_LightPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(76)] + HRESULT get_LightSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(77)] + HRESULT get_LightSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(78)] + HRESULT get_LightSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(79)] + HRESULT get_LightSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(80)] + HRESULT get_LightSteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(81)] + HRESULT get_LightYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(82)] + HRESULT get_Lime([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(83)] + HRESULT get_LimeGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(84)] + HRESULT get_Linen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(85)] + HRESULT get_Magenta([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(86)] + HRESULT get_Maroon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(87)] + HRESULT get_MediumAquamarine([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(88)] + HRESULT get_MediumBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(89)] + HRESULT get_MediumOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(90)] + HRESULT get_MediumPurple([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(91)] + HRESULT get_MediumSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(92)] + HRESULT get_MediumSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(93)] + HRESULT get_MediumSpringGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(94)] + HRESULT get_MediumTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(95)] + HRESULT get_MediumVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(96)] + HRESULT get_MidnightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(97)] + HRESULT get_MintCream([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(98)] + HRESULT get_MistyRose([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(99)] + HRESULT get_Moccasin([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(100)] + HRESULT get_NavajoWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(101)] + HRESULT get_Navy([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(102)] + HRESULT get_OldLace([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(103)] + HRESULT get_Olive([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(104)] + HRESULT get_OliveDrab([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(105)] + HRESULT get_Orange([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(106)] + HRESULT get_OrangeRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(107)] + HRESULT get_Orchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(108)] + HRESULT get_PaleGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(109)] + HRESULT get_PaleGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(110)] + HRESULT get_PaleTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(111)] + HRESULT get_PaleVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(112)] + HRESULT get_PapayaWhip([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(113)] + HRESULT get_PeachPuff([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(114)] + HRESULT get_Peru([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(115)] + HRESULT get_Pink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(116)] + HRESULT get_Plum([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(117)] + HRESULT get_PowderBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(118)] + HRESULT get_Purple([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(119)] + HRESULT get_Red([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(120)] + HRESULT get_RosyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(121)] + HRESULT get_RoyalBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(122)] + HRESULT get_SaddleBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(123)] + HRESULT get_Salmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(124)] + HRESULT get_SandyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(125)] + HRESULT get_SeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(126)] + HRESULT get_SeaShell([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(127)] + HRESULT get_Sienna([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(128)] + HRESULT get_Silver([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(129)] + HRESULT get_SkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(130)] + HRESULT get_SlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(131)] + HRESULT get_SlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(132)] + HRESULT get_Snow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(133)] + HRESULT get_SpringGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(134)] + HRESULT get_SteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(135)] + HRESULT get_Tan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(136)] + HRESULT get_Teal([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(137)] + HRESULT get_Thistle([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(138)] + HRESULT get_Tomato([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(139)] + HRESULT get_Transparent([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(140)] + HRESULT get_Turquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(141)] + HRESULT get_Violet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(142)] + HRESULT get_Wheat([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(143)] + HRESULT get_White([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(144)] + HRESULT get_WhiteSmoke([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(145)] + HRESULT get_Yellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + + [VtblIndex(146)] + HRESULT get_YellowGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_AliceBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_AntiqueWhite; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Aqua; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Aquamarine; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Azure; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Beige; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Bisque; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Black; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_BlanchedAlmond; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Blue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_BlueViolet; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Brown; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_BurlyWood; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_CadetBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Chartreuse; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Chocolate; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Coral; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_CornflowerBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Cornsilk; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Crimson; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Cyan; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkCyan; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkGoldenrod; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkGray; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkKhaki; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkMagenta; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkOliveGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkOrange; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkOrchid; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkRed; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkSalmon; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkSeaGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkSlateBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkSlateGray; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkTurquoise; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DarkViolet; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DeepPink; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DeepSkyBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DimGray; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_DodgerBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Firebrick; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_FloralWhite; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_ForestGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Fuchsia; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Gainsboro; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_GhostWhite; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Gold; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Goldenrod; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Gray; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Green; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_GreenYellow; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Honeydew; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_HotPink; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_IndianRed; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Indigo; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Ivory; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Khaki; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Lavender; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LavenderBlush; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LawnGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LemonChiffon; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightCoral; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightCyan; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightGoldenrodYellow; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightGray; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightPink; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightSalmon; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightSeaGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightSkyBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightSlateGray; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightSteelBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LightYellow; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Lime; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_LimeGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Linen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Magenta; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Maroon; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumAquamarine; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumOrchid; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumPurple; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumSeaGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumSlateBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumSpringGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumTurquoise; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MediumVioletRed; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MidnightBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MintCream; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_MistyRose; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Moccasin; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_NavajoWhite; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Navy; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_OldLace; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Olive; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_OliveDrab; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Orange; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_OrangeRed; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Orchid; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_PaleGoldenrod; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_PaleGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_PaleTurquoise; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_PaleVioletRed; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_PapayaWhip; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_PeachPuff; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Peru; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Pink; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Plum; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_PowderBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Purple; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Red; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_RosyBrown; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_RoyalBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SaddleBrown; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Salmon; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SandyBrown; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SeaGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SeaShell; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Sienna; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Silver; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SkyBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SlateBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SlateGray; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Snow; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SpringGreen; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_SteelBlue; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Tan; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Teal; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Thistle; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Tomato; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Transparent; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Turquoise; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Violet; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Wheat; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_White; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_WhiteSmoke; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_Yellow; + + [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] + public delegate* unmanaged get_YellowGreen; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IID.cs new file mode 100644 index 0000000000..fe56c222aa --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IID.cs @@ -0,0 +1,175 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IColorHelper + { + get + { + ReadOnlySpan data = new byte[] { + 0xE7, 0xFB, 0x3C, 0x19, + 0xC7, 0x65, + 0x40, 0x45, + 0xAD, + 0x08, + 0x62, + 0x83, + 0xBA, + 0x76, + 0x87, + 0x9A + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IColorHelperStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0xEA, 0xDB, 0x04, 0x85, + 0x6A, 0xFB, + 0x44, 0x41, + 0xA6, + 0xC2, + 0x33, + 0x49, + 0x9C, + 0x92, + 0x84, + 0xF5 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IColorHelperStatics2 + { + get + { + ReadOnlySpan data = new byte[] { + 0x02, 0xAF, 0xD9, 0x24, + 0xB0, 0x6E, + 0x94, 0x4B, + 0x85, + 0x5C, + 0xFC, + 0xF0, + 0x81, + 0x8D, + 0x9A, + 0x16 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IColors + { + get + { + ReadOnlySpan data = new byte[] { + 0x26, 0x93, 0x8C, 0x9B, + 0xA6, 0x4C, + 0xE5, 0x4C, + 0x89, + 0x94, + 0x9E, + 0xFF, + 0x65, + 0xCA, + 0xBD, + 0xCC + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IColorsStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0x04, 0x2E, 0xF5, 0xCF, + 0xA6, 0xCC, + 0x14, 0x46, + 0xA1, + 0x7E, + 0x75, + 0x49, + 0x10, + 0xC8, + 0x4A, + 0x99 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IUIContentRoot + { + get + { + ReadOnlySpan data = new byte[] { + 0xC6, 0xBA, 0xFC, 0x1D, + 0x6B, 0xB3, + 0xB9, 0x5C, + 0x9B, + 0xC5, + 0x2B, + 0x7A, + 0x0E, + 0xDD, + 0xC3, + 0x78 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IUIContext + { + get + { + ReadOnlySpan data = new byte[] { + 0xCD, 0xFA, 0x5C, 0xBB, + 0xD8, 0x5B, + 0xD0, 0x59, + 0xA5, + 0x9E, + 0x1C, + 0x17, + 0xA4, + 0xD6, + 0xD2, + 0x43 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs new file mode 100644 index 0000000000..c30441c91f --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs @@ -0,0 +1,112 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("1DFCBAC6-B36B-5CB9-9BC5-2B7A0EDDC378")] +[NativeTypeName("struct IUIContentRoot : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IUIContentRoot : IUIContentRoot.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IUIContentRoot)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IUIContentRoot*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IUIContentRoot*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IUIContentRoot*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IUIContentRoot*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IUIContentRoot*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IUIContentRoot*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_UIContext([NativeTypeName("ABI::Windows::UI::IUIContext **")] IUIContext** value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IUIContentRoot*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_UIContext([NativeTypeName("ABI::Windows::UI::IUIContext **")] IUIContext** value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::UI::IUIContext **) __attribute__((stdcall))")] + public delegate* unmanaged get_UIContext; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs new file mode 100644 index 0000000000..07345a6d08 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs @@ -0,0 +1,99 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("BB5CFACD-5BD8-59D0-A59E-1C17A4D6D243")] +[NativeTypeName("struct IUIContext : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IUIContext : IUIContext.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IUIContext)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IUIContext*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IUIContext*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IUIContext*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IUIContext*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IUIContext*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IUIContext*)Unsafe.AsPointer(ref this), trustLevel); + } + + public interface Interface : IInspectable.Interface + { + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/WinRT.cs new file mode 100644 index 0000000000..ff9a289f56 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/WinRT.cs @@ -0,0 +1,42 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[24]")] + public const string InterfaceName_Windows_UI_IColorHelper = "Windows.UI.IColorHelper"; + + [NativeTypeName("const WCHAR[31]")] + public const string InterfaceName_Windows_UI_IColorHelperStatics = "Windows.UI.IColorHelperStatics"; + + [NativeTypeName("const WCHAR[32]")] + public const string InterfaceName_Windows_UI_IColorHelperStatics2 = "Windows.UI.IColorHelperStatics2"; + + [NativeTypeName("const WCHAR[19]")] + public const string InterfaceName_Windows_UI_IColors = "Windows.UI.IColors"; + + [NativeTypeName("const WCHAR[26]")] + public const string InterfaceName_Windows_UI_IColorsStatics = "Windows.UI.IColorsStatics"; + + [NativeTypeName("const WCHAR[26]")] + public const string InterfaceName_Windows_UI_IUIContentRoot = "Windows.UI.IUIContentRoot"; + + [NativeTypeName("const WCHAR[22]")] + public const string InterfaceName_Windows_UI_IUIContext = "Windows.UI.IUIContext"; + + [NativeTypeName("const WCHAR[23]")] + public const string RuntimeClass_Windows_UI_ColorHelper = "Windows.UI.ColorHelper"; + + [NativeTypeName("const WCHAR[18]")] + public const string RuntimeClass_Windows_UI_Colors = "Windows.UI.Colors"; + + [NativeTypeName("const WCHAR[25]")] + public const string RuntimeClass_Windows_UI_UIContentRoot = "Windows.UI.UIContentRoot"; + + [NativeTypeName("const WCHAR[21]")] + public const string RuntimeClass_Windows_UI_UIContext = "Windows.UI.UIContext"; +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/WindowId.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/WindowId.cs new file mode 100644 index 0000000000..7be14cc346 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/WindowId.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public partial struct WindowId +{ + /// + [NativeTypeName("UINT64")] + public ulong Value; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs new file mode 100644 index 0000000000..92ad72c5e7 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class ColorTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Color))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Color).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Color), Is.EqualTo(4)); + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs new file mode 100644 index 0000000000..d9f781d279 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IColorHelperStatics2Tests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IColorHelperStatics2).GUID, Is.EqualTo(IID_IColorHelperStatics2)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorHelperStatics2))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IColorHelperStatics2).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IColorHelperStatics2), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IColorHelperStatics2), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs new file mode 100644 index 0000000000..5c6cdafb15 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IColorHelperStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IColorHelperStatics).GUID, Is.EqualTo(IID_IColorHelperStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorHelperStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IColorHelperStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IColorHelperStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IColorHelperStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs new file mode 100644 index 0000000000..c808d2d561 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IColorHelperTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IColorHelper).GUID, Is.EqualTo(IID_IColorHelper)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorHelper))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IColorHelper).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IColorHelper), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IColorHelper), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs new file mode 100644 index 0000000000..61e069c6b6 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IColorsStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IColorsStatics).GUID, Is.EqualTo(IID_IColorsStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorsStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IColorsStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IColorsStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IColorsStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs new file mode 100644 index 0000000000..ae95ccaea8 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IColorsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IColors).GUID, Is.EqualTo(IID_IColors)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColors))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IColors).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IColors), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IColors), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs new file mode 100644 index 0000000000..df7a9b3119 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IUIContentRootTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IUIContentRoot).GUID, Is.EqualTo(IID_IUIContentRoot)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUIContentRoot))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IUIContentRoot).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IUIContentRoot), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IUIContentRoot), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs new file mode 100644 index 0000000000..949cf44b1c --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IUIContextTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IUIContext).GUID, Is.EqualTo(IID_IUIContext)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUIContext))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IUIContext).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IUIContext), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IUIContext), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs new file mode 100644 index 0000000000..bf68c41049 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class WindowIdTests +{ + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WindowId))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WindowId).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WindowId), Is.EqualTo(8)); + } +} From 507d627d862cfcde151415e81fa73963c856cae0 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 16 Oct 2022 13:30:42 -0400 Subject: [PATCH 10/14] Add windows.devices.haptics.h --- TerraFX.Interop.Windows.sln | 8 + .../windows.devices.haptics/generate.rsp | 19 ++ .../winrt/windows.devices.haptics/header.txt | 4 + .../winrt-windows.devices.haptics.h | 2 + .../winrt/windows.devices.haptics/IID.cs | 152 +++++++++++ ...SimpleHapticsControllerWaveformsStatics.cs | 168 ++++++++++++ ...impleHapticsControllerWaveformsStatics2.cs | 238 +++++++++++++++++ .../ISimpleHapticsController.cs | 252 ++++++++++++++++++ .../ISimpleHapticsControllerFeedback.cs | 126 +++++++++ .../IVibrationDevice.cs | 126 +++++++++ .../IVibrationDeviceStatics.cs | 168 ++++++++++++ .../VibrationAccessStatus.cs | 22 ++ .../winrt/windows.devices.haptics/WinRT.cs | 39 +++ ...HapticsControllerWaveformsStatics2Tests.cs | 50 ++++ ...eHapticsControllerWaveformsStaticsTests.cs | 50 ++++ .../ISimpleHapticsControllerFeedbackTests.cs | 50 ++++ .../ISimpleHapticsControllerTests.cs | 50 ++++ .../IVibrationDeviceStaticsTests.cs | 50 ++++ .../IVibrationDeviceTests.cs | 50 ++++ 19 files changed, 1624 insertions(+) create mode 100644 generation/WinRT/winrt/windows.devices.haptics/generate.rsp create mode 100644 generation/WinRT/winrt/windows.devices.haptics/header.txt create mode 100644 generation/WinRT/winrt/windows.devices.haptics/winrt-windows.devices.haptics.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/VibrationAccessStatus.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/WinRT.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 39967b7ea8..8bc9bc8ec0 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3116,6 +3116,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.ui", "windows.ui", generation\WinRT\winrt\windows.ui\winrt-windows.ui.h = generation\WinRT\winrt\windows.ui\winrt-windows.ui.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.devices.haptics", "windows.devices.haptics", "{48C596B5-7E3C-46A8-A0B1-ACC1960234F3}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.devices.haptics\generate.rsp = generation\WinRT\winrt\windows.devices.haptics\generate.rsp + generation\WinRT\winrt\windows.devices.haptics\header.txt = generation\WinRT\winrt\windows.devices.haptics\header.txt + generation\WinRT\winrt\windows.devices.haptics\winrt-windows.devices.haptics.h = generation\WinRT\winrt\windows.devices.haptics\winrt-windows.devices.haptics.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3593,6 +3600,7 @@ Global {D9631DB3-5394-4D28-B687-C0524ABC80FC} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {E1CE167B-DD40-4955-84F0-64D55CAACA00} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {7523C542-E0CD-42F9-93C4-B593179B378C} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {48C596B5-7E3C-46A8-A0B1-ACC1960234F3} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.devices.haptics/generate.rsp b/generation/WinRT/winrt/windows.devices.haptics/generate.rsp new file mode 100644 index 0000000000..6fb36ef163 --- /dev/null +++ b/generation/WinRT/winrt/windows.devices.haptics/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.devices.haptics.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.devices.haptics +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.devices.haptics +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.devices.haptics.h diff --git a/generation/WinRT/winrt/windows.devices.haptics/header.txt b/generation/WinRT/winrt/windows.devices.haptics/header.txt new file mode 100644 index 0000000000..adeabb007e --- /dev/null +++ b/generation/WinRT/winrt/windows.devices.haptics/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.devices.haptics/winrt-windows.devices.haptics.h b/generation/WinRT/winrt/windows.devices.haptics/winrt-windows.devices.haptics.h new file mode 100644 index 0000000000..ffd5a14e04 --- /dev/null +++ b/generation/WinRT/winrt/windows.devices.haptics/winrt-windows.devices.haptics.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.cs new file mode 100644 index 0000000000..b86ca42449 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.cs @@ -0,0 +1,152 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IKnownSimpleHapticsControllerWaveformsStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0xF7, 0x7E, 0x57, 0x3D, + 0xEE, 0x4C, + 0xE6, 0x11, + 0xB5, + 0x35, + 0x00, + 0x1B, + 0xDC, + 0x06, + 0xAB, + 0x3B + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IKnownSimpleHapticsControllerWaveformsStatics2 + { + get + { + ReadOnlySpan data = new byte[] { + 0x27, 0x4C, 0xD2, 0xA7, + 0x9D, 0xB7, + 0x0A, 0x51, + 0xBF, + 0x79, + 0xFF, + 0x6D, + 0x49, + 0x17, + 0x3E, + 0x1D + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_ISimpleHapticsController + { + get + { + ReadOnlySpan data = new byte[] { + 0xF9, 0x7E, 0x57, 0x3D, + 0xEE, 0x4C, + 0xE6, 0x11, + 0xB5, + 0x35, + 0x00, + 0x1B, + 0xDC, + 0x06, + 0xAB, + 0x3B + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_ISimpleHapticsControllerFeedback + { + get + { + ReadOnlySpan data = new byte[] { + 0xF8, 0x7E, 0x57, 0x3D, + 0xEE, 0x4C, + 0xE6, 0x11, + 0xB5, + 0x35, + 0x00, + 0x1B, + 0xDC, + 0x06, + 0xAB, + 0x3B + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IVibrationDevice + { + get + { + ReadOnlySpan data = new byte[] { + 0x3E, 0x1A, 0xF2, 0x40, + 0x44, 0x88, + 0xFF, 0x47, + 0xB3, + 0x12, + 0x06, + 0x18, + 0x5A, + 0x38, + 0x44, + 0xDA + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IVibrationDeviceStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0xED, 0xED, 0xE2, 0x53, + 0x90, 0x22, + 0xC9, 0x4A, + 0x8E, + 0xB3, + 0x1A, + 0x84, + 0x12, + 0x2E, + 0xB7, + 0x1C + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs new file mode 100644 index 0000000000..12d42f491a --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs @@ -0,0 +1,168 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("3D577EF7-4CEE-11E6-B535-001BDC06AB3B")] +[NativeTypeName("struct IKnownSimpleHapticsControllerWaveformsStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IKnownSimpleHapticsControllerWaveformsStatics : IKnownSimpleHapticsControllerWaveformsStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IKnownSimpleHapticsControllerWaveformsStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Click([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_BuzzContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT get_RumbleContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT get_Press([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT get_Release([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Click([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(7)] + HRESULT get_BuzzContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(8)] + HRESULT get_RumbleContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(9)] + HRESULT get_Press([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(10)] + HRESULT get_Release([NativeTypeName("UINT16 *")] ushort* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Click; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_BuzzContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_RumbleContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Press; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Release; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs new file mode 100644 index 0000000000..8f9e48b07a --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs @@ -0,0 +1,238 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("A7D24C27-B79D-510A-BF79-FF6D49173E1D")] +[NativeTypeName("struct IKnownSimpleHapticsControllerWaveformsStatics2 : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IKnownSimpleHapticsControllerWaveformsStatics2 : IKnownSimpleHapticsControllerWaveformsStatics2.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IKnownSimpleHapticsControllerWaveformsStatics2)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_BrushContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_ChiselMarkerContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT get_EraserContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT get_Error([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT get_GalaxyPenContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT get_Hover([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT get_InkContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT get_MarkerContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT get_PencilContinuous([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT get_Success([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_BrushContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(7)] + HRESULT get_ChiselMarkerContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(8)] + HRESULT get_EraserContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(9)] + HRESULT get_Error([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(10)] + HRESULT get_GalaxyPenContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(11)] + HRESULT get_Hover([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(12)] + HRESULT get_InkContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(13)] + HRESULT get_MarkerContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(14)] + HRESULT get_PencilContinuous([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(15)] + HRESULT get_Success([NativeTypeName("UINT16 *")] ushort* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_BrushContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_ChiselMarkerContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_EraserContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Error; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_GalaxyPenContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Hover; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_InkContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_MarkerContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_PencilContinuous; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Success; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs new file mode 100644 index 0000000000..ba5d00b5ed --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs @@ -0,0 +1,252 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("3D577EF9-4CEE-11E6-B535-001BDC06AB3B")] +[NativeTypeName("struct ISimpleHapticsController : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct ISimpleHapticsController : ISimpleHapticsController.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ISimpleHapticsController)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Id(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_SupportedFeedback([NativeTypeName("ABI::Windows::Foundation::Collections::__FIVectorView_1_Windows__CDevices__CHaptics__CSimpleHapticsControllerFeedback_t **")] IVectorView** value) + { + return ((delegate* unmanaged**, int>)(lpVtbl[7]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT get_IsIntensitySupported([NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT get_IsPlayCountSupported([NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT get_IsPlayDurationSupported([NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT get_IsReplayPauseIntervalSupported([NativeTypeName("boolean *")] byte* value) + { + return ((delegate* unmanaged)(lpVtbl[11]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT StopFeedback() + { + return ((delegate* unmanaged)(lpVtbl[12]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT SendHapticFeedback([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback) + { + return ((delegate* unmanaged)(lpVtbl[13]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT SendHapticFeedbackWithIntensity([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity) + { + return ((delegate* unmanaged)(lpVtbl[14]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT SendHapticFeedbackForDuration([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity, [NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan playDuration) + { + return ((delegate* unmanaged)(lpVtbl[15]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity, playDuration); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HRESULT SendHapticFeedbackForPlayCount([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity, [NativeTypeName("INT32")] int playCount, [NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan replayPauseInterval) + { + return ((delegate* unmanaged)(lpVtbl[16]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity, playCount, replayPauseInterval); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Id(HSTRING* value); + + [VtblIndex(7)] + HRESULT get_SupportedFeedback([NativeTypeName("ABI::Windows::Foundation::Collections::__FIVectorView_1_Windows__CDevices__CHaptics__CSimpleHapticsControllerFeedback_t **")] IVectorView** value); + + [VtblIndex(8)] + HRESULT get_IsIntensitySupported([NativeTypeName("boolean *")] byte* value); + + [VtblIndex(9)] + HRESULT get_IsPlayCountSupported([NativeTypeName("boolean *")] byte* value); + + [VtblIndex(10)] + HRESULT get_IsPlayDurationSupported([NativeTypeName("boolean *")] byte* value); + + [VtblIndex(11)] + HRESULT get_IsReplayPauseIntervalSupported([NativeTypeName("boolean *")] byte* value); + + [VtblIndex(12)] + HRESULT StopFeedback(); + + [VtblIndex(13)] + HRESULT SendHapticFeedback([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback); + + [VtblIndex(14)] + HRESULT SendHapticFeedbackWithIntensity([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity); + + [VtblIndex(15)] + HRESULT SendHapticFeedbackForDuration([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity, [NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan playDuration); + + [VtblIndex(16)] + HRESULT SendHapticFeedbackForPlayCount([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity, [NativeTypeName("INT32")] int playCount, [NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan replayPauseInterval); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Id; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::Collections::__FIVectorView_1_Windows__CDevices__CHaptics__CSimpleHapticsControllerFeedback_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> get_SupportedFeedback; + + [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] + public delegate* unmanaged get_IsIntensitySupported; + + [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] + public delegate* unmanaged get_IsPlayCountSupported; + + [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] + public delegate* unmanaged get_IsPlayDurationSupported; + + [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] + public delegate* unmanaged get_IsReplayPauseIntervalSupported; + + [NativeTypeName("HRESULT () __attribute__((stdcall))")] + public delegate* unmanaged StopFeedback; + + [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *) __attribute__((stdcall))")] + public delegate* unmanaged SendHapticFeedback; + + [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *, DOUBLE) __attribute__((stdcall))")] + public delegate* unmanaged SendHapticFeedbackWithIntensity; + + [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *, DOUBLE, ABI::Windows::Foundation::TimeSpan) __attribute__((stdcall))")] + public delegate* unmanaged SendHapticFeedbackForDuration; + + [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *, DOUBLE, INT32, ABI::Windows::Foundation::TimeSpan) __attribute__((stdcall))")] + public delegate* unmanaged SendHapticFeedbackForPlayCount; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs new file mode 100644 index 0000000000..d368fcb6d7 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs @@ -0,0 +1,126 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("3D577EF8-4CEE-11E6-B535-001BDC06AB3B")] +[NativeTypeName("struct ISimpleHapticsControllerFeedback : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct ISimpleHapticsControllerFeedback : ISimpleHapticsControllerFeedback.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ISimpleHapticsControllerFeedback)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Waveform([NativeTypeName("UINT16 *")] ushort* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_Duration([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Waveform([NativeTypeName("UINT16 *")] ushort* value); + + [VtblIndex(7)] + HRESULT get_Duration([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] + public delegate* unmanaged get_Waveform; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan *) __attribute__((stdcall))")] + public delegate* unmanaged get_Duration; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs new file mode 100644 index 0000000000..7749ebac81 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs @@ -0,0 +1,126 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("40F21A3E-8844-47FF-B312-06185A3844DA")] +[NativeTypeName("struct IVibrationDevice : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IVibrationDevice : IVibrationDevice.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IVibrationDevice)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IVibrationDevice*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IVibrationDevice*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IVibrationDevice*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IVibrationDevice*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IVibrationDevice*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IVibrationDevice*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_Id(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IVibrationDevice*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_SimpleHapticsController([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsController **")] ISimpleHapticsController** value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IVibrationDevice*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_Id(HSTRING* value); + + [VtblIndex(7)] + HRESULT get_SimpleHapticsController([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsController **")] ISimpleHapticsController** value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_Id; + + [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsController **) __attribute__((stdcall))")] + public delegate* unmanaged get_SimpleHapticsController; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs new file mode 100644 index 0000000000..fbc7af2c16 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs @@ -0,0 +1,168 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("53E2EDED-2290-4AC9-8EB3-1A84122EB71C")] +[NativeTypeName("struct IVibrationDeviceStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IVibrationDeviceStatics : IVibrationDeviceStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IVibrationDeviceStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT RequestAccessAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationAccessStatus_t **")] IAsyncOperation** operation) + { + return ((delegate* unmanaged**, int>)(lpVtbl[6]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT GetDeviceSelector(HSTRING* result) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation) + { + return ((delegate* unmanaged**, int>)(lpVtbl[8]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), deviceId, operation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT GetDefaultAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation) + { + return ((delegate* unmanaged**, int>)(lpVtbl[9]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT FindAllAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1___FIVectorView_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation) + { + return ((delegate* unmanaged**, int>)(lpVtbl[10]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT RequestAccessAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationAccessStatus_t **")] IAsyncOperation** operation); + + [VtblIndex(7)] + HRESULT GetDeviceSelector(HSTRING* result); + + [VtblIndex(8)] + HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation); + + [VtblIndex(9)] + HRESULT GetDefaultAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation); + + [VtblIndex(10)] + HRESULT FindAllAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1___FIVectorView_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationAccessStatus_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> RequestAccessAsync; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetDeviceSelector; + + [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> FromIdAsync; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> GetDefaultAsync; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIAsyncOperation_1___FIVectorView_1_Windows__CDevices__CHaptics__CVibrationDevice_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> FindAllAsync; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/VibrationAccessStatus.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/VibrationAccessStatus.cs new file mode 100644 index 0000000000..e5384fa2fc --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/VibrationAccessStatus.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum VibrationAccessStatus +{ + /// + VibrationAccessStatus_Allowed = 0, + + /// + VibrationAccessStatus_DeniedByUser = 1, + + /// + VibrationAccessStatus_DeniedBySystem = 2, + + /// + VibrationAccessStatus_DeniedByEnergySaver = 3, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/WinRT.cs new file mode 100644 index 0000000000..bd2ee8454b --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/WinRT.cs @@ -0,0 +1,39 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[70]")] + public const string InterfaceName_Windows_Devices_Haptics_IKnownSimpleHapticsControllerWaveformsStatics = "Windows.Devices.Haptics.IKnownSimpleHapticsControllerWaveformsStatics"; + + [NativeTypeName("const WCHAR[71]")] + public const string InterfaceName_Windows_Devices_Haptics_IKnownSimpleHapticsControllerWaveformsStatics2 = "Windows.Devices.Haptics.IKnownSimpleHapticsControllerWaveformsStatics2"; + + [NativeTypeName("const WCHAR[49]")] + public const string InterfaceName_Windows_Devices_Haptics_ISimpleHapticsController = "Windows.Devices.Haptics.ISimpleHapticsController"; + + [NativeTypeName("const WCHAR[57]")] + public const string InterfaceName_Windows_Devices_Haptics_ISimpleHapticsControllerFeedback = "Windows.Devices.Haptics.ISimpleHapticsControllerFeedback"; + + [NativeTypeName("const WCHAR[41]")] + public const string InterfaceName_Windows_Devices_Haptics_IVibrationDevice = "Windows.Devices.Haptics.IVibrationDevice"; + + [NativeTypeName("const WCHAR[48]")] + public const string InterfaceName_Windows_Devices_Haptics_IVibrationDeviceStatics = "Windows.Devices.Haptics.IVibrationDeviceStatics"; + + [NativeTypeName("const WCHAR[62]")] + public const string RuntimeClass_Windows_Devices_Haptics_KnownSimpleHapticsControllerWaveforms = "Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms"; + + [NativeTypeName("const WCHAR[48]")] + public const string RuntimeClass_Windows_Devices_Haptics_SimpleHapticsController = "Windows.Devices.Haptics.SimpleHapticsController"; + + [NativeTypeName("const WCHAR[56]")] + public const string RuntimeClass_Windows_Devices_Haptics_SimpleHapticsControllerFeedback = "Windows.Devices.Haptics.SimpleHapticsControllerFeedback"; + + [NativeTypeName("const WCHAR[40]")] + public const string RuntimeClass_Windows_Devices_Haptics_VibrationDevice = "Windows.Devices.Haptics.VibrationDevice"; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs new file mode 100644 index 0000000000..43a0ebe82e --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IKnownSimpleHapticsControllerWaveformsStatics2Tests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics2).GUID, Is.EqualTo(IID_IKnownSimpleHapticsControllerWaveformsStatics2)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IKnownSimpleHapticsControllerWaveformsStatics2))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics2).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics2), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics2), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs new file mode 100644 index 0000000000..c0f93739cc --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IKnownSimpleHapticsControllerWaveformsStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics).GUID, Is.EqualTo(IID_IKnownSimpleHapticsControllerWaveformsStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IKnownSimpleHapticsControllerWaveformsStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs new file mode 100644 index 0000000000..be5ee9b11c --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class ISimpleHapticsControllerFeedbackTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(ISimpleHapticsControllerFeedback).GUID, Is.EqualTo(IID_ISimpleHapticsControllerFeedback)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ISimpleHapticsControllerFeedback))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(ISimpleHapticsControllerFeedback).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(ISimpleHapticsControllerFeedback), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(ISimpleHapticsControllerFeedback), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs new file mode 100644 index 0000000000..993be18026 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class ISimpleHapticsControllerTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(ISimpleHapticsController).GUID, Is.EqualTo(IID_ISimpleHapticsController)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ISimpleHapticsController))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(ISimpleHapticsController).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(ISimpleHapticsController), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(ISimpleHapticsController), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs new file mode 100644 index 0000000000..0a9085f08e --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IVibrationDeviceStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IVibrationDeviceStatics).GUID, Is.EqualTo(IID_IVibrationDeviceStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IVibrationDeviceStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IVibrationDeviceStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IVibrationDeviceStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IVibrationDeviceStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs new file mode 100644 index 0000000000..14d2ad4afa --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.haptics.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IVibrationDeviceTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IVibrationDevice).GUID, Is.EqualTo(IID_IVibrationDevice)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IVibrationDevice))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IVibrationDevice).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IVibrationDevice), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IVibrationDevice), Is.EqualTo(4)); + } + } +} From a886ccdd776ac7f54933fc81aa242b188f453924 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 16 Oct 2022 13:36:21 -0400 Subject: [PATCH 11/14] Add windows.devices.power.h --- .../winrt/windows.devices.power/generate.rsp | 19 ++ .../winrt/windows.devices.power/header.txt | 4 + .../winrt-windows.devices.power.h | 2 + .../winrt/windows.devices.power/IBattery.cs | 154 ++++++++++++++++ .../windows.devices.power/IBatteryReport.cs | 168 ++++++++++++++++++ .../windows.devices.power/IBatteryStatics.cs | 140 +++++++++++++++ .../WinRT/winrt/windows.devices.power/IID.cs | 83 +++++++++ .../winrt/windows.devices.power/WinRT.cs | 24 +++ .../IBatteryReportTests.cs | 50 ++++++ .../IBatteryStaticsTests.cs | 50 ++++++ .../windows.devices.power/IBatteryTests.cs | 50 ++++++ 11 files changed, 744 insertions(+) create mode 100644 generation/WinRT/winrt/windows.devices.power/generate.rsp create mode 100644 generation/WinRT/winrt/windows.devices.power/header.txt create mode 100644 generation/WinRT/winrt/windows.devices.power/winrt-windows.devices.power.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.devices.power/WinRT.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs diff --git a/generation/WinRT/winrt/windows.devices.power/generate.rsp b/generation/WinRT/winrt/windows.devices.power/generate.rsp new file mode 100644 index 0000000000..f4fb96af1a --- /dev/null +++ b/generation/WinRT/winrt/windows.devices.power/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.devices.power.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.devices.power +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.devices.power +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.devices.power.h diff --git a/generation/WinRT/winrt/windows.devices.power/header.txt b/generation/WinRT/winrt/windows.devices.power/header.txt new file mode 100644 index 0000000000..a71034b80f --- /dev/null +++ b/generation/WinRT/winrt/windows.devices.power/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.devices.power/winrt-windows.devices.power.h b/generation/WinRT/winrt/windows.devices.power/winrt-windows.devices.power.h new file mode 100644 index 0000000000..9df4f3ca97 --- /dev/null +++ b/generation/WinRT/winrt/windows.devices.power/winrt-windows.devices.power.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs new file mode 100644 index 0000000000..cb3c30125d --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs @@ -0,0 +1,154 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("BC894FC6-0072-47C8-8B5D-614AAA7A437E")] +[NativeTypeName("struct IBattery : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IBattery : IBattery.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IBattery)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IBattery*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IBattery*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IBattery*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IBattery*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IBattery*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IBattery*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_DeviceId(HSTRING* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IBattery*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT GetReport([NativeTypeName("ABI::Windows::Devices::Power::IBatteryReport **")] IBatteryReport** result) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IBattery*)Unsafe.AsPointer(ref this), result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT add_ReportUpdated([NativeTypeName("ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CDevices__CPower__CBattery_IInspectable_t *")] ITypedEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[8]))((IBattery*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT remove_ReportUpdated(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IBattery*)Unsafe.AsPointer(ref this), token); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_DeviceId(HSTRING* value); + + [VtblIndex(7)] + HRESULT GetReport([NativeTypeName("ABI::Windows::Devices::Power::IBatteryReport **")] IBatteryReport** result); + + [VtblIndex(8)] + HRESULT add_ReportUpdated([NativeTypeName("ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CDevices__CPower__CBattery_IInspectable_t *")] ITypedEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(9)] + HRESULT remove_ReportUpdated(EventRegistrationToken token); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged get_DeviceId; + + [NativeTypeName("HRESULT (ABI::Windows::Devices::Power::IBatteryReport **) __attribute__((stdcall))")] + public delegate* unmanaged GetReport; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CDevices__CPower__CBattery_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_ReportUpdated; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + public delegate* unmanaged remove_ReportUpdated; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs new file mode 100644 index 0000000000..8188b510ff --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs @@ -0,0 +1,168 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("C9858C3A-4E13-420A-A8D0-24F18F395401")] +[NativeTypeName("struct IBatteryReport : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IBatteryReport : IBatteryReport.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IBatteryReport)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IBatteryReport*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IBatteryReport*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IBatteryReport*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IBatteryReport*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IBatteryReport*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IBatteryReport*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_ChargeRateInMilliwatts([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) + { + return ((delegate* unmanaged**, int>)(lpVtbl[6]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT get_DesignCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) + { + return ((delegate* unmanaged**, int>)(lpVtbl[7]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT get_FullChargeCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) + { + return ((delegate* unmanaged**, int>)(lpVtbl[8]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT get_RemainingCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) + { + return ((delegate* unmanaged**, int>)(lpVtbl[9]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT get_Status([NativeTypeName("ABI::Windows::System::Power::BatteryStatus *")] BatteryStatus* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_ChargeRateInMilliwatts([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value); + + [VtblIndex(7)] + HRESULT get_DesignCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value); + + [VtblIndex(8)] + HRESULT get_FullChargeCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value); + + [VtblIndex(9)] + HRESULT get_RemainingCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value); + + [VtblIndex(10)] + HRESULT get_Status([NativeTypeName("ABI::Windows::System::Power::BatteryStatus *")] BatteryStatus* value); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> get_ChargeRateInMilliwatts; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> get_DesignCapacityInMilliwattHours; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> get_FullChargeCapacityInMilliwattHours; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> get_RemainingCapacityInMilliwattHours; + + [NativeTypeName("HRESULT (ABI::Windows::System::Power::BatteryStatus *) __attribute__((stdcall))")] + public delegate* unmanaged get_Status; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs new file mode 100644 index 0000000000..00ee4e2df7 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs @@ -0,0 +1,140 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("79CD72B6-9E5E-4452-BEA6-DFCD541E597F")] +[NativeTypeName("struct IBatteryStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IBatteryStatics : IBatteryStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IBatteryStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IBatteryStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IBatteryStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IBatteryStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IBatteryStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IBatteryStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IBatteryStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_AggregateBattery([NativeTypeName("ABI::Windows::Devices::Power::IBattery **")] IBattery** result) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IBatteryStatics*)Unsafe.AsPointer(ref this), result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CPower__CBattery_t **")] IAsyncOperation** result) + { + return ((delegate* unmanaged**, int>)(lpVtbl[7]))((IBatteryStatics*)Unsafe.AsPointer(ref this), deviceId, result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT GetDeviceSelector(HSTRING* result) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IBatteryStatics*)Unsafe.AsPointer(ref this), result); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_AggregateBattery([NativeTypeName("ABI::Windows::Devices::Power::IBattery **")] IBattery** result); + + [VtblIndex(7)] + HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CPower__CBattery_t **")] IAsyncOperation** result); + + [VtblIndex(8)] + HRESULT GetDeviceSelector(HSTRING* result); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Devices::Power::IBattery **) __attribute__((stdcall))")] + public delegate* unmanaged get_AggregateBattery; + + [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CPower__CBattery_t **) __attribute__((stdcall))")] + public delegate* unmanaged**, int> FromIdAsync; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetDeviceSelector; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.cs new file mode 100644 index 0000000000..8b4cf7c203 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.cs @@ -0,0 +1,83 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IBattery + { + get + { + ReadOnlySpan data = new byte[] { + 0xC6, 0x4F, 0x89, 0xBC, + 0x72, 0x00, + 0xC8, 0x47, + 0x8B, + 0x5D, + 0x61, + 0x4A, + 0xAA, + 0x7A, + 0x43, + 0x7E + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IBatteryReport + { + get + { + ReadOnlySpan data = new byte[] { + 0x3A, 0x8C, 0x85, 0xC9, + 0x13, 0x4E, + 0x0A, 0x42, + 0xA8, + 0xD0, + 0x24, + 0xF1, + 0x8F, + 0x39, + 0x54, + 0x01 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IBatteryStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0xB6, 0x72, 0xCD, 0x79, + 0x5E, 0x9E, + 0x52, 0x44, + 0xBE, + 0xA6, + 0xDF, + 0xCD, + 0x54, + 0x1E, + 0x59, + 0x7F + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/WinRT.cs new file mode 100644 index 0000000000..44da411e87 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/WinRT.cs @@ -0,0 +1,24 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[31]")] + public const string InterfaceName_Windows_Devices_Power_IBattery = "Windows.Devices.Power.IBattery"; + + [NativeTypeName("const WCHAR[37]")] + public const string InterfaceName_Windows_Devices_Power_IBatteryReport = "Windows.Devices.Power.IBatteryReport"; + + [NativeTypeName("const WCHAR[38]")] + public const string InterfaceName_Windows_Devices_Power_IBatteryStatics = "Windows.Devices.Power.IBatteryStatics"; + + [NativeTypeName("const WCHAR[30]")] + public const string RuntimeClass_Windows_Devices_Power_Battery = "Windows.Devices.Power.Battery"; + + [NativeTypeName("const WCHAR[36]")] + public const string RuntimeClass_Windows_Devices_Power_BatteryReport = "Windows.Devices.Power.BatteryReport"; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs new file mode 100644 index 0000000000..30e3f04fde --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IBatteryReportTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IBatteryReport).GUID, Is.EqualTo(IID_IBatteryReport)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBatteryReport))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IBatteryReport).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IBatteryReport), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IBatteryReport), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs new file mode 100644 index 0000000000..de3a8187f5 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IBatteryStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IBatteryStatics).GUID, Is.EqualTo(IID_IBatteryStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBatteryStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IBatteryStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IBatteryStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IBatteryStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs new file mode 100644 index 0000000000..693e78f8f2 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.devices.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IBatteryTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IBattery).GUID, Is.EqualTo(IID_IBattery)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBattery))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IBattery).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IBattery), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IBattery), Is.EqualTo(4)); + } + } +} From d7cd232977364a43edb99132c6ea7919eae1bf7e Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 16 Oct 2022 13:40:20 -0400 Subject: [PATCH 12/14] Add windows.system.power.h --- TerraFX.Interop.Windows.sln | 16 + .../winrt/windows.system.power/generate.rsp | 19 ++ .../winrt/windows.system.power/header.txt | 4 + .../winrt-windows.system.power.h | 2 + .../windows.system.power/BatteryStatus.cs | 22 ++ .../windows.system.power/EnergySaverStatus.cs | 19 ++ .../IBackgroundEnergyManagerStatics.cs | 303 +++++++++++++++++ .../IForegroundEnergyManagerStatics.cs | 269 +++++++++++++++ .../WinRT/winrt/windows.system.power/IID.cs | 83 +++++ .../IPowerManagerStatics.cs | 308 ++++++++++++++++++ .../windows.system.power/PowerSupplyStatus.cs | 19 ++ .../WinRT/winrt/windows.system.power/WinRT.cs | 29 ++ .../IBackgroundEnergyManagerStaticsTests.cs | 50 +++ .../IForegroundEnergyManagerStaticsTests.cs | 50 +++ .../IPowerManagerStaticsTests.cs | 50 +++ 15 files changed, 1243 insertions(+) create mode 100644 generation/WinRT/winrt/windows.system.power/generate.rsp create mode 100644 generation/WinRT/winrt/windows.system.power/header.txt create mode 100644 generation/WinRT/winrt/windows.system.power/winrt-windows.system.power.h create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/BatteryStatus.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/EnergySaverStatus.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/PowerSupplyStatus.cs create mode 100644 sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs create mode 100644 tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 8bc9bc8ec0..ea98c4532a 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -3123,6 +3123,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.devices.haptics", " generation\WinRT\winrt\windows.devices.haptics\winrt-windows.devices.haptics.h = generation\WinRT\winrt\windows.devices.haptics\winrt-windows.devices.haptics.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.devices.power", "windows.devices.power", "{B9B6668A-10CD-451A-8B5B-0C0DC12213AD}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.devices.power\generate.rsp = generation\WinRT\winrt\windows.devices.power\generate.rsp + generation\WinRT\winrt\windows.devices.power\header.txt = generation\WinRT\winrt\windows.devices.power\header.txt + generation\WinRT\winrt\windows.devices.power\winrt-windows.devices.power.h = generation\WinRT\winrt\windows.devices.power\winrt-windows.devices.power.h + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows.system.power", "windows.system.power", "{5C9AEBD7-5857-4641-9F8C-D16680230BD9}" + ProjectSection(SolutionItems) = preProject + generation\WinRT\winrt\windows.system.power\generate.rsp = generation\WinRT\winrt\windows.system.power\generate.rsp + generation\WinRT\winrt\windows.system.power\header.txt = generation\WinRT\winrt\windows.system.power\header.txt + generation\WinRT\winrt\windows.system.power\winrt-windows.system.power.h = generation\WinRT\winrt\windows.system.power\winrt-windows.system.power.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3601,6 +3615,8 @@ Global {E1CE167B-DD40-4955-84F0-64D55CAACA00} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {7523C542-E0CD-42F9-93C4-B593179B378C} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {48C596B5-7E3C-46A8-A0B1-ACC1960234F3} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {B9B6668A-10CD-451A-8B5B-0C0DC12213AD} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {5C9AEBD7-5857-4641-9F8C-D16680230BD9} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/WinRT/winrt/windows.system.power/generate.rsp b/generation/WinRT/winrt/windows.system.power/generate.rsp new file mode 100644 index 0000000000..5a7934afe1 --- /dev/null +++ b/generation/WinRT/winrt/windows.system.power/generate.rsp @@ -0,0 +1,19 @@ +@../../../settings.rsp +@../../../remap.rsp +--exclude +CHECK_NS_PREFIX_STATE +DEPRECATEDENUMERATOR +WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION +WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION +--file +winrt-windows.system.power.h +--methodClassName +WinRT +--namespace +TerraFX.Interop.WinRT +--output +../../../../sources/Interop/Windows/WinRT/winrt/windows.system.power +--test-output +../../../../tests/Interop/Windows/WinRT/winrt/windows.system.power +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt/windows.system.power.h diff --git a/generation/WinRT/winrt/windows.system.power/header.txt b/generation/WinRT/winrt/windows.system.power/header.txt new file mode 100644 index 0000000000..77e5b8196f --- /dev/null +++ b/generation/WinRT/winrt/windows.system.power/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/WinRT/winrt/windows.system.power/winrt-windows.system.power.h b/generation/WinRT/winrt/windows.system.power/winrt-windows.system.power.h new file mode 100644 index 0000000000..bb37897043 --- /dev/null +++ b/generation/WinRT/winrt/windows.system.power/winrt-windows.system.power.h @@ -0,0 +1,2 @@ +#include "..\..\..\TerraFX.h" +#include diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/BatteryStatus.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/BatteryStatus.cs new file mode 100644 index 0000000000..1c2d7c3b24 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/BatteryStatus.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum BatteryStatus +{ + /// + BatteryStatus_NotPresent = 0, + + /// + BatteryStatus_Discharging = 1, + + /// + BatteryStatus_Idle = 2, + + /// + BatteryStatus_Charging = 3, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/EnergySaverStatus.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/EnergySaverStatus.cs new file mode 100644 index 0000000000..796701ce3d --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/EnergySaverStatus.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum EnergySaverStatus +{ + /// + EnergySaverStatus_Disabled = 0, + + /// + EnergySaverStatus_Off = 1, + + /// + EnergySaverStatus_On = 2, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs new file mode 100644 index 0000000000..ebcb2c6b71 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs @@ -0,0 +1,303 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("B3161D95-1180-4376-96E1-4095568147CE")] +[NativeTypeName("struct IBackgroundEnergyManagerStatics : IInspectable")] +[NativeInheritance("IInspectable")] +[Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] +public unsafe partial struct IBackgroundEnergyManagerStatics : IBackgroundEnergyManagerStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IBackgroundEnergyManagerStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_NearTerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_TerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[14]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[16]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(7)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(8)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(9)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(10)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_NearTerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(11)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_TerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(12)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(13)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(14)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(15)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token); + + [VtblIndex(16)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(17)] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_LowUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_NearMaxAcceptableUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_MaxAcceptableUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_ExcessiveUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_NearTerminationUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_TerminationUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_RecentEnergyUsage; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_RecentEnergyUsageLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageIncreased; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged remove_RecentEnergyUsageIncreased; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageReturnedToLow; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged remove_RecentEnergyUsageReturnedToLow; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs new file mode 100644 index 0000000000..2fa735fcd4 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs @@ -0,0 +1,269 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("9FF86872-E677-4814-9A20-5337CA732B98")] +[NativeTypeName("struct IForegroundEnergyManagerStatics : IInspectable")] +[NativeInheritance("IInspectable")] +[Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] +public unsafe partial struct IForegroundEnergyManagerStatics : IForegroundEnergyManagerStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IForegroundEnergyManagerStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[12]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[14]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(7)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(8)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(9)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(10)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(11)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value); + + [VtblIndex(12)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(13)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token); + + [VtblIndex(14)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(15)] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_LowUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_NearMaxAcceptableUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_MaxAcceptableUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_ExcessiveUsageLevel; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_RecentEnergyUsage; + + [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged get_RecentEnergyUsageLevel; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageIncreased; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged remove_RecentEnergyUsageIncreased; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageReturnedToLow; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public delegate* unmanaged remove_RecentEnergyUsageReturnedToLow; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.cs new file mode 100644 index 0000000000..02e8a10b33 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.cs @@ -0,0 +1,83 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows; + +public static unsafe partial class IID +{ + public static ref readonly Guid IID_IBackgroundEnergyManagerStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0x95, 0x1D, 0x16, 0xB3, + 0x80, 0x11, + 0x76, 0x43, + 0x96, + 0xE1, + 0x40, + 0x95, + 0x56, + 0x81, + 0x47, + 0xCE + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IForegroundEnergyManagerStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0x72, 0x68, 0xF8, 0x9F, + 0x77, 0xE6, + 0x14, 0x48, + 0x9A, + 0x20, + 0x53, + 0x37, + 0xCA, + 0x73, + 0x2B, + 0x98 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IPowerManagerStatics + { + get + { + ReadOnlySpan data = new byte[] { + 0x5D, 0x82, 0x94, 0x13, + 0xCE, 0x62, + 0x64, 0x43, + 0x98, + 0xD5, + 0xAA, + 0x28, + 0xC7, + 0xFB, + 0xD1, + 0x5B + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs new file mode 100644 index 0000000000..472bd2b30c --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs @@ -0,0 +1,308 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT; + +/// +[Guid("1394825D-62CE-4364-98D5-AA28C7FBD15B")] +[NativeTypeName("struct IPowerManagerStatics : IInspectable")] +[NativeInheritance("IInspectable")] +public unsafe partial struct IPowerManagerStatics : IPowerManagerStatics.Interface, INativeGuid +{ + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IPowerManagerStatics)); + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HRESULT GetRuntimeClassName(HSTRING* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), className); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HRESULT GetTrustLevel(TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HRESULT get_EnergySaverStatus([NativeTypeName("ABI::Windows::System::Power::EnergySaverStatus *")] EnergySaverStatus* value) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HRESULT add_EnergySaverStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[7]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT remove_EnergySaverStatusChanged(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT get_BatteryStatus([NativeTypeName("ABI::Windows::System::Power::BatteryStatus *")] BatteryStatus* value) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HRESULT add_BatteryStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[10]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public HRESULT remove_BatteryStatusChanged(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HRESULT get_PowerSupplyStatus([NativeTypeName("ABI::Windows::System::Power::PowerSupplyStatus *")] PowerSupplyStatus* value) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT add_PowerSupplyStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[13]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HRESULT remove_PowerSupplyStatusChanged(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT get_RemainingChargePercent([NativeTypeName("INT32 *")] int* value) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HRESULT add_RemainingChargePercentChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[16]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public HRESULT remove_RemainingChargePercentChanged(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public HRESULT get_RemainingDischargeTime([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] + public HRESULT add_RemainingDischargeTimeChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) + { + return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[19]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] + public HRESULT remove_RemainingDischargeTimeChanged(EventRegistrationToken token) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + } + + public interface Interface : IInspectable.Interface + { + [VtblIndex(6)] + HRESULT get_EnergySaverStatus([NativeTypeName("ABI::Windows::System::Power::EnergySaverStatus *")] EnergySaverStatus* value); + + [VtblIndex(7)] + HRESULT add_EnergySaverStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(8)] + HRESULT remove_EnergySaverStatusChanged(EventRegistrationToken token); + + [VtblIndex(9)] + HRESULT get_BatteryStatus([NativeTypeName("ABI::Windows::System::Power::BatteryStatus *")] BatteryStatus* value); + + [VtblIndex(10)] + HRESULT add_BatteryStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(11)] + HRESULT remove_BatteryStatusChanged(EventRegistrationToken token); + + [VtblIndex(12)] + HRESULT get_PowerSupplyStatus([NativeTypeName("ABI::Windows::System::Power::PowerSupplyStatus *")] PowerSupplyStatus* value); + + [VtblIndex(13)] + HRESULT add_PowerSupplyStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(14)] + HRESULT remove_PowerSupplyStatusChanged(EventRegistrationToken token); + + [VtblIndex(15)] + HRESULT get_RemainingChargePercent([NativeTypeName("INT32 *")] int* value); + + [VtblIndex(16)] + HRESULT add_RemainingChargePercentChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(17)] + HRESULT remove_RemainingChargePercentChanged(EventRegistrationToken token); + + [VtblIndex(18)] + HRESULT get_RemainingDischargeTime([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value); + + [VtblIndex(19)] + HRESULT add_RemainingDischargeTimeChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); + + [VtblIndex(20)] + HRESULT remove_RemainingDischargeTimeChanged(EventRegistrationToken token); + } + + public partial struct Vtbl + where TSelf : unmanaged, Interface + { + [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] + public delegate* unmanaged QueryInterface; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged AddRef; + + [NativeTypeName("ULONG () __attribute__((stdcall))")] + public delegate* unmanaged Release; + + [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] + public delegate* unmanaged GetIids; + + [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] + public delegate* unmanaged GetRuntimeClassName; + + [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] + public delegate* unmanaged GetTrustLevel; + + [NativeTypeName("HRESULT (ABI::Windows::System::Power::EnergySaverStatus *) __attribute__((stdcall))")] + public delegate* unmanaged get_EnergySaverStatus; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_EnergySaverStatusChanged; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + public delegate* unmanaged remove_EnergySaverStatusChanged; + + [NativeTypeName("HRESULT (ABI::Windows::System::Power::BatteryStatus *) __attribute__((stdcall))")] + public delegate* unmanaged get_BatteryStatus; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_BatteryStatusChanged; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + public delegate* unmanaged remove_BatteryStatusChanged; + + [NativeTypeName("HRESULT (ABI::Windows::System::Power::PowerSupplyStatus *) __attribute__((stdcall))")] + public delegate* unmanaged get_PowerSupplyStatus; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_PowerSupplyStatusChanged; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + public delegate* unmanaged remove_PowerSupplyStatusChanged; + + [NativeTypeName("HRESULT (INT32 *) __attribute__((stdcall))")] + public delegate* unmanaged get_RemainingChargePercent; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_RemainingChargePercentChanged; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + public delegate* unmanaged remove_RemainingChargePercentChanged; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan *) __attribute__((stdcall))")] + public delegate* unmanaged get_RemainingDischargeTime; + + [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] + public delegate* unmanaged*, EventRegistrationToken*, int> add_RemainingDischargeTimeChanged; + + [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] + public delegate* unmanaged remove_RemainingDischargeTimeChanged; + } +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/PowerSupplyStatus.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/PowerSupplyStatus.cs new file mode 100644 index 0000000000..96528eb797 --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/PowerSupplyStatus.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +/// +public enum PowerSupplyStatus +{ + /// + PowerSupplyStatus_NotPresent = 0, + + /// + PowerSupplyStatus_Inadequate = 1, + + /// + PowerSupplyStatus_Adequate = 2, +} diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs new file mode 100644 index 0000000000..543ca3489f --- /dev/null +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs @@ -0,0 +1,29 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.WinRT; + +public static partial class WinRT +{ + [NativeTypeName("const WCHAR[53]")] + public const string InterfaceName_Windows_System_Power_IBackgroundEnergyManagerStatics = "Windows.System.Power.IBackgroundEnergyManagerStatics"; + + [NativeTypeName("const WCHAR[53]")] + public const string InterfaceName_Windows_System_Power_IForegroundEnergyManagerStatics = "Windows.System.Power.IForegroundEnergyManagerStatics"; + + [NativeTypeName("const WCHAR[42]")] + public const string InterfaceName_Windows_System_Power_IPowerManagerStatics = "Windows.System.Power.IPowerManagerStatics"; + + [NativeTypeName("const WCHAR[45]")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + public const string RuntimeClass_Windows_System_Power_BackgroundEnergyManager = "Windows.System.Power.BackgroundEnergyManager"; + + [NativeTypeName("const WCHAR[45]")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + public const string RuntimeClass_Windows_System_Power_ForegroundEnergyManager = "Windows.System.Power.ForegroundEnergyManager"; + + [NativeTypeName("const WCHAR[34]")] + public const string RuntimeClass_Windows_System_Power_PowerManager = "Windows.System.Power.PowerManager"; +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs new file mode 100644 index 0000000000..6ee9112d16 --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IBackgroundEnergyManagerStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IBackgroundEnergyManagerStatics).GUID, Is.EqualTo(IID_IBackgroundEnergyManagerStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBackgroundEnergyManagerStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IBackgroundEnergyManagerStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IBackgroundEnergyManagerStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IBackgroundEnergyManagerStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs new file mode 100644 index 0000000000..939e96de2b --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IForegroundEnergyManagerStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IForegroundEnergyManagerStatics).GUID, Is.EqualTo(IID_IForegroundEnergyManagerStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IForegroundEnergyManagerStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IForegroundEnergyManagerStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IForegroundEnergyManagerStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IForegroundEnergyManagerStatics), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs new file mode 100644 index 0000000000..6222f0715b --- /dev/null +++ b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows.IID; + +namespace TerraFX.Interop.WinRT.UnitTests; + +/// Provides validation of the struct. +public static unsafe partial class IPowerManagerStaticsTests +{ + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IPowerManagerStatics).GUID, Is.EqualTo(IID_IPowerManagerStatics)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPowerManagerStatics))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IPowerManagerStatics).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IPowerManagerStatics), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IPowerManagerStatics), Is.EqualTo(4)); + } + } +} From 7bcdabce383679255e192c6e26bd2cf15f0b53c1 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Sun, 24 Dec 2023 07:46:31 -0800 Subject: [PATCH 13/14] Fixup the excludes and remappings --- .../windows.devices.haptics/generate.rsp | 18 ++++++++ .../winrt/windows.devices.power/generate.rsp | 7 ++++ .../windows.foundation.metadata/generate.rsp | 1 + .../winrt/windows.foundation/generate.rsp | 41 +++++++++++++++++++ .../windows.graphics.effects/generate.rsp | 2 + .../WinRT/winrt/windows.graphics/generate.rsp | 1 + .../winrt/windows.system.power/generate.rsp | 4 ++ .../WinRT/winrt/windows.ui/generate.rsp | 7 ++++ generation/remap-types.rsp | 36 ++++++++++++++++ 9 files changed, 117 insertions(+) diff --git a/generation/WinRT/winrt/windows.devices.haptics/generate.rsp b/generation/WinRT/winrt/windows.devices.haptics/generate.rsp index 6fb36ef163..5fe3e8f228 100644 --- a/generation/WinRT/winrt/windows.devices.haptics/generate.rsp +++ b/generation/WinRT/winrt/windows.devices.haptics/generate.rsp @@ -1,8 +1,26 @@ @../../../settings.rsp @../../../remap.rsp --exclude +ABI::Windows::Foundation::Collections::IIterable +ABI::Windows::Foundation::Collections::IIterable +ABI::Windows::Foundation::Collections::IIterator +ABI::Windows::Foundation::Collections::IIterator +ABI::Windows::Foundation::Collections::IVectorView +ABI::Windows::Foundation::Collections::IVectorView +ABI::Windows::Foundation::IAsyncOperation +ABI::Windows::Foundation::IAsyncOperation +ABI::Windows::Foundation::IAsyncOperation *> +ABI::Windows::Foundation::IAsyncOperationCompletedHandler +ABI::Windows::Foundation::IAsyncOperationCompletedHandler +ABI::Windows::Foundation::IAsyncOperationCompletedHandler *> CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IKnownSimpleHapticsControllerWaveformsStatics +IID_IKnownSimpleHapticsControllerWaveformsStatics2 +IID_ISimpleHapticsController +IID_ISimpleHapticsControllerFeedback +IID_IVibrationDevice +IID_IVibrationDeviceStatics WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/WinRT/winrt/windows.devices.power/generate.rsp b/generation/WinRT/winrt/windows.devices.power/generate.rsp index f4fb96af1a..a8d39d213c 100644 --- a/generation/WinRT/winrt/windows.devices.power/generate.rsp +++ b/generation/WinRT/winrt/windows.devices.power/generate.rsp @@ -1,8 +1,15 @@ @../../../settings.rsp @../../../remap.rsp --exclude +ABI::Windows::Foundation::IAsyncOperation +ABI::Windows::Foundation::IAsyncOperationCompletedHandler +ABI::Windows::Foundation::IReference +ABI::Windows::Foundation::ITypedEventHandler CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IBattery +IID_IBatteryReport +IID_IBatteryStatics WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/WinRT/winrt/windows.foundation.metadata/generate.rsp b/generation/WinRT/winrt/windows.foundation.metadata/generate.rsp index ee93a57ccb..4a97cd5090 100644 --- a/generation/WinRT/winrt/windows.foundation.metadata/generate.rsp +++ b/generation/WinRT/winrt/windows.foundation.metadata/generate.rsp @@ -3,6 +3,7 @@ --exclude CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IApiInformationStatics WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/WinRT/winrt/windows.foundation/generate.rsp b/generation/WinRT/winrt/windows.foundation/generate.rsp index e9518b4cfe..cf39f3c17a 100644 --- a/generation/WinRT/winrt/windows.foundation/generate.rsp +++ b/generation/WinRT/winrt/windows.foundation/generate.rsp @@ -1,8 +1,49 @@ @../../../settings.rsp @../../../remap.rsp --exclude +ABI::Windows::Foundation::Collections::IIterable *> +ABI::Windows::Foundation::Collections::IIterable *> +ABI::Windows::Foundation::Collections::IIterable +ABI::Windows::Foundation::Collections::IIterator *> +ABI::Windows::Foundation::Collections::IIterator *> +ABI::Windows::Foundation::Collections::IIterator +ABI::Windows::Foundation::Collections::IKeyValuePair +ABI::Windows::Foundation::Collections::IKeyValuePair +ABI::Windows::Foundation::Collections::IMap +ABI::Windows::Foundation::Collections::IMap +ABI::Windows::Foundation::Collections::IMapChangedEventArgs +ABI::Windows::Foundation::Collections::IMapView +ABI::Windows::Foundation::Collections::IMapView +ABI::Windows::Foundation::Collections::IObservableMap +ABI::Windows::Foundation::Collections::IObservableMap +ABI::Windows::Foundation::Collections::IVectorView +ABI::Windows::Foundation::Collections::MapChangedEventHandler +ABI::Windows::Foundation::Collections::MapChangedEventHandler +ABI::Windows::Foundation::ITypedEventHandler CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IAsyncAction +IID_IAsyncActionCompletedHandler +IID_IClosable +IID_IDeferral +IID_IDeferralCompletedHandler +IID_IDeferralFactory +IID_IGetActivationFactory +IID_IGuidHelperStatics +IID_IMemoryBuffer +IID_IMemoryBufferFactory +IID_IMemoryBufferReference +IID_IPropertySet +IID_IPropertyValue +IID_IPropertyValueStatics +IID_IStringable +IID_IUriEscapeStatics +IID_IUriRuntimeClass +IID_IUriRuntimeClassFactory +IID_IUriRuntimeClassWithAbsoluteCanonicalUri +IID_IWwwFormUrlDecoderEntry +IID_IWwwFormUrlDecoderRuntimeClass +IID_IWwwFormUrlDecoderRuntimeClassFactory WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/WinRT/winrt/windows.graphics.effects/generate.rsp b/generation/WinRT/winrt/windows.graphics.effects/generate.rsp index c724f88d6b..5fdc1c062d 100644 --- a/generation/WinRT/winrt/windows.graphics.effects/generate.rsp +++ b/generation/WinRT/winrt/windows.graphics.effects/generate.rsp @@ -3,6 +3,8 @@ --exclude CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IGraphicsEffect +IID_IGraphicsEffectSource WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/WinRT/winrt/windows.graphics/generate.rsp b/generation/WinRT/winrt/windows.graphics/generate.rsp index 6b0d283681..0fd3b45fed 100644 --- a/generation/WinRT/winrt/windows.graphics/generate.rsp +++ b/generation/WinRT/winrt/windows.graphics/generate.rsp @@ -3,6 +3,7 @@ --exclude CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IGeometrySource2D WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/WinRT/winrt/windows.system.power/generate.rsp b/generation/WinRT/winrt/windows.system.power/generate.rsp index 5a7934afe1..4691c107c9 100644 --- a/generation/WinRT/winrt/windows.system.power/generate.rsp +++ b/generation/WinRT/winrt/windows.system.power/generate.rsp @@ -1,8 +1,12 @@ @../../../settings.rsp @../../../remap.rsp --exclude +ABI::Windows::Foundation::IEventHandler CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IBackgroundEnergyManagerStatics +IID_IForegroundEnergyManagerStatics +IID_IPowerManagerStatics WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/WinRT/winrt/windows.ui/generate.rsp b/generation/WinRT/winrt/windows.ui/generate.rsp index 2f2086619e..83f18f3ed6 100644 --- a/generation/WinRT/winrt/windows.ui/generate.rsp +++ b/generation/WinRT/winrt/windows.ui/generate.rsp @@ -3,6 +3,13 @@ --exclude CHECK_NS_PREFIX_STATE DEPRECATEDENUMERATOR +IID_IColorHelper +IID_IColorHelperStatics +IID_IColorHelperStatics2 +IID_IColors +IID_IColorsStatics +IID_IUIContentRoot +IID_IUIContext WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION --file diff --git a/generation/remap-types.rsp b/generation/remap-types.rsp index aaa7608af4..13dd3ecceb 100644 --- a/generation/remap-types.rsp +++ b/generation/remap-types.rsp @@ -1,4 +1,40 @@ --remap +ABI::Windows::Foundation::Collections::IIterable=IIterable +ABI::Windows::Foundation::Collections::IIterable=IIterable +ABI::Windows::Foundation::Collections::IIterable *>=IIterable +ABI::Windows::Foundation::Collections::IIterable *>=IIterable +ABI::Windows::Foundation::Collections::IIterable=IIterable +ABI::Windows::Foundation::Collections::IIterator=IIterator +ABI::Windows::Foundation::Collections::IIterator=IIterator +ABI::Windows::Foundation::Collections::IIterator *>=IIterator +ABI::Windows::Foundation::Collections::IIterator *>=IIterator +ABI::Windows::Foundation::Collections::IIterator=IIterator +ABI::Windows::Foundation::Collections::IKeyValuePair=IKeyValuePair +ABI::Windows::Foundation::Collections::IKeyValuePair=IKeyValuePair +ABI::Windows::Foundation::Collections::IMap=IMap +ABI::Windows::Foundation::Collections::IMap=IMap +ABI::Windows::Foundation::Collections::IMapChangedEventArgs=IMapChangedEventArgs +ABI::Windows::Foundation::Collections::IMapView=IMapView +ABI::Windows::Foundation::Collections::IMapView=IMapView +ABI::Windows::Foundation::Collections::IObservableMap=IObservableMap +ABI::Windows::Foundation::Collections::IObservableMap=IObservableMap +ABI::Windows::Foundation::Collections::IVectorView=IVectorView +ABI::Windows::Foundation::Collections::IVectorView=IVectorView +ABI::Windows::Foundation::Collections::IVectorView=IVectorView +ABI::Windows::Foundation::Collections::MapChangedEventHandler=MapChangedEventHandler +ABI::Windows::Foundation::Collections::MapChangedEventHandler=MapChangedEventHandler +ABI::Windows::Foundation::IAsyncOperation=IAsyncOperation +ABI::Windows::Foundation::IAsyncOperation=IAsyncOperation +ABI::Windows::Foundation::IAsyncOperation=IAsyncOperation +ABI::Windows::Foundation::IAsyncOperation *>=IAsyncOperation +ABI::Windows::Foundation::IAsyncOperationCompletedHandler=IAsyncOperationCompletedHandler +ABI::Windows::Foundation::IAsyncOperationCompletedHandler=IAsyncOperationCompletedHandler +ABI::Windows::Foundation::IAsyncOperationCompletedHandler=IAsyncOperationCompletedHandler +ABI::Windows::Foundation::IAsyncOperationCompletedHandler *>=IAsyncOperationCompletedHandler +ABI::Windows::Foundation::IEventHandler=IEventHandler +ABI::Windows::Foundation::IReference=IReference +ABI::Windows::Foundation::ITypedEventHandler=ITypedEventHandler +ABI::Windows::Foundation::ITypedEventHandler=ITypedEventHandler addrinfo=ADDRINFOA addrinfoex2A=ADDRINFOEX2A addrinfoex2W=ADDRINFOEX2W From 923859368ac7e7e15589443cf8842a74fc3a0ff1 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Sun, 24 Dec 2023 07:53:25 -0800 Subject: [PATCH 14/14] Regenerating bindings using the latest version of ClangSharp --- .../{IID.cs => IID.Manual.cs} | 24 +- ...SimpleHapticsControllerWaveformsStatics.cs | 44 +- ...impleHapticsControllerWaveformsStatics2.cs | 64 +- .../ISimpleHapticsController.cs | 68 +- .../ISimpleHapticsControllerFeedback.cs | 32 +- .../IVibrationDevice.cs | 32 +- .../IVibrationDeviceStatics.cs | 44 +- .../winrt/windows.devices.power/IBattery.cs | 40 +- .../windows.devices.power/IBatteryReport.cs | 44 +- .../windows.devices.power/IBatteryStatics.cs | 36 +- .../{IID.cs => IID.Manual.cs} | 12 +- .../IApiInformationStatics.cs | 64 +- .../{IID.cs => IID.Manual.cs} | 4 +- .../winrt/windows.foundation/IAsyncAction.cs | 36 +- .../IAsyncActionCompletedHandler.cs | 18 +- .../winrt/windows.foundation/IClosable.cs | 28 +- .../winrt/windows.foundation/IDeferral.cs | 28 +- .../IDeferralCompletedHandler.cs | 16 +- .../windows.foundation/IDeferralFactory.cs | 28 +- .../IGetActivationFactory.cs | 28 +- .../windows.foundation/IGuidHelperStatics.cs | 36 +- .../{IID.cs => IID.Manual.cs} | 88 +-- .../winrt/windows.foundation/IMemoryBuffer.cs | 28 +- .../IMemoryBufferFactory.cs | 28 +- .../IMemoryBufferReference.cs | 36 +- .../winrt/windows.foundation/IPropertySet.cs | 24 +- .../windows.foundation/IPropertyValue.cs | 188 +++--- .../IPropertyValueStatics.cs | 188 +++--- .../winrt/windows.foundation/IStringable.cs | 28 +- .../windows.foundation/IUriEscapeStatics.cs | 32 +- .../windows.foundation/IUriRuntimeClass.cs | 92 +-- .../IUriRuntimeClassFactory.cs | 32 +- ...UriRuntimeClassWithAbsoluteCanonicalUri.cs | 32 +- .../IWwwFormUrlDecoderEntry.cs | 32 +- .../IWwwFormUrlDecoderRuntimeClass.cs | 28 +- .../IWwwFormUrlDecoderRuntimeClassFactory.cs | 28 +- .../IGraphicsEffect.cs | 32 +- .../IGraphicsEffectSource.cs | 24 +- .../{IID.cs => IID.Manual.cs} | 8 +- .../windows.graphics/IGeometrySource2D.cs | 24 +- .../{IID.cs => IID.Manual.cs} | 4 +- .../IBackgroundEnergyManagerStatics.cs | 146 ++--- .../IForegroundEnergyManagerStatics.cs | 126 ++-- .../{IID.cs => IID.Manual.cs} | 12 +- .../IPowerManagerStatics.cs | 84 +-- .../WinRT/winrt/windows.system.power/WinRT.cs | 6 +- .../WinRT/winrt/windows.ui/IColorHelper.cs | 24 +- .../winrt/windows.ui/IColorHelperStatics.cs | 28 +- .../winrt/windows.ui/IColorHelperStatics2.cs | 28 +- .../Windows/WinRT/winrt/windows.ui/IColors.cs | 24 +- .../WinRT/winrt/windows.ui/IColorsStatics.cs | 588 +++++++++--------- .../windows.ui/{IID.cs => IID.Manual.cs} | 28 +- .../WinRT/winrt/windows.ui/IUIContentRoot.cs | 28 +- .../WinRT/winrt/windows.ui/IUIContext.cs | 24 +- ...HapticsControllerWaveformsStatics2Tests.cs | 28 - ...eHapticsControllerWaveformsStaticsTests.cs | 28 - .../ISimpleHapticsControllerFeedbackTests.cs | 28 - .../ISimpleHapticsControllerTests.cs | 28 - .../IVibrationDeviceStaticsTests.cs | 28 - .../IVibrationDeviceTests.cs | 28 - .../IBatteryReportTests.cs | 28 - .../IBatteryStaticsTests.cs | 28 - .../windows.devices.power/IBatteryTests.cs | 28 - .../IApiInformationStaticsTests.cs | 28 - .../Matrix3x2Tests.cs | 34 - .../Matrix4x4Tests.cs | 34 - .../windows.foundation.numerics/PlaneTests.cs | 34 - .../QuaternionTests.cs | 34 - .../RationalTests.cs | 34 - .../Vector2Tests.cs | 34 - .../Vector3Tests.cs | 34 - .../Vector4Tests.cs | 34 - .../winrt/windows.foundation/DateTimeTests.cs | 34 - .../IAsyncActionCompletedHandlerTests.cs | 28 - .../windows.foundation/IAsyncActionTests.cs | 28 - .../windows.foundation/IClosableTests.cs | 28 - .../IDeferralCompletedHandlerTests.cs | 28 - .../IDeferralFactoryTests.cs | 28 - .../windows.foundation/IDeferralTests.cs | 28 - .../IGetActivationFactoryTests.cs | 28 - .../IGuidHelperStaticsTests.cs | 28 - .../IMemoryBufferFactoryTests.cs | 28 - .../IMemoryBufferReferenceTests.cs | 28 - .../windows.foundation/IMemoryBufferTests.cs | 28 - .../windows.foundation/IPropertySetTests.cs | 28 - .../IPropertyValueStaticsTests.cs | 28 - .../windows.foundation/IPropertyValueTests.cs | 28 - .../windows.foundation/IStringableTests.cs | 28 - .../IUriEscapeStaticsTests.cs | 28 - .../IUriRuntimeClassFactoryTests.cs | 28 - .../IUriRuntimeClassTests.cs | 28 - ...ntimeClassWithAbsoluteCanonicalUriTests.cs | 28 - .../IWwwFormUrlDecoderEntryTests.cs | 28 - ...wFormUrlDecoderRuntimeClassFactoryTests.cs | 28 - .../IWwwFormUrlDecoderRuntimeClassTests.cs | 28 - .../winrt/windows.foundation/PointTests.cs | 34 - .../winrt/windows.foundation/RectTests.cs | 34 - .../winrt/windows.foundation/SizeTests.cs | 34 - .../winrt/windows.foundation/TimeSpanTests.cs | 34 - .../IGraphicsEffectSourceTests.cs | 28 - .../IGraphicsEffectTests.cs | 28 - .../windows.graphics/DisplayAdapterIdTests.cs | 34 - .../winrt/windows.graphics/DisplayIdTests.cs | 34 - .../IGeometrySource2DTests.cs | 28 - .../winrt/windows.graphics/PointInt32Tests.cs | 34 - .../winrt/windows.graphics/RectInt32Tests.cs | 34 - .../winrt/windows.graphics/SizeInt32Tests.cs | 34 - .../IBackgroundEnergyManagerStaticsTests.cs | 28 - .../IForegroundEnergyManagerStaticsTests.cs | 28 - .../IPowerManagerStaticsTests.cs | 28 - .../WinRT/winrt/windows.ui/ColorTests.cs | 34 - .../windows.ui/IColorHelperStatics2Tests.cs | 28 - .../windows.ui/IColorHelperStaticsTests.cs | 28 - .../winrt/windows.ui/IColorHelperTests.cs | 28 - .../winrt/windows.ui/IColorsStaticsTests.cs | 28 - .../WinRT/winrt/windows.ui/IColorsTests.cs | 28 - .../winrt/windows.ui/IUIContentRootTests.cs | 28 - .../WinRT/winrt/windows.ui/IUIContextTests.cs | 28 - .../WinRT/winrt/windows.ui/WindowIdTests.cs | 34 - 119 files changed, 1425 insertions(+), 3363 deletions(-) rename sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/{IID.cs => IID.Manual.cs} (90%) rename sources/Interop/Windows/WinRT/winrt/windows.devices.power/{IID.cs => IID.Manual.cs} (91%) rename sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/{IID.cs => IID.Manual.cs} (94%) rename sources/Interop/Windows/WinRT/winrt/windows.foundation/{IID.cs => IID.Manual.cs} (89%) rename sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/{IID.cs => IID.Manual.cs} (92%) rename sources/Interop/Windows/WinRT/winrt/windows.graphics/{IID.cs => IID.Manual.cs} (93%) rename sources/Interop/Windows/WinRT/winrt/windows.system.power/{IID.cs => IID.Manual.cs} (91%) rename sources/Interop/Windows/WinRT/winrt/windows.ui/{IID.cs => IID.Manual.cs} (89%) delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs delete mode 100644 tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.Manual.cs similarity index 90% rename from sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.Manual.cs index b86ca42449..828549b500 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IKnownSimpleHapticsControllerWaveformsStatic { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xF7, 0x7E, 0x57, 0x3D, 0xEE, 0x4C, 0xE6, 0x11, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IKnownSimpleHapticsControllerWaveformsStatic 0x06, 0xAB, 0x3B - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -39,7 +39,7 @@ public static ref readonly Guid IID_IKnownSimpleHapticsControllerWaveformsStatic { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x27, 0x4C, 0xD2, 0xA7, 0x9D, 0xB7, 0x0A, 0x51, @@ -51,7 +51,7 @@ public static ref readonly Guid IID_IKnownSimpleHapticsControllerWaveformsStatic 0x17, 0x3E, 0x1D - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -62,7 +62,7 @@ public static ref readonly Guid IID_ISimpleHapticsController { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xF9, 0x7E, 0x57, 0x3D, 0xEE, 0x4C, 0xE6, 0x11, @@ -74,7 +74,7 @@ public static ref readonly Guid IID_ISimpleHapticsController 0x06, 0xAB, 0x3B - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -85,7 +85,7 @@ public static ref readonly Guid IID_ISimpleHapticsControllerFeedback { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xF8, 0x7E, 0x57, 0x3D, 0xEE, 0x4C, 0xE6, 0x11, @@ -97,7 +97,7 @@ public static ref readonly Guid IID_ISimpleHapticsControllerFeedback 0x06, 0xAB, 0x3B - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -108,7 +108,7 @@ public static ref readonly Guid IID_IVibrationDevice { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x3E, 0x1A, 0xF2, 0x40, 0x44, 0x88, 0xFF, 0x47, @@ -120,7 +120,7 @@ public static ref readonly Guid IID_IVibrationDevice 0x38, 0x44, 0xDA - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -131,7 +131,7 @@ public static ref readonly Guid IID_IVibrationDeviceStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xED, 0xED, 0xE2, 0x53, 0x90, 0x22, 0xC9, 0x4A, @@ -143,7 +143,7 @@ public static ref readonly Guid IID_IVibrationDeviceStatics 0x2E, 0xB7, 0x1C - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs index 12d42f491a..dd76b7abb7 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IKnownSimpleHapticsControllerWaveformsStatics : IKn [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Click([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_Click([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(7)] public HRESULT get_BuzzContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_BuzzContinuous([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(8)] public HRESULT get_RumbleContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -100,7 +100,7 @@ public HRESULT get_RumbleContinuous([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(9)] public HRESULT get_Press([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT get_Press([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(10)] public HRESULT get_Release([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IKnownSimpleHapticsControllerWaveformsStatics*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -133,36 +133,36 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Click; + public delegate* unmanaged[MemberFunction] get_Click; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_BuzzContinuous; + public delegate* unmanaged[MemberFunction] get_BuzzContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_RumbleContinuous; + public delegate* unmanaged[MemberFunction] get_RumbleContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Press; + public delegate* unmanaged[MemberFunction] get_Press; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Release; + public delegate* unmanaged[MemberFunction] get_Release; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs index 8f9e48b07a..2db17497fb 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2.cs @@ -26,7 +26,7 @@ public unsafe partial struct IKnownSimpleHapticsControllerWaveformsStatics2 : IK [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_BrushContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_BrushContinuous([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(7)] public HRESULT get_ChiselMarkerContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_ChiselMarkerContinuous([NativeTypeName("UINT16 *")] ushort* v [VtblIndex(8)] public HRESULT get_EraserContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -100,7 +100,7 @@ public HRESULT get_EraserContinuous([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(9)] public HRESULT get_Error([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT get_Error([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(10)] public HRESULT get_GalaxyPenContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -116,7 +116,7 @@ public HRESULT get_GalaxyPenContinuous([NativeTypeName("UINT16 *")] ushort* valu [VtblIndex(11)] public HRESULT get_Hover([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[11]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -124,7 +124,7 @@ public HRESULT get_Hover([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(12)] public HRESULT get_InkContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[12]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -132,7 +132,7 @@ public HRESULT get_InkContinuous([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(13)] public HRESULT get_MarkerContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[13]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -140,7 +140,7 @@ public HRESULT get_MarkerContinuous([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(14)] public HRESULT get_PencilContinuous([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[14]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } /// @@ -148,7 +148,7 @@ public HRESULT get_PencilContinuous([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(15)] public HRESULT get_Success([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[15]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IKnownSimpleHapticsControllerWaveformsStatics2*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -188,51 +188,51 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_BrushContinuous; + public delegate* unmanaged[MemberFunction] get_BrushContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_ChiselMarkerContinuous; + public delegate* unmanaged[MemberFunction] get_ChiselMarkerContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_EraserContinuous; + public delegate* unmanaged[MemberFunction] get_EraserContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Error; + public delegate* unmanaged[MemberFunction] get_Error; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_GalaxyPenContinuous; + public delegate* unmanaged[MemberFunction] get_GalaxyPenContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Hover; + public delegate* unmanaged[MemberFunction] get_Hover; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_InkContinuous; + public delegate* unmanaged[MemberFunction] get_InkContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_MarkerContinuous; + public delegate* unmanaged[MemberFunction] get_MarkerContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_PencilContinuous; + public delegate* unmanaged[MemberFunction] get_PencilContinuous; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Success; + public delegate* unmanaged[MemberFunction] get_Success; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs index ba5d00b5ed..8f39bee753 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsController.cs @@ -26,7 +26,7 @@ public unsafe partial struct ISimpleHapticsController : ISimpleHapticsController [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Id(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_Id(HSTRING* value) [VtblIndex(7)] public HRESULT get_SupportedFeedback([NativeTypeName("ABI::Windows::Foundation::Collections::__FIVectorView_1_Windows__CDevices__CHaptics__CSimpleHapticsControllerFeedback_t **")] IVectorView** value) { - return ((delegate* unmanaged**, int>)(lpVtbl[7]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[7]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_SupportedFeedback([NativeTypeName("ABI::Windows::Foundation:: [VtblIndex(8)] public HRESULT get_IsIntensitySupported([NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); } /// @@ -100,7 +100,7 @@ public HRESULT get_IsIntensitySupported([NativeTypeName("boolean *")] byte* valu [VtblIndex(9)] public HRESULT get_IsPlayCountSupported([NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT get_IsPlayCountSupported([NativeTypeName("boolean *")] byte* valu [VtblIndex(10)] public HRESULT get_IsPlayDurationSupported([NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); } /// @@ -116,7 +116,7 @@ public HRESULT get_IsPlayDurationSupported([NativeTypeName("boolean *")] byte* v [VtblIndex(11)] public HRESULT get_IsReplayPauseIntervalSupported([NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[11]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), value); } /// @@ -124,7 +124,7 @@ public HRESULT get_IsReplayPauseIntervalSupported([NativeTypeName("boolean *")] [VtblIndex(12)] public HRESULT StopFeedback() { - return ((delegate* unmanaged)(lpVtbl[12]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this)); } /// @@ -132,7 +132,7 @@ public HRESULT StopFeedback() [VtblIndex(13)] public HRESULT SendHapticFeedback([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback) { - return ((delegate* unmanaged)(lpVtbl[13]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback); } /// @@ -140,7 +140,7 @@ public HRESULT SendHapticFeedback([NativeTypeName("ABI::Windows::Devices::Haptic [VtblIndex(14)] public HRESULT SendHapticFeedbackWithIntensity([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity) { - return ((delegate* unmanaged)(lpVtbl[14]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity); } /// @@ -148,7 +148,7 @@ public HRESULT SendHapticFeedbackWithIntensity([NativeTypeName("ABI::Windows::De [VtblIndex(15)] public HRESULT SendHapticFeedbackForDuration([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity, [NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan playDuration) { - return ((delegate* unmanaged)(lpVtbl[15]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity, playDuration); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity, playDuration); } /// @@ -156,7 +156,7 @@ public HRESULT SendHapticFeedbackForDuration([NativeTypeName("ABI::Windows::Devi [VtblIndex(16)] public HRESULT SendHapticFeedbackForPlayCount([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *")] ISimpleHapticsControllerFeedback* feedback, double intensity, [NativeTypeName("INT32")] int playCount, [NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan replayPauseInterval) { - return ((delegate* unmanaged)(lpVtbl[16]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity, playCount, replayPauseInterval); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[16]))((ISimpleHapticsController*)Unsafe.AsPointer(ref this), feedback, intensity, playCount, replayPauseInterval); } public interface Interface : IInspectable.Interface @@ -199,54 +199,54 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Id; + public delegate* unmanaged[MemberFunction] get_Id; [NativeTypeName("HRESULT (ABI::Windows::Foundation::Collections::__FIVectorView_1_Windows__CDevices__CHaptics__CSimpleHapticsControllerFeedback_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> get_SupportedFeedback; + public delegate* unmanaged[MemberFunction]**, int> get_SupportedFeedback; [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] - public delegate* unmanaged get_IsIntensitySupported; + public delegate* unmanaged[MemberFunction] get_IsIntensitySupported; [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] - public delegate* unmanaged get_IsPlayCountSupported; + public delegate* unmanaged[MemberFunction] get_IsPlayCountSupported; [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] - public delegate* unmanaged get_IsPlayDurationSupported; + public delegate* unmanaged[MemberFunction] get_IsPlayDurationSupported; [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] - public delegate* unmanaged get_IsReplayPauseIntervalSupported; + public delegate* unmanaged[MemberFunction] get_IsReplayPauseIntervalSupported; [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged StopFeedback; + public delegate* unmanaged[MemberFunction] StopFeedback; [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *) __attribute__((stdcall))")] - public delegate* unmanaged SendHapticFeedback; + public delegate* unmanaged[MemberFunction] SendHapticFeedback; [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *, DOUBLE) __attribute__((stdcall))")] - public delegate* unmanaged SendHapticFeedbackWithIntensity; + public delegate* unmanaged[MemberFunction] SendHapticFeedbackWithIntensity; [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *, DOUBLE, ABI::Windows::Foundation::TimeSpan) __attribute__((stdcall))")] - public delegate* unmanaged SendHapticFeedbackForDuration; + public delegate* unmanaged[MemberFunction] SendHapticFeedbackForDuration; [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsControllerFeedback *, DOUBLE, INT32, ABI::Windows::Foundation::TimeSpan) __attribute__((stdcall))")] - public delegate* unmanaged SendHapticFeedbackForPlayCount; + public delegate* unmanaged[MemberFunction] SendHapticFeedbackForPlayCount; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs index d368fcb6d7..0c685980fe 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedback.cs @@ -26,7 +26,7 @@ public unsafe partial struct ISimpleHapticsControllerFeedback : ISimpleHapticsCo [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Waveform([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_Waveform([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(7)] public HRESULT get_Duration([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((ISimpleHapticsControllerFeedback*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -100,27 +100,27 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Waveform; + public delegate* unmanaged[MemberFunction] get_Waveform; [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan *) __attribute__((stdcall))")] - public delegate* unmanaged get_Duration; + public delegate* unmanaged[MemberFunction] get_Duration; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs index 7749ebac81..da1c1b5ded 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDevice.cs @@ -26,7 +26,7 @@ public unsafe partial struct IVibrationDevice : IVibrationDevice.Interface, INat [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IVibrationDevice*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IVibrationDevice*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IVibrationDevice*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IVibrationDevice*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IVibrationDevice*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IVibrationDevice*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IVibrationDevice*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IVibrationDevice*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IVibrationDevice*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IVibrationDevice*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IVibrationDevice*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IVibrationDevice*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Id(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IVibrationDevice*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IVibrationDevice*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_Id(HSTRING* value) [VtblIndex(7)] public HRESULT get_SimpleHapticsController([NativeTypeName("ABI::Windows::Devices::Haptics::ISimpleHapticsController **")] ISimpleHapticsController** value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IVibrationDevice*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IVibrationDevice*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -100,27 +100,27 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Id; + public delegate* unmanaged[MemberFunction] get_Id; [NativeTypeName("HRESULT (ABI::Windows::Devices::Haptics::ISimpleHapticsController **) __attribute__((stdcall))")] - public delegate* unmanaged get_SimpleHapticsController; + public delegate* unmanaged[MemberFunction] get_SimpleHapticsController; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs index fbc7af2c16..9f8477e18f 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IVibrationDeviceStatics : IVibrationDeviceStatics.I [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT RequestAccessAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationAccessStatus_t **")] IAsyncOperation** operation) { - return ((delegate* unmanaged**, int>)(lpVtbl[6]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[6]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); } /// @@ -84,7 +84,7 @@ public HRESULT RequestAccessAsync([NativeTypeName("ABI::Windows::Foundation::__F [VtblIndex(7)] public HRESULT GetDeviceSelector(HSTRING* result) { - return ((delegate* unmanaged)(lpVtbl[7]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), result); } /// @@ -92,7 +92,7 @@ public HRESULT GetDeviceSelector(HSTRING* result) [VtblIndex(8)] public HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation) { - return ((delegate* unmanaged**, int>)(lpVtbl[8]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), deviceId, operation); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[8]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), deviceId, operation); } /// @@ -100,7 +100,7 @@ public HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foun [VtblIndex(9)] public HRESULT GetDefaultAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation) { - return ((delegate* unmanaged**, int>)(lpVtbl[9]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[9]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); } /// @@ -108,7 +108,7 @@ public HRESULT GetDefaultAsync([NativeTypeName("ABI::Windows::Foundation::__FIAs [VtblIndex(10)] public HRESULT FindAllAsync([NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1___FIVectorView_1_Windows__CDevices__CHaptics__CVibrationDevice_t **")] IAsyncOperation** operation) { - return ((delegate* unmanaged**, int>)(lpVtbl[10]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[10]))((IVibrationDeviceStatics*)Unsafe.AsPointer(ref this), operation); } public interface Interface : IInspectable.Interface @@ -133,36 +133,36 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationAccessStatus_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> RequestAccessAsync; + public delegate* unmanaged[MemberFunction]**, int> RequestAccessAsync; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetDeviceSelector; + public delegate* unmanaged[MemberFunction] GetDeviceSelector; [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> FromIdAsync; + public delegate* unmanaged[MemberFunction]**, int> FromIdAsync; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CHaptics__CVibrationDevice_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> GetDefaultAsync; + public delegate* unmanaged[MemberFunction]**, int> GetDefaultAsync; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIAsyncOperation_1___FIVectorView_1_Windows__CDevices__CHaptics__CVibrationDevice_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> FindAllAsync; + public delegate* unmanaged[MemberFunction]**, int> FindAllAsync; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs index cb3c30125d..ea741fd50e 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBattery.cs @@ -26,7 +26,7 @@ public unsafe partial struct IBattery : IBattery.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IBattery*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IBattery*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IBattery*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IBattery*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IBattery*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IBattery*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IBattery*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IBattery*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IBattery*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IBattery*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IBattery*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IBattery*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_DeviceId(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IBattery*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IBattery*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_DeviceId(HSTRING* value) [VtblIndex(7)] public HRESULT GetReport([NativeTypeName("ABI::Windows::Devices::Power::IBatteryReport **")] IBatteryReport** result) { - return ((delegate* unmanaged)(lpVtbl[7]))((IBattery*)Unsafe.AsPointer(ref this), result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IBattery*)Unsafe.AsPointer(ref this), result); } /// @@ -92,7 +92,7 @@ public HRESULT GetReport([NativeTypeName("ABI::Windows::Devices::Power::IBattery [VtblIndex(8)] public HRESULT add_ReportUpdated([NativeTypeName("ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CDevices__CPower__CBattery_IInspectable_t *")] ITypedEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[8]))((IBattery*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[8]))((IBattery*)Unsafe.AsPointer(ref this), handler, token); } /// @@ -100,7 +100,7 @@ public HRESULT add_ReportUpdated([NativeTypeName("ABI::Windows::Foundation::__FI [VtblIndex(9)] public HRESULT remove_ReportUpdated(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[9]))((IBattery*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IBattery*)Unsafe.AsPointer(ref this), token); } public interface Interface : IInspectable.Interface @@ -122,33 +122,33 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_DeviceId; + public delegate* unmanaged[MemberFunction] get_DeviceId; [NativeTypeName("HRESULT (ABI::Windows::Devices::Power::IBatteryReport **) __attribute__((stdcall))")] - public delegate* unmanaged GetReport; + public delegate* unmanaged[MemberFunction] GetReport; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CDevices__CPower__CBattery_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_ReportUpdated; + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_ReportUpdated; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - public delegate* unmanaged remove_ReportUpdated; + public delegate* unmanaged[MemberFunction] remove_ReportUpdated; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs index 8188b510ff..0a1a27c011 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReport.cs @@ -26,7 +26,7 @@ public unsafe partial struct IBatteryReport : IBatteryReport.Interface, INativeG [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IBatteryReport*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IBatteryReport*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IBatteryReport*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IBatteryReport*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IBatteryReport*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IBatteryReport*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IBatteryReport*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IBatteryReport*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IBatteryReport*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IBatteryReport*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IBatteryReport*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IBatteryReport*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_ChargeRateInMilliwatts([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) { - return ((delegate* unmanaged**, int>)(lpVtbl[6]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[6]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_ChargeRateInMilliwatts([NativeTypeName("ABI::Windows::Foundat [VtblIndex(7)] public HRESULT get_DesignCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) { - return ((delegate* unmanaged**, int>)(lpVtbl[7]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[7]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_DesignCapacityInMilliwattHours([NativeTypeName("ABI::Windows: [VtblIndex(8)] public HRESULT get_FullChargeCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) { - return ((delegate* unmanaged**, int>)(lpVtbl[8]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[8]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); } /// @@ -100,7 +100,7 @@ public HRESULT get_FullChargeCapacityInMilliwattHours([NativeTypeName("ABI::Wind [VtblIndex(9)] public HRESULT get_RemainingCapacityInMilliwattHours([NativeTypeName("ABI::Windows::Foundation::__FIReference_1_int_t **")] IReference** value) { - return ((delegate* unmanaged**, int>)(lpVtbl[9]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[9]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT get_RemainingCapacityInMilliwattHours([NativeTypeName("ABI::Windo [VtblIndex(10)] public HRESULT get_Status([NativeTypeName("ABI::Windows::System::Power::BatteryStatus *")] BatteryStatus* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IBatteryReport*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -133,36 +133,36 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> get_ChargeRateInMilliwatts; + public delegate* unmanaged[MemberFunction]**, int> get_ChargeRateInMilliwatts; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> get_DesignCapacityInMilliwattHours; + public delegate* unmanaged[MemberFunction]**, int> get_DesignCapacityInMilliwattHours; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> get_FullChargeCapacityInMilliwattHours; + public delegate* unmanaged[MemberFunction]**, int> get_FullChargeCapacityInMilliwattHours; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIReference_1_int_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> get_RemainingCapacityInMilliwattHours; + public delegate* unmanaged[MemberFunction]**, int> get_RemainingCapacityInMilliwattHours; [NativeTypeName("HRESULT (ABI::Windows::System::Power::BatteryStatus *) __attribute__((stdcall))")] - public delegate* unmanaged get_Status; + public delegate* unmanaged[MemberFunction] get_Status; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs index 00ee4e2df7..1fa71179dd 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IBatteryStatics : IBatteryStatics.Interface, INativ [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IBatteryStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IBatteryStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IBatteryStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IBatteryStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IBatteryStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IBatteryStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IBatteryStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IBatteryStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IBatteryStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IBatteryStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IBatteryStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IBatteryStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_AggregateBattery([NativeTypeName("ABI::Windows::Devices::Power::IBattery **")] IBattery** result) { - return ((delegate* unmanaged)(lpVtbl[6]))((IBatteryStatics*)Unsafe.AsPointer(ref this), result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IBatteryStatics*)Unsafe.AsPointer(ref this), result); } /// @@ -84,7 +84,7 @@ public HRESULT get_AggregateBattery([NativeTypeName("ABI::Windows::Devices::Powe [VtblIndex(7)] public HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CPower__CBattery_t **")] IAsyncOperation** result) { - return ((delegate* unmanaged**, int>)(lpVtbl[7]))((IBatteryStatics*)Unsafe.AsPointer(ref this), deviceId, result); + return ((delegate* unmanaged[MemberFunction]**, int>)(lpVtbl[7]))((IBatteryStatics*)Unsafe.AsPointer(ref this), deviceId, result); } /// @@ -92,7 +92,7 @@ public HRESULT FromIdAsync(HSTRING deviceId, [NativeTypeName("ABI::Windows::Foun [VtblIndex(8)] public HRESULT GetDeviceSelector(HSTRING* result) { - return ((delegate* unmanaged)(lpVtbl[8]))((IBatteryStatics*)Unsafe.AsPointer(ref this), result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IBatteryStatics*)Unsafe.AsPointer(ref this), result); } public interface Interface : IInspectable.Interface @@ -111,30 +111,30 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::Devices::Power::IBattery **) __attribute__((stdcall))")] - public delegate* unmanaged get_AggregateBattery; + public delegate* unmanaged[MemberFunction] get_AggregateBattery; [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CPower__CBattery_t **) __attribute__((stdcall))")] - public delegate* unmanaged**, int> FromIdAsync; + public delegate* unmanaged[MemberFunction]**, int> FromIdAsync; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetDeviceSelector; + public delegate* unmanaged[MemberFunction] GetDeviceSelector; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.Manual.cs similarity index 91% rename from sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.Manual.cs index 8b4cf7c203..0bbdb1e334 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.power/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IBattery { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xC6, 0x4F, 0x89, 0xBC, 0x72, 0x00, 0xC8, 0x47, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IBattery 0x7A, 0x43, 0x7E - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -39,7 +39,7 @@ public static ref readonly Guid IID_IBatteryReport { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x3A, 0x8C, 0x85, 0xC9, 0x13, 0x4E, 0x0A, 0x42, @@ -51,7 +51,7 @@ public static ref readonly Guid IID_IBatteryReport 0x39, 0x54, 0x01 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -62,7 +62,7 @@ public static ref readonly Guid IID_IBatteryStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xB6, 0x72, 0xCD, 0x79, 0x5E, 0x9E, 0x52, 0x44, @@ -74,7 +74,7 @@ public static ref readonly Guid IID_IBatteryStatics 0x1E, 0x59, 0x7F - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs index 46c9220b68..fcfdafad6f 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IApiInformationStatics : IApiInformationStatics.Int [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IApiInformationStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IApiInformationStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IApiInformationStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IApiInformationStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT IsTypePresent(HSTRING typeName, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[6]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, result); } /// @@ -84,7 +84,7 @@ public HRESULT IsTypePresent(HSTRING typeName, [NativeTypeName("boolean *")] byt [VtblIndex(7)] public HRESULT IsMethodPresent(HSTRING typeName, HSTRING methodName, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[7]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, methodName, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, methodName, result); } /// @@ -92,7 +92,7 @@ public HRESULT IsMethodPresent(HSTRING typeName, HSTRING methodName, [NativeType [VtblIndex(8)] public HRESULT IsMethodPresentWithArity(HSTRING typeName, HSTRING methodName, [NativeTypeName("UINT32")] uint inputParameterCount, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[8]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, methodName, inputParameterCount, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, methodName, inputParameterCount, result); } /// @@ -100,7 +100,7 @@ public HRESULT IsMethodPresentWithArity(HSTRING typeName, HSTRING methodName, [N [VtblIndex(9)] public HRESULT IsEventPresent(HSTRING typeName, HSTRING eventName, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[9]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, eventName, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, eventName, result); } /// @@ -108,7 +108,7 @@ public HRESULT IsEventPresent(HSTRING typeName, HSTRING eventName, [NativeTypeNa [VtblIndex(10)] public HRESULT IsPropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[10]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); } /// @@ -116,7 +116,7 @@ public HRESULT IsPropertyPresent(HSTRING typeName, HSTRING propertyName, [Native [VtblIndex(11)] public HRESULT IsReadOnlyPropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[11]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); } /// @@ -124,7 +124,7 @@ public HRESULT IsReadOnlyPropertyPresent(HSTRING typeName, HSTRING propertyName, [VtblIndex(12)] public HRESULT IsWriteablePropertyPresent(HSTRING typeName, HSTRING propertyName, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[12]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), typeName, propertyName, result); } /// @@ -132,7 +132,7 @@ public HRESULT IsWriteablePropertyPresent(HSTRING typeName, HSTRING propertyName [VtblIndex(13)] public HRESULT IsEnumNamedValuePresent(HSTRING enumTypeName, HSTRING valueName, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[13]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), enumTypeName, valueName, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), enumTypeName, valueName, result); } /// @@ -140,7 +140,7 @@ public HRESULT IsEnumNamedValuePresent(HSTRING enumTypeName, HSTRING valueName, [VtblIndex(14)] public HRESULT IsApiContractPresentByMajor(HSTRING contractName, [NativeTypeName("UINT16")] ushort majorVersion, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[14]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), contractName, majorVersion, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), contractName, majorVersion, result); } /// @@ -148,7 +148,7 @@ public HRESULT IsApiContractPresentByMajor(HSTRING contractName, [NativeTypeName [VtblIndex(15)] public HRESULT IsApiContractPresentByMajorAndMinor(HSTRING contractName, [NativeTypeName("UINT16")] ushort majorVersion, [NativeTypeName("UINT16")] ushort minorVersion, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[15]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), contractName, majorVersion, minorVersion, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IApiInformationStatics*)Unsafe.AsPointer(ref this), contractName, majorVersion, minorVersion, result); } public interface Interface : IInspectable.Interface @@ -188,51 +188,51 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsTypePresent; + public delegate* unmanaged[MemberFunction] IsTypePresent; [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsMethodPresent; + public delegate* unmanaged[MemberFunction] IsMethodPresent; [NativeTypeName("HRESULT (HSTRING, HSTRING, UINT32, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsMethodPresentWithArity; + public delegate* unmanaged[MemberFunction] IsMethodPresentWithArity; [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsEventPresent; + public delegate* unmanaged[MemberFunction] IsEventPresent; [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsPropertyPresent; + public delegate* unmanaged[MemberFunction] IsPropertyPresent; [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsReadOnlyPropertyPresent; + public delegate* unmanaged[MemberFunction] IsReadOnlyPropertyPresent; [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsWriteablePropertyPresent; + public delegate* unmanaged[MemberFunction] IsWriteablePropertyPresent; [NativeTypeName("HRESULT (HSTRING, HSTRING, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsEnumNamedValuePresent; + public delegate* unmanaged[MemberFunction] IsEnumNamedValuePresent; [NativeTypeName("HRESULT (HSTRING, UINT16, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsApiContractPresentByMajor; + public delegate* unmanaged[MemberFunction] IsApiContractPresentByMajor; [NativeTypeName("HRESULT (HSTRING, UINT16, UINT16, boolean *) __attribute__((stdcall))")] - public delegate* unmanaged IsApiContractPresentByMajorAndMinor; + public delegate* unmanaged[MemberFunction] IsApiContractPresentByMajorAndMinor; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.Manual.cs similarity index 94% rename from sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.Manual.cs index 5de19cbfa0..3ab8b3601c 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IApiInformationStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xFE, 0x39, 0x74, 0x99, 0x81, 0xF6, 0x11, 0x4A, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IApiInformationStatics 0xE8, 0xBA, 0x36 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs index 5d7fea202c..6d540f1313 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncAction.cs @@ -26,7 +26,7 @@ public unsafe partial struct IAsyncAction : IAsyncAction.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IAsyncAction*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IAsyncAction*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IAsyncAction*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IAsyncAction*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IAsyncAction*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IAsyncAction*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IAsyncAction*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IAsyncAction*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IAsyncAction*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IAsyncAction*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IAsyncAction*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IAsyncAction*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT put_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncActionCompletedHandler *")] IAsyncActionCompletedHandler* handler) { - return ((delegate* unmanaged)(lpVtbl[6]))((IAsyncAction*)Unsafe.AsPointer(ref this), handler); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IAsyncAction*)Unsafe.AsPointer(ref this), handler); } /// @@ -84,7 +84,7 @@ public HRESULT put_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncAc [VtblIndex(7)] public HRESULT get_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncActionCompletedHandler **")] IAsyncActionCompletedHandler** handler) { - return ((delegate* unmanaged)(lpVtbl[7]))((IAsyncAction*)Unsafe.AsPointer(ref this), handler); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IAsyncAction*)Unsafe.AsPointer(ref this), handler); } /// @@ -92,7 +92,7 @@ public HRESULT get_Completed([NativeTypeName("ABI::Windows::Foundation::IAsyncAc [VtblIndex(8)] public HRESULT GetResults() { - return ((delegate* unmanaged)(lpVtbl[8]))((IAsyncAction*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IAsyncAction*)Unsafe.AsPointer(ref this)); } public interface Interface : IInspectable.Interface @@ -111,30 +111,30 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::IAsyncActionCompletedHandler *) __attribute__((stdcall))")] - public delegate* unmanaged put_Completed; + public delegate* unmanaged[MemberFunction] put_Completed; [NativeTypeName("HRESULT (ABI::Windows::Foundation::IAsyncActionCompletedHandler **) __attribute__((stdcall))")] - public delegate* unmanaged get_Completed; + public delegate* unmanaged[MemberFunction] get_Completed; [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged GetResults; + public delegate* unmanaged[MemberFunction] GetResults; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs index e59fb8bec6..9f7aa1459d 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandler.cs @@ -26,7 +26,7 @@ public unsafe partial struct IAsyncActionCompletedHandler : IAsyncActionComplete [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT Invoke([NativeTypeName("ABI::Windows::Foundation::IAsyncAction *")] IAsyncAction* asyncInfo, [NativeTypeName("ABI::Windows::Foundation::AsyncStatus")] AsyncStatus asyncStatus) { - return ((delegate* unmanaged)(lpVtbl[3]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this), asyncInfo, asyncStatus); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IAsyncActionCompletedHandler*)Unsafe.AsPointer(ref this), asyncInfo, asyncStatus); } public interface Interface : IUnknown.Interface @@ -65,15 +65,15 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; - [NativeTypeName("HRESULT (ABI::Windows::Foundation::IAsyncAction *, ABI::Windows::Foundation::AsyncStatus) __attribute__((stdcall))")] - public delegate* unmanaged Invoke; + [NativeTypeName("HRESULT (ABI::Windows::Foundation::IAsyncAction *, AsyncStatus) __attribute__((stdcall))")] + public delegate* unmanaged[MemberFunction] Invoke; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs index b6beeac25a..35de3ff0f9 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IClosable.cs @@ -26,7 +26,7 @@ public unsafe partial struct IClosable : IClosable.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IClosable*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IClosable*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IClosable*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IClosable*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IClosable*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IClosable*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IClosable*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IClosable*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IClosable*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IClosable*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IClosable*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IClosable*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT Close() { - return ((delegate* unmanaged)(lpVtbl[6]))((IClosable*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IClosable*)Unsafe.AsPointer(ref this)); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged Close; + public delegate* unmanaged[MemberFunction] Close; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs index f0c1117c41..ddbf62ba65 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferral.cs @@ -26,7 +26,7 @@ public unsafe partial struct IDeferral : IDeferral.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IDeferral*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IDeferral*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IDeferral*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IDeferral*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IDeferral*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IDeferral*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IDeferral*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IDeferral*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IDeferral*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IDeferral*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IDeferral*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IDeferral*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT Complete() { - return ((delegate* unmanaged)(lpVtbl[6]))((IDeferral*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IDeferral*)Unsafe.AsPointer(ref this)); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged Complete; + public delegate* unmanaged[MemberFunction] Complete; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs index 3e1a9bad98..12a1f5d916 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandler.cs @@ -26,7 +26,7 @@ public unsafe partial struct IDeferralCompletedHandler : IDeferralCompletedHandl [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT Invoke() { - return ((delegate* unmanaged)(lpVtbl[3]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IDeferralCompletedHandler*)Unsafe.AsPointer(ref this)); } public interface Interface : IUnknown.Interface @@ -65,15 +65,15 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged Invoke; + public delegate* unmanaged[MemberFunction] Invoke; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs index aae791ee18..75fd7ed2bf 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactory.cs @@ -26,7 +26,7 @@ public unsafe partial struct IDeferralFactory : IDeferralFactory.Interface, INat [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IDeferralFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IDeferralFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IDeferralFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IDeferralFactory*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IDeferralFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IDeferralFactory*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IDeferralFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IDeferralFactory*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IDeferralFactory*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IDeferralFactory*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IDeferralFactory*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IDeferralFactory*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT Create([NativeTypeName("ABI::Windows::Foundation::IDeferralCompletedHandler *")] IDeferralCompletedHandler* handler, [NativeTypeName("ABI::Windows::Foundation::IDeferral **")] IDeferral** result) { - return ((delegate* unmanaged)(lpVtbl[6]))((IDeferralFactory*)Unsafe.AsPointer(ref this), handler, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IDeferralFactory*)Unsafe.AsPointer(ref this), handler, result); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::IDeferralCompletedHandler *, ABI::Windows::Foundation::IDeferral **) __attribute__((stdcall))")] - public delegate* unmanaged Create; + public delegate* unmanaged[MemberFunction] Create; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs index d47a444639..d2b145fe04 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactory.cs @@ -26,7 +26,7 @@ public unsafe partial struct IGetActivationFactory : IGetActivationFactory.Inter [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IGetActivationFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IGetActivationFactory*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IGetActivationFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IGetActivationFactory*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT GetActivationFactory(HSTRING activatableClassId, IInspectable** factory) { - return ((delegate* unmanaged)(lpVtbl[6]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), activatableClassId, factory); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IGetActivationFactory*)Unsafe.AsPointer(ref this), activatableClassId, factory); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged GetActivationFactory; + public delegate* unmanaged[MemberFunction] GetActivationFactory; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs index 7070f0dc86..a41a46c20b 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IGuidHelperStatics : IGuidHelperStatics.Interface, [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT CreateNewGuid(Guid* result) { - return ((delegate* unmanaged)(lpVtbl[6]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), result); } /// @@ -84,7 +84,7 @@ public HRESULT CreateNewGuid(Guid* result) [VtblIndex(7)] public HRESULT get_Empty(Guid* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_Empty(Guid* value) [VtblIndex(8)] public HRESULT Equals([NativeTypeName("const GUID *")] Guid* target, [NativeTypeName("const GUID *")] Guid* value, [NativeTypeName("boolean *")] byte* result) { - return ((delegate* unmanaged)(lpVtbl[8]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), target, value, result); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IGuidHelperStatics*)Unsafe.AsPointer(ref this), target, value, result); } public interface Interface : IInspectable.Interface @@ -111,30 +111,30 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged CreateNewGuid; + public delegate* unmanaged[MemberFunction] CreateNewGuid; [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged get_Empty; + public delegate* unmanaged[MemberFunction] get_Empty; [NativeTypeName("HRESULT (const GUID *, const GUID *, boolean *) __attribute__((stdcall))")] - public new delegate* unmanaged Equals; + public new delegate* unmanaged[MemberFunction] Equals; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.Manual.cs similarity index 89% rename from sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.Manual.cs index 42429e9006..91260e2640 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IAsyncActionCompletedHandler { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x81, 0x5C, 0xED, 0xA4, 0xC9, 0x76, 0xBD, 0x40, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IAsyncActionCompletedHandler 0xB2, 0x0A, 0xE7 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -39,7 +39,7 @@ public static ref readonly Guid IID_IDeferralCompletedHandler { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x72, 0xA3, 0x32, 0xED, 0xC8, 0xF3, 0xAA, 0x4F, @@ -51,7 +51,7 @@ public static ref readonly Guid IID_IDeferralCompletedHandler 0xDA, 0x38, 0x88 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -62,7 +62,7 @@ public static ref readonly Guid IID_IPropertySet { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x9F, 0xED, 0x43, 0x8A, 0xE6, 0xF4, 0x21, 0x44, @@ -74,7 +74,7 @@ public static ref readonly Guid IID_IPropertySet 0x86, 0x82, 0x0C - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -85,7 +85,7 @@ public static ref readonly Guid IID_IAsyncAction { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x06, 0x80, 0x64, 0x5A, 0x3A, 0x84, 0xA9, 0x4D, @@ -97,7 +97,7 @@ public static ref readonly Guid IID_IAsyncAction 0xDF, 0xAD, 0x7B - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -108,7 +108,7 @@ public static ref readonly Guid IID_IClosable { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x29, 0xA8, 0xD5, 0x30, 0xA4, 0x7F, 0x26, 0x40, @@ -120,7 +120,7 @@ public static ref readonly Guid IID_IClosable 0x4E, 0xA9, 0x9E - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -131,7 +131,7 @@ public static ref readonly Guid IID_IDeferral { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x32, 0x97, 0x26, 0xD6, 0x7F, 0x3B, 0xA7, 0x46, @@ -143,7 +143,7 @@ public static ref readonly Guid IID_IDeferral 0xA2, 0xC6, 0x93 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -154,7 +154,7 @@ public static ref readonly Guid IID_IDeferralFactory { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xC5, 0xEC, 0xA1, 0x65, 0xB5, 0x3F, 0x32, 0x48, @@ -166,7 +166,7 @@ public static ref readonly Guid IID_IDeferralFactory 0x81, 0xD1, 0x3A - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -177,7 +177,7 @@ public static ref readonly Guid IID_IGetActivationFactory { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xE2, 0x8E, 0xDB, 0x4E, 0xDD, 0x96, 0xA7, 0x49, @@ -189,7 +189,7 @@ public static ref readonly Guid IID_IGetActivationFactory 0xAB, 0x8E, 0x3C - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -200,7 +200,7 @@ public static ref readonly Guid IID_IGuidHelperStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x6B, 0x96, 0xC7, 0x59, 0x52, 0xAE, 0x83, 0x52, @@ -212,7 +212,7 @@ public static ref readonly Guid IID_IGuidHelperStatics 0x67, 0x8A, 0xDD - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -223,7 +223,7 @@ public static ref readonly Guid IID_IMemoryBuffer { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x2A, 0xDD, 0xC4, 0xFB, 0x5B, 0x24, 0xE4, 0x11, @@ -235,7 +235,7 @@ public static ref readonly Guid IID_IMemoryBuffer 0x26, 0x0C, 0xF8 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -246,7 +246,7 @@ public static ref readonly Guid IID_IMemoryBufferFactory { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x2B, 0xDD, 0xC4, 0xFB, 0x5B, 0x24, 0xE4, 0x11, @@ -258,7 +258,7 @@ public static ref readonly Guid IID_IMemoryBufferFactory 0x26, 0x0C, 0xF8 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -269,7 +269,7 @@ public static ref readonly Guid IID_IMemoryBufferReference { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x29, 0xDD, 0xC4, 0xFB, 0x5B, 0x24, 0xE4, 0x11, @@ -281,7 +281,7 @@ public static ref readonly Guid IID_IMemoryBufferReference 0x26, 0x0C, 0xF8 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -292,7 +292,7 @@ public static ref readonly Guid IID_IPropertyValue { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xDD, 0x82, 0xD6, 0x4B, 0x54, 0x75, 0xE9, 0x40, @@ -304,7 +304,7 @@ public static ref readonly Guid IID_IPropertyValue 0xDE, 0x7E, 0x62 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -315,7 +315,7 @@ public static ref readonly Guid IID_IPropertyValueStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xC8, 0xDB, 0x9B, 0x62, 0x32, 0xD9, 0xF4, 0x4F, @@ -327,7 +327,7 @@ public static ref readonly Guid IID_IPropertyValueStatics 0xC1, 0xE8, 0x58 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -338,7 +338,7 @@ public static ref readonly Guid IID_IStringable { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x54, 0x9F, 0x36, 0x96, 0xB6, 0x8E, 0xF0, 0x48, @@ -350,7 +350,7 @@ public static ref readonly Guid IID_IStringable 0xE6, 0x27, 0xC3 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -361,7 +361,7 @@ public static ref readonly Guid IID_IUriEscapeStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xBA, 0x32, 0xD4, 0xC1, 0x24, 0xC8, 0x52, 0x44, @@ -373,7 +373,7 @@ public static ref readonly Guid IID_IUriEscapeStatics 0xBB, 0xE9, 0xA1 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -384,7 +384,7 @@ public static ref readonly Guid IID_IUriRuntimeClass { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x57, 0x5E, 0x36, 0x9E, 0xB2, 0x48, 0x60, 0x41, @@ -396,7 +396,7 @@ public static ref readonly Guid IID_IUriRuntimeClass 0x20, 0xBB, 0xFC - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -407,7 +407,7 @@ public static ref readonly Guid IID_IUriRuntimeClassFactory { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x6F, 0x79, 0xA9, 0x44, 0x3E, 0x72, 0xDF, 0x4F, @@ -419,7 +419,7 @@ public static ref readonly Guid IID_IUriRuntimeClassFactory 0xB0, 0xC0, 0x84 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -430,7 +430,7 @@ public static ref readonly Guid IID_IUriRuntimeClassWithAbsoluteCanonicalUri { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x61, 0x96, 0x8D, 0x75, 0x1C, 0x22, 0x0F, 0x48, @@ -442,7 +442,7 @@ public static ref readonly Guid IID_IUriRuntimeClassWithAbsoluteCanonicalUri 0x73, 0xF4, 0x6F - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -453,7 +453,7 @@ public static ref readonly Guid IID_IWwwFormUrlDecoderEntry { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x31, 0x74, 0x5E, 0x12, 0x78, 0xF6, 0x8E, 0x4E, @@ -465,7 +465,7 @@ public static ref readonly Guid IID_IWwwFormUrlDecoderEntry 0x6C, 0x51, 0x2D - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -476,7 +476,7 @@ public static ref readonly Guid IID_IWwwFormUrlDecoderRuntimeClass { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x51, 0x04, 0x5A, 0xD4, 0x25, 0xF2, 0x42, 0x45, @@ -488,7 +488,7 @@ public static ref readonly Guid IID_IWwwFormUrlDecoderRuntimeClass 0xD2, 0x54, 0xDF - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -499,7 +499,7 @@ public static ref readonly Guid IID_IWwwFormUrlDecoderRuntimeClassFactory { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x3D, 0x6B, 0x8C, 0x5B, 0xAE, 0x24, 0xB5, 0x41, @@ -511,7 +511,7 @@ public static ref readonly Guid IID_IWwwFormUrlDecoderRuntimeClassFactory 0x44, 0x84, 0x5B - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs index 0380f93cec..5854bc3d0f 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBuffer.cs @@ -26,7 +26,7 @@ public unsafe partial struct IMemoryBuffer : IMemoryBuffer.Interface, INativeGui [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IMemoryBuffer*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IMemoryBuffer*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IMemoryBuffer*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IMemoryBuffer*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT CreateReference([NativeTypeName("ABI::Windows::Foundation::IMemoryBufferReference **")] IMemoryBufferReference** reference) { - return ((delegate* unmanaged)(lpVtbl[6]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), reference); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IMemoryBuffer*)Unsafe.AsPointer(ref this), reference); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::IMemoryBufferReference **) __attribute__((stdcall))")] - public delegate* unmanaged CreateReference; + public delegate* unmanaged[MemberFunction] CreateReference; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs index 62594be3ec..9ad33539b0 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactory.cs @@ -26,7 +26,7 @@ public unsafe partial struct IMemoryBufferFactory : IMemoryBufferFactory.Interfa [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT Create([NativeTypeName("UINT32")] uint capacity, [NativeTypeName("ABI::Windows::Foundation::IMemoryBuffer **")] IMemoryBuffer** value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), capacity, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IMemoryBufferFactory*)Unsafe.AsPointer(ref this), capacity, value); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::IMemoryBuffer **) __attribute__((stdcall))")] - public delegate* unmanaged Create; + public delegate* unmanaged[MemberFunction] Create; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs index 9012d339cf..38989d2c9b 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReference.cs @@ -26,7 +26,7 @@ public unsafe partial struct IMemoryBufferReference : IMemoryBufferReference.Int [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Capacity([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_Capacity([NativeTypeName("UINT32 *")] uint* value) [VtblIndex(7)] public HRESULT add_Closed([NativeTypeName("ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CFoundation__CIMemoryBufferReference_IInspectable_t *")] ITypedEventHandler* handler, EventRegistrationToken* cookie) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[7]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), handler, cookie); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[7]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), handler, cookie); } /// @@ -92,7 +92,7 @@ public HRESULT add_Closed([NativeTypeName("ABI::Windows::Foundation::__FITypedEv [VtblIndex(8)] public HRESULT remove_Closed(EventRegistrationToken cookie) { - return ((delegate* unmanaged)(lpVtbl[8]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), cookie); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IMemoryBufferReference*)Unsafe.AsPointer(ref this), cookie); } public interface Interface : IInspectable.Interface @@ -111,30 +111,30 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Capacity; + public delegate* unmanaged[MemberFunction] get_Capacity; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CFoundation__CIMemoryBufferReference_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_Closed; + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_Closed; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - public delegate* unmanaged remove_Closed; + public delegate* unmanaged[MemberFunction] remove_Closed; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs index 1bbafdc91b..1c2d64d7cd 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySet.cs @@ -26,7 +26,7 @@ public unsafe partial struct IPropertySet : IPropertySet.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IPropertySet*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IPropertySet*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IPropertySet*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IPropertySet*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IPropertySet*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IPropertySet*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IPropertySet*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IPropertySet*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IPropertySet*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IPropertySet*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IPropertySet*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IPropertySet*)Unsafe.AsPointer(ref this), trustLevel); } public interface Interface : IInspectable.Interface @@ -79,21 +79,21 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs index bc5f80b003..5a4e09115f 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValue.cs @@ -26,7 +26,7 @@ public unsafe partial struct IPropertyValue : IPropertyValue.Interface, INativeG [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IPropertyValue*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IPropertyValue*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IPropertyValue*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IPropertyValue*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IPropertyValue*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IPropertyValue*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IPropertyValue*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IPropertyValue*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IPropertyValue*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IPropertyValue*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IPropertyValue*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IPropertyValue*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Type([NativeTypeName("ABI::Windows::Foundation::PropertyType *")] PropertyType* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_Type([NativeTypeName("ABI::Windows::Foundation::PropertyType [VtblIndex(7)] public HRESULT get_IsNumericScalar([NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_IsNumericScalar([NativeTypeName("boolean *")] byte* value) [VtblIndex(8)] public HRESULT GetUInt8(byte* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -100,7 +100,7 @@ public HRESULT GetUInt8(byte* value) [VtblIndex(9)] public HRESULT GetInt16([NativeTypeName("INT16 *")] short* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT GetInt16([NativeTypeName("INT16 *")] short* value) [VtblIndex(10)] public HRESULT GetUInt16([NativeTypeName("UINT16 *")] ushort* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -116,7 +116,7 @@ public HRESULT GetUInt16([NativeTypeName("UINT16 *")] ushort* value) [VtblIndex(11)] public HRESULT GetInt32([NativeTypeName("INT32 *")] int* value) { - return ((delegate* unmanaged)(lpVtbl[11]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -124,7 +124,7 @@ public HRESULT GetInt32([NativeTypeName("INT32 *")] int* value) [VtblIndex(12)] public HRESULT GetUInt32([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[12]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -132,7 +132,7 @@ public HRESULT GetUInt32([NativeTypeName("UINT32 *")] uint* value) [VtblIndex(13)] public HRESULT GetInt64([NativeTypeName("INT64 *")] long* value) { - return ((delegate* unmanaged)(lpVtbl[13]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -140,7 +140,7 @@ public HRESULT GetInt64([NativeTypeName("INT64 *")] long* value) [VtblIndex(14)] public HRESULT GetUInt64([NativeTypeName("UINT64 *")] ulong* value) { - return ((delegate* unmanaged)(lpVtbl[14]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -148,7 +148,7 @@ public HRESULT GetUInt64([NativeTypeName("UINT64 *")] ulong* value) [VtblIndex(15)] public HRESULT GetSingle(float* value) { - return ((delegate* unmanaged)(lpVtbl[15]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -156,15 +156,15 @@ public HRESULT GetSingle(float* value) [VtblIndex(16)] public HRESULT GetDouble(double* value) { - return ((delegate* unmanaged)(lpVtbl[16]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[16]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(17)] - public HRESULT GetChar16([NativeTypeName("WCHAR *")] ushort* value) + public HRESULT GetChar16([NativeTypeName("WCHAR *")] char* value) { - return ((delegate* unmanaged)(lpVtbl[17]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[17]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -172,7 +172,7 @@ public HRESULT GetChar16([NativeTypeName("WCHAR *")] ushort* value) [VtblIndex(18)] public HRESULT GetBoolean([NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[18]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[18]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -180,7 +180,7 @@ public HRESULT GetBoolean([NativeTypeName("boolean *")] byte* value) [VtblIndex(19)] public HRESULT GetString(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[19]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[19]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -188,7 +188,7 @@ public HRESULT GetString(HSTRING* value) [VtblIndex(20)] public HRESULT GetGuid(Guid* value) { - return ((delegate* unmanaged)(lpVtbl[20]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[20]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -196,7 +196,7 @@ public HRESULT GetGuid(Guid* value) [VtblIndex(21)] public HRESULT GetDateTime([NativeTypeName("ABI::Windows::Foundation::DateTime *")] DateTime* value) { - return ((delegate* unmanaged)(lpVtbl[21]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[21]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -204,7 +204,7 @@ public HRESULT GetDateTime([NativeTypeName("ABI::Windows::Foundation::DateTime * [VtblIndex(22)] public HRESULT GetTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value) { - return ((delegate* unmanaged)(lpVtbl[22]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[22]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -212,7 +212,7 @@ public HRESULT GetTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpan * [VtblIndex(23)] public HRESULT GetPoint([NativeTypeName("ABI::Windows::Foundation::Point *")] Point* value) { - return ((delegate* unmanaged)(lpVtbl[23]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[23]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -220,7 +220,7 @@ public HRESULT GetPoint([NativeTypeName("ABI::Windows::Foundation::Point *")] Po [VtblIndex(24)] public HRESULT GetSize([NativeTypeName("ABI::Windows::Foundation::Size *")] Size* value) { - return ((delegate* unmanaged)(lpVtbl[24]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[24]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -228,7 +228,7 @@ public HRESULT GetSize([NativeTypeName("ABI::Windows::Foundation::Size *")] Size [VtblIndex(25)] public HRESULT GetRect([NativeTypeName("ABI::Windows::Foundation::Rect *")] Rect* value) { - return ((delegate* unmanaged)(lpVtbl[25]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[25]))((IPropertyValue*)Unsafe.AsPointer(ref this), value); } /// @@ -236,7 +236,7 @@ public HRESULT GetRect([NativeTypeName("ABI::Windows::Foundation::Rect *")] Rect [VtblIndex(26)] public HRESULT GetUInt8Array([NativeTypeName("UINT32 *")] uint* valueLength, byte** value) { - return ((delegate* unmanaged)(lpVtbl[26]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[26]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -244,7 +244,7 @@ public HRESULT GetUInt8Array([NativeTypeName("UINT32 *")] uint* valueLength, byt [VtblIndex(27)] public HRESULT GetInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT16 **")] short** value) { - return ((delegate* unmanaged)(lpVtbl[27]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[27]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -252,7 +252,7 @@ public HRESULT GetInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [Na [VtblIndex(28)] public HRESULT GetUInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT16 **")] ushort** value) { - return ((delegate* unmanaged)(lpVtbl[28]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[28]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -260,7 +260,7 @@ public HRESULT GetUInt16Array([NativeTypeName("UINT32 *")] uint* valueLength, [N [VtblIndex(29)] public HRESULT GetInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT32 **")] int** value) { - return ((delegate* unmanaged)(lpVtbl[29]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[29]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -268,7 +268,7 @@ public HRESULT GetInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [Na [VtblIndex(30)] public HRESULT GetUInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT32 **")] uint** value) { - return ((delegate* unmanaged)(lpVtbl[30]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[30]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -276,7 +276,7 @@ public HRESULT GetUInt32Array([NativeTypeName("UINT32 *")] uint* valueLength, [N [VtblIndex(31)] public HRESULT GetInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("INT64 **")] long** value) { - return ((delegate* unmanaged)(lpVtbl[31]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[31]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -284,7 +284,7 @@ public HRESULT GetInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [Na [VtblIndex(32)] public HRESULT GetUInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("UINT64 **")] ulong** value) { - return ((delegate* unmanaged)(lpVtbl[32]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[32]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -292,7 +292,7 @@ public HRESULT GetUInt64Array([NativeTypeName("UINT32 *")] uint* valueLength, [N [VtblIndex(33)] public HRESULT GetSingleArray([NativeTypeName("UINT32 *")] uint* valueLength, float** value) { - return ((delegate* unmanaged)(lpVtbl[33]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[33]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -300,15 +300,15 @@ public HRESULT GetSingleArray([NativeTypeName("UINT32 *")] uint* valueLength, fl [VtblIndex(34)] public HRESULT GetDoubleArray([NativeTypeName("UINT32 *")] uint* valueLength, double** value) { - return ((delegate* unmanaged)(lpVtbl[34]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[34]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(35)] - public HRESULT GetChar16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("WCHAR **")] ushort** value) + public HRESULT GetChar16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("WCHAR **")] char** value) { - return ((delegate* unmanaged)(lpVtbl[35]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[35]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -316,7 +316,7 @@ public HRESULT GetChar16Array([NativeTypeName("UINT32 *")] uint* valueLength, [N [VtblIndex(36)] public HRESULT GetBooleanArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("boolean **")] byte** value) { - return ((delegate* unmanaged)(lpVtbl[36]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[36]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -324,7 +324,7 @@ public HRESULT GetBooleanArray([NativeTypeName("UINT32 *")] uint* valueLength, [ [VtblIndex(37)] public HRESULT GetStringArray([NativeTypeName("UINT32 *")] uint* valueLength, HSTRING** value) { - return ((delegate* unmanaged)(lpVtbl[37]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[37]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -332,7 +332,7 @@ public HRESULT GetStringArray([NativeTypeName("UINT32 *")] uint* valueLength, HS [VtblIndex(38)] public HRESULT GetInspectableArray([NativeTypeName("UINT32 *")] uint* valueLength, IInspectable*** value) { - return ((delegate* unmanaged)(lpVtbl[38]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[38]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -340,7 +340,7 @@ public HRESULT GetInspectableArray([NativeTypeName("UINT32 *")] uint* valueLengt [VtblIndex(39)] public HRESULT GetGuidArray([NativeTypeName("UINT32 *")] uint* valueLength, Guid** value) { - return ((delegate* unmanaged)(lpVtbl[39]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[39]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -348,7 +348,7 @@ public HRESULT GetGuidArray([NativeTypeName("UINT32 *")] uint* valueLength, Guid [VtblIndex(40)] public HRESULT GetDateTimeArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::DateTime **")] DateTime** value) { - return ((delegate* unmanaged)(lpVtbl[40]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[40]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -356,7 +356,7 @@ public HRESULT GetDateTimeArray([NativeTypeName("UINT32 *")] uint* valueLength, [VtblIndex(41)] public HRESULT GetTimeSpanArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::TimeSpan **")] TimeSpan** value) { - return ((delegate* unmanaged)(lpVtbl[41]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[41]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -364,7 +364,7 @@ public HRESULT GetTimeSpanArray([NativeTypeName("UINT32 *")] uint* valueLength, [VtblIndex(42)] public HRESULT GetPointArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Point **")] Point** value) { - return ((delegate* unmanaged)(lpVtbl[42]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[42]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -372,7 +372,7 @@ public HRESULT GetPointArray([NativeTypeName("UINT32 *")] uint* valueLength, [Na [VtblIndex(43)] public HRESULT GetSizeArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Size **")] Size** value) { - return ((delegate* unmanaged)(lpVtbl[43]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[43]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } /// @@ -380,7 +380,7 @@ public HRESULT GetSizeArray([NativeTypeName("UINT32 *")] uint* valueLength, [Nat [VtblIndex(44)] public HRESULT GetRectArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("ABI::Windows::Foundation::Rect **")] Rect** value) { - return ((delegate* unmanaged)(lpVtbl[44]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[44]))((IPropertyValue*)Unsafe.AsPointer(ref this), valueLength, value); } public interface Interface : IInspectable.Interface @@ -419,7 +419,7 @@ public interface Interface : IInspectable.Interface HRESULT GetDouble(double* value); [VtblIndex(17)] - HRESULT GetChar16([NativeTypeName("WCHAR *")] ushort* value); + HRESULT GetChar16([NativeTypeName("WCHAR *")] char* value); [VtblIndex(18)] HRESULT GetBoolean([NativeTypeName("boolean *")] byte* value); @@ -473,7 +473,7 @@ public interface Interface : IInspectable.Interface HRESULT GetDoubleArray([NativeTypeName("UINT32 *")] uint* valueLength, double** value); [VtblIndex(35)] - HRESULT GetChar16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("WCHAR **")] ushort** value); + HRESULT GetChar16Array([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("WCHAR **")] char** value); [VtblIndex(36)] HRESULT GetBooleanArray([NativeTypeName("UINT32 *")] uint* valueLength, [NativeTypeName("boolean **")] byte** value); @@ -507,138 +507,138 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::PropertyType *) __attribute__((stdcall))")] - public delegate* unmanaged get_Type; + public delegate* unmanaged[MemberFunction] get_Type; [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] - public delegate* unmanaged get_IsNumericScalar; + public delegate* unmanaged[MemberFunction] get_IsNumericScalar; [NativeTypeName("HRESULT (BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt8; + public delegate* unmanaged[MemberFunction] GetUInt8; [NativeTypeName("HRESULT (INT16 *) __attribute__((stdcall))")] - public delegate* unmanaged GetInt16; + public delegate* unmanaged[MemberFunction] GetInt16; [NativeTypeName("HRESULT (UINT16 *) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt16; + public delegate* unmanaged[MemberFunction] GetUInt16; [NativeTypeName("HRESULT (INT32 *) __attribute__((stdcall))")] - public delegate* unmanaged GetInt32; + public delegate* unmanaged[MemberFunction] GetInt32; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt32; + public delegate* unmanaged[MemberFunction] GetUInt32; [NativeTypeName("HRESULT (INT64 *) __attribute__((stdcall))")] - public delegate* unmanaged GetInt64; + public delegate* unmanaged[MemberFunction] GetInt64; [NativeTypeName("HRESULT (UINT64 *) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt64; + public delegate* unmanaged[MemberFunction] GetUInt64; [NativeTypeName("HRESULT (FLOAT *) __attribute__((stdcall))")] - public delegate* unmanaged GetSingle; + public delegate* unmanaged[MemberFunction] GetSingle; [NativeTypeName("HRESULT (DOUBLE *) __attribute__((stdcall))")] - public delegate* unmanaged GetDouble; + public delegate* unmanaged[MemberFunction] GetDouble; [NativeTypeName("HRESULT (WCHAR *) __attribute__((stdcall))")] - public delegate* unmanaged GetChar16; + public delegate* unmanaged[MemberFunction] GetChar16; [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] - public delegate* unmanaged GetBoolean; + public delegate* unmanaged[MemberFunction] GetBoolean; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetString; + public delegate* unmanaged[MemberFunction] GetString; [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged GetGuid; + public delegate* unmanaged[MemberFunction] GetGuid; [NativeTypeName("HRESULT (ABI::Windows::Foundation::DateTime *) __attribute__((stdcall))")] - public delegate* unmanaged GetDateTime; + public delegate* unmanaged[MemberFunction] GetDateTime; [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan *) __attribute__((stdcall))")] - public delegate* unmanaged GetTimeSpan; + public delegate* unmanaged[MemberFunction] GetTimeSpan; [NativeTypeName("HRESULT (ABI::Windows::Foundation::Point *) __attribute__((stdcall))")] - public delegate* unmanaged GetPoint; + public delegate* unmanaged[MemberFunction] GetPoint; [NativeTypeName("HRESULT (ABI::Windows::Foundation::Size *) __attribute__((stdcall))")] - public delegate* unmanaged GetSize; + public delegate* unmanaged[MemberFunction] GetSize; [NativeTypeName("HRESULT (ABI::Windows::Foundation::Rect *) __attribute__((stdcall))")] - public delegate* unmanaged GetRect; + public delegate* unmanaged[MemberFunction] GetRect; [NativeTypeName("HRESULT (UINT32 *, BYTE **) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt8Array; + public delegate* unmanaged[MemberFunction] GetUInt8Array; [NativeTypeName("HRESULT (UINT32 *, INT16 **) __attribute__((stdcall))")] - public delegate* unmanaged GetInt16Array; + public delegate* unmanaged[MemberFunction] GetInt16Array; [NativeTypeName("HRESULT (UINT32 *, UINT16 **) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt16Array; + public delegate* unmanaged[MemberFunction] GetUInt16Array; [NativeTypeName("HRESULT (UINT32 *, INT32 **) __attribute__((stdcall))")] - public delegate* unmanaged GetInt32Array; + public delegate* unmanaged[MemberFunction] GetInt32Array; [NativeTypeName("HRESULT (UINT32 *, UINT32 **) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt32Array; + public delegate* unmanaged[MemberFunction] GetUInt32Array; [NativeTypeName("HRESULT (UINT32 *, INT64 **) __attribute__((stdcall))")] - public delegate* unmanaged GetInt64Array; + public delegate* unmanaged[MemberFunction] GetInt64Array; [NativeTypeName("HRESULT (UINT32 *, UINT64 **) __attribute__((stdcall))")] - public delegate* unmanaged GetUInt64Array; + public delegate* unmanaged[MemberFunction] GetUInt64Array; [NativeTypeName("HRESULT (UINT32 *, FLOAT **) __attribute__((stdcall))")] - public delegate* unmanaged GetSingleArray; + public delegate* unmanaged[MemberFunction] GetSingleArray; [NativeTypeName("HRESULT (UINT32 *, DOUBLE **) __attribute__((stdcall))")] - public delegate* unmanaged GetDoubleArray; + public delegate* unmanaged[MemberFunction] GetDoubleArray; [NativeTypeName("HRESULT (UINT32 *, WCHAR **) __attribute__((stdcall))")] - public delegate* unmanaged GetChar16Array; + public delegate* unmanaged[MemberFunction] GetChar16Array; [NativeTypeName("HRESULT (UINT32 *, boolean **) __attribute__((stdcall))")] - public delegate* unmanaged GetBooleanArray; + public delegate* unmanaged[MemberFunction] GetBooleanArray; [NativeTypeName("HRESULT (UINT32 *, HSTRING **) __attribute__((stdcall))")] - public delegate* unmanaged GetStringArray; + public delegate* unmanaged[MemberFunction] GetStringArray; [NativeTypeName("HRESULT (UINT32 *, IInspectable ***) __attribute__((stdcall))")] - public delegate* unmanaged GetInspectableArray; + public delegate* unmanaged[MemberFunction] GetInspectableArray; [NativeTypeName("HRESULT (UINT32 *, GUID **) __attribute__((stdcall))")] - public delegate* unmanaged GetGuidArray; + public delegate* unmanaged[MemberFunction] GetGuidArray; [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::DateTime **) __attribute__((stdcall))")] - public delegate* unmanaged GetDateTimeArray; + public delegate* unmanaged[MemberFunction] GetDateTimeArray; [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::TimeSpan **) __attribute__((stdcall))")] - public delegate* unmanaged GetTimeSpanArray; + public delegate* unmanaged[MemberFunction] GetTimeSpanArray; [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::Point **) __attribute__((stdcall))")] - public delegate* unmanaged GetPointArray; + public delegate* unmanaged[MemberFunction] GetPointArray; [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::Size **) __attribute__((stdcall))")] - public delegate* unmanaged GetSizeArray; + public delegate* unmanaged[MemberFunction] GetSizeArray; [NativeTypeName("HRESULT (UINT32 *, ABI::Windows::Foundation::Rect **) __attribute__((stdcall))")] - public delegate* unmanaged GetRectArray; + public delegate* unmanaged[MemberFunction] GetRectArray; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs index f251925ea2..fc8bd1ed43 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IPropertyValueStatics : IPropertyValueStatics.Inter [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT CreateEmpty(IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[6]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), propertyValue); } /// @@ -84,7 +84,7 @@ public HRESULT CreateEmpty(IInspectable** propertyValue) [VtblIndex(7)] public HRESULT CreateUInt8(byte value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[7]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -92,7 +92,7 @@ public HRESULT CreateUInt8(byte value, IInspectable** propertyValue) [VtblIndex(8)] public HRESULT CreateInt16([NativeTypeName("INT16")] short value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[8]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -100,7 +100,7 @@ public HRESULT CreateInt16([NativeTypeName("INT16")] short value, IInspectable** [VtblIndex(9)] public HRESULT CreateUInt16([NativeTypeName("UINT16")] ushort value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[9]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -108,7 +108,7 @@ public HRESULT CreateUInt16([NativeTypeName("UINT16")] ushort value, IInspectabl [VtblIndex(10)] public HRESULT CreateInt32([NativeTypeName("INT32")] int value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[10]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -116,7 +116,7 @@ public HRESULT CreateInt32([NativeTypeName("INT32")] int value, IInspectable** p [VtblIndex(11)] public HRESULT CreateUInt32([NativeTypeName("UINT32")] uint value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[11]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -124,7 +124,7 @@ public HRESULT CreateUInt32([NativeTypeName("UINT32")] uint value, IInspectable* [VtblIndex(12)] public HRESULT CreateInt64([NativeTypeName("INT64")] long value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[12]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -132,7 +132,7 @@ public HRESULT CreateInt64([NativeTypeName("INT64")] long value, IInspectable** [VtblIndex(13)] public HRESULT CreateUInt64([NativeTypeName("UINT64")] ulong value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[13]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -140,7 +140,7 @@ public HRESULT CreateUInt64([NativeTypeName("UINT64")] ulong value, IInspectable [VtblIndex(14)] public HRESULT CreateSingle(float value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[14]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -148,15 +148,15 @@ public HRESULT CreateSingle(float value, IInspectable** propertyValue) [VtblIndex(15)] public HRESULT CreateDouble(double value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[15]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(16)] - public HRESULT CreateChar16([NativeTypeName("WCHAR")] ushort value, IInspectable** propertyValue) + public HRESULT CreateChar16([NativeTypeName("WCHAR")] char value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[16]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[16]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -164,7 +164,7 @@ public HRESULT CreateChar16([NativeTypeName("WCHAR")] ushort value, IInspectable [VtblIndex(17)] public HRESULT CreateBoolean([NativeTypeName("boolean")] byte value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[17]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[17]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -172,7 +172,7 @@ public HRESULT CreateBoolean([NativeTypeName("boolean")] byte value, IInspectabl [VtblIndex(18)] public HRESULT CreateString(HSTRING value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[18]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[18]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -180,7 +180,7 @@ public HRESULT CreateString(HSTRING value, IInspectable** propertyValue) [VtblIndex(19)] public HRESULT CreateInspectable(IInspectable* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[19]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[19]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -188,7 +188,7 @@ public HRESULT CreateInspectable(IInspectable* value, IInspectable** propertyVal [VtblIndex(20)] public HRESULT CreateGuid(Guid value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[20]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[20]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -196,7 +196,7 @@ public HRESULT CreateGuid(Guid value, IInspectable** propertyValue) [VtblIndex(21)] public HRESULT CreateDateTime([NativeTypeName("ABI::Windows::Foundation::DateTime")] DateTime value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[21]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[21]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -204,7 +204,7 @@ public HRESULT CreateDateTime([NativeTypeName("ABI::Windows::Foundation::DateTim [VtblIndex(22)] public HRESULT CreateTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpan")] TimeSpan value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[22]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[22]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -212,7 +212,7 @@ public HRESULT CreateTimeSpan([NativeTypeName("ABI::Windows::Foundation::TimeSpa [VtblIndex(23)] public HRESULT CreatePoint([NativeTypeName("ABI::Windows::Foundation::Point")] Point value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[23]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[23]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -220,7 +220,7 @@ public HRESULT CreatePoint([NativeTypeName("ABI::Windows::Foundation::Point")] P [VtblIndex(24)] public HRESULT CreateSize([NativeTypeName("ABI::Windows::Foundation::Size")] Size value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[24]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[24]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -228,7 +228,7 @@ public HRESULT CreateSize([NativeTypeName("ABI::Windows::Foundation::Size")] Siz [VtblIndex(25)] public HRESULT CreateRect([NativeTypeName("ABI::Windows::Foundation::Rect")] Rect value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[25]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[25]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), value, propertyValue); } /// @@ -236,7 +236,7 @@ public HRESULT CreateRect([NativeTypeName("ABI::Windows::Foundation::Rect")] Rec [VtblIndex(26)] public HRESULT CreateUInt8Array([NativeTypeName("UINT32")] uint valueLength, byte* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[26]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[26]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -244,7 +244,7 @@ public HRESULT CreateUInt8Array([NativeTypeName("UINT32")] uint valueLength, byt [VtblIndex(27)] public HRESULT CreateInt16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT16 *")] short* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[27]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[27]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -252,7 +252,7 @@ public HRESULT CreateInt16Array([NativeTypeName("UINT32")] uint valueLength, [Na [VtblIndex(28)] public HRESULT CreateUInt16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT16 *")] ushort* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[28]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[28]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -260,7 +260,7 @@ public HRESULT CreateUInt16Array([NativeTypeName("UINT32")] uint valueLength, [N [VtblIndex(29)] public HRESULT CreateInt32Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT32 *")] int* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[29]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[29]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -268,7 +268,7 @@ public HRESULT CreateInt32Array([NativeTypeName("UINT32")] uint valueLength, [Na [VtblIndex(30)] public HRESULT CreateUInt32Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT32 *")] uint* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[30]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[30]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -276,7 +276,7 @@ public HRESULT CreateUInt32Array([NativeTypeName("UINT32")] uint valueLength, [N [VtblIndex(31)] public HRESULT CreateInt64Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("INT64 *")] long* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[31]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[31]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -284,7 +284,7 @@ public HRESULT CreateInt64Array([NativeTypeName("UINT32")] uint valueLength, [Na [VtblIndex(32)] public HRESULT CreateUInt64Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("UINT64 *")] ulong* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[32]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[32]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -292,7 +292,7 @@ public HRESULT CreateUInt64Array([NativeTypeName("UINT32")] uint valueLength, [N [VtblIndex(33)] public HRESULT CreateSingleArray([NativeTypeName("UINT32")] uint valueLength, float* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[33]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[33]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -300,15 +300,15 @@ public HRESULT CreateSingleArray([NativeTypeName("UINT32")] uint valueLength, fl [VtblIndex(34)] public HRESULT CreateDoubleArray([NativeTypeName("UINT32")] uint valueLength, double* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[34]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[34]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(35)] - public HRESULT CreateChar16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("WCHAR *")] ushort* value, IInspectable** propertyValue) + public HRESULT CreateChar16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("WCHAR *")] char* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[35]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[35]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -316,7 +316,7 @@ public HRESULT CreateChar16Array([NativeTypeName("UINT32")] uint valueLength, [N [VtblIndex(36)] public HRESULT CreateBooleanArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("boolean *")] byte* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[36]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[36]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -324,7 +324,7 @@ public HRESULT CreateBooleanArray([NativeTypeName("UINT32")] uint valueLength, [ [VtblIndex(37)] public HRESULT CreateStringArray([NativeTypeName("UINT32")] uint valueLength, HSTRING* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[37]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[37]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -332,7 +332,7 @@ public HRESULT CreateStringArray([NativeTypeName("UINT32")] uint valueLength, HS [VtblIndex(38)] public HRESULT CreateInspectableArray([NativeTypeName("UINT32")] uint valueLength, IInspectable** value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[38]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[38]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -340,7 +340,7 @@ public HRESULT CreateInspectableArray([NativeTypeName("UINT32")] uint valueLengt [VtblIndex(39)] public HRESULT CreateGuidArray([NativeTypeName("UINT32")] uint valueLength, Guid* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[39]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[39]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -348,7 +348,7 @@ public HRESULT CreateGuidArray([NativeTypeName("UINT32")] uint valueLength, Guid [VtblIndex(40)] public HRESULT CreateDateTimeArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::DateTime *")] DateTime* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[40]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[40]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -356,7 +356,7 @@ public HRESULT CreateDateTimeArray([NativeTypeName("UINT32")] uint valueLength, [VtblIndex(41)] public HRESULT CreateTimeSpanArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[41]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[41]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -364,7 +364,7 @@ public HRESULT CreateTimeSpanArray([NativeTypeName("UINT32")] uint valueLength, [VtblIndex(42)] public HRESULT CreatePointArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Point *")] Point* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[42]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[42]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -372,7 +372,7 @@ public HRESULT CreatePointArray([NativeTypeName("UINT32")] uint valueLength, [Na [VtblIndex(43)] public HRESULT CreateSizeArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Size *")] Size* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[43]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[43]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } /// @@ -380,7 +380,7 @@ public HRESULT CreateSizeArray([NativeTypeName("UINT32")] uint valueLength, [Nat [VtblIndex(44)] public HRESULT CreateRectArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("ABI::Windows::Foundation::Rect *")] Rect* value, IInspectable** propertyValue) { - return ((delegate* unmanaged)(lpVtbl[44]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[44]))((IPropertyValueStatics*)Unsafe.AsPointer(ref this), valueLength, value, propertyValue); } public interface Interface : IInspectable.Interface @@ -416,7 +416,7 @@ public interface Interface : IInspectable.Interface HRESULT CreateDouble(double value, IInspectable** propertyValue); [VtblIndex(16)] - HRESULT CreateChar16([NativeTypeName("WCHAR")] ushort value, IInspectable** propertyValue); + HRESULT CreateChar16([NativeTypeName("WCHAR")] char value, IInspectable** propertyValue); [VtblIndex(17)] HRESULT CreateBoolean([NativeTypeName("boolean")] byte value, IInspectable** propertyValue); @@ -473,7 +473,7 @@ public interface Interface : IInspectable.Interface HRESULT CreateDoubleArray([NativeTypeName("UINT32")] uint valueLength, double* value, IInspectable** propertyValue); [VtblIndex(35)] - HRESULT CreateChar16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("WCHAR *")] ushort* value, IInspectable** propertyValue); + HRESULT CreateChar16Array([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("WCHAR *")] char* value, IInspectable** propertyValue); [VtblIndex(36)] HRESULT CreateBooleanArray([NativeTypeName("UINT32")] uint valueLength, [NativeTypeName("boolean *")] byte* value, IInspectable** propertyValue); @@ -507,138 +507,138 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateEmpty; + public delegate* unmanaged[MemberFunction] CreateEmpty; [NativeTypeName("HRESULT (BYTE, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt8; + public delegate* unmanaged[MemberFunction] CreateUInt8; [NativeTypeName("HRESULT (INT16, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInt16; + public delegate* unmanaged[MemberFunction] CreateInt16; [NativeTypeName("HRESULT (UINT16, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt16; + public delegate* unmanaged[MemberFunction] CreateUInt16; [NativeTypeName("HRESULT (INT32, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInt32; + public delegate* unmanaged[MemberFunction] CreateInt32; [NativeTypeName("HRESULT (UINT32, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt32; + public delegate* unmanaged[MemberFunction] CreateUInt32; [NativeTypeName("HRESULT (INT64, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInt64; + public delegate* unmanaged[MemberFunction] CreateInt64; [NativeTypeName("HRESULT (UINT64, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt64; + public delegate* unmanaged[MemberFunction] CreateUInt64; [NativeTypeName("HRESULT (FLOAT, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateSingle; + public delegate* unmanaged[MemberFunction] CreateSingle; [NativeTypeName("HRESULT (DOUBLE, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateDouble; + public delegate* unmanaged[MemberFunction] CreateDouble; [NativeTypeName("HRESULT (WCHAR, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateChar16; + public delegate* unmanaged[MemberFunction] CreateChar16; [NativeTypeName("HRESULT (boolean, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateBoolean; + public delegate* unmanaged[MemberFunction] CreateBoolean; [NativeTypeName("HRESULT (HSTRING, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateString; + public delegate* unmanaged[MemberFunction] CreateString; [NativeTypeName("HRESULT (IInspectable *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInspectable; + public delegate* unmanaged[MemberFunction] CreateInspectable; [NativeTypeName("HRESULT (GUID, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateGuid; + public delegate* unmanaged[MemberFunction] CreateGuid; [NativeTypeName("HRESULT (ABI::Windows::Foundation::DateTime, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateDateTime; + public delegate* unmanaged[MemberFunction] CreateDateTime; [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateTimeSpan; + public delegate* unmanaged[MemberFunction] CreateTimeSpan; [NativeTypeName("HRESULT (ABI::Windows::Foundation::Point, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreatePoint; + public delegate* unmanaged[MemberFunction] CreatePoint; [NativeTypeName("HRESULT (ABI::Windows::Foundation::Size, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateSize; + public delegate* unmanaged[MemberFunction] CreateSize; [NativeTypeName("HRESULT (ABI::Windows::Foundation::Rect, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateRect; + public delegate* unmanaged[MemberFunction] CreateRect; [NativeTypeName("HRESULT (UINT32, BYTE *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt8Array; + public delegate* unmanaged[MemberFunction] CreateUInt8Array; [NativeTypeName("HRESULT (UINT32, INT16 *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInt16Array; + public delegate* unmanaged[MemberFunction] CreateInt16Array; [NativeTypeName("HRESULT (UINT32, UINT16 *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt16Array; + public delegate* unmanaged[MemberFunction] CreateUInt16Array; [NativeTypeName("HRESULT (UINT32, INT32 *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInt32Array; + public delegate* unmanaged[MemberFunction] CreateInt32Array; [NativeTypeName("HRESULT (UINT32, UINT32 *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt32Array; + public delegate* unmanaged[MemberFunction] CreateUInt32Array; [NativeTypeName("HRESULT (UINT32, INT64 *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInt64Array; + public delegate* unmanaged[MemberFunction] CreateInt64Array; [NativeTypeName("HRESULT (UINT32, UINT64 *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUInt64Array; + public delegate* unmanaged[MemberFunction] CreateUInt64Array; [NativeTypeName("HRESULT (UINT32, FLOAT *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateSingleArray; + public delegate* unmanaged[MemberFunction] CreateSingleArray; [NativeTypeName("HRESULT (UINT32, DOUBLE *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateDoubleArray; + public delegate* unmanaged[MemberFunction] CreateDoubleArray; [NativeTypeName("HRESULT (UINT32, WCHAR *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateChar16Array; + public delegate* unmanaged[MemberFunction] CreateChar16Array; [NativeTypeName("HRESULT (UINT32, boolean *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateBooleanArray; + public delegate* unmanaged[MemberFunction] CreateBooleanArray; [NativeTypeName("HRESULT (UINT32, HSTRING *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateStringArray; + public delegate* unmanaged[MemberFunction] CreateStringArray; [NativeTypeName("HRESULT (UINT32, IInspectable **, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateInspectableArray; + public delegate* unmanaged[MemberFunction] CreateInspectableArray; [NativeTypeName("HRESULT (UINT32, GUID *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateGuidArray; + public delegate* unmanaged[MemberFunction] CreateGuidArray; [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::DateTime *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateDateTimeArray; + public delegate* unmanaged[MemberFunction] CreateDateTimeArray; [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::TimeSpan *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateTimeSpanArray; + public delegate* unmanaged[MemberFunction] CreateTimeSpanArray; [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::Point *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreatePointArray; + public delegate* unmanaged[MemberFunction] CreatePointArray; [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::Size *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateSizeArray; + public delegate* unmanaged[MemberFunction] CreateSizeArray; [NativeTypeName("HRESULT (UINT32, ABI::Windows::Foundation::Rect *, IInspectable **) __attribute__((stdcall))")] - public delegate* unmanaged CreateRectArray; + public delegate* unmanaged[MemberFunction] CreateRectArray; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs index e8ffe43345..8c792f96aa 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IStringable.cs @@ -26,7 +26,7 @@ public unsafe partial struct IStringable : IStringable.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IStringable*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IStringable*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IStringable*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IStringable*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IStringable*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IStringable*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IStringable*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IStringable*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IStringable*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IStringable*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IStringable*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IStringable*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT ToString(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IStringable*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IStringable*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public new delegate* unmanaged ToString; + public new delegate* unmanaged[MemberFunction] ToString; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs index 3d872b87da..3259befdae 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IUriEscapeStatics : IUriEscapeStatics.Interface, IN [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT UnescapeComponent(HSTRING toUnescape, HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), toUnescape, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), toUnescape, value); } /// @@ -84,7 +84,7 @@ public HRESULT UnescapeComponent(HSTRING toUnescape, HSTRING* value) [VtblIndex(7)] public HRESULT EscapeComponent(HSTRING toEscape, HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), toEscape, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IUriEscapeStatics*)Unsafe.AsPointer(ref this), toEscape, value); } public interface Interface : IInspectable.Interface @@ -100,27 +100,27 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING, HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged UnescapeComponent; + public delegate* unmanaged[MemberFunction] UnescapeComponent; [NativeTypeName("HRESULT (HSTRING, HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged EscapeComponent; + public delegate* unmanaged[MemberFunction] EscapeComponent; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs index 0d9f52020e..23a756be03 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClass.cs @@ -26,7 +26,7 @@ public unsafe partial struct IUriRuntimeClass : IUriRuntimeClass.Interface, INat [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_AbsoluteUri(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_AbsoluteUri(HSTRING* value) [VtblIndex(7)] public HRESULT get_DisplayUri(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_DisplayUri(HSTRING* value) [VtblIndex(8)] public HRESULT get_Domain(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -100,7 +100,7 @@ public HRESULT get_Domain(HSTRING* value) [VtblIndex(9)] public HRESULT get_Extension(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT get_Extension(HSTRING* value) [VtblIndex(10)] public HRESULT get_Fragment(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -116,7 +116,7 @@ public HRESULT get_Fragment(HSTRING* value) [VtblIndex(11)] public HRESULT get_Host(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[11]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -124,7 +124,7 @@ public HRESULT get_Host(HSTRING* value) [VtblIndex(12)] public HRESULT get_Password(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[12]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -132,7 +132,7 @@ public HRESULT get_Password(HSTRING* value) [VtblIndex(13)] public HRESULT get_Path(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[13]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -140,7 +140,7 @@ public HRESULT get_Path(HSTRING* value) [VtblIndex(14)] public HRESULT get_Query(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[14]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -148,7 +148,7 @@ public HRESULT get_Query(HSTRING* value) [VtblIndex(15)] public HRESULT get_QueryParsed([NativeTypeName("ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **")] IWwwFormUrlDecoderRuntimeClass** ppWwwFormUrlDecoder) { - return ((delegate* unmanaged)(lpVtbl[15]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), ppWwwFormUrlDecoder); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), ppWwwFormUrlDecoder); } /// @@ -156,7 +156,7 @@ public HRESULT get_QueryParsed([NativeTypeName("ABI::Windows::Foundation::IWwwFo [VtblIndex(16)] public HRESULT get_RawUri(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[16]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[16]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -164,7 +164,7 @@ public HRESULT get_RawUri(HSTRING* value) [VtblIndex(17)] public HRESULT get_SchemeName(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[17]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[17]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -172,7 +172,7 @@ public HRESULT get_SchemeName(HSTRING* value) [VtblIndex(18)] public HRESULT get_UserName(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[18]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[18]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -180,7 +180,7 @@ public HRESULT get_UserName(HSTRING* value) [VtblIndex(19)] public HRESULT get_Port([NativeTypeName("INT32 *")] int* value) { - return ((delegate* unmanaged)(lpVtbl[19]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[19]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -188,7 +188,7 @@ public HRESULT get_Port([NativeTypeName("INT32 *")] int* value) [VtblIndex(20)] public HRESULT get_Suspicious([NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[20]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[20]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), value); } /// @@ -196,7 +196,7 @@ public HRESULT get_Suspicious([NativeTypeName("boolean *")] byte* value) [VtblIndex(21)] public HRESULT Equals([NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass *")] IUriRuntimeClass* pUri, [NativeTypeName("boolean *")] byte* value) { - return ((delegate* unmanaged)(lpVtbl[21]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), pUri, value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[21]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), pUri, value); } /// @@ -204,7 +204,7 @@ public HRESULT Equals([NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClas [VtblIndex(22)] public HRESULT CombineUri(HSTRING relativeUri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance) { - return ((delegate* unmanaged)(lpVtbl[22]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), relativeUri, instance); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[22]))((IUriRuntimeClass*)Unsafe.AsPointer(ref this), relativeUri, instance); } public interface Interface : IInspectable.Interface @@ -265,72 +265,72 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_AbsoluteUri; + public delegate* unmanaged[MemberFunction] get_AbsoluteUri; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_DisplayUri; + public delegate* unmanaged[MemberFunction] get_DisplayUri; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Domain; + public delegate* unmanaged[MemberFunction] get_Domain; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Extension; + public delegate* unmanaged[MemberFunction] get_Extension; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Fragment; + public delegate* unmanaged[MemberFunction] get_Fragment; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Host; + public delegate* unmanaged[MemberFunction] get_Host; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Password; + public delegate* unmanaged[MemberFunction] get_Password; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Path; + public delegate* unmanaged[MemberFunction] get_Path; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Query; + public delegate* unmanaged[MemberFunction] get_Query; [NativeTypeName("HRESULT (ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **) __attribute__((stdcall))")] - public delegate* unmanaged get_QueryParsed; + public delegate* unmanaged[MemberFunction] get_QueryParsed; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_RawUri; + public delegate* unmanaged[MemberFunction] get_RawUri; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_SchemeName; + public delegate* unmanaged[MemberFunction] get_SchemeName; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_UserName; + public delegate* unmanaged[MemberFunction] get_UserName; [NativeTypeName("HRESULT (INT32 *) __attribute__((stdcall))")] - public delegate* unmanaged get_Port; + public delegate* unmanaged[MemberFunction] get_Port; [NativeTypeName("HRESULT (boolean *) __attribute__((stdcall))")] - public delegate* unmanaged get_Suspicious; + public delegate* unmanaged[MemberFunction] get_Suspicious; [NativeTypeName("HRESULT (ABI::Windows::Foundation::IUriRuntimeClass *, boolean *) __attribute__((stdcall))")] - public new delegate* unmanaged Equals; + public new delegate* unmanaged[MemberFunction] Equals; [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::IUriRuntimeClass **) __attribute__((stdcall))")] - public delegate* unmanaged CombineUri; + public delegate* unmanaged[MemberFunction] CombineUri; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs index 08d0acefbe..cad75fc5b2 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactory.cs @@ -26,7 +26,7 @@ public unsafe partial struct IUriRuntimeClassFactory : IUriRuntimeClassFactory.I [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT CreateUri(HSTRING uri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance) { - return ((delegate* unmanaged)(lpVtbl[6]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), uri, instance); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), uri, instance); } /// @@ -84,7 +84,7 @@ public HRESULT CreateUri(HSTRING uri, [NativeTypeName("ABI::Windows::Foundation: [VtblIndex(7)] public HRESULT CreateWithRelativeUri(HSTRING baseUri, HSTRING relativeUri, [NativeTypeName("ABI::Windows::Foundation::IUriRuntimeClass **")] IUriRuntimeClass** instance) { - return ((delegate* unmanaged)(lpVtbl[7]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), baseUri, relativeUri, instance); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IUriRuntimeClassFactory*)Unsafe.AsPointer(ref this), baseUri, relativeUri, instance); } public interface Interface : IInspectable.Interface @@ -100,27 +100,27 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::IUriRuntimeClass **) __attribute__((stdcall))")] - public delegate* unmanaged CreateUri; + public delegate* unmanaged[MemberFunction] CreateUri; [NativeTypeName("HRESULT (HSTRING, HSTRING, ABI::Windows::Foundation::IUriRuntimeClass **) __attribute__((stdcall))")] - public delegate* unmanaged CreateWithRelativeUri; + public delegate* unmanaged[MemberFunction] CreateWithRelativeUri; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs index 2657c8ece5..696475dd5a 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUri.cs @@ -26,7 +26,7 @@ public unsafe partial struct IUriRuntimeClassWithAbsoluteCanonicalUri : IUriRunt [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_AbsoluteCanonicalUri(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_AbsoluteCanonicalUri(HSTRING* value) [VtblIndex(7)] public HRESULT get_DisplayIri(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IUriRuntimeClassWithAbsoluteCanonicalUri*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -100,27 +100,27 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_AbsoluteCanonicalUri; + public delegate* unmanaged[MemberFunction] get_AbsoluteCanonicalUri; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_DisplayIri; + public delegate* unmanaged[MemberFunction] get_DisplayIri; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs index f9b7b0e8e5..4fcd04abe4 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntry.cs @@ -26,7 +26,7 @@ public unsafe partial struct IWwwFormUrlDecoderEntry : IWwwFormUrlDecoderEntry.I [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Name(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_Name(HSTRING* value) [VtblIndex(7)] public HRESULT get_Value(HSTRING* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IWwwFormUrlDecoderEntry*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -100,27 +100,27 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Name; + public delegate* unmanaged[MemberFunction] get_Name; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Value; + public delegate* unmanaged[MemberFunction] get_Value; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs index a7d337ce3f..7b8d46e20b 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClass.cs @@ -26,7 +26,7 @@ public unsafe partial struct IWwwFormUrlDecoderRuntimeClass : IWwwFormUrlDecoder [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT GetFirstValueByName(HSTRING name, HSTRING* phstrValue) { - return ((delegate* unmanaged)(lpVtbl[6]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), name, phstrValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IWwwFormUrlDecoderRuntimeClass*)Unsafe.AsPointer(ref this), name, phstrValue); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING, HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetFirstValueByName; + public delegate* unmanaged[MemberFunction] GetFirstValueByName; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs index ca559a2bf1..1ebd8f4b05 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactory.cs @@ -26,7 +26,7 @@ public unsafe partial struct IWwwFormUrlDecoderRuntimeClassFactory : IWwwFormUrl [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT CreateWwwFormUrlDecoder(HSTRING query, [NativeTypeName("ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **")] IWwwFormUrlDecoderRuntimeClass** instance) { - return ((delegate* unmanaged)(lpVtbl[6]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), query, instance); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IWwwFormUrlDecoderRuntimeClassFactory*)Unsafe.AsPointer(ref this), query, instance); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING, ABI::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass **) __attribute__((stdcall))")] - public delegate* unmanaged CreateWwwFormUrlDecoder; + public delegate* unmanaged[MemberFunction] CreateWwwFormUrlDecoder; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs index 41696e5a6b..1f40e2f285 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffect.cs @@ -26,7 +26,7 @@ public unsafe partial struct IGraphicsEffect : IGraphicsEffect.Interface, INativ [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IGraphicsEffect*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IGraphicsEffect*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IGraphicsEffect*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IGraphicsEffect*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_Name(HSTRING* name) { - return ((delegate* unmanaged)(lpVtbl[6]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), name); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), name); } /// @@ -84,7 +84,7 @@ public HRESULT get_Name(HSTRING* name) [VtblIndex(7)] public HRESULT put_Name(HSTRING name) { - return ((delegate* unmanaged)(lpVtbl[7]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), name); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IGraphicsEffect*)Unsafe.AsPointer(ref this), name); } public interface Interface : IInspectable.Interface @@ -100,27 +100,27 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged get_Name; + public delegate* unmanaged[MemberFunction] get_Name; [NativeTypeName("HRESULT (HSTRING) __attribute__((stdcall))")] - public delegate* unmanaged put_Name; + public delegate* unmanaged[MemberFunction] put_Name; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs index cf4602b025..c79488856c 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSource.cs @@ -26,7 +26,7 @@ public unsafe partial struct IGraphicsEffectSource : IGraphicsEffectSource.Inter [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IGraphicsEffectSource*)Unsafe.AsPointer(ref this), trustLevel); } public interface Interface : IInspectable.Interface @@ -79,21 +79,21 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.Manual.cs similarity index 92% rename from sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.Manual.cs index d6615fa086..2233aa93f7 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics.effects/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IGraphicsEffect { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xCE, 0xC0, 0x51, 0xCB, 0xE6, 0x8F, 0x36, 0x46, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IGraphicsEffect 0x07, 0xD8, 0xF3 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -39,7 +39,7 @@ public static ref readonly Guid IID_IGraphicsEffectSource { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xDC, 0x9D, 0x8F, 0x2D, 0x39, 0x43, 0xB9, 0x4E, @@ -51,7 +51,7 @@ public static ref readonly Guid IID_IGraphicsEffectSource 0x56, 0x58, 0xA2 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs index 757df65a43..869fc29adf 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2D.cs @@ -26,7 +26,7 @@ public unsafe partial struct IGeometrySource2D : IGeometrySource2D.Interface, IN [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IGeometrySource2D*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IGeometrySource2D*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IGeometrySource2D*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IGeometrySource2D*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IGeometrySource2D*)Unsafe.AsPointer(ref this), trustLevel); } public interface Interface : IInspectable.Interface @@ -79,21 +79,21 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.Manual.cs similarity index 93% rename from sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.Manual.cs index 522ab3140e..4831c08343 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.graphics/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IGeometrySource2D { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x02, 0x79, 0xFF, 0xCA, 0x0C, 0x67, 0x81, 0x41, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IGeometrySource2D 0x03, 0xB8, 0x45 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs index ebcb2c6b71..c5f9b42863 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStatics.cs @@ -15,7 +15,7 @@ namespace TerraFX.Interop.WinRT; [Guid("B3161D95-1180-4376-96E1-4095568147CE")] [NativeTypeName("struct IBackgroundEnergyManagerStatics : IInspectable")] [NativeInheritance("IInspectable")] -[Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] +[Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public unsafe partial struct IBackgroundEnergyManagerStatics : IBackgroundEnergyManagerStatics.Interface, INativeGuid { static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IBackgroundEnergyManagerStatics)); @@ -27,7 +27,7 @@ public unsafe partial struct IBackgroundEnergyManagerStatics : IBackgroundEnergy [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -36,7 +36,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); } /// @@ -45,7 +45,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); } /// @@ -53,7 +53,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -61,7 +61,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -69,165 +69,165 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_NearTerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(11)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_TerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[11]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(12)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[12]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[13]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[14]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[14]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[15]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(16)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[16]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[16]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(17)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[17]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[17]))((IBackgroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); } public interface Interface : IInspectable.Interface { [VtblIndex(6)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(7)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(8)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(9)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(10)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_NearTerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(11)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_TerminationUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(12)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(13)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(14)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); [VtblIndex(15)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token); [VtblIndex(16)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); [VtblIndex(17)] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token); } @@ -235,69 +235,69 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_LowUsageLevel; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_LowUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_NearMaxAcceptableUsageLevel; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_NearMaxAcceptableUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_MaxAcceptableUsageLevel; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_MaxAcceptableUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_ExcessiveUsageLevel; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_ExcessiveUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_NearTerminationUsageLevel; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_NearTerminationUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_TerminationUsageLevel; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_TerminationUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_RecentEnergyUsage; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_RecentEnergyUsage; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_RecentEnergyUsageLevel; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_RecentEnergyUsageLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageIncreased; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_RecentEnergyUsageIncreased; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged remove_RecentEnergyUsageIncreased; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] remove_RecentEnergyUsageIncreased; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageReturnedToLow; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_RecentEnergyUsageReturnedToLow; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged remove_RecentEnergyUsageReturnedToLow; + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] remove_RecentEnergyUsageReturnedToLow; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs index 2fa735fcd4..6a2d21eb08 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStatics.cs @@ -15,7 +15,7 @@ namespace TerraFX.Interop.WinRT; [Guid("9FF86872-E677-4814-9A20-5337CA732B98")] [NativeTypeName("struct IForegroundEnergyManagerStatics : IInspectable")] [NativeInheritance("IInspectable")] -[Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] +[Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public unsafe partial struct IForegroundEnergyManagerStatics : IForegroundEnergyManagerStatics.Interface, INativeGuid { static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IForegroundEnergyManagerStatics)); @@ -27,7 +27,7 @@ public unsafe partial struct IForegroundEnergyManagerStatics : IForegroundEnergy [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -36,7 +36,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); } /// @@ -45,7 +45,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this)); } /// @@ -53,7 +53,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -61,7 +61,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -69,139 +69,139 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(11)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value) { - return ((delegate* unmanaged)(lpVtbl[11]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), value); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(12)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[12]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[12]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[13]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[14]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[14]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[15]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IForegroundEnergyManagerStatics*)Unsafe.AsPointer(ref this), token); } public interface Interface : IInspectable.Interface { [VtblIndex(6)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_LowUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(7)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_NearMaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(8)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_MaxAcceptableUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(9)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_ExcessiveUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(10)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_RecentEnergyUsage([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(11)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT get_RecentEnergyUsageLevel([NativeTypeName("UINT32 *")] uint* value); [VtblIndex(12)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT add_RecentEnergyUsageIncreased([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); [VtblIndex(13)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT remove_RecentEnergyUsageIncreased(EventRegistrationToken token); [VtblIndex(14)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT add_RecentEnergyUsageReturnedToLow([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token); [VtblIndex(15)] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] HRESULT remove_RecentEnergyUsageReturnedToLow(EventRegistrationToken token); } @@ -209,61 +209,61 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_LowUsageLevel; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_LowUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_NearMaxAcceptableUsageLevel; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_NearMaxAcceptableUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_MaxAcceptableUsageLevel; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_MaxAcceptableUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_ExcessiveUsageLevel; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_ExcessiveUsageLevel; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_RecentEnergyUsage; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_RecentEnergyUsage; [NativeTypeName("HRESULT (UINT32 *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged get_RecentEnergyUsageLevel; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] get_RecentEnergyUsageLevel; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageIncreased; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_RecentEnergyUsageIncreased; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged remove_RecentEnergyUsageIncreased; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] remove_RecentEnergyUsageIncreased; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_RecentEnergyUsageReturnedToLow; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_RecentEnergyUsageReturnedToLow; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] - public delegate* unmanaged remove_RecentEnergyUsageReturnedToLow; + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] + public delegate* unmanaged[MemberFunction] remove_RecentEnergyUsageReturnedToLow; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.Manual.cs similarity index 91% rename from sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.Manual.cs index 02e8a10b33..4b879b5140 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IBackgroundEnergyManagerStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x95, 0x1D, 0x16, 0xB3, 0x80, 0x11, 0x76, 0x43, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IBackgroundEnergyManagerStatics 0x81, 0x47, 0xCE - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -39,7 +39,7 @@ public static ref readonly Guid IID_IForegroundEnergyManagerStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x72, 0x68, 0xF8, 0x9F, 0x77, 0xE6, 0x14, 0x48, @@ -51,7 +51,7 @@ public static ref readonly Guid IID_IForegroundEnergyManagerStatics 0x73, 0x2B, 0x98 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -62,7 +62,7 @@ public static ref readonly Guid IID_IPowerManagerStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x5D, 0x82, 0x94, 0x13, 0xCE, 0x62, 0x64, 0x43, @@ -74,7 +74,7 @@ public static ref readonly Guid IID_IPowerManagerStatics 0xFB, 0xD1, 0x5B - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs index 472bd2b30c..95dca132cb 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IPowerManagerStatics : IPowerManagerStatics.Interfa [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_EnergySaverStatus([NativeTypeName("ABI::Windows::System::Power::EnergySaverStatus *")] EnergySaverStatus* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_EnergySaverStatus([NativeTypeName("ABI::Windows::System::Powe [VtblIndex(7)] public HRESULT add_EnergySaverStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[7]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[7]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// @@ -92,7 +92,7 @@ public HRESULT add_EnergySaverStatusChanged([NativeTypeName("ABI::Windows::Found [VtblIndex(8)] public HRESULT remove_EnergySaverStatusChanged(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[8]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); } /// @@ -100,7 +100,7 @@ public HRESULT remove_EnergySaverStatusChanged(EventRegistrationToken token) [VtblIndex(9)] public HRESULT get_BatteryStatus([NativeTypeName("ABI::Windows::System::Power::BatteryStatus *")] BatteryStatus* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT get_BatteryStatus([NativeTypeName("ABI::Windows::System::Power::B [VtblIndex(10)] public HRESULT add_BatteryStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[10]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[10]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// @@ -116,7 +116,7 @@ public HRESULT add_BatteryStatusChanged([NativeTypeName("ABI::Windows::Foundatio [VtblIndex(11)] public HRESULT remove_BatteryStatusChanged(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[11]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); } /// @@ -124,7 +124,7 @@ public HRESULT remove_BatteryStatusChanged(EventRegistrationToken token) [VtblIndex(12)] public HRESULT get_PowerSupplyStatus([NativeTypeName("ABI::Windows::System::Power::PowerSupplyStatus *")] PowerSupplyStatus* value) { - return ((delegate* unmanaged)(lpVtbl[12]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -132,7 +132,7 @@ public HRESULT get_PowerSupplyStatus([NativeTypeName("ABI::Windows::System::Powe [VtblIndex(13)] public HRESULT add_PowerSupplyStatusChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[13]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[13]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// @@ -140,7 +140,7 @@ public HRESULT add_PowerSupplyStatusChanged([NativeTypeName("ABI::Windows::Found [VtblIndex(14)] public HRESULT remove_PowerSupplyStatusChanged(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[14]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); } /// @@ -148,7 +148,7 @@ public HRESULT remove_PowerSupplyStatusChanged(EventRegistrationToken token) [VtblIndex(15)] public HRESULT get_RemainingChargePercent([NativeTypeName("INT32 *")] int* value) { - return ((delegate* unmanaged)(lpVtbl[15]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -156,7 +156,7 @@ public HRESULT get_RemainingChargePercent([NativeTypeName("INT32 *")] int* value [VtblIndex(16)] public HRESULT add_RemainingChargePercentChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[16]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[16]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// @@ -164,7 +164,7 @@ public HRESULT add_RemainingChargePercentChanged([NativeTypeName("ABI::Windows:: [VtblIndex(17)] public HRESULT remove_RemainingChargePercentChanged(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[17]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[17]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); } /// @@ -172,7 +172,7 @@ public HRESULT remove_RemainingChargePercentChanged(EventRegistrationToken token [VtblIndex(18)] public HRESULT get_RemainingDischargeTime([NativeTypeName("ABI::Windows::Foundation::TimeSpan *")] TimeSpan* value) { - return ((delegate* unmanaged)(lpVtbl[18]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[18]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -180,7 +180,7 @@ public HRESULT get_RemainingDischargeTime([NativeTypeName("ABI::Windows::Foundat [VtblIndex(19)] public HRESULT add_RemainingDischargeTimeChanged([NativeTypeName("ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *")] IEventHandler* handler, EventRegistrationToken* token) { - return ((delegate* unmanaged*, EventRegistrationToken*, int>)(lpVtbl[19]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); + return ((delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int>)(lpVtbl[19]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), handler, token); } /// @@ -188,7 +188,7 @@ public HRESULT add_RemainingDischargeTimeChanged([NativeTypeName("ABI::Windows:: [VtblIndex(20)] public HRESULT remove_RemainingDischargeTimeChanged(EventRegistrationToken token) { - return ((delegate* unmanaged)(lpVtbl[20]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[20]))((IPowerManagerStatics*)Unsafe.AsPointer(ref this), token); } public interface Interface : IInspectable.Interface @@ -243,66 +243,66 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::System::Power::EnergySaverStatus *) __attribute__((stdcall))")] - public delegate* unmanaged get_EnergySaverStatus; + public delegate* unmanaged[MemberFunction] get_EnergySaverStatus; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_EnergySaverStatusChanged; + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_EnergySaverStatusChanged; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - public delegate* unmanaged remove_EnergySaverStatusChanged; + public delegate* unmanaged[MemberFunction] remove_EnergySaverStatusChanged; [NativeTypeName("HRESULT (ABI::Windows::System::Power::BatteryStatus *) __attribute__((stdcall))")] - public delegate* unmanaged get_BatteryStatus; + public delegate* unmanaged[MemberFunction] get_BatteryStatus; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_BatteryStatusChanged; + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_BatteryStatusChanged; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - public delegate* unmanaged remove_BatteryStatusChanged; + public delegate* unmanaged[MemberFunction] remove_BatteryStatusChanged; [NativeTypeName("HRESULT (ABI::Windows::System::Power::PowerSupplyStatus *) __attribute__((stdcall))")] - public delegate* unmanaged get_PowerSupplyStatus; + public delegate* unmanaged[MemberFunction] get_PowerSupplyStatus; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_PowerSupplyStatusChanged; + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_PowerSupplyStatusChanged; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - public delegate* unmanaged remove_PowerSupplyStatusChanged; + public delegate* unmanaged[MemberFunction] remove_PowerSupplyStatusChanged; [NativeTypeName("HRESULT (INT32 *) __attribute__((stdcall))")] - public delegate* unmanaged get_RemainingChargePercent; + public delegate* unmanaged[MemberFunction] get_RemainingChargePercent; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_RemainingChargePercentChanged; + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_RemainingChargePercentChanged; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - public delegate* unmanaged remove_RemainingChargePercentChanged; + public delegate* unmanaged[MemberFunction] remove_RemainingChargePercentChanged; [NativeTypeName("HRESULT (ABI::Windows::Foundation::TimeSpan *) __attribute__((stdcall))")] - public delegate* unmanaged get_RemainingDischargeTime; + public delegate* unmanaged[MemberFunction] get_RemainingDischargeTime; [NativeTypeName("HRESULT (ABI::Windows::Foundation::__FIEventHandler_1_IInspectable_t *, EventRegistrationToken *) __attribute__((stdcall))")] - public delegate* unmanaged*, EventRegistrationToken*, int> add_RemainingDischargeTimeChanged; + public delegate* unmanaged[MemberFunction]*, EventRegistrationToken*, int> add_RemainingDischargeTimeChanged; [NativeTypeName("HRESULT (EventRegistrationToken) __attribute__((stdcall))")] - public delegate* unmanaged remove_RemainingDischargeTimeChanged; + public delegate* unmanaged[MemberFunction] remove_RemainingDischargeTimeChanged; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs b/sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs index 543ca3489f..b1a2ea49c8 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.system.power/WinRT.cs @@ -3,6 +3,8 @@ // Ported from winrt/windows.system.power.h in the Windows SDK for Windows 10.0.22621.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop.WinRT; public static partial class WinRT @@ -17,11 +19,11 @@ public static partial class WinRT public const string InterfaceName_Windows_System_Power_IPowerManagerStatics = "Windows.System.Power.IPowerManagerStatics"; [NativeTypeName("const WCHAR[45]")] - [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Background Energy Manager has been deprecated. For more info, see MSDN.")] public const string RuntimeClass_Windows_System_Power_BackgroundEnergyManager = "Windows.System.Power.BackgroundEnergyManager"; [NativeTypeName("const WCHAR[45]")] - [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN")] + [Obsolete("Foreground Energy Manager has been deprecated. For more info, see MSDN.")] public const string RuntimeClass_Windows_System_Power_ForegroundEnergyManager = "Windows.System.Power.ForegroundEnergyManager"; [NativeTypeName("const WCHAR[34]")] diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs index fa61301c72..0f8f2852b3 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelper.cs @@ -26,7 +26,7 @@ public unsafe partial struct IColorHelper : IColorHelper.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IColorHelper*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IColorHelper*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IColorHelper*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IColorHelper*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IColorHelper*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IColorHelper*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IColorHelper*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IColorHelper*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IColorHelper*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IColorHelper*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IColorHelper*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IColorHelper*)Unsafe.AsPointer(ref this), trustLevel); } public interface Interface : IInspectable.Interface @@ -79,21 +79,21 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs index 3cc02506e5..e3a46dfea6 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IColorHelperStatics : IColorHelperStatics.Interface [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IColorHelperStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IColorHelperStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IColorHelperStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IColorHelperStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT FromArgb(byte a, byte r, byte g, byte b, [NativeTypeName("ABI::Windows::UI::Color *")] Color* returnValue) { - return ((delegate* unmanaged)(lpVtbl[6]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), a, r, g, b, returnValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IColorHelperStatics*)Unsafe.AsPointer(ref this), a, r, g, b, returnValue); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (BYTE, BYTE, BYTE, BYTE, ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged FromArgb; + public delegate* unmanaged[MemberFunction] FromArgb; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs index 935c806592..5b2a87564c 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2.cs @@ -26,7 +26,7 @@ public unsafe partial struct IColorHelperStatics2 : IColorHelperStatics2.Interfa [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT ToDisplayName([NativeTypeName("ABI::Windows::UI::Color")] Color color, HSTRING* returnValue) { - return ((delegate* unmanaged)(lpVtbl[6]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), color, returnValue); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IColorHelperStatics2*)Unsafe.AsPointer(ref this), color, returnValue); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::UI::Color, HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged ToDisplayName; + public delegate* unmanaged[MemberFunction] ToDisplayName; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs index e7cd571765..6411a535b2 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColors.cs @@ -26,7 +26,7 @@ public unsafe partial struct IColors : IColors.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IColors*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IColors*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IColors*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IColors*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IColors*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IColors*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IColors*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IColors*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IColors*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IColors*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IColors*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IColors*)Unsafe.AsPointer(ref this), trustLevel); } public interface Interface : IInspectable.Interface @@ -79,21 +79,21 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs index 6af6323631..73226d151a 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IColorsStatics.cs @@ -26,7 +26,7 @@ public unsafe partial struct IColorsStatics : IColorsStatics.Interface, INativeG [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IColorsStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IColorsStatics*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IColorsStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IColorsStatics*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IColorsStatics*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IColorsStatics*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IColorsStatics*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IColorsStatics*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IColorsStatics*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IColorsStatics*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IColorsStatics*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IColorsStatics*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_AliceBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -84,7 +84,7 @@ public HRESULT get_AliceBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(7)] public HRESULT get_AntiqueWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[7]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[7]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -92,7 +92,7 @@ public HRESULT get_AntiqueWhite([NativeTypeName("ABI::Windows::UI::Color *")] Co [VtblIndex(8)] public HRESULT get_Aqua([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[8]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -100,7 +100,7 @@ public HRESULT get_Aqua([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(9)] public HRESULT get_Aquamarine([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[9]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[9]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -108,7 +108,7 @@ public HRESULT get_Aquamarine([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(10)] public HRESULT get_Azure([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[10]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[10]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -116,7 +116,7 @@ public HRESULT get_Azure([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(11)] public HRESULT get_Beige([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[11]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[11]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -124,7 +124,7 @@ public HRESULT get_Beige([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(12)] public HRESULT get_Bisque([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[12]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[12]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -132,7 +132,7 @@ public HRESULT get_Bisque([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(13)] public HRESULT get_Black([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[13]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[13]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -140,7 +140,7 @@ public HRESULT get_Black([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(14)] public HRESULT get_BlanchedAlmond([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[14]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[14]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -148,7 +148,7 @@ public HRESULT get_BlanchedAlmond([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(15)] public HRESULT get_Blue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[15]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[15]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -156,7 +156,7 @@ public HRESULT get_Blue([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(16)] public HRESULT get_BlueViolet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[16]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[16]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -164,7 +164,7 @@ public HRESULT get_BlueViolet([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(17)] public HRESULT get_Brown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[17]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[17]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -172,7 +172,7 @@ public HRESULT get_Brown([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(18)] public HRESULT get_BurlyWood([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[18]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[18]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -180,7 +180,7 @@ public HRESULT get_BurlyWood([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(19)] public HRESULT get_CadetBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[19]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[19]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -188,7 +188,7 @@ public HRESULT get_CadetBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(20)] public HRESULT get_Chartreuse([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[20]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[20]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -196,7 +196,7 @@ public HRESULT get_Chartreuse([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(21)] public HRESULT get_Chocolate([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[21]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[21]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -204,7 +204,7 @@ public HRESULT get_Chocolate([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(22)] public HRESULT get_Coral([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[22]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[22]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -212,7 +212,7 @@ public HRESULT get_Coral([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(23)] public HRESULT get_CornflowerBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[23]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[23]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -220,7 +220,7 @@ public HRESULT get_CornflowerBlue([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(24)] public HRESULT get_Cornsilk([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[24]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[24]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -228,7 +228,7 @@ public HRESULT get_Cornsilk([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(25)] public HRESULT get_Crimson([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[25]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[25]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -236,7 +236,7 @@ public HRESULT get_Crimson([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(26)] public HRESULT get_Cyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[26]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[26]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -244,7 +244,7 @@ public HRESULT get_Cyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(27)] public HRESULT get_DarkBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[27]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[27]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -252,7 +252,7 @@ public HRESULT get_DarkBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(28)] public HRESULT get_DarkCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[28]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[28]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -260,7 +260,7 @@ public HRESULT get_DarkCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(29)] public HRESULT get_DarkGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[29]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[29]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -268,7 +268,7 @@ public HRESULT get_DarkGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(30)] public HRESULT get_DarkGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[30]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[30]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -276,7 +276,7 @@ public HRESULT get_DarkGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(31)] public HRESULT get_DarkGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[31]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[31]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -284,7 +284,7 @@ public HRESULT get_DarkGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(32)] public HRESULT get_DarkKhaki([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[32]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[32]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -292,7 +292,7 @@ public HRESULT get_DarkKhaki([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(33)] public HRESULT get_DarkMagenta([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[33]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[33]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -300,7 +300,7 @@ public HRESULT get_DarkMagenta([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(34)] public HRESULT get_DarkOliveGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[34]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[34]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -308,7 +308,7 @@ public HRESULT get_DarkOliveGreen([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(35)] public HRESULT get_DarkOrange([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[35]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[35]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -316,7 +316,7 @@ public HRESULT get_DarkOrange([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(36)] public HRESULT get_DarkOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[36]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[36]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -324,7 +324,7 @@ public HRESULT get_DarkOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(37)] public HRESULT get_DarkRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[37]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[37]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -332,7 +332,7 @@ public HRESULT get_DarkRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(38)] public HRESULT get_DarkSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[38]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[38]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -340,7 +340,7 @@ public HRESULT get_DarkSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(39)] public HRESULT get_DarkSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[39]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[39]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -348,7 +348,7 @@ public HRESULT get_DarkSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Co [VtblIndex(40)] public HRESULT get_DarkSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[40]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[40]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -356,7 +356,7 @@ public HRESULT get_DarkSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(41)] public HRESULT get_DarkSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[41]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[41]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -364,7 +364,7 @@ public HRESULT get_DarkSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(42)] public HRESULT get_DarkTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[42]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[42]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -372,7 +372,7 @@ public HRESULT get_DarkTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(43)] public HRESULT get_DarkViolet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[43]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[43]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -380,7 +380,7 @@ public HRESULT get_DarkViolet([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(44)] public HRESULT get_DeepPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[44]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[44]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -388,7 +388,7 @@ public HRESULT get_DeepPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(45)] public HRESULT get_DeepSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[45]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[45]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -396,7 +396,7 @@ public HRESULT get_DeepSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(46)] public HRESULT get_DimGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[46]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[46]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -404,7 +404,7 @@ public HRESULT get_DimGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(47)] public HRESULT get_DodgerBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[47]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[47]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -412,7 +412,7 @@ public HRESULT get_DodgerBlue([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(48)] public HRESULT get_Firebrick([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[48]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[48]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -420,7 +420,7 @@ public HRESULT get_Firebrick([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(49)] public HRESULT get_FloralWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[49]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[49]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -428,7 +428,7 @@ public HRESULT get_FloralWhite([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(50)] public HRESULT get_ForestGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[50]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[50]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -436,7 +436,7 @@ public HRESULT get_ForestGreen([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(51)] public HRESULT get_Fuchsia([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[51]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[51]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -444,7 +444,7 @@ public HRESULT get_Fuchsia([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(52)] public HRESULT get_Gainsboro([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[52]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[52]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -452,7 +452,7 @@ public HRESULT get_Gainsboro([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(53)] public HRESULT get_GhostWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[53]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[53]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -460,7 +460,7 @@ public HRESULT get_GhostWhite([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(54)] public HRESULT get_Gold([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[54]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[54]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -468,7 +468,7 @@ public HRESULT get_Gold([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(55)] public HRESULT get_Goldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[55]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[55]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -476,7 +476,7 @@ public HRESULT get_Goldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(56)] public HRESULT get_Gray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[56]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[56]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -484,7 +484,7 @@ public HRESULT get_Gray([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(57)] public HRESULT get_Green([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[57]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[57]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -492,7 +492,7 @@ public HRESULT get_Green([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(58)] public HRESULT get_GreenYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[58]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[58]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -500,7 +500,7 @@ public HRESULT get_GreenYellow([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(59)] public HRESULT get_Honeydew([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[59]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[59]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -508,7 +508,7 @@ public HRESULT get_Honeydew([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(60)] public HRESULT get_HotPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[60]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[60]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -516,7 +516,7 @@ public HRESULT get_HotPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(61)] public HRESULT get_IndianRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[61]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[61]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -524,7 +524,7 @@ public HRESULT get_IndianRed([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(62)] public HRESULT get_Indigo([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[62]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[62]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -532,7 +532,7 @@ public HRESULT get_Indigo([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(63)] public HRESULT get_Ivory([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[63]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[63]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -540,7 +540,7 @@ public HRESULT get_Ivory([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(64)] public HRESULT get_Khaki([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[64]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[64]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -548,7 +548,7 @@ public HRESULT get_Khaki([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(65)] public HRESULT get_Lavender([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[65]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[65]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -556,7 +556,7 @@ public HRESULT get_Lavender([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(66)] public HRESULT get_LavenderBlush([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[66]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[66]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -564,7 +564,7 @@ public HRESULT get_LavenderBlush([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(67)] public HRESULT get_LawnGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[67]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[67]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -572,7 +572,7 @@ public HRESULT get_LawnGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(68)] public HRESULT get_LemonChiffon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[68]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[68]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -580,7 +580,7 @@ public HRESULT get_LemonChiffon([NativeTypeName("ABI::Windows::UI::Color *")] Co [VtblIndex(69)] public HRESULT get_LightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[69]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[69]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -588,7 +588,7 @@ public HRESULT get_LightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(70)] public HRESULT get_LightCoral([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[70]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[70]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -596,7 +596,7 @@ public HRESULT get_LightCoral([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(71)] public HRESULT get_LightCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[71]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[71]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -604,7 +604,7 @@ public HRESULT get_LightCyan([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(72)] public HRESULT get_LightGoldenrodYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[72]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[72]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -612,7 +612,7 @@ public HRESULT get_LightGoldenrodYellow([NativeTypeName("ABI::Windows::UI::Color [VtblIndex(73)] public HRESULT get_LightGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[73]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[73]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -620,7 +620,7 @@ public HRESULT get_LightGreen([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(74)] public HRESULT get_LightGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[74]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[74]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -628,7 +628,7 @@ public HRESULT get_LightGray([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(75)] public HRESULT get_LightPink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[75]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[75]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -636,7 +636,7 @@ public HRESULT get_LightPink([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(76)] public HRESULT get_LightSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[76]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[76]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -644,7 +644,7 @@ public HRESULT get_LightSalmon([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(77)] public HRESULT get_LightSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[77]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[77]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -652,7 +652,7 @@ public HRESULT get_LightSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(78)] public HRESULT get_LightSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[78]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[78]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -660,7 +660,7 @@ public HRESULT get_LightSkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Co [VtblIndex(79)] public HRESULT get_LightSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[79]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[79]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -668,7 +668,7 @@ public HRESULT get_LightSlateGray([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(80)] public HRESULT get_LightSteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[80]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[80]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -676,7 +676,7 @@ public HRESULT get_LightSteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(81)] public HRESULT get_LightYellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[81]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[81]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -684,7 +684,7 @@ public HRESULT get_LightYellow([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(82)] public HRESULT get_Lime([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[82]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[82]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -692,7 +692,7 @@ public HRESULT get_Lime([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(83)] public HRESULT get_LimeGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[83]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[83]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -700,7 +700,7 @@ public HRESULT get_LimeGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(84)] public HRESULT get_Linen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[84]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[84]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -708,7 +708,7 @@ public HRESULT get_Linen([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(85)] public HRESULT get_Magenta([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[85]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[85]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -716,7 +716,7 @@ public HRESULT get_Magenta([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(86)] public HRESULT get_Maroon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[86]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[86]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -724,7 +724,7 @@ public HRESULT get_Maroon([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(87)] public HRESULT get_MediumAquamarine([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[87]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[87]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -732,7 +732,7 @@ public HRESULT get_MediumAquamarine([NativeTypeName("ABI::Windows::UI::Color *") [VtblIndex(88)] public HRESULT get_MediumBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[88]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[88]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -740,7 +740,7 @@ public HRESULT get_MediumBlue([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(89)] public HRESULT get_MediumOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[89]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[89]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -748,7 +748,7 @@ public HRESULT get_MediumOrchid([NativeTypeName("ABI::Windows::UI::Color *")] Co [VtblIndex(90)] public HRESULT get_MediumPurple([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[90]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[90]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -756,7 +756,7 @@ public HRESULT get_MediumPurple([NativeTypeName("ABI::Windows::UI::Color *")] Co [VtblIndex(91)] public HRESULT get_MediumSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[91]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[91]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -764,7 +764,7 @@ public HRESULT get_MediumSeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(92)] public HRESULT get_MediumSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[92]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[92]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -772,7 +772,7 @@ public HRESULT get_MediumSlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(93)] public HRESULT get_MediumSpringGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[93]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[93]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -780,7 +780,7 @@ public HRESULT get_MediumSpringGreen([NativeTypeName("ABI::Windows::UI::Color *" [VtblIndex(94)] public HRESULT get_MediumTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[94]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[94]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -788,7 +788,7 @@ public HRESULT get_MediumTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(95)] public HRESULT get_MediumVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[95]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[95]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -796,7 +796,7 @@ public HRESULT get_MediumVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] [VtblIndex(96)] public HRESULT get_MidnightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[96]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[96]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -804,7 +804,7 @@ public HRESULT get_MidnightBlue([NativeTypeName("ABI::Windows::UI::Color *")] Co [VtblIndex(97)] public HRESULT get_MintCream([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[97]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[97]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -812,7 +812,7 @@ public HRESULT get_MintCream([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(98)] public HRESULT get_MistyRose([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[98]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[98]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -820,7 +820,7 @@ public HRESULT get_MistyRose([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(99)] public HRESULT get_Moccasin([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[99]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[99]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -828,7 +828,7 @@ public HRESULT get_Moccasin([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(100)] public HRESULT get_NavajoWhite([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[100]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[100]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -836,7 +836,7 @@ public HRESULT get_NavajoWhite([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(101)] public HRESULT get_Navy([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[101]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[101]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -844,7 +844,7 @@ public HRESULT get_Navy([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(102)] public HRESULT get_OldLace([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[102]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[102]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -852,7 +852,7 @@ public HRESULT get_OldLace([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(103)] public HRESULT get_Olive([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[103]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[103]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -860,7 +860,7 @@ public HRESULT get_Olive([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(104)] public HRESULT get_OliveDrab([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[104]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[104]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -868,7 +868,7 @@ public HRESULT get_OliveDrab([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(105)] public HRESULT get_Orange([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[105]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[105]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -876,7 +876,7 @@ public HRESULT get_Orange([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(106)] public HRESULT get_OrangeRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[106]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[106]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -884,7 +884,7 @@ public HRESULT get_OrangeRed([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(107)] public HRESULT get_Orchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[107]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[107]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -892,7 +892,7 @@ public HRESULT get_Orchid([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(108)] public HRESULT get_PaleGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[108]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[108]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -900,7 +900,7 @@ public HRESULT get_PaleGoldenrod([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(109)] public HRESULT get_PaleGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[109]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[109]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -908,7 +908,7 @@ public HRESULT get_PaleGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(110)] public HRESULT get_PaleTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[110]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[110]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -916,7 +916,7 @@ public HRESULT get_PaleTurquoise([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(111)] public HRESULT get_PaleVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[111]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[111]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -924,7 +924,7 @@ public HRESULT get_PaleVioletRed([NativeTypeName("ABI::Windows::UI::Color *")] C [VtblIndex(112)] public HRESULT get_PapayaWhip([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[112]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[112]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -932,7 +932,7 @@ public HRESULT get_PapayaWhip([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(113)] public HRESULT get_PeachPuff([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[113]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[113]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -940,7 +940,7 @@ public HRESULT get_PeachPuff([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(114)] public HRESULT get_Peru([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[114]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[114]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -948,7 +948,7 @@ public HRESULT get_Peru([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(115)] public HRESULT get_Pink([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[115]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[115]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -956,7 +956,7 @@ public HRESULT get_Pink([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(116)] public HRESULT get_Plum([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[116]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[116]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -964,7 +964,7 @@ public HRESULT get_Plum([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(117)] public HRESULT get_PowderBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[117]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[117]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -972,7 +972,7 @@ public HRESULT get_PowderBlue([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(118)] public HRESULT get_Purple([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[118]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[118]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -980,7 +980,7 @@ public HRESULT get_Purple([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(119)] public HRESULT get_Red([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[119]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[119]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -988,7 +988,7 @@ public HRESULT get_Red([NativeTypeName("ABI::Windows::UI::Color *")] Color* valu [VtblIndex(120)] public HRESULT get_RosyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[120]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[120]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -996,7 +996,7 @@ public HRESULT get_RosyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(121)] public HRESULT get_RoyalBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[121]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[121]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1004,7 +1004,7 @@ public HRESULT get_RoyalBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(122)] public HRESULT get_SaddleBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[122]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[122]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1012,7 +1012,7 @@ public HRESULT get_SaddleBrown([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(123)] public HRESULT get_Salmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[123]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[123]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1020,7 +1020,7 @@ public HRESULT get_Salmon([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(124)] public HRESULT get_SandyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[124]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[124]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1028,7 +1028,7 @@ public HRESULT get_SandyBrown([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(125)] public HRESULT get_SeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[125]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[125]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1036,7 +1036,7 @@ public HRESULT get_SeaGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(126)] public HRESULT get_SeaShell([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[126]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[126]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1044,7 +1044,7 @@ public HRESULT get_SeaShell([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(127)] public HRESULT get_Sienna([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[127]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[127]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1052,7 +1052,7 @@ public HRESULT get_Sienna([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(128)] public HRESULT get_Silver([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[128]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[128]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1060,7 +1060,7 @@ public HRESULT get_Silver([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(129)] public HRESULT get_SkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[129]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[129]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1068,7 +1068,7 @@ public HRESULT get_SkyBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(130)] public HRESULT get_SlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[130]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[130]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1076,7 +1076,7 @@ public HRESULT get_SlateBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(131)] public HRESULT get_SlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[131]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[131]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1084,7 +1084,7 @@ public HRESULT get_SlateGray([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(132)] public HRESULT get_Snow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[132]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[132]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1092,7 +1092,7 @@ public HRESULT get_Snow([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(133)] public HRESULT get_SpringGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[133]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[133]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1100,7 +1100,7 @@ public HRESULT get_SpringGreen([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(134)] public HRESULT get_SteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[134]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[134]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1108,7 +1108,7 @@ public HRESULT get_SteelBlue([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(135)] public HRESULT get_Tan([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[135]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[135]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1116,7 +1116,7 @@ public HRESULT get_Tan([NativeTypeName("ABI::Windows::UI::Color *")] Color* valu [VtblIndex(136)] public HRESULT get_Teal([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[136]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[136]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1124,7 +1124,7 @@ public HRESULT get_Teal([NativeTypeName("ABI::Windows::UI::Color *")] Color* val [VtblIndex(137)] public HRESULT get_Thistle([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[137]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[137]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1132,7 +1132,7 @@ public HRESULT get_Thistle([NativeTypeName("ABI::Windows::UI::Color *")] Color* [VtblIndex(138)] public HRESULT get_Tomato([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[138]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[138]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1140,7 +1140,7 @@ public HRESULT get_Tomato([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(139)] public HRESULT get_Transparent([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[139]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[139]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1148,7 +1148,7 @@ public HRESULT get_Transparent([NativeTypeName("ABI::Windows::UI::Color *")] Col [VtblIndex(140)] public HRESULT get_Turquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[140]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[140]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1156,7 +1156,7 @@ public HRESULT get_Turquoise([NativeTypeName("ABI::Windows::UI::Color *")] Color [VtblIndex(141)] public HRESULT get_Violet([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[141]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[141]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1164,7 +1164,7 @@ public HRESULT get_Violet([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(142)] public HRESULT get_Wheat([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[142]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[142]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1172,7 +1172,7 @@ public HRESULT get_Wheat([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(143)] public HRESULT get_White([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[143]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[143]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1180,7 +1180,7 @@ public HRESULT get_White([NativeTypeName("ABI::Windows::UI::Color *")] Color* va [VtblIndex(144)] public HRESULT get_WhiteSmoke([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[144]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[144]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1188,7 +1188,7 @@ public HRESULT get_WhiteSmoke([NativeTypeName("ABI::Windows::UI::Color *")] Colo [VtblIndex(145)] public HRESULT get_Yellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[145]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[145]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } /// @@ -1196,7 +1196,7 @@ public HRESULT get_Yellow([NativeTypeName("ABI::Windows::UI::Color *")] Color* v [VtblIndex(146)] public HRESULT get_YellowGreen([NativeTypeName("ABI::Windows::UI::Color *")] Color* value) { - return ((delegate* unmanaged)(lpVtbl[146]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[146]))((IColorsStatics*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -1629,444 +1629,444 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_AliceBlue; + public delegate* unmanaged[MemberFunction] get_AliceBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_AntiqueWhite; + public delegate* unmanaged[MemberFunction] get_AntiqueWhite; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Aqua; + public delegate* unmanaged[MemberFunction] get_Aqua; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Aquamarine; + public delegate* unmanaged[MemberFunction] get_Aquamarine; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Azure; + public delegate* unmanaged[MemberFunction] get_Azure; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Beige; + public delegate* unmanaged[MemberFunction] get_Beige; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Bisque; + public delegate* unmanaged[MemberFunction] get_Bisque; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Black; + public delegate* unmanaged[MemberFunction] get_Black; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_BlanchedAlmond; + public delegate* unmanaged[MemberFunction] get_BlanchedAlmond; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Blue; + public delegate* unmanaged[MemberFunction] get_Blue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_BlueViolet; + public delegate* unmanaged[MemberFunction] get_BlueViolet; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Brown; + public delegate* unmanaged[MemberFunction] get_Brown; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_BurlyWood; + public delegate* unmanaged[MemberFunction] get_BurlyWood; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_CadetBlue; + public delegate* unmanaged[MemberFunction] get_CadetBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Chartreuse; + public delegate* unmanaged[MemberFunction] get_Chartreuse; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Chocolate; + public delegate* unmanaged[MemberFunction] get_Chocolate; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Coral; + public delegate* unmanaged[MemberFunction] get_Coral; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_CornflowerBlue; + public delegate* unmanaged[MemberFunction] get_CornflowerBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Cornsilk; + public delegate* unmanaged[MemberFunction] get_Cornsilk; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Crimson; + public delegate* unmanaged[MemberFunction] get_Crimson; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Cyan; + public delegate* unmanaged[MemberFunction] get_Cyan; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkBlue; + public delegate* unmanaged[MemberFunction] get_DarkBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkCyan; + public delegate* unmanaged[MemberFunction] get_DarkCyan; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkGoldenrod; + public delegate* unmanaged[MemberFunction] get_DarkGoldenrod; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkGray; + public delegate* unmanaged[MemberFunction] get_DarkGray; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkGreen; + public delegate* unmanaged[MemberFunction] get_DarkGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkKhaki; + public delegate* unmanaged[MemberFunction] get_DarkKhaki; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkMagenta; + public delegate* unmanaged[MemberFunction] get_DarkMagenta; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkOliveGreen; + public delegate* unmanaged[MemberFunction] get_DarkOliveGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkOrange; + public delegate* unmanaged[MemberFunction] get_DarkOrange; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkOrchid; + public delegate* unmanaged[MemberFunction] get_DarkOrchid; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkRed; + public delegate* unmanaged[MemberFunction] get_DarkRed; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkSalmon; + public delegate* unmanaged[MemberFunction] get_DarkSalmon; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkSeaGreen; + public delegate* unmanaged[MemberFunction] get_DarkSeaGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkSlateBlue; + public delegate* unmanaged[MemberFunction] get_DarkSlateBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkSlateGray; + public delegate* unmanaged[MemberFunction] get_DarkSlateGray; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkTurquoise; + public delegate* unmanaged[MemberFunction] get_DarkTurquoise; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DarkViolet; + public delegate* unmanaged[MemberFunction] get_DarkViolet; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DeepPink; + public delegate* unmanaged[MemberFunction] get_DeepPink; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DeepSkyBlue; + public delegate* unmanaged[MemberFunction] get_DeepSkyBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DimGray; + public delegate* unmanaged[MemberFunction] get_DimGray; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_DodgerBlue; + public delegate* unmanaged[MemberFunction] get_DodgerBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Firebrick; + public delegate* unmanaged[MemberFunction] get_Firebrick; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_FloralWhite; + public delegate* unmanaged[MemberFunction] get_FloralWhite; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_ForestGreen; + public delegate* unmanaged[MemberFunction] get_ForestGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Fuchsia; + public delegate* unmanaged[MemberFunction] get_Fuchsia; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Gainsboro; + public delegate* unmanaged[MemberFunction] get_Gainsboro; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_GhostWhite; + public delegate* unmanaged[MemberFunction] get_GhostWhite; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Gold; + public delegate* unmanaged[MemberFunction] get_Gold; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Goldenrod; + public delegate* unmanaged[MemberFunction] get_Goldenrod; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Gray; + public delegate* unmanaged[MemberFunction] get_Gray; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Green; + public delegate* unmanaged[MemberFunction] get_Green; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_GreenYellow; + public delegate* unmanaged[MemberFunction] get_GreenYellow; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Honeydew; + public delegate* unmanaged[MemberFunction] get_Honeydew; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_HotPink; + public delegate* unmanaged[MemberFunction] get_HotPink; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_IndianRed; + public delegate* unmanaged[MemberFunction] get_IndianRed; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Indigo; + public delegate* unmanaged[MemberFunction] get_Indigo; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Ivory; + public delegate* unmanaged[MemberFunction] get_Ivory; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Khaki; + public delegate* unmanaged[MemberFunction] get_Khaki; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Lavender; + public delegate* unmanaged[MemberFunction] get_Lavender; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LavenderBlush; + public delegate* unmanaged[MemberFunction] get_LavenderBlush; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LawnGreen; + public delegate* unmanaged[MemberFunction] get_LawnGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LemonChiffon; + public delegate* unmanaged[MemberFunction] get_LemonChiffon; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightBlue; + public delegate* unmanaged[MemberFunction] get_LightBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightCoral; + public delegate* unmanaged[MemberFunction] get_LightCoral; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightCyan; + public delegate* unmanaged[MemberFunction] get_LightCyan; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightGoldenrodYellow; + public delegate* unmanaged[MemberFunction] get_LightGoldenrodYellow; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightGreen; + public delegate* unmanaged[MemberFunction] get_LightGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightGray; + public delegate* unmanaged[MemberFunction] get_LightGray; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightPink; + public delegate* unmanaged[MemberFunction] get_LightPink; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightSalmon; + public delegate* unmanaged[MemberFunction] get_LightSalmon; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightSeaGreen; + public delegate* unmanaged[MemberFunction] get_LightSeaGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightSkyBlue; + public delegate* unmanaged[MemberFunction] get_LightSkyBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightSlateGray; + public delegate* unmanaged[MemberFunction] get_LightSlateGray; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightSteelBlue; + public delegate* unmanaged[MemberFunction] get_LightSteelBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LightYellow; + public delegate* unmanaged[MemberFunction] get_LightYellow; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Lime; + public delegate* unmanaged[MemberFunction] get_Lime; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_LimeGreen; + public delegate* unmanaged[MemberFunction] get_LimeGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Linen; + public delegate* unmanaged[MemberFunction] get_Linen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Magenta; + public delegate* unmanaged[MemberFunction] get_Magenta; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Maroon; + public delegate* unmanaged[MemberFunction] get_Maroon; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumAquamarine; + public delegate* unmanaged[MemberFunction] get_MediumAquamarine; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumBlue; + public delegate* unmanaged[MemberFunction] get_MediumBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumOrchid; + public delegate* unmanaged[MemberFunction] get_MediumOrchid; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumPurple; + public delegate* unmanaged[MemberFunction] get_MediumPurple; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumSeaGreen; + public delegate* unmanaged[MemberFunction] get_MediumSeaGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumSlateBlue; + public delegate* unmanaged[MemberFunction] get_MediumSlateBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumSpringGreen; + public delegate* unmanaged[MemberFunction] get_MediumSpringGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumTurquoise; + public delegate* unmanaged[MemberFunction] get_MediumTurquoise; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MediumVioletRed; + public delegate* unmanaged[MemberFunction] get_MediumVioletRed; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MidnightBlue; + public delegate* unmanaged[MemberFunction] get_MidnightBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MintCream; + public delegate* unmanaged[MemberFunction] get_MintCream; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_MistyRose; + public delegate* unmanaged[MemberFunction] get_MistyRose; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Moccasin; + public delegate* unmanaged[MemberFunction] get_Moccasin; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_NavajoWhite; + public delegate* unmanaged[MemberFunction] get_NavajoWhite; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Navy; + public delegate* unmanaged[MemberFunction] get_Navy; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_OldLace; + public delegate* unmanaged[MemberFunction] get_OldLace; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Olive; + public delegate* unmanaged[MemberFunction] get_Olive; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_OliveDrab; + public delegate* unmanaged[MemberFunction] get_OliveDrab; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Orange; + public delegate* unmanaged[MemberFunction] get_Orange; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_OrangeRed; + public delegate* unmanaged[MemberFunction] get_OrangeRed; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Orchid; + public delegate* unmanaged[MemberFunction] get_Orchid; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_PaleGoldenrod; + public delegate* unmanaged[MemberFunction] get_PaleGoldenrod; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_PaleGreen; + public delegate* unmanaged[MemberFunction] get_PaleGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_PaleTurquoise; + public delegate* unmanaged[MemberFunction] get_PaleTurquoise; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_PaleVioletRed; + public delegate* unmanaged[MemberFunction] get_PaleVioletRed; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_PapayaWhip; + public delegate* unmanaged[MemberFunction] get_PapayaWhip; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_PeachPuff; + public delegate* unmanaged[MemberFunction] get_PeachPuff; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Peru; + public delegate* unmanaged[MemberFunction] get_Peru; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Pink; + public delegate* unmanaged[MemberFunction] get_Pink; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Plum; + public delegate* unmanaged[MemberFunction] get_Plum; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_PowderBlue; + public delegate* unmanaged[MemberFunction] get_PowderBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Purple; + public delegate* unmanaged[MemberFunction] get_Purple; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Red; + public delegate* unmanaged[MemberFunction] get_Red; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_RosyBrown; + public delegate* unmanaged[MemberFunction] get_RosyBrown; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_RoyalBlue; + public delegate* unmanaged[MemberFunction] get_RoyalBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SaddleBrown; + public delegate* unmanaged[MemberFunction] get_SaddleBrown; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Salmon; + public delegate* unmanaged[MemberFunction] get_Salmon; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SandyBrown; + public delegate* unmanaged[MemberFunction] get_SandyBrown; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SeaGreen; + public delegate* unmanaged[MemberFunction] get_SeaGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SeaShell; + public delegate* unmanaged[MemberFunction] get_SeaShell; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Sienna; + public delegate* unmanaged[MemberFunction] get_Sienna; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Silver; + public delegate* unmanaged[MemberFunction] get_Silver; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SkyBlue; + public delegate* unmanaged[MemberFunction] get_SkyBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SlateBlue; + public delegate* unmanaged[MemberFunction] get_SlateBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SlateGray; + public delegate* unmanaged[MemberFunction] get_SlateGray; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Snow; + public delegate* unmanaged[MemberFunction] get_Snow; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SpringGreen; + public delegate* unmanaged[MemberFunction] get_SpringGreen; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_SteelBlue; + public delegate* unmanaged[MemberFunction] get_SteelBlue; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Tan; + public delegate* unmanaged[MemberFunction] get_Tan; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Teal; + public delegate* unmanaged[MemberFunction] get_Teal; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Thistle; + public delegate* unmanaged[MemberFunction] get_Thistle; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Tomato; + public delegate* unmanaged[MemberFunction] get_Tomato; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Transparent; + public delegate* unmanaged[MemberFunction] get_Transparent; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Turquoise; + public delegate* unmanaged[MemberFunction] get_Turquoise; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Violet; + public delegate* unmanaged[MemberFunction] get_Violet; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Wheat; + public delegate* unmanaged[MemberFunction] get_Wheat; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_White; + public delegate* unmanaged[MemberFunction] get_White; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_WhiteSmoke; + public delegate* unmanaged[MemberFunction] get_WhiteSmoke; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_Yellow; + public delegate* unmanaged[MemberFunction] get_Yellow; [NativeTypeName("HRESULT (ABI::Windows::UI::Color *) __attribute__((stdcall))")] - public delegate* unmanaged get_YellowGreen; + public delegate* unmanaged[MemberFunction] get_YellowGreen; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IID.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IID.Manual.cs similarity index 89% rename from sources/Interop/Windows/WinRT/winrt/windows.ui/IID.cs rename to sources/Interop/Windows/WinRT/winrt/windows.ui/IID.Manual.cs index fe56c222aa..4775657576 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IID.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_IColorHelper { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xE7, 0xFB, 0x3C, 0x19, 0xC7, 0x65, 0x40, 0x45, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_IColorHelper 0x76, 0x87, 0x9A - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -39,7 +39,7 @@ public static ref readonly Guid IID_IColorHelperStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xEA, 0xDB, 0x04, 0x85, 0x6A, 0xFB, 0x44, 0x41, @@ -51,7 +51,7 @@ public static ref readonly Guid IID_IColorHelperStatics 0x92, 0x84, 0xF5 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -62,7 +62,7 @@ public static ref readonly Guid IID_IColorHelperStatics2 { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x02, 0xAF, 0xD9, 0x24, 0xB0, 0x6E, 0x94, 0x4B, @@ -74,7 +74,7 @@ public static ref readonly Guid IID_IColorHelperStatics2 0x8D, 0x9A, 0x16 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -85,7 +85,7 @@ public static ref readonly Guid IID_IColors { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x26, 0x93, 0x8C, 0x9B, 0xA6, 0x4C, 0xE5, 0x4C, @@ -97,7 +97,7 @@ public static ref readonly Guid IID_IColors 0xCA, 0xBD, 0xCC - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -108,7 +108,7 @@ public static ref readonly Guid IID_IColorsStatics { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x04, 0x2E, 0xF5, 0xCF, 0xA6, 0xCC, 0x14, 0x46, @@ -120,7 +120,7 @@ public static ref readonly Guid IID_IColorsStatics 0xC8, 0x4A, 0x99 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -131,7 +131,7 @@ public static ref readonly Guid IID_IUIContentRoot { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xC6, 0xBA, 0xFC, 0x1D, 0x6B, 0xB3, 0xB9, 0x5C, @@ -143,7 +143,7 @@ public static ref readonly Guid IID_IUIContentRoot 0xDD, 0xC3, 0x78 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); @@ -154,7 +154,7 @@ public static ref readonly Guid IID_IUIContext { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0xCD, 0xFA, 0x5C, 0xBB, 0xD8, 0x5B, 0xD0, 0x59, @@ -166,7 +166,7 @@ public static ref readonly Guid IID_IUIContext 0xD6, 0xD2, 0x43 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs index c30441c91f..8f065a46f8 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRoot.cs @@ -26,7 +26,7 @@ public unsafe partial struct IUIContentRoot : IUIContentRoot.Interface, INativeG [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IUIContentRoot*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IUIContentRoot*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IUIContentRoot*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IUIContentRoot*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IUIContentRoot*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IUIContentRoot*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IUIContentRoot*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IUIContentRoot*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IUIContentRoot*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IUIContentRoot*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IUIContentRoot*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IUIContentRoot*)Unsafe.AsPointer(ref this), trustLevel); } /// @@ -76,7 +76,7 @@ public HRESULT GetTrustLevel(TrustLevel* trustLevel) [VtblIndex(6)] public HRESULT get_UIContext([NativeTypeName("ABI::Windows::UI::IUIContext **")] IUIContext** value) { - return ((delegate* unmanaged)(lpVtbl[6]))((IUIContentRoot*)Unsafe.AsPointer(ref this), value); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[6]))((IUIContentRoot*)Unsafe.AsPointer(ref this), value); } public interface Interface : IInspectable.Interface @@ -89,24 +89,24 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; [NativeTypeName("HRESULT (ABI::Windows::UI::IUIContext **) __attribute__((stdcall))")] - public delegate* unmanaged get_UIContext; + public delegate* unmanaged[MemberFunction] get_UIContext; } } diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs index 07345a6d08..ddbd2c1276 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui/IUIContext.cs @@ -26,7 +26,7 @@ public unsafe partial struct IUIContext : IUIContext.Interface, INativeGuid [VtblIndex(0)] public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { - return ((delegate* unmanaged)(lpVtbl[0]))((IUIContext*)Unsafe.AsPointer(ref this), riid, ppvObject); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[0]))((IUIContext*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// @@ -35,7 +35,7 @@ public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** [return: NativeTypeName("ULONG")] public uint AddRef() { - return ((delegate* unmanaged)(lpVtbl[1]))((IUIContext*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[1]))((IUIContext*)Unsafe.AsPointer(ref this)); } /// @@ -44,7 +44,7 @@ public uint AddRef() [return: NativeTypeName("ULONG")] public uint Release() { - return ((delegate* unmanaged)(lpVtbl[2]))((IUIContext*)Unsafe.AsPointer(ref this)); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[2]))((IUIContext*)Unsafe.AsPointer(ref this)); } /// @@ -52,7 +52,7 @@ public uint Release() [VtblIndex(3)] public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { - return ((delegate* unmanaged)(lpVtbl[3]))((IUIContext*)Unsafe.AsPointer(ref this), iidCount, iids); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[3]))((IUIContext*)Unsafe.AsPointer(ref this), iidCount, iids); } /// @@ -60,7 +60,7 @@ public HRESULT GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeNa [VtblIndex(4)] public HRESULT GetRuntimeClassName(HSTRING* className) { - return ((delegate* unmanaged)(lpVtbl[4]))((IUIContext*)Unsafe.AsPointer(ref this), className); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[4]))((IUIContext*)Unsafe.AsPointer(ref this), className); } /// @@ -68,7 +68,7 @@ public HRESULT GetRuntimeClassName(HSTRING* className) [VtblIndex(5)] public HRESULT GetTrustLevel(TrustLevel* trustLevel) { - return ((delegate* unmanaged)(lpVtbl[5]))((IUIContext*)Unsafe.AsPointer(ref this), trustLevel); + return ((delegate* unmanaged[MemberFunction])(lpVtbl[5]))((IUIContext*)Unsafe.AsPointer(ref this), trustLevel); } public interface Interface : IInspectable.Interface @@ -79,21 +79,21 @@ public partial struct Vtbl where TSelf : unmanaged, Interface { [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged QueryInterface; + public delegate* unmanaged[MemberFunction] QueryInterface; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged AddRef; + public delegate* unmanaged[MemberFunction] AddRef; [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged Release; + public delegate* unmanaged[MemberFunction] Release; [NativeTypeName("HRESULT (ULONG *, IID **) __attribute__((stdcall))")] - public delegate* unmanaged GetIids; + public delegate* unmanaged[MemberFunction] GetIids; [NativeTypeName("HRESULT (HSTRING *) __attribute__((stdcall))")] - public delegate* unmanaged GetRuntimeClassName; + public delegate* unmanaged[MemberFunction] GetRuntimeClassName; [NativeTypeName("HRESULT (TrustLevel *) __attribute__((stdcall))")] - public delegate* unmanaged GetTrustLevel; + public delegate* unmanaged[MemberFunction] GetTrustLevel; } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs index 43a0ebe82e..ed4afa0b3e 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStatics2Tests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics2).GUID, Is.EqualTo(IID_IKnownSimpleHapticsControllerWaveformsStatics2)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IKnownSimpleHapticsControllerWaveformsStatics2))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics2).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics2), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics2), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs index c0f93739cc..938ffe14c1 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IKnownSimpleHapticsControllerWaveformsStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics).GUID, Is.EqualTo(IID_IKnownSimpleHapticsControllerWaveformsStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IKnownSimpleHapticsControllerWaveformsStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IKnownSimpleHapticsControllerWaveformsStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IKnownSimpleHapticsControllerWaveformsStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs index be5ee9b11c..1b89b97e74 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerFeedbackTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(ISimpleHapticsControllerFeedback).GUID, Is.EqualTo(IID_ISimpleHapticsControllerFeedback)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ISimpleHapticsControllerFeedback))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(ISimpleHapticsControllerFeedback).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(ISimpleHapticsControllerFeedback), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(ISimpleHapticsControllerFeedback), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs index 993be18026..28c22025e4 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/ISimpleHapticsControllerTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(ISimpleHapticsController).GUID, Is.EqualTo(IID_ISimpleHapticsController)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ISimpleHapticsController))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(ISimpleHapticsController).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(ISimpleHapticsController), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(ISimpleHapticsController), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs index 0a9085f08e..c2042258e2 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IVibrationDeviceStatics).GUID, Is.EqualTo(IID_IVibrationDeviceStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IVibrationDeviceStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IVibrationDeviceStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IVibrationDeviceStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IVibrationDeviceStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs index 14d2ad4afa..3e36001456 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.haptics/IVibrationDeviceTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IVibrationDevice).GUID, Is.EqualTo(IID_IVibrationDevice)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IVibrationDevice))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IVibrationDevice).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IVibrationDevice), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IVibrationDevice), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs index 30e3f04fde..ba336f703d 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryReportTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IBatteryReport).GUID, Is.EqualTo(IID_IBatteryReport)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBatteryReport))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IBatteryReport).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IBatteryReport), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IBatteryReport), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs index de3a8187f5..6f62ed2b93 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IBatteryStatics).GUID, Is.EqualTo(IID_IBatteryStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBatteryStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IBatteryStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IBatteryStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IBatteryStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs index 693e78f8f2..65bf3ee827 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.devices.power/IBatteryTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IBattery).GUID, Is.EqualTo(IID_IBattery)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBattery))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IBattery).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IBattery), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IBattery), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs index 590ef591b8..e9807c79f0 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation.metadata/IApiInformationStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IApiInformationStatics).GUID, Is.EqualTo(IID_IApiInformationStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IApiInformationStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IApiInformationStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IApiInformationStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IApiInformationStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs deleted file mode 100644 index 47e92eba36..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix3x2Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class Matrix3x2Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Matrix3x2))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Matrix3x2).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Matrix3x2), Is.EqualTo(24)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs deleted file mode 100644 index 72c39172ca..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Matrix4x4Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class Matrix4x4Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Matrix4x4))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Matrix4x4).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Matrix4x4), Is.EqualTo(64)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs deleted file mode 100644 index d18c8f5e44..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/PlaneTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class PlaneTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Plane))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Plane).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Plane), Is.EqualTo(16)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs deleted file mode 100644 index ecefae53aa..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/QuaternionTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class QuaternionTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Quaternion))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Quaternion).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Quaternion), Is.EqualTo(16)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs deleted file mode 100644 index 399b959144..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/RationalTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class RationalTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Rational))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Rational).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Rational), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs deleted file mode 100644 index 6b247ce533..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector2Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class Vector2Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Vector2))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Vector2).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Vector2), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs deleted file mode 100644 index 0df4ab0c47..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector3Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class Vector3Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Vector3))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Vector3).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Vector3), Is.EqualTo(12)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs deleted file mode 100644 index 7872969b43..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation.numerics/Vector4Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.numerics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class Vector4Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Vector4))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Vector4).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Vector4), Is.EqualTo(16)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs deleted file mode 100644 index b739e332ed..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/DateTimeTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class DateTimeTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DateTime))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(DateTime).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(DateTime), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs index 7c73b60cd6..9c41324b61 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionCompletedHandlerTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IAsyncActionCompletedHandler).GUID, Is.EqualTo(IID_IAsyncActionCompletedHandler)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IAsyncActionCompletedHandler))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IAsyncActionCompletedHandler).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IAsyncActionCompletedHandler), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IAsyncActionCompletedHandler), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs index dae9ab7300..563b03fd70 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IAsyncActionTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IAsyncAction).GUID, Is.EqualTo(IID_IAsyncAction)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IAsyncAction))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IAsyncAction).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IAsyncAction), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IAsyncAction), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs index 6e52847f59..0f1200d7df 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IClosableTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IClosable).GUID, Is.EqualTo(IID_IClosable)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IClosable))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IClosable).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IClosable), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IClosable), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs index 3b33f8095e..079e477025 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralCompletedHandlerTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IDeferralCompletedHandler).GUID, Is.EqualTo(IID_IDeferralCompletedHandler)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDeferralCompletedHandler))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IDeferralCompletedHandler).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IDeferralCompletedHandler), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IDeferralCompletedHandler), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs index bbd5da6e2a..56297ba99d 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralFactoryTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IDeferralFactory).GUID, Is.EqualTo(IID_IDeferralFactory)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDeferralFactory))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IDeferralFactory).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IDeferralFactory), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IDeferralFactory), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs index 939e4fef23..4586492d61 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IDeferralTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IDeferral).GUID, Is.EqualTo(IID_IDeferral)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDeferral))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IDeferral).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IDeferral), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IDeferral), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs index 9a766c5502..24e1094cf2 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGetActivationFactoryTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IGetActivationFactory).GUID, Is.EqualTo(IID_IGetActivationFactory)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGetActivationFactory))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IGetActivationFactory).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IGetActivationFactory), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IGetActivationFactory), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs index 7012cc1d99..cdeca5a81e 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IGuidHelperStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IGuidHelperStatics).GUID, Is.EqualTo(IID_IGuidHelperStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGuidHelperStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IGuidHelperStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IGuidHelperStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IGuidHelperStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs index 5608c25966..c83a3016ab 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferFactoryTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IMemoryBufferFactory).GUID, Is.EqualTo(IID_IMemoryBufferFactory)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IMemoryBufferFactory))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IMemoryBufferFactory).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IMemoryBufferFactory), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IMemoryBufferFactory), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs index 54bf530728..8af0f36af2 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferReferenceTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IMemoryBufferReference).GUID, Is.EqualTo(IID_IMemoryBufferReference)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IMemoryBufferReference))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IMemoryBufferReference).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IMemoryBufferReference), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IMemoryBufferReference), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs index ecd94db8a9..aab218fa5a 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IMemoryBufferTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IMemoryBuffer).GUID, Is.EqualTo(IID_IMemoryBuffer)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IMemoryBuffer))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IMemoryBuffer).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IMemoryBuffer), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IMemoryBuffer), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs index 0f320a6acc..1fc5b2f5a7 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertySetTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IPropertySet).GUID, Is.EqualTo(IID_IPropertySet)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPropertySet))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IPropertySet).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IPropertySet), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IPropertySet), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs index e7356ce04b..1129c8d901 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IPropertyValueStatics).GUID, Is.EqualTo(IID_IPropertyValueStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPropertyValueStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IPropertyValueStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IPropertyValueStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IPropertyValueStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs index fcbc78d5d0..0cde458f14 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IPropertyValueTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IPropertyValue).GUID, Is.EqualTo(IID_IPropertyValue)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPropertyValue))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IPropertyValue).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IPropertyValue), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IPropertyValue), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs index 89983171f1..f30d037f61 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IStringableTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IStringable).GUID, Is.EqualTo(IID_IStringable)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IStringable))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IStringable).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IStringable), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IStringable), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs index d886061ca1..611020764a 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriEscapeStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IUriEscapeStatics).GUID, Is.EqualTo(IID_IUriEscapeStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriEscapeStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IUriEscapeStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IUriEscapeStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IUriEscapeStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs index 172cb86496..f42c6e02e8 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassFactoryTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IUriRuntimeClassFactory).GUID, Is.EqualTo(IID_IUriRuntimeClassFactory)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriRuntimeClassFactory))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IUriRuntimeClassFactory).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IUriRuntimeClassFactory), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IUriRuntimeClassFactory), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs index 794c6e48fe..22ebd47e56 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IUriRuntimeClass).GUID, Is.EqualTo(IID_IUriRuntimeClass)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriRuntimeClass))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IUriRuntimeClass).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IUriRuntimeClass), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IUriRuntimeClass), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs index 900bab9711..ed670d2b2d 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IUriRuntimeClassWithAbsoluteCanonicalUriTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IUriRuntimeClassWithAbsoluteCanonicalUri).GUID, Is.EqualTo(IID_IUriRuntimeClassWithAbsoluteCanonicalUri)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUriRuntimeClassWithAbsoluteCanonicalUri))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IUriRuntimeClassWithAbsoluteCanonicalUri).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IUriRuntimeClassWithAbsoluteCanonicalUri), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IUriRuntimeClassWithAbsoluteCanonicalUri), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs index 959ac107eb..8878858f16 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderEntryTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IWwwFormUrlDecoderEntry).GUID, Is.EqualTo(IID_IWwwFormUrlDecoderEntry)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IWwwFormUrlDecoderEntry))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IWwwFormUrlDecoderEntry).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IWwwFormUrlDecoderEntry), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IWwwFormUrlDecoderEntry), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs index 90ce0e856c..067a20ad97 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassFactoryTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IWwwFormUrlDecoderRuntimeClassFactory).GUID, Is.EqualTo(IID_IWwwFormUrlDecoderRuntimeClassFactory)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IWwwFormUrlDecoderRuntimeClassFactory))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IWwwFormUrlDecoderRuntimeClassFactory).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClassFactory), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClassFactory), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs index 0aeb65da86..66059c5803 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.foundation/IWwwFormUrlDecoderRuntimeClassTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IWwwFormUrlDecoderRuntimeClass).GUID, Is.EqualTo(IID_IWwwFormUrlDecoderRuntimeClass)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IWwwFormUrlDecoderRuntimeClass))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IWwwFormUrlDecoderRuntimeClass).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClass), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IWwwFormUrlDecoderRuntimeClass), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs deleted file mode 100644 index 9e44e50f02..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/PointTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class PointTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Point))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Point).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Point), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs deleted file mode 100644 index 429772f421..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/RectTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class RectTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Rect))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Rect).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Rect), Is.EqualTo(16)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs deleted file mode 100644 index 50e6ab4501..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/SizeTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class SizeTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Size))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Size).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Size), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs deleted file mode 100644 index 3bed91950e..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.foundation/TimeSpanTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.foundation.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class TimeSpanTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(TimeSpan))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(TimeSpan).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(TimeSpan), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs index aa82598a3c..bf4bd6eb63 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectSourceTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IGraphicsEffectSource).GUID, Is.EqualTo(IID_IGraphicsEffectSource)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGraphicsEffectSource))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IGraphicsEffectSource).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IGraphicsEffectSource), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IGraphicsEffectSource), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs index 7a5e0bfe7a..54c1f419cc 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics.effects/IGraphicsEffectTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IGraphicsEffect).GUID, Is.EqualTo(IID_IGraphicsEffect)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGraphicsEffect))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IGraphicsEffect).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IGraphicsEffect), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IGraphicsEffect), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs deleted file mode 100644 index a5788881ac..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayAdapterIdTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class DisplayAdapterIdTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DisplayAdapterId))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(DisplayAdapterId).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(DisplayAdapterId), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs deleted file mode 100644 index 24a67ba2c3..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics/DisplayIdTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class DisplayIdTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DisplayId))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(DisplayId).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(DisplayId), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs index 4d10c99402..1fa0b2baa6 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.graphics/IGeometrySource2DTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IGeometrySource2D).GUID, Is.EqualTo(IID_IGeometrySource2D)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IGeometrySource2D))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IGeometrySource2D).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IGeometrySource2D), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IGeometrySource2D), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs deleted file mode 100644 index e87280134c..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics/PointInt32Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class PointInt32Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PointInt32))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(PointInt32).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(PointInt32), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs deleted file mode 100644 index 3a8440b8a1..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics/RectInt32Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class RectInt32Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(RectInt32))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(RectInt32).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(RectInt32), Is.EqualTo(16)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs deleted file mode 100644 index 5f4a29c7ba..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.graphics/SizeInt32Tests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.graphics.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class SizeInt32Tests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(SizeInt32))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(SizeInt32).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(SizeInt32), Is.EqualTo(8)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs index 6ee9112d16..d70da71ac4 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IBackgroundEnergyManagerStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IBackgroundEnergyManagerStatics).GUID, Is.EqualTo(IID_IBackgroundEnergyManagerStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IBackgroundEnergyManagerStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IBackgroundEnergyManagerStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IBackgroundEnergyManagerStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IBackgroundEnergyManagerStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs index 939e96de2b..ea74558186 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IForegroundEnergyManagerStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IForegroundEnergyManagerStatics).GUID, Is.EqualTo(IID_IForegroundEnergyManagerStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IForegroundEnergyManagerStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IForegroundEnergyManagerStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IForegroundEnergyManagerStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IForegroundEnergyManagerStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs index 6222f0715b..e34fa2ae66 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.system.power/IPowerManagerStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IPowerManagerStatics).GUID, Is.EqualTo(IID_IPowerManagerStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPowerManagerStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IPowerManagerStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IPowerManagerStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IPowerManagerStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs deleted file mode 100644 index 92ad72c5e7..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/ColorTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class ColorTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Color))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(Color).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(Color), Is.EqualTo(4)); - } -} diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs index d9f781d279..a405de56d7 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStatics2Tests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IColorHelperStatics2).GUID, Is.EqualTo(IID_IColorHelperStatics2)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorHelperStatics2))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IColorHelperStatics2).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IColorHelperStatics2), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IColorHelperStatics2), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs index 5c6cdafb15..19cbbef63d 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IColorHelperStatics).GUID, Is.EqualTo(IID_IColorHelperStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorHelperStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IColorHelperStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IColorHelperStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IColorHelperStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs index c808d2d561..4a6f03ba48 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorHelperTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IColorHelper).GUID, Is.EqualTo(IID_IColorHelper)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorHelper))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IColorHelper).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IColorHelper), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IColorHelper), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs index 61e069c6b6..f4f652a15f 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsStaticsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IColorsStatics).GUID, Is.EqualTo(IID_IColorsStatics)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColorsStatics))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IColorsStatics).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IColorsStatics), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IColorsStatics), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs index ae95ccaea8..36e88c5717 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IColorsTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IColors).GUID, Is.EqualTo(IID_IColors)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IColors))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IColors).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IColors), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IColors), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs index df7a9b3119..88cc08ad45 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContentRootTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IUIContentRoot).GUID, Is.EqualTo(IID_IUIContentRoot)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUIContentRoot))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IUIContentRoot).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IUIContentRoot), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IUIContentRoot), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs index 949cf44b1c..2999f8f872 100644 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs +++ b/tests/Interop/Windows/WinRT/winrt/windows.ui/IUIContextTests.cs @@ -19,32 +19,4 @@ public static void GuidOfTest() { Assert.That(typeof(IUIContext).GUID, Is.EqualTo(IID_IUIContext)); } - - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IUIContext))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(IUIContext).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - if (Environment.Is64BitProcess) - { - Assert.That(sizeof(IUIContext), Is.EqualTo(8)); - } - else - { - Assert.That(sizeof(IUIContext), Is.EqualTo(4)); - } - } } diff --git a/tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs b/tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs deleted file mode 100644 index bf68c41049..0000000000 --- a/tests/Interop/Windows/WinRT/winrt/windows.ui/WindowIdTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/windows.ui.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using NUnit.Framework; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.WinRT.UnitTests; - -/// Provides validation of the struct. -public static unsafe partial class WindowIdTests -{ - /// Validates that the struct is blittable. - [Test] - public static void IsBlittableTest() - { - Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WindowId))); - } - - /// Validates that the struct has the right . - [Test] - public static void IsLayoutSequentialTest() - { - Assert.That(typeof(WindowId).IsLayoutSequential, Is.True); - } - - /// Validates that the struct has the correct size. - [Test] - public static void SizeOfTest() - { - Assert.That(sizeof(WindowId), Is.EqualTo(8)); - } -}