Signed-off-by: Jactry Zeng jzeng@codeweavers.com --- include/windows.foundation.collections.idl | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/include/windows.foundation.collections.idl b/include/windows.foundation.collections.idl index b0b9430048b..876e15336a2 100644 --- a/include/windows.foundation.collections.idl +++ b/include/windows.foundation.collections.idl @@ -74,6 +74,18 @@ cpp_quote("#endif")
namespace Collections { + [ + contract(Windows.Foundation.FoundationContract, 1.0), + uuid(e480ce40-a338-4ada-adcf-272272e48cb9) + ] + interface IMapView<K, V> : IInspectable + { + HRESULT Lookup([in] K key, [out] V *value); + [propget] HRESULT Size([out] unsigned int *size); + HRESULT HasKey([in] K key, [out] boolean *found); + HRESULT Split([out] IMapView<K, V> **first, [out] IMapView<K, V> **second); + } + [ contract(Windows.Foundation.FoundationContract, 1.0), uuid(6a79e863-4300-459a-9966-cbb660963ee1)
Signed-off-by: Jactry Zeng jzeng@codeweavers.com --- include/Makefile.in | 1 + include/windows.storage.streams.idl | 70 +++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 include/windows.storage.streams.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 71d1b497b6d..ff7aa1b0ff5 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -776,6 +776,7 @@ SOURCES = \ windows.h \ windows.media.devices.idl \ windows.media.speechsynthesis.idl \ + windows.storage.streams.idl \ windows.system.idl \ windows.system.userprofile.idl \ windowscontracts.idl \ diff --git a/include/windows.storage.streams.idl b/include/windows.storage.streams.idl new file mode 100644 index 00000000000..59b15761af0 --- /dev/null +++ b/include/windows.storage.streams.idl @@ -0,0 +1,70 @@ +/* + * Copyright 2021 Jactry Zeng 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 "eventtoken.idl"; +import "windows.foundation.idl"; + +namespace Windows +{ + namespace Foundation + { + interface IClosable; + } +} + +namespace Windows +{ + namespace Storage + { + namespace Streams + { + interface IContentTypeProvider; + interface IInputStream; + interface IOutputStream; + interface IRandomAccessStream; + interface IRandomAccessStreamWithContentType; + } + } +} + +namespace Windows +{ + namespace Storage + { + namespace Streams + { + [ + uuid(cc254827-4b3d-438f-9232-10c76bc7e038), + ] + interface IRandomAccessStreamWithContentType : IInspectable + requires + Windows.Storage.Streams.IRandomAccessStream, + Windows.Foundation.IClosable, + Windows.Storage.Streams.IInputStream, + Windows.Storage.Streams.IOutputStream, + Windows.Storage.Streams.IContentTypeProvider + { + } + } + } +}
Signed-off-by: Jactry Zeng jzeng@codeweavers.com --- include/windows.devices.enumeration.idl | 123 ++++++++++++++++++++++++ 1 file changed, 123 insertions(+)
diff --git a/include/windows.devices.enumeration.idl b/include/windows.devices.enumeration.idl index 9aa2aaba441..20e4df9d33d 100644 --- a/include/windows.devices.enumeration.idl +++ b/include/windows.devices.enumeration.idl @@ -24,13 +24,57 @@ import "inspectable.idl"; import "asyncinfo.idl"; import "eventtoken.idl"; import "windowscontracts.idl"; +import "windows.storage.streams.idl"; import "windows.foundation.idl";
namespace Windows { namespace Devices { namespace Enumeration { + typedef enum Panel Panel; + + interface IDeviceInformation; interface IDeviceInformationStatics; interface IDeviceInformationStatics2; + interface IDeviceInformationUpdate; + interface IEnclosureLocation; + + runtimeclass DeviceInformation; + runtimeclass DeviceInformationUpdate; + runtimeclass DeviceThumbnail; + runtimeclass EnclosureLocation; + } + } +} + +namespace Windows +{ + namespace Devices + { + namespace Enumeration + { + declare + { + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceInformation *>; + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceThumbnail *>; + interface Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *>; + interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformation *>; + interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceThumbnail *>; + } + } + } +} + +namespace Windows +{ + namespace Storage + { + namespace Streams + { + interface IContentTypeProvider; + interface IInputStream; + interface IOutputStream; + interface IRandomAccessStream; + interface IRandomAccessStreamWithContentType; } } } @@ -38,6 +82,55 @@ namespace Windows { namespace Windows { namespace Devices { namespace Enumeration { + enum Panel + { + Unknown = 0, + Front = 1, + Back = 2, + Top = 3, + Bottom = 4, + Left = 5, + Right = 6 + }; + + [ + exclusiveto(Windows.Devices.Enumeration.DeviceInformation), + uuid(aba0fb95-4398-489d-8e44-e6130927011f) + ] + interface IDeviceInformation : IInspectable + { + [propget] HRESULT Id([out, retval] HSTRING *value); + [propget] HRESULT Name([out, retval] HSTRING *value); + [propget] HRESULT IsEnabled([out, retval] boolean *value); + [propget] HRESULT IsDefault([out, retval] boolean *value); + [propget] HRESULT EnclosureLocation([out, retval] Windows.Devices.Enumeration.EnclosureLocation **value); + [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *> **value); + HRESULT Update([in] Windows.Devices.Enumeration.DeviceInformationUpdate *info); + HRESULT GetThumbnailAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceThumbnail *> **operation); + HRESULT GetGlyphThumbnailAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceThumbnail *> **operation); + } + + [ + exclusiveto(Windows.Devices.Enumeration.DeviceInformationUpdate), + uuid(8f315305-d972-44b7-a37e-9e822c78213b) + ] + interface IDeviceInformationUpdate : IInspectable + { + [propget] HRESULT Id([out, retval] HSTRING *value); + [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *> **value); + } + + [ + exclusiveto(Windows.Devices.Enumeration.EnclosureLocation), + uuid(42340a27-5810-459c-aabb-c65e1f813ecf) + ] + interface IEnclosureLocation : IInspectable + { + [propget] HRESULT InDock([out, retval] boolean *value); + [propget] HRESULT InLid([out, retval] boolean *value); + [propget] HRESULT Panel([out, retval] Windows.Devices.Enumeration.Panel *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -50,6 +143,36 @@ namespace Windows { [default] interface Windows.Devices.Enumeration.IDeviceInformation; [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.Enumeration.IDeviceInformation2; } + + [ + marshaling_behavior(agile), + ] + runtimeclass DeviceInformationUpdate + { + [default] interface Windows.Devices.Enumeration.IDeviceInformationUpdate; + interface Windows.Devices.Enumeration.IDeviceInformationUpdate2; + } + + [ + marshaling_behavior(agile), + ] + runtimeclass DeviceThumbnail + { + [default] interface Windows.Storage.Streams.IRandomAccessStreamWithContentType; + interface Windows.Storage.Streams.IContentTypeProvider; + interface Windows.Storage.Streams.IRandomAccessStream; + interface Windows.Storage.Streams.IOutputStream; + interface Windows.Foundation.IClosable; + interface Windows.Storage.Streams.IInputStream; + } + + [ + marshaling_behavior(agile) + ] + runtimeclass EnclosureLocation + { + [default] interface Windows.Devices.Enumeration.IEnclosureLocation; + } } } }
Signed-off-by: Jactry Zeng jzeng@codeweavers.com --- include/windows.devices.enumeration.idl | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
diff --git a/include/windows.devices.enumeration.idl b/include/windows.devices.enumeration.idl index 20e4df9d33d..7cde49224a1 100644 --- a/include/windows.devices.enumeration.idl +++ b/include/windows.devices.enumeration.idl @@ -30,6 +30,7 @@ import "windows.foundation.idl"; namespace Windows { namespace Devices { namespace Enumeration { + typedef enum DeviceWatcherStatus DeviceWatcherStatus; typedef enum Panel Panel;
interface IDeviceInformation; @@ -41,6 +42,7 @@ namespace Windows { runtimeclass DeviceInformation; runtimeclass DeviceInformationUpdate; runtimeclass DeviceThumbnail; + runtimeclass DeviceWatcher; runtimeclass EnclosureLocation; } } @@ -59,6 +61,9 @@ namespace Windows interface Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *>; interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformation *>; interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceThumbnail *>; + interface Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, IInspectable *>; + interface Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, Windows.Devices.Enumeration.DeviceInformation *>; + interface Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, Windows.Devices.Enumeration.DeviceInformationUpdate *>; } } } @@ -82,6 +87,16 @@ namespace Windows namespace Windows { namespace Devices { namespace Enumeration { + enum DeviceWatcherStatus + { + Created = 0, + Started = 1, + EnumerationCompleted = 2, + Stopping = 3, + Stopped = 4, + Aborted = 5 + }; + enum Panel { Unknown = 0, @@ -120,6 +135,32 @@ namespace Windows { [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *> **value); }
+ [ + exclusiveto(Windows.Devices.Enumeration.DeviceWatcher), + uuid(c9eab97d-8f6b-4f96-a9f4-abc814e22271), + ] + interface IDeviceWatcher : IInspectable + { + [eventadd] HRESULT Added([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher*, + Windows.Devices.Enumeration.DeviceInformation *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Added([in] EventRegistrationToken token); + [eventadd] HRESULT Updated([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, + Windows.Devices.Enumeration.DeviceInformationUpdate *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Updated([in] EventRegistrationToken token); + [eventadd] HRESULT Removed([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, + Windows.Devices.Enumeration.DeviceInformationUpdate *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Removed([in] EventRegistrationToken token); + [eventadd] HRESULT EnumerationCompleted([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, + IInspectable *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT EnumerationCompleted([in] EventRegistrationToken token); + [eventadd] HRESULT Stopped([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, + IInspectable *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Stopped([in] EventRegistrationToken token); + [propget] HRESULT Status([out, retval] Windows.Devices.Enumeration.DeviceWatcherStatus *status); + HRESULT Start(); + HRESULT Stop(); + } + [ exclusiveto(Windows.Devices.Enumeration.EnclosureLocation), uuid(42340a27-5810-459c-aabb-c65e1f813ecf) @@ -166,6 +207,15 @@ namespace Windows { interface Windows.Storage.Streams.IInputStream; }
+ [ + marshaling_behavior(agile), + ] + runtimeclass DeviceWatcher + { + [default] interface Windows.Devices.Enumeration.IDeviceWatcher; + interface Windows.Devices.Enumeration.IDeviceWatcher2; + } + [ marshaling_behavior(agile) ]