From: Bernhard Kölbl besentv@gmail.com
In windows.foundation.collections.idl.
Signed-off-by: Bernhard Kölbl besentv@gmail.com Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
v2: Add missing retval attributes, reword the commit title accordingly.
include/windows.foundation.collections.idl | 35 ++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/include/windows.foundation.collections.idl b/include/windows.foundation.collections.idl index a2d2d75ec4f..d69c27f6bbd 100644 --- a/include/windows.foundation.collections.idl +++ b/include/windows.foundation.collections.idl @@ -74,18 +74,6 @@ 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) @@ -107,6 +95,29 @@ cpp_quote("#endif") HRESULT First([out, retval] Windows.Foundation.Collections.IIterator<T> **value); }
+ [ + contract(Windows.Foundation.FoundationContract, 1.0), + uuid(02b51929-c1c4-4a7e-8940-0312b5c18500) + ] + interface IKeyValuePair<K, V> : IInspectable + { + [propget] HRESULT Key([out, retval] K *key); + [propget] HRESULT Value([out, retval] V *value); + } + + [ + contract(Windows.Foundation.FoundationContract, 1.0), + uuid(e480ce40-a338-4ada-adcf-272272e48cb9) + ] + interface IMapView<K, V> : IInspectable + requires IIterable<IKeyValuePair<K, V> *> + { + HRESULT Lookup([in] K key, [out, retval] V *value); + [propget] HRESULT Size([out, retval] unsigned int *size); + HRESULT HasKey([in] K key, [out, retval] boolean *found); + HRESULT Split([out] IMapView<K, V> **first, [out] IMapView<K, V> **second); + } + [ contract(Windows.Foundation.FoundationContract, 1.0), uuid(bbe1fa4c-b0e3-4583-baef-1f1b2e483e56)
Although more verbose this makes things more consistent everywhere, when types from other namespaces are referenced.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- include/windows.foundation.collections.idl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/windows.foundation.collections.idl b/include/windows.foundation.collections.idl index d69c27f6bbd..7576f331172 100644 --- a/include/windows.foundation.collections.idl +++ b/include/windows.foundation.collections.idl @@ -53,7 +53,8 @@ cpp_quote("#endif") contract(Windows.Foundation.FoundationContract, 1.0), uuid(fcdcf02c-e5d8-4478-915a-4d90b74b83a5) ] - delegate HRESULT AsyncOperationCompletedHandler<TResult>([in] IAsyncOperation<TResult> *info, [in] AsyncStatus status); + delegate HRESULT AsyncOperationCompletedHandler<TResult>([in] Windows.Foundation.IAsyncOperation<TResult> *info, + [in] AsyncStatus status);
[ contract(Windows.Foundation.FoundationContract, 1.0), @@ -61,8 +62,8 @@ cpp_quote("#endif") ] interface IAsyncOperation<TResult> : IInspectable { - [propput] HRESULT Completed([in] AsyncOperationCompletedHandler<TResult> *handler); - [propget] HRESULT Completed([out, retval] AsyncOperationCompletedHandler<TResult> **handler); + [propput] HRESULT Completed([in] Windows.Foundation.AsyncOperationCompletedHandler<TResult> *handler); + [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncOperationCompletedHandler<TResult> **handler); HRESULT GetResults([out, retval] TResult **results); }
@@ -110,12 +111,13 @@ cpp_quote("#endif") uuid(e480ce40-a338-4ada-adcf-272272e48cb9) ] interface IMapView<K, V> : IInspectable - requires IIterable<IKeyValuePair<K, V> *> + requires Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<K, V> *> { HRESULT Lookup([in] K key, [out, retval] V *value); [propget] HRESULT Size([out, retval] unsigned int *size); HRESULT HasKey([in] K key, [out, retval] boolean *found); - HRESULT Split([out] IMapView<K, V> **first, [out] IMapView<K, V> **second); + HRESULT Split([out] Windows.Foundation.Collections.IMapView<K, V> **first, + [out] Windows.Foundation.Collections.IMapView<K, V> **second); }
[ @@ -138,7 +140,7 @@ cpp_quote("#endif") { HRESULT GetAt([in, optional] UINT32 index, [out, retval] T *value); [propget] HRESULT Size([out, retval] UINT32 *value); - HRESULT GetView([out, retval] IVectorView<T> **value); + HRESULT GetView([out, retval] Windows.Foundation.Collections.IVectorView<T> **value); HRESULT IndexOf([in, optional] T element, [out] UINT32 *index, [out, retval] BOOLEAN *value); HRESULT SetAt([in] UINT32 index, [in, optional] T value); HRESULT InsertAt([in] UINT32 index, [in, optional] T value);