From: Hans Leidekker hans@codeweavers.com
--- include/windows.foundation.idl | 144 +++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl index 9be302515a4..11679367eca 100644 --- a/include/windows.foundation.idl +++ b/include/windows.foundation.idl @@ -68,16 +68,32 @@ namespace Windows.Foundation { interface IMemoryBufferFactory; interface IMemoryBufferReference; interface IStringable; + interface IUriEscapeStatics; + interface IUriRuntimeClass; + interface IUriRuntimeClassFactory; + interface IUriRuntimeClassWithAbsoluteCanonicalUri; + interface IWwwFormUrlDecoderEntry; + interface IWwwFormUrlDecoderRuntimeClass; + interface IWwwFormUrlDecoderRuntimeClassFactory; + runtimeclass Deferral; runtimeclass MemoryBuffer; + runtimeclass Uri; + runtimeclass WwwFormUrlDecoder; + runtimeclass WwwFormUrlDecoderEntry;
declare { interface Windows.Foundation.Collections.IIterable<HSTRING>; interface Windows.Foundation.Collections.IIterable<IInspectable *>; + interface Windows.Foundation.Collections.IIterable<IWwwFormUrlDecoderEntry *>; + interface Windows.Foundation.Collections.IIterable<Uri *>; interface Windows.Foundation.Collections.IIterator<HSTRING>; interface Windows.Foundation.Collections.IIterator<IInspectable *>; + interface Windows.Foundation.Collections.IIterator<IWwwFormUrlDecoderEntry *>; + interface Windows.Foundation.Collections.IIterator<Uri *>; interface Windows.Foundation.Collections.IVectorView<HSTRING>; interface Windows.Foundation.Collections.IVectorView<IInspectable *>; + interface Windows.Foundation.Collections.IVectorView<IWwwFormUrlDecoderEntry *>; interface Windows.Foundation.Collections.IVector<HSTRING>; interface Windows.Foundation.Collections.IVector<IInspectable *>; interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING> *>; @@ -271,6 +287,97 @@ namespace Windows.Foundation { [eventremove] HRESULT Closed([in] EventRegistrationToken cookie); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Foundation.Uri), + uuid(c1d432ba-c824-4452-a7fd-512bc3bbe9a1) + ] + interface IUriEscapeStatics : IInspectable + { + HRESULT UnescapeComponent([in] HSTRING to_unescape, [out, retval] HSTRING *value); + HRESULT EscapeComponent([in] HSTRING to_escape, [out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Foundation.Uri), + uuid(9e365e57-48b2-4160-956f-c7385120bbfc) + ] + interface IUriRuntimeClass : IInspectable + { + [propget] HRESULT AbsoluteUri([out, retval] HSTRING *value); + [propget] HRESULT DisplayUri([out, retval] HSTRING *value); + [propget] HRESULT Domain([out, retval] HSTRING *value); + [propget] HRESULT Extension([out, retval] HSTRING *value); + [propget] HRESULT Fragment([out, retval] HSTRING *value); + [propget] HRESULT Host([out, retval] HSTRING *value); + [propget] HRESULT Password([out, retval] HSTRING *value); + [propget] HRESULT Path([out, retval] HSTRING *value); + [propget] HRESULT Query([out, retval] HSTRING *value); + [propget] HRESULT QueryParsed([out, retval] Windows.Foundation.WwwFormUrlDecoder **decoder); + [propget] HRESULT RawUri([out, retval] HSTRING *value); + [propget] HRESULT SchemeName([out, retval] HSTRING *value); + [propget] HRESULT UserName([out, retval] HSTRING *value); + [propget] HRESULT Port([out, retval] INT32 *value); + [propget] HRESULT Suspicious([out, retval] boolean *value); + HRESULT Equals([in] Windows.Foundation.Uri *uri, [out, retval] boolean *value); + HRESULT CombineUri([in] HSTRING relative_uri, [out, retval] Windows.Foundation.Uri **instance); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Foundation.Uri), + uuid(44a9796f-723e-4fdf-a218-033e75b0c084) + ] + interface IUriRuntimeClassFactory : IInspectable + { + HRESULT CreateUri([in] HSTRING uri, [out, retval] Windows.Foundation.Uri **instance); + HRESULT CreateWithRelativeUri([in] HSTRING base_uri, [in] HSTRING relative_uri, [out, retval] Windows.Foundation.Uri **instance); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Foundation.Uri), + uuid(758d9661-221c-480f-a339-50656673f46f) + ] + interface IUriRuntimeClassWithAbsoluteCanonicalUri : IInspectable + { + [propget] HRESULT AbsoluteCanonicalUri([out, retval] HSTRING *value); + [propget] HRESULT DisplayIri([out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(125e7431-f678-4e8e-b670-20a9b06c512d) + ] + interface IWwwFormUrlDecoderEntry : IInspectable + { + [propget] HRESULT Name([out, retval] HSTRING *value); + [propget] HRESULT Value([out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Foundation.WwwFormUrlDecoder), + uuid(d45a0451-f225-4542-9296-0e1df5d254df) + ] + interface IWwwFormUrlDecoderRuntimeClass : IInspectable + requires Windows.Foundation.Collections.IIterable<Windows.Foundation.IWwwFormUrlDecoderEntry *>, + Windows.Foundation.Collections.IVectorView<Windows.Foundation.IWwwFormUrlDecoderEntry *> + { + HRESULT GetFirstValueByName([in] HSTRING name, [out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Foundation.WwwFormUrlDecoder), + uuid(5b8c6b3d-24ae-41b5-a1bf-f0c3d544845b) + ] + interface IWwwFormUrlDecoderRuntimeClassFactory : IInspectable + { + HRESULT CreateWwwFormUrlDecoder([in] HSTRING query, [out, retval] Windows.Foundation.WwwFormUrlDecoder **instance); + } + [ activatable(Windows.Foundation.IDeferralFactory, Windows.Foundation.FoundationContract, 1.0), contract(Windows.Foundation.FoundationContract, 1.0), @@ -293,4 +400,41 @@ namespace Windows.Foundation { [default] interface Windows.Foundation.IMemoryBuffer; interface Windows.Foundation.IClosable; } + + [ + activatable(Windows.Foundation.IUriRuntimeClassFactory, Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.Foundation.IUriEscapeStatics, Windows.Foundation.UniversalApiContract, 1.0), + threading(both) + ] + runtimeclass Uri + { + [default] interface Windows.Foundation.IUriRuntimeClass; + interface Windows.Foundation.IUriRuntimeClassWithAbsoluteCanonicalUri; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable; + } + + [ + activatable(Windows.Foundation.IWwwFormUrlDecoderRuntimeClassFactory, Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass WwwFormUrlDecoder + { + [default] interface Windows.Foundation.IWwwFormUrlDecoderRuntimeClass; + interface Windows.Foundation.Collections.IVectorView<Windows.Foundation.IWwwFormUrlDecoderEntry *>; + interface Windows.Foundation.Collections.IIterable<Windows.Foundation.IWwwFormUrlDecoderEntry *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass WwwFormUrlDecoderEntry + { + [default] interface Windows.Foundation.IWwwFormUrlDecoderEntry; + } }
From: Hans Leidekker hans@codeweavers.com
--- include/windows.system.idl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/include/windows.system.idl b/include/windows.system.idl index 5ba5c3f86b3..84e7e2baeae 100644 --- a/include/windows.system.idl +++ b/include/windows.system.idl @@ -29,6 +29,7 @@ import "windows.foundation.idl"; namespace Windows.System { typedef enum DispatcherQueuePriority DispatcherQueuePriority; + typedef enum ProcessorArchitecture ProcessorArchitecture;
interface IDispatcherQueue; interface IDispatcherQueue2; @@ -66,6 +67,22 @@ namespace Windows.System High = 10, };
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum ProcessorArchitecture + { + X86 = 0, + Arm = 5, + X64 = 9, + Neutral = 11, + [contract(Windows.Foundation.UniversalApiContract, 8.0)] + Arm64 = 12, + [contract(Windows.Foundation.UniversalApiContract, 8.0)] + X86OnArm64 = 14, + Unknown = 65535 + }; + [ contract(Windows.Foundation.UniversalApiContract, 5.0), uuid(dfa2dc9c-1a2d-4917-98f2-939af1d6e0c8)
From: Hans Leidekker hans@codeweavers.com
--- include/Makefile.in | 1 + include/windows.storage.idl | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 include/windows.storage.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 5fd20858aee..94b5e77e849 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -842,6 +842,7 @@ SOURCES = \ windows.perception.spatial.surfaces.idl \ windows.security.credentials.idl \ windows.security.cryptography.idl \ + windows.storage.idl \ windows.storage.streams.idl \ windows.system.idl \ windows.system.power.idl \ diff --git a/include/windows.storage.idl b/include/windows.storage.idl new file mode 100644 index 00000000000..de918ddc104 --- /dev/null +++ b/include/windows.storage.idl @@ -0,0 +1,39 @@ +/* + * Copyright 2023 Hans Leidekker 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 "windows.foundation.idl"; + +namespace Windows.Storage { + interface IStorageFolder; + interface IStorageFolderStatics; + + runtimeclass StorageFolder; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Storage.IStorageFolderStatics, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass StorageFolder + { + [default] interface Windows.Storage.IStorageFolder; + } +}
From: Hans Leidekker hans@codeweavers.com
--- include/Makefile.in | 1 + include/windows.applicationmodel.idl | 116 +++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 include/windows.applicationmodel.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 94b5e77e849..53d4d0fe3fb 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -809,6 +809,7 @@ SOURCES = \ windef.h \ windns.h \ windot11.h \ + windows.applicationmodel.idl \ windows.devices.bluetooth.idl \ windows.devices.enumeration.idl \ windows.devices.geolocation.idl \ diff --git a/include/windows.applicationmodel.idl b/include/windows.applicationmodel.idl new file mode 100644 index 00000000000..cea2c9423d8 --- /dev/null +++ b/include/windows.applicationmodel.idl @@ -0,0 +1,116 @@ +/* + * Copyright 2023 Hans Leidekker 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 "windows.foundation.idl"; +import "windows.storage.idl"; +import "windows.system.idl"; + +namespace Windows.ApplicationModel { + typedef struct PackageVersion PackageVersion; + + interface IPackage; + interface IPackageId; + interface IPackageIdWithMetadata; + interface IPackageStatics; + + runtimeclass Package; + runtimeclass PackageId; + + declare { + interface Windows.Foundation.Collections.IIterable<Windows.ApplicationModel.Package *>; + interface Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Package *>; + interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Package *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + struct PackageVersion + { + UINT16 Major; + UINT16 Minor; + UINT16 Build; + UINT16 Revision; + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Package), + uuid(163c792f-bd75-413c-bf23-b1fe7b95d825) + ] + interface IPackage : IInspectable + { + [propget] HRESULT Id([out, retval] Windows.ApplicationModel.PackageId **value); + [propget] HRESULT InstalledLocation([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT IsFramework([out, retval] boolean *value); + [propget] HRESULT Dependencies([out, retval] Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Package *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.PackageId), + uuid(1adb665e-37c7-4790-9980-dd7ae74e8bb2) + ] + interface IPackageId : IInspectable + { + [propget] HRESULT Name([out, retval] HSTRING *value); + [propget] HRESULT Version([out, retval] Windows.ApplicationModel.PackageVersion *value); + [propget] HRESULT Architecture([out, retval] Windows.System.ProcessorArchitecture *value); + [propget] HRESULT ResourceId([out, retval] HSTRING *value); + [propget] HRESULT Publisher([out, retval] HSTRING *value); + [propget] HRESULT PublisherId([out, retval] HSTRING *value); + [propget] HRESULT FullName([out, retval] HSTRING *value); + [propget] HRESULT FamilyName([out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.PackageId), + uuid(40577a7c-0c9e-443d-9074-855f5ce0a08d) + ] + interface IPackageIdWithMetadata : IInspectable + { + [propget] HRESULT ProductId([out, retval] HSTRING *value); + [propget] HRESULT Author([out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.ApplicationModel.IPackageStatics, Windows.Foundation.UniversalApiContract, 1.0), + threading(both) + ] + runtimeclass Package + { + [default] interface Windows.ApplicationModel.IPackage; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass PackageId + { + [default] interface Windows.ApplicationModel.IPackageId; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.IPackageIdWithMetadata; + } +}