From: Hans Leidekker hans@codeweavers.com
--- include/windows.devices.usb.idl | 502 ++++++++++++++++++++++++++++++++ 1 file changed, 502 insertions(+)
diff --git a/include/windows.devices.usb.idl b/include/windows.devices.usb.idl index abd036074bd..63ca545760f 100644 --- a/include/windows.devices.usb.idl +++ b/include/windows.devices.usb.idl @@ -28,27 +28,245 @@ import "windows.foundation.idl"; import "windows.storage.streams.idl";
namespace Windows.Devices.Usb { + typedef enum UsbControlRecipient UsbControlRecipient; + typedef enum UsbControlTransferType UsbControlTransferType; + typedef enum UsbReadOptions UsbReadOptions; + typedef enum UsbTransferDirection UsbTransferDirection; + typedef enum UsbWriteOptions UsbWriteOptions; + + interface IUsbBulkInEndpointDescriptor; + interface IUsbBulkInPipe; interface IUsbDevice; interface IUsbDeviceClass; interface IUsbConfiguration; + interface IUsbConfigurationDescriptor; + interface IUsbConfigurationDescriptorStatics; + interface IUsbControlRequestType; interface IUsbDeviceDescriptor; interface IUsbDeviceStatics; interface IUsbInterface; + interface IUsbInterfaceDescriptor; + interface IUsbInterfaceDescriptorStatics; + interface IUsbInterruptInEndpointDescriptor; + interface IUsbInterruptInEventArgs; + interface IUsbInterruptInPipe; + interface IUsbInterruptOutEndpointDescriptor; + interface IUsbInterruptOutPipe; interface IUsbSetupPacket; interface IUsbSetupPacketFactory;
+ runtimeclass UsbBulkInEndpointDescriptor; + runtimeclass UsbBulkInPipe; + runtimeclass UsbBulkOutEndpointDescriptor; + runtimeclass UsbBulkOutPipe; runtimeclass UsbConfiguration; + runtimeclass UsbConfigurationDescriptor; + runtimeclass UsbControlRequestType; + runtimeclass UsbDescriptor; runtimeclass UsbDevice; runtimeclass UsbDeviceClass; runtimeclass UsbDeviceDescriptor; runtimeclass UsbInterface; + runtimeclass UsbInterfaceDescriptor; + runtimeclass UsbInterfaceSetting; + runtimeclass UsbInterruptInEndpointDescriptor; + runtimeclass UsbInterruptInEventArgs; + runtimeclass UsbInterruptInPipe; + runtimeclass UsbInterruptOutEndpointDescriptor; + runtimeclass UsbInterruptOutPipe; runtimeclass UsbSetupPacket;
declare { interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Usb.UsbDevice *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInEndpointDescriptor *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInPipe *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutEndpointDescriptor *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutPipe *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterface *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterfaceSetting *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInEndpointDescriptor *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInPipe *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutPipe *>; interface Windows.Foundation.IAsyncOperation<Windows.Devices.Usb.UsbDevice *>; + interface Windows.Foundation.TypedEventHandler<Windows.Devices.Usb.UsbInterruptInPipe *, Windows.Devices.Usb.UsbInterruptInEventArgs *>; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum UsbControlRecipient + { + Device = 0, + SpecifiedInterface = 1, + Endpoint = 2, + Other = 3, + DefaultInterface = 4, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum UsbControlTransferType + { + Standard = 0, + Class = 1, + Vendor = 2, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + flags + ] + enum UsbReadOptions + { + None = 0x0, + AutoClearStall = 0x1, + OverrideAutomaticBufferManagement = 0x2, + IgnoreShortPacket = 0x4, + AllowPartialReads = 0x8, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum UsbTransferDirection + { + Out = 0, + In = 1, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + flags + ] + enum UsbWriteOptions + { + None = 0x0, + AutoClearStall = 0x1, + ShortPacketTerminate = 0x2, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbBulkInEndpointDescriptor), + uuid(3c6e4846-06cf-42a9-9dc2-971c1b14b6e3) + ] + interface IUsbBulkInEndpointDescriptor : IInspectable + { + [propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); + [propget] HRESULT EndpointNumber([out, retval] BYTE *value); + [propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbBulkInPipe **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbBulkInPipe), + uuid(f01d2d3b-4548-4d50-b326-d82cdabe1220) + ] + interface IUsbBulkInPipe : IInspectable + { + [propget] HRESULT MaxTransferSizeBytes([out, retval] UINT32 *value); + [propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbBulkInEndpointDescriptor **value); + HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); + [propput] HRESULT ReadOptions([in] Windows.Devices.Usb.UsbReadOptions value); + [propget] HRESULT ReadOptions([out, retval] Windows.Devices.Usb.UsbReadOptions *value); + HRESULT FlushBuffer(); + [propget] HRESULT InputStream([out, retval] Windows.Storage.Streams.IInputStream **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbBulkOutEndpointDescriptor), + uuid(2820847a-ffee-4f60-9be1-956cac3ecb65) + ] + interface IUsbBulkOutEndpointDescriptor : IInspectable + { + [propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); + [propget] HRESULT EndpointNumber([out, retval] BYTE *value); + [propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbBulkOutPipe **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbBulkOutPipe), + uuid(a8e9ee6e-0115-45aa-8b21-37b225bccee7) + ] + interface IUsbBulkOutPipe : IInspectable + { + [propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbBulkOutEndpointDescriptor **value); + HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); + [propput] HRESULT WriteOptions([in] Windows.Devices.Usb.UsbWriteOptions value); + [propget] HRESULT WriteOptions([out, retval] Windows.Devices.Usb.UsbWriteOptions *value); + [propget] HRESULT OutputStream([out, retval] Windows.Storage.Streams.IOutputStream **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbConfiguration), + uuid(68177429-36a9-46d7-b873-fc689251ec30) + ] + interface IUsbConfiguration : IInspectable + { + [propget] HRESULT UsbInterfaces([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterface *> **value); + [propget] HRESULT ConfigurationDescriptor([out, retval] Windows.Devices.Usb.UsbConfigurationDescriptor **value); + [propget] HRESULT Descriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbConfigurationDescriptor), + uuid(f2176d92-b442-407a-8207-7d646c0385f3) + ] + interface IUsbConfigurationDescriptor : IInspectable + { + [propget] HRESULT ConfigurationValue([out, retval] BYTE *value); + [propget] HRESULT MaxPowerMilliamps([out, retval] UINT32 *value); + [propget] HRESULT SelfPowered([out, retval] boolean *value); + [propget] HRESULT RemoteWakeup([out, retval] boolean *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbConfigurationDescriptor), + uuid(424ced93-e740-40a1-92bd-da120ea04914) + ] + interface IUsbConfigurationDescriptorStatics : IInspectable + { + HRESULT TryParse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out] Windows.Devices.Usb.UsbConfigurationDescriptor **parsed, [out, retval] boolean *success); + HRESULT Parse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out, retval] Windows.Devices.Usb.UsbConfigurationDescriptor **parsed); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbControlRequestType), + uuid(8e9465a6-d73d-46de-94be-aae7f07c0f5c) + ] + interface IUsbControlRequestType : IInspectable + { + [propget] HRESULT Direction([out, retval] Windows.Devices.Usb.UsbTransferDirection *value); + [propput] HRESULT Direction([in] Windows.Devices.Usb.UsbTransferDirection value); + [propget] HRESULT ControlTransferType([out, retval] Windows.Devices.Usb.UsbControlTransferType *value); + [propput] HRESULT ControlTransferType([in] Windows.Devices.Usb.UsbControlTransferType value); + [propget] HRESULT Recipient([out, retval] Windows.Devices.Usb.UsbControlRecipient *value); + [propput] HRESULT Recipient([in] Windows.Devices.Usb.UsbControlRecipient value); + [propget] HRESULT AsByte([out, retval] BYTE *value); + [propput] HRESULT AsByte([in] BYTE value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbDescriptor), + uuid(0a89f216-5f9d-4874-8904-da9ad3f5528f) + ] + interface IUsbDescriptor : IInspectable + { + [propget] HRESULT Length([out, retval] BYTE *value); + [propget] HRESULT DescriptorType([out, retval] BYTE *value); + HRESULT ReadDescriptorBuffer([in] Windows.Storage.Streams.IBuffer *buffer); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Devices.Usb.UsbDevice), @@ -99,6 +317,21 @@ namespace Windows.Devices.Usb { [propput] HRESULT ProtocolCode([in] Windows.Foundation.IReference<BYTE> *value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbDeviceDescriptor), + uuid(1f48d1f6-ba97-4322-b92c-b5b189216588) + ] + interface IUsbDeviceDescriptor : IInspectable + { + [propget] HRESULT BcdUsb([out, retval] UINT32 *value); + [propget] HRESULT MaxPacketSize0([out, retval] BYTE *value); + [propget] HRESULT VendorId([out, retval] UINT32 *value); + [propget] HRESULT ProductId([out, retval] UINT32 *value); + [propget] HRESULT BcdDeviceRevision([out, retval] UINT32 *value); + [propget] HRESULT NumberOfConfigurations([out, retval] BYTE *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Devices.Usb.UsbDevice), @@ -116,6 +349,182 @@ namespace Windows.Devices.Usb { HRESULT FromIdAsync([in] HSTRING id, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Usb.UsbDevice *> **operation); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterface), + uuid(a0322b95-7f47-48ab-a727-678c25be2112) + ] + interface IUsbInterface : IInspectable + { + [propget] HRESULT BulkInPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInPipe *> **value); + [propget] HRESULT InterruptInPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInPipe *> **value); + [propget] HRESULT BulkOutPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutPipe *> **value); + [propget] HRESULT InterruptOutPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutPipe *> **value); + [propget] HRESULT InterfaceSettings([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterfaceSetting *> **value); + [propget] HRESULT InterfaceNumber([out, retval] BYTE *value); + [propget] HRESULT Descriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterfaceDescriptor), + uuid(199670c7-b7ee-4f90-8cd5-94a2e257598a) + ] + interface IUsbInterfaceDescriptor : IInspectable + { + [propget] HRESULT ClassCode([out, retval] BYTE *value); + [propget] HRESULT SubclassCode([out, retval] BYTE *value); + [propget] HRESULT ProtocolCode([out, retval] BYTE *value); + [propget] HRESULT AlternateSettingNumber([out, retval] BYTE *value); + [propget] HRESULT InterfaceNumber([out, retval] BYTE *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterfaceDescriptor), + uuid(e34a9ff5-77d6-48b6-b0be-16c6422316fe) + ] + interface IUsbInterfaceDescriptorStatics : IInspectable + { + HRESULT TryParse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out] Windows.Devices.Usb.UsbInterfaceDescriptor **parsed, [out, retval] boolean *success); + HRESULT Parse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out, retval] Windows.Devices.Usb.UsbInterfaceDescriptor **parsed); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterfaceSetting), + uuid(1827bba7-8da7-4af7-8f4c-7f3032e781f5) + ] + interface IUsbInterfaceSetting : IInspectable + { + [propget] HRESULT BulkInEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInEndpointDescriptor *> **value); + [propget] HRESULT InterruptInEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInEndpointDescriptor *> **value); + [propget] HRESULT BulkOutEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutEndpointDescriptor *> **value); + [propget] HRESULT InterruptOutEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor *> **value); + [propget] HRESULT Selected([out, retval] boolean *value); + HRESULT SelectSettingAsync([out, retval] Windows.Foundation.IAsyncAction **operation); + [propget] HRESULT InterfaceDescriptor([out, retval] Windows.Devices.Usb.UsbInterfaceDescriptor **value); + [propget] HRESULT Descriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterruptInEndpointDescriptor), + uuid(c0528967-c911-4c3a-86b2-419c2da89039) + ] + interface IUsbInterruptInEndpointDescriptor : IInspectable + { + [propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); + [propget] HRESULT EndpointNumber([out, retval] BYTE *value); + [propget] HRESULT Interval([out, retval] Windows.Foundation.TimeSpan *value); + [propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbInterruptInPipe **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterruptInEventArgs), + uuid(b7b04092-1418-4936-8209-299cf5605583) + ] + interface IUsbInterruptInEventArgs : IInspectable + { + [propget] HRESULT InterruptData([out, retval] Windows.Storage.Streams.IBuffer **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterruptInPipe), + uuid(fa007116-84d7-48c7-8a3f-4c0b235f2ea6) + ] + interface IUsbInterruptInPipe : IInspectable + { + [propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbInterruptInEndpointDescriptor **value); + HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); + [eventadd] HRESULT DataReceived([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Usb.UsbInterruptInPipe *, Windows.Devices.Usb.UsbInterruptInEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT DataReceived([in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor), + uuid(cc9fed81-10ca-4533-952d-9e278341e80f) + ] + interface IUsbInterruptOutEndpointDescriptor : IInspectable + { + [propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); + [propget] HRESULT EndpointNumber([out, retval] BYTE *value); + [propget] HRESULT Interval([out, retval] Windows.Foundation.TimeSpan *value); + [propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbInterruptOutPipe **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbInterruptOutPipe), + uuid(e984c8a9-aaf9-49d0-b96c-f661ab4a7f95) + ] + interface IUsbInterruptOutPipe : IInspectable + { + [propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor **value); + HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); + [propput] HRESULT WriteOptions([in] Windows.Devices.Usb.UsbWriteOptions value); + [propget] HRESULT WriteOptions([out, retval] Windows.Devices.Usb.UsbWriteOptions *value); + [propget] HRESULT OutputStream([out, retval] Windows.Storage.Streams.IOutputStream **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbSetupPacket), + uuid(104ba132-c78f-4c51-b654-e49d02f2cb03) + ] + interface IUsbSetupPacket : IInspectable + { + [propget] HRESULT RequestType([out, retval] Windows.Devices.Usb.UsbControlRequestType **value); + [propput] HRESULT RequestType([in] Windows.Devices.Usb.UsbControlRequestType *value); + [propget] HRESULT Request([out, retval] BYTE *value); + [propput] HRESULT Request([in] BYTE value); + [propget] HRESULT Value([out, retval] UINT32 *value); + [propput] HRESULT Value([in] UINT32 value); + [propget] HRESULT Index([out, retval] UINT32 *value); + [propput] HRESULT Index([in] UINT32 value); + [propget] HRESULT Length([out, retval] UINT32 *value); + [propput] HRESULT Length([in] UINT32 value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbBulkInEndpointDescriptor + { + [default] interface Windows.Devices.Usb.IUsbBulkInEndpointDescriptor; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbBulkInPipe + { + [default] interface Windows.Devices.Usb.IUsbBulkInPipe; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbBulkOutEndpointDescriptor + { + [default] interface Windows.Devices.Usb.IUsbBulkOutEndpointDescriptor; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbBulkOutPipe + { + [default] interface Windows.Devices.Usb.IUsbBulkOutPipe; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile) @@ -125,6 +534,35 @@ namespace Windows.Devices.Usb { [default] interface Windows.Devices.Usb.IUsbConfiguration; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.Devices.Usb.IUsbConfigurationDescriptorStatics, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass UsbConfigurationDescriptor + { + [default] interface Windows.Devices.Usb.IUsbConfigurationDescriptor; + } + + [ + activatable(Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbControlRequestType + { + [default] interface Windows.Devices.Usb.IUsbControlRequestType; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbDescriptor + { + [default] interface Windows.Devices.Usb.IUsbDescriptor; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -164,6 +602,70 @@ namespace Windows.Devices.Usb { [default] interface Windows.Devices.Usb.IUsbInterface; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.Devices.Usb.IUsbInterfaceDescriptorStatics, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass UsbInterfaceDescriptor + { + [default] interface Windows.Devices.Usb.IUsbInterfaceDescriptor; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbInterfaceSetting + { + [default] interface Windows.Devices.Usb.IUsbInterfaceSetting; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbInterruptInEventArgs + { + [default] interface Windows.Devices.Usb.IUsbInterruptInEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbInterruptInEndpointDescriptor + { + [default] interface Windows.Devices.Usb.IUsbInterruptInEndpointDescriptor; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbInterruptInPipe + { + [default] interface Windows.Devices.Usb.IUsbInterruptInPipe; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbInterruptOutEndpointDescriptor + { + [default] interface Windows.Devices.Usb.IUsbInterruptOutEndpointDescriptor; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbInterruptOutPipe + { + [default] interface Windows.Devices.Usb.IUsbInterruptOutPipe; + } + [ /* activatable(Windows.Devices.Usb.IUsbSetupPacketFactory, Windows.Foundation.UniversalApiContract, 1.0), */ activatable(Windows.Foundation.UniversalApiContract, 1.0),
From: Hans Leidekker hans@codeweavers.com
--- include/windows.media.idl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/include/windows.media.idl b/include/windows.media.idl index 5d3666c281c..c04063a3303 100644 --- a/include/windows.media.idl +++ b/include/windows.media.idl @@ -170,6 +170,19 @@ namespace Windows.Media [propget] HRESULT RequestedAutoRepeatMode([out, retval] Windows.Media.MediaPlaybackAutoRepeatMode *value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.ImageDisplayProperties), + uuid(cd0bc7ef-54e7-411f-9933-f0e98b0a96d2) + ] + interface IImageDisplayProperties : IInspectable + { + [propget] HRESULT Title([out, retval] HSTRING *value); + [propput] HRESULT Title([in] HSTRING value); + [propget] HRESULT Subtitle([out, retval] HSTRING *value); + [propput] HRESULT Subtitle([in] HSTRING value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(1803def8-dca5-4b6f-9c20-e3d3c0643625) @@ -390,6 +403,19 @@ namespace Windows.Media [propput] HRESULT Position([in] Windows.Foundation.TimeSpan value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.VideoDisplayProperties), + uuid(5609fdb1-5d2d-4872-8170-45dee5bc2f5c) + ] + interface IVideoDisplayProperties : IInspectable + { + [propget] HRESULT Title([out, retval] HSTRING *value); + [propput] HRESULT Title([in] HSTRING value); + [propget] HRESULT Subtitle([out, retval] HSTRING *value); + [propput] HRESULT Subtitle([in] HSTRING value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile)
From: Hans Leidekker hans@codeweavers.com
--- include/windows.media.mediaproperties.idl | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+)
diff --git a/include/windows.media.mediaproperties.idl b/include/windows.media.mediaproperties.idl index 6dcd5ec61e1..c9935eaa1e9 100644 --- a/include/windows.media.mediaproperties.idl +++ b/include/windows.media.mediaproperties.idl @@ -57,9 +57,18 @@ namespace Windows.Media.MediaProperties { runtimeclass AudioEncodingProperties; runtimeclass ContainerEncodingProperties; runtimeclass MediaEncodingProfile; + runtimeclass MediaPropertySet; runtimeclass MediaRatio; runtimeclass VideoEncodingProperties;
+ declare { + interface Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *>; + interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *> *>; + interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *> *>; + interface Windows.Foundation.Collections.IMap<GUID, IInspectable *>; + interface Windows.Foundation.Collections.IMapView<GUID, IInspectable *>; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Media.MediaProperties.AudioEncodingProperties), @@ -103,6 +112,29 @@ namespace Windows.Media.MediaProperties { [propget] HRESULT Container([out, retval] Windows.Media.MediaProperties.ContainerEncodingProperties **value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(b4002af6-acd4-4e5a-a24b-5d7498a8b8c4) + ] + interface IMediaEncodingProperties : IInspectable + { + [propget] HRESULT Properties([out, retval] Windows.Media.MediaProperties.MediaPropertySet **value); + [propget] HRESULT Type([out, retval] HSTRING *value); + [propput] HRESULT Subtype([in] HSTRING value); + [propget] HRESULT Subtype([out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.MediaProperties.AudioEncodingProperties), + uuid(98f10d79-13ea-49ff-be70-2673db69702c) + ] + interface IAudioEncodingPropertiesWithFormatUserData : IInspectable + { + HRESULT SetFormatUserData([in] UINT32 __value_size, [in, size_is(__value_size)] BYTE *value); + HRESULT GetFormatUserData([out] UINT32 * __value_size, [out, size_is(, *__value_size)] BYTE **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Media.MediaProperties.MediaRatio), @@ -180,6 +212,18 @@ namespace Windows.Media.MediaProperties { /* [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Media.MediaProperties.IMediaEncodingProfile3; */ }
+ [ + activatable(Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass MediaPropertySet + { + [default] interface Windows.Foundation.Collections.IMap<GUID, IInspectable *>; + interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *> *>; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile),
From: Hans Leidekker hans@codeweavers.com
--- include/Makefile.in | 1 + include/windows.graphics.holographic.idl | 152 ++++++++++++++++++++++- include/windows.perception.idl | 54 ++++++++ 3 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 include/windows.perception.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 159a100b4ca..d2bc8d3436f 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -913,6 +913,7 @@ SOURCES = \ windows.networking.connectivity.idl \ windows.networking.idl \ windows.networking.sockets.idl \ + windows.perception.idl \ windows.perception.spatial.idl \ windows.perception.spatial.surfaces.idl \ windows.security.authentication.onlineid.idl \ diff --git a/include/windows.graphics.holographic.idl b/include/windows.graphics.holographic.idl index 204b1fd4886..05731f62b02 100644 --- a/include/windows.graphics.holographic.idl +++ b/include/windows.graphics.holographic.idl @@ -28,15 +28,26 @@ import "windows.foundation.idl"; import "windows.foundation.numerics.idl"; import "windows.graphics.directx.idl"; import "windows.graphics.directx.direct3d11.idl"; -/* import "windows.perception.idl"; */ +import "windows.perception.idl"; import "windows.perception.spatial.idl"; import "windows.ui.core.idl";
+namespace Windows.Perception { + runtimeclass PerceptionTimestamp; +} + namespace Windows.Graphics.Holographic { + typedef enum HolographicFramePresentResult HolographicFramePresentResult; + typedef enum HolographicFramePresentWaitBehavior HolographicFramePresentWaitBehavior; + typedef struct HolographicAdapterId HolographicAdapterId; + typedef struct HolographicStereoTransform HolographicStereoTransform;
interface IHolographicCamera; + interface IHolographicCameraPose; + interface IHolographicCameraRenderingParameters; interface IHolographicFrame; + interface IHolographicFramePrediction; interface IHolographicSpaceStatics; interface IHolographicSpaceStatics2; interface IHolographicSpaceStatics3; @@ -44,17 +55,41 @@ namespace Windows.Graphics.Holographic { interface IHolographicSpaceCameraRemovedEventArgs;
runtimeclass HolographicCamera; + runtimeclass HolographicCameraPose; + runtimeclass HolographicCameraRenderingParameters; runtimeclass HolographicFrame; + runtimeclass HolographicFramePrediction; runtimeclass HolographicSpace; runtimeclass HolographicSpaceCameraAddedEventArgs; runtimeclass HolographicSpaceCameraRemovedEventArgs;
declare { + interface Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCamera *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCameraPose *>; + interface Windows.Foundation.IReference<Windows.Graphics.Holographic.HolographicStereoTransform>; interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, IInspectable *>; interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraAddedEventArgs *>; interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraRemovedEventArgs *>; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 2.0) + ] + enum HolographicFramePresentResult + { + Success = 0, + DeviceRemoved = 1, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0) + ] + enum HolographicFramePresentWaitBehavior + { + WaitForFrameToFinish = 0, + DoNotWaitForFrameToFinish = 1, + }; + [ contract(Windows.Foundation.UniversalApiContract, 2.0) ] @@ -64,6 +99,91 @@ namespace Windows.Graphics.Holographic { INT32 HighPart; };
+ [ + contract(Windows.Foundation.UniversalApiContract, 2.0) + ] + struct HolographicStereoTransform + { + Windows.Foundation.Numerics.Matrix4x4 Left; + Windows.Foundation.Numerics.Matrix4x4 Right; + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicCamera), + uuid(e4e98445-9bed-4980-9ba0-e87680d1cb74) + ] + interface IHolographicCamera : IInspectable + { + [propget] HRESULT RenderTargetSize([out, retval] Windows.Foundation.Size *value); + [propget] HRESULT ViewportScaleFactor([out, retval] DOUBLE *value); + [propput] HRESULT ViewportScaleFactor([in] DOUBLE value); + [propget] HRESULT IsStereo([out, retval] boolean *value); + [propget] HRESULT Id([out, retval] UINT32 *value); + HRESULT SetNearPlaneDistance([in] DOUBLE value); + HRESULT SetFarPlaneDistance([in] DOUBLE value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicCameraPose), + uuid(0d7d7e30-12de-45bd-912b-c7f6561599d1) + ] + interface IHolographicCameraPose : IInspectable + { + [propget] HRESULT HolographicCamera([out, retval] Windows.Graphics.Holographic.HolographicCamera **value); + [propget] HRESULT Viewport([out, retval] Windows.Foundation.Rect *value); + HRESULT TryGetViewTransform([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [out, retval] Windows.Foundation.IReference<Windows.Graphics.Holographic.HolographicStereoTransform> **value); + [propget] HRESULT ProjectionTransform([out, retval] Windows.Graphics.Holographic.HolographicStereoTransform *value); + HRESULT TryGetCullingFrustum([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [out, retval] Windows.Foundation.IReference<Windows.Perception.Spatial.SpatialBoundingFrustum> **value); + HRESULT TryGetVisibleFrustum([in] Windows.Perception.Spatial.SpatialCoordinateSystem* coordinateSystem, [out, retval] Windows.Foundation.IReference<Windows.Perception.Spatial.SpatialBoundingFrustum> **value); + [propget] HRESULT NearPlaneDistance([out, retval] DOUBLE *value); + [propget] HRESULT FarPlaneDistance([out, retval] DOUBLE *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicCameraRenderingParameters), + uuid(8eac2ed1-5bf4-4e16-8236-ae0800c11d0d) + ] + interface IHolographicCameraRenderingParameters : IInspectable + { + [overload("SetFocusPoint")] HRESULT SetFocusPoint([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [in] Windows.Foundation.Numerics.Vector3 position); + [overload("SetFocusPoint")] HRESULT SetFocusPointWithNormal([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [in] Windows.Foundation.Numerics.Vector3 position, [in] Windows.Foundation.Numerics.Vector3 normal); + [overload("SetFocusPoint")] HRESULT SetFocusPointWithNormalLinearVelocity([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [in] Windows.Foundation.Numerics.Vector3 position, [in] Windows.Foundation.Numerics.Vector3 normal, [in] Windows.Foundation.Numerics.Vector3 linearVelocity); + [propget] HRESULT Direct3D11Device([out, retval] Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice **value); + [propget] HRESULT Direct3D11BackBuffer([out, retval] Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicFrame), + uuid(c6988eb6-a8b9-3054-a6eb-d624b6536375) + ] + interface IHolographicFrame : IInspectable + { + [propget] HRESULT AddedCameras([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCamera *> **value); + [propget] HRESULT RemovedCameras([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCamera *> **value); + HRESULT GetRenderingParameters([in] Windows.Graphics.Holographic.HolographicCameraPose *camera_pose, [out, retval] Windows.Graphics.Holographic.HolographicCameraRenderingParameters **value); + [propget] HRESULT Duration([out, retval] Windows.Foundation.TimeSpan *value); + [propget] HRESULT CurrentPrediction([out, retval] Windows.Graphics.Holographic.HolographicFramePrediction **value); + HRESULT UpdateCurrentPrediction(); + [overload("PresentUsingCurrentPrediction")] HRESULT PresentUsingCurrentPrediction([out, retval] Windows.Graphics.Holographic.HolographicFramePresentResult *result); + [overload("PresentUsingCurrentPrediction")] HRESULT PresentUsingCurrentPredictionWithBehavior([in] Windows.Graphics.Holographic.HolographicFramePresentWaitBehavior wait_behavior, [out, retval] Windows.Graphics.Holographic.HolographicFramePresentResult *result); + HRESULT WaitForFrameToFinish(); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicFramePrediction), + uuid(520f4de1-5c0a-4e79-a81e-6abe02bb2739) + ] + interface IHolographicFramePrediction : IInspectable + { + [propget] HRESULT CameraPoses([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCameraPose *> **value); + [propget] HRESULT Timestamp([out, retval] Windows.Perception.PerceptionTimestamp **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 2.0), exclusiveto(Windows.Graphics.Holographic.HolographicSpace), @@ -140,6 +260,26 @@ namespace Windows.Graphics.Holographic { [default] interface Windows.Graphics.Holographic.IHolographicCamera; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HolographicCameraPose + { + [default] interface Windows.Graphics.Holographic.IHolographicCameraPose; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HolographicCameraRenderingParameters + { + [default] interface Windows.Graphics.Holographic.IHolographicCameraRenderingParameters; + } + [ contract(Windows.Foundation.UniversalApiContract, 2.0), marshaling_behavior(agile), @@ -150,6 +290,16 @@ namespace Windows.Graphics.Holographic { [default] interface Windows.Graphics.Holographic.IHolographicFrame; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HolographicFramePrediction + { + [default] interface Windows.Graphics.Holographic.IHolographicFramePrediction; + } + [ contract(Windows.Foundation.UniversalApiContract, 2.0), marshaling_behavior(agile), diff --git a/include/windows.perception.idl b/include/windows.perception.idl new file mode 100644 index 00000000000..e13195c39a1 --- /dev/null +++ b/include/windows.perception.idl @@ -0,0 +1,54 @@ +/* + * Copyright 2025 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 "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; + +namespace Windows.Perception { + interface IPerceptionTimestamp; + + runtimeclass PerceptionTimestamp; + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Perception.PerceptionTimestamp), + uuid(87c24804-a22e-4adb-ba26-d78ef639bcf4) + ] + interface IPerceptionTimestamp : IInspectable + { + [propget] HRESULT TargetTime([out, retval] Windows.Foundation.DateTime *value); + [propget] HRESULT PredictionAmount([out, retval] Windows.Foundation.TimeSpan *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass PerceptionTimestamp + { + [default] interface Windows.Perception.IPerceptionTimestamp; + } +}
From: Hans Leidekker hans@codeweavers.com
--- ...ndows.security.authentication.onlineid.idl | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+)
diff --git a/include/windows.security.authentication.onlineid.idl b/include/windows.security.authentication.onlineid.idl index a96518f78cc..ee1ad0a81f7 100644 --- a/include/windows.security.authentication.onlineid.idl +++ b/include/windows.security.authentication.onlineid.idl @@ -37,6 +37,7 @@ namespace Windows.Security.Authentication.OnlineId { interface IOnlineIdSystemIdentity; interface IOnlineIdSystemTicketResult;
+ runtimeclass OnlineIdServiceTicket; runtimeclass OnlineIdServiceTicketRequest; runtimeclass OnlineIdSystemAuthenticator; runtimeclass OnlineIdSystemAuthenticatorForUser; @@ -60,6 +61,18 @@ namespace Windows.Security.Authentication.OnlineId { ServiceConnectionError = 2, };
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdServiceTicket), + uuid(c95c547f-d781-4a94-acb8-c59874238c26) + ] + interface IOnlineIdServiceTicket : IInspectable + { + [propget] HRESULT Value([out, retval] HSTRING *value); + [propget] HRESULT Request([out, retval] Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest **value); + [propget] HRESULT ErrorCode([out, retval] INT32 *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest), @@ -115,6 +128,17 @@ namespace Windows.Security.Authentication.OnlineId { HRESULT GetForUser([in] Windows.System.User *user, [out, retval] Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser **value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdSystemIdentity), + uuid(743cd20d-b6ca-434d-8124-53ea12685307) + ] + interface IOnlineIdSystemIdentity : IInspectable + { + [propget] HRESULT Ticket([out, retval] Windows.Security.Authentication.OnlineId.OnlineIdServiceTicket **value); + [propget] HRESULT Id([out, retval] HSTRING *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 4.0), exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult), @@ -127,6 +151,15 @@ namespace Windows.Security.Authentication.OnlineId { [propget] HRESULT ExtendedError([out, retval] HRESULT *value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass OnlineIdServiceTicket + { + [default] interface Windows.Security.Authentication.OnlineId.IOnlineIdServiceTicket; + } + [ activatable(Windows.Security.Authentication.OnlineId.IOnlineIdServiceTicketRequestFactory, Windows.Foundation.UniversalApiContract, 1.0), contract(Windows.Foundation.UniversalApiContract, 1.0),
From: Hans Leidekker hans@codeweavers.com
--- include/windows.applicationmodel.datatransfer.idl | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/windows.applicationmodel.datatransfer.idl b/include/windows.applicationmodel.datatransfer.idl index 06c128c1df8..7f84513934a 100644 --- a/include/windows.applicationmodel.datatransfer.idl +++ b/include/windows.applicationmodel.datatransfer.idl @@ -113,8 +113,12 @@ namespace Windows.ApplicationModel.DataTransfer { runtimeclass TargetApplicationChosenEventArgs;
declare { + interface Windows.Foundation.Collections.IKeyValuePair<HSTRING, IInspectable *>; + interface Windows.Foundation.Collections.IMap<HSTRING, IInspectable *>; + interface Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *>; interface Windows.Foundation.Collections.IIterable<Windows.ApplicationModel.DataTransfer.ClipboardHistoryItem *>; interface Windows.Foundation.Collections.IIterable<Windows.ApplicationModel.DataTransfer.ShareProvider *>; + interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, IInspectable *> *>; interface Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.DataTransfer.ClipboardHistoryItem *>; interface Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.DataTransfer.ShareProvider *>; interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.DataTransfer.ClipboardHistoryItem *>;
From: Hans Leidekker hans@codeweavers.com
--- tools/widl/parser.y | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index e57b1412a80..36f2b16e317 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -2979,6 +2979,8 @@ static void check_composition_interface( const type_t *iface )
static void check_runtimeclass( const type_t *runtimeclass ) { + const typeref_list_t *iface_list = type_runtimeclass_get_ifaces( runtimeclass ); + const typeref_t *iface; const attr_t *attr;
LIST_FOR_EACH_ENTRY( attr, runtimeclass->attrs, const attr_t, entry ) @@ -3012,6 +3014,12 @@ static void check_runtimeclass( const type_t *runtimeclass ) error_at( &attr->where, "apicontract %s is undefined\n", value->u.var->declspec.type->name ); } } + + if (iface_list) LIST_FOR_EACH_ENTRY( iface, iface_list, typeref_t, entry ) + { + if (!iface->type->defined) + error_at( NULL, "member interface %s of runtimeclass %s is undefined\n", iface->type->name, runtimeclass->name ); + } }
static void check_statements(const statement_list_t *stmts, int is_inside_library)
Rémi Bernon (@rbernon) commented about include/windows.media.mediaproperties.idl:
- {
[propget] HRESULT Properties([out, retval] Windows.Media.MediaProperties.MediaPropertySet **value);
[propget] HRESULT Type([out, retval] HSTRING *value);
[propput] HRESULT Subtype([in] HSTRING value);
[propget] HRESULT Subtype([out, retval] HSTRING *value);
- }
- [
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.Media.MediaProperties.AudioEncodingProperties),
uuid(98f10d79-13ea-49ff-be70-2673db69702c)
- ]
- interface IAudioEncodingPropertiesWithFormatUserData : IInspectable
- {
HRESULT SetFormatUserData([in] UINT32 __value_size, [in, size_is(__value_size)] BYTE *value);
HRESULT GetFormatUserData([out] UINT32 * __value_size, [out, size_is(, *__value_size)] BYTE **value);
Why the underscores?
On Fri Sep 5 07:44:18 2025 +0000, Rémi Bernon wrote:
Why the underscores?
That's the convention MS uses for these size_is parameters. They are implicit and must always precede conformant array parameters. https://learn.microsoft.com/en-us/uwp/winrt-cref/winrt-type-system, section on array parameters says: "The array size parameter does not have a name". C doesn't allow that, so I think the underscores are used to avoid potential name conflicts.
Also note that winmd skips these size_is parameters and encodes arrays as NULL terminated arrays.
This merge request was approved by Rémi Bernon.
On Fri Sep 5 08:33:30 2025 +0000, Hans Leidekker wrote:
That's the convention MS uses for these size_is parameters. They are implicit and must always precede conformant array parameters. https://learn.microsoft.com/en-us/uwp/winrt-cref/winrt-type-system, section on array parameters says: "The array size parameter does not have a name". C doesn't allow that, so I think the underscores are used to avoid potential name conflicts. Also note that winmd skips these size_is parameters and encodes arrays as NULL terminated arrays.
Do we need to match Microsoft's parameter names? Are they encoded in whatever winrt's equivalent of a typelib is?
On Fri Sep 5 17:22:47 2025 +0000, Elizabeth Figura wrote:
Do we need to match Microsoft's parameter names? Are they encoded in whatever winrt's equivalent of a typelib is?
I don't know if anything depends on that. In this case I didn't follow MS naming, I used snake case instead of camel case. Parameter names are encoded in winmd files.