[PATCH 1/5] include: Add windows.foundation.metadata.idl.

Zhiyi Zhang zzhang at codeweavers.com
Wed Apr 20 02:04:25 CDT 2022


Required for Iragon: Prologue.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 include/Makefile.in                     |  1 +
 include/windows.foundation.metadata.idl | 98 +++++++++++++++++++++++++
 2 files changed, 99 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..d3c78c35f21
--- /dev/null
+++ b/include/windows.foundation.metadata.idl
@@ -0,0 +1,98 @@
+/*
+ * 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
+{
+    namespace Foundation
+    {
+        apicontract FoundationContract;
+    }
+}
+
+namespace Windows
+{
+    namespace Foundation
+    {
+        namespace Metadata
+        {
+            typedef enum GCPressureAmount GCPressureAmount;
+
+            interface IApiInformationStatics;
+
+            runtimeclass ApiInformation;
+        }
+    }
+}
+
+namespace Windows
+{
+    namespace Foundation
+    {
+        namespace Metadata
+        {
+            [
+                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
+            {
+            }
+        }
+    }
+}
-- 
2.32.0




More information about the wine-devel mailing list