From baf569c6a9227c4d24791ce39a9a805520879087 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Thu, 21 Apr 2022 11:36:51 +0800 Subject: [PATCH] include: Add windows.foundation.metadata.idl. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Required for Iragon: Prologue. Signed-off-by: Zhiyi Zhang Signed-off-by: RĂ©mi Bernon Signed-off-by: Alexandre Julliard --- include/Makefile.in | 1 + include/windows.foundation.metadata.idl | 75 +++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 include/windows.foundation.metadata.idl diff --git a/include/Makefile.in b/include/Makefile.in index dff2f341568..b0a1d0e4880 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -786,6 +786,7 @@ SOURCES = \ windows.devices.power.idl \ windows.foundation.collections.idl \ windows.foundation.idl \ + windows.foundation.metadata.idl \ windows.gaming.input.custom.idl \ windows.gaming.input.forcefeedback.idl \ windows.gaming.input.idl \ diff --git a/include/windows.foundation.metadata.idl b/include/windows.foundation.metadata.idl new file mode 100644 index 00000000000..9487737e071 --- /dev/null +++ b/include/windows.foundation.metadata.idl @@ -0,0 +1,75 @@ +/* + * Copyright 2022 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; + +namespace Windows.Foundation.Metadata +{ + typedef enum GCPressureAmount GCPressureAmount; + + interface IApiInformationStatics; + + runtimeclass ApiInformation; + + [ + contract(Windows.Foundation.FoundationContract, 1.0) + ] + enum GCPressureAmount + { + Low = 0, + Medium = 1, + High = 2 + }; + + [ + contract(Windows.Foundation.FoundationContract, 1.0), + exclusiveto(Windows.Foundation.Metadata.ApiInformation), + uuid(997439fe-f681-4a11-b416-c13a47e8ba36) + ] + interface IApiInformationStatics : IInspectable + { + HRESULT IsTypePresent([in] HSTRING type_name, [out, retval] boolean *value); + [overload("IsMethodPresent")] HRESULT IsMethodPresent([in] HSTRING type_name, [in] HSTRING method_name, [out, retval] boolean *value); + [overload("IsMethodPresent")] HRESULT IsMethodPresentWithArity([in] HSTRING type_name, [in] HSTRING method_name, [in] UINT32 parameter_count, [out, retval] boolean *value); + HRESULT IsEventPresent([in] HSTRING type_name, [in] HSTRING event_name, [out, retval] boolean *value); + HRESULT IsPropertyPresent([in] HSTRING type_name, [in] HSTRING property_name, [out, retval] boolean *value); + HRESULT IsReadOnlyPropertyPresent([in] HSTRING type_name, [in] HSTRING property_name, [out, retval] boolean *value); + HRESULT IsWriteablePropertyPresent([in] HSTRING type_name, [in] HSTRING property_name, [out, retval] boolean *value); + HRESULT IsEnumNamedValuePresent([in] HSTRING enum_type_name, [in] HSTRING value_name, [out, retval] boolean *value); + [overload("IsApiContractPresent")] HRESULT IsApiContractPresentByMajor([in] HSTRING contract_name, [in] UINT16 major_version, [out, retval] boolean *value); + [overload("IsApiContractPresent")] HRESULT IsApiContractPresentByMajorAndMinor([in] HSTRING contract_name, [in] UINT16 major_version, [in] UINT16 minor_version, [out, retval] boolean *value); + } + + [ + contract(Windows.Foundation.FoundationContract, 1.0), + marshaling_behavior(agile), + static(Windows.Foundation.Metadata.IApiInformationStatics, Windows.Foundation.FoundationContract, 1.0), + threading(both) + ] + runtimeclass ApiInformation + { + } +}