user32/tests: Account for some messages from dual-monitor setups.
[wine.git] / include / windows.foundation.collections.idl
blob680d7803cc8d06705bc6169a9556a048ae17579b
1 /*
2 * Copyright 2021 RĂ©mi Bernon for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifdef __WIDL__
20 #pragma winrt ns_prefix
21 #endif
23 import "inspectable.idl";
24 import "asyncinfo.idl";
25 import "windowscontracts.idl";
26 import "eventtoken.idl";
27 import "ivectorchangedeventargs.idl";
29 namespace Windows {
30 namespace Foundation {
32 cpp_quote("#ifdef __cplusplus")
33 cpp_quote("} /* extern \"C\" */")
34 cpp_quote("namespace ABI { namespace Windows { namespace Foundation { namespace Internal {")
35 cpp_quote("template <class T> struct GetAbiType { typedef T type; };")
36 cpp_quote("template <class T> struct GetLogicalType { typedef T type; };")
37 cpp_quote("template <class L, class A> struct AggregateType {};")
38 cpp_quote("template <class L, class A> struct GetAbiType<AggregateType<L, A> > { typedef A type; };")
39 cpp_quote("template <class L, class A> struct GetLogicalType<AggregateType<L, A> > { typedef L type; };")
40 cpp_quote("}}}}")
41 cpp_quote("extern \"C\" {")
42 cpp_quote("#endif")
44 #ifdef __WIDL__
46 contract(Windows.Foundation.FoundationContract, 1.0),
47 uuid(9de1c535-6ae1-11e0-84e1-18a905bcc53f)
49 delegate HRESULT EventHandler<T>([in] IInspectable *sender, [in] T args);
51 interface IAsyncOperation<TResult>;
54 contract(Windows.Foundation.FoundationContract, 1.0),
55 uuid(fcdcf02c-e5d8-4478-915a-4d90b74b83a5)
57 delegate HRESULT AsyncOperationCompletedHandler<TResult>([in] Windows.Foundation.IAsyncOperation<TResult> *info,
58 [in] AsyncStatus status);
61 contract(Windows.Foundation.FoundationContract, 1.0),
62 uuid(9fc2b0bb-e446-44e2-aa61-9cab8f636af2)
64 interface IAsyncOperation<TResult> : IInspectable
66 [propput] HRESULT Completed([in] Windows.Foundation.AsyncOperationCompletedHandler<TResult> *handler);
67 [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncOperationCompletedHandler<TResult> **handler);
68 HRESULT GetResults([out, retval] TResult *results);
71 interface IAsyncActionWithProgress<TProgress>;
74 contract(Windows.Foundation.FoundationContract, 1.0),
75 uuid(6d844858-0cff-4590-ae89-95a5a5c8b4b8)
77 delegate HRESULT AsyncActionProgressHandler<TProgress>([in] Windows.Foundation.IAsyncActionWithProgress<TProgress> *info,
78 [in] TProgress progress);
80 contract(Windows.Foundation.FoundationContract, 1.0),
81 uuid(9c029f91-cc84-44fd-ac26-0a6c4e555281)
83 delegate HRESULT AsyncActionWithProgressCompletedHandler<TProgress>([in] Windows.Foundation.IAsyncActionWithProgress<TProgress> *info,
84 [in] AsyncStatus status);
87 contract(Windows.Foundation.FoundationContract, 1.0),
88 uuid(1f6db258-e803-48a1-9546-eb7353398884)
90 interface IAsyncActionWithProgress<TProgress> : IInspectable
92 [propput] HRESULT Progress([in] Windows.Foundation.AsyncActionProgressHandler<TProgress> *handler);
93 [propget] HRESULT Progress([out, retval] Windows.Foundation.AsyncActionProgressHandler<TProgress> **handler);
94 [propput] HRESULT Completed([in] Windows.Foundation.AsyncActionWithProgressCompletedHandler<TProgress> *handler);
95 [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncActionWithProgressCompletedHandler<TProgress> **handler);
96 HRESULT GetResults();
99 interface IAsyncOperationWithProgress<TResult, TProgress>;
102 contract(Windows.Foundation.FoundationContract, 1.0),
103 uuid(55690902-0aab-421a-8778-f8ce5026d758)
105 delegate HRESULT AsyncOperationProgressHandler<TResult, TProgress>([in] Windows.Foundation.IAsyncOperationWithProgress<TResult, TProgress> *info,
106 [in] TProgress progress);
108 contract(Windows.Foundation.FoundationContract, 1.0),
109 uuid(e85df41d-6aa7-46e3-a8e2-f009d840c627)
111 delegate HRESULT AsyncOperationWithProgressCompletedHandler<TResult, TProgress>([in] Windows.Foundation.IAsyncOperationWithProgress<TResult, TProgress> *info,
112 [in] AsyncStatus status);
115 contract(Windows.Foundation.FoundationContract, 1.0),
116 uuid(b5d036d7-e297-498f-ba60-0289e76e23dd)
118 interface IAsyncOperationWithProgress<TResult, TProgress> : IInspectable
120 [propput] HRESULT Progress([in] Windows.Foundation.AsyncOperationProgressHandler<TResult, TProgress> *handler);
121 [propget] HRESULT Progress([out, retval] Windows.Foundation.AsyncOperationProgressHandler<TResult, TProgress> **handler);
122 [propput] HRESULT Completed([in] Windows.Foundation.AsyncOperationWithProgressCompletedHandler<TResult, TProgress> *handler);
123 [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncOperationWithProgressCompletedHandler<TResult, TProgress> **handler);
124 HRESULT GetResults([out, retval] TResult *results);
128 contract(Windows.Foundation.FoundationContract, 1.0),
129 uuid(9de1c534-6ae1-11e0-84e1-18a905bcc53f)
131 delegate HRESULT TypedEventHandler<TSender, TArgs>([in] TSender sender, [in] TArgs args);
134 contract(Windows.Foundation.FoundationContract, 1.0),
135 uuid(61c17706-2d65-11e0-9ae8-d48564015472)
137 interface IReference<T> : IInspectable
139 [propget] HRESULT Value([out, retval] T *value);
142 namespace Collections
145 contract(Windows.Foundation.FoundationContract, 1.0),
146 uuid(6a79e863-4300-459a-9966-cbb660963ee1)
148 interface IIterator<T> : IInspectable
150 [propget] HRESULT Current([out, retval] T *value);
151 [propget] HRESULT HasCurrent([out, retval] BOOL *value);
152 HRESULT MoveNext([out, retval] BOOL *value);
153 HRESULT GetMany([in] UINT32 items_size, [out] T *items, [out, retval] UINT32 *value);
157 contract(Windows.Foundation.FoundationContract, 1.0),
158 uuid(faa585ea-6214-4217-afda-7f46de5869b3)
160 interface IIterable<T> : IInspectable
162 HRESULT First([out, retval] Windows.Foundation.Collections.IIterator<T> **value);
166 contract(Windows.Foundation.FoundationContract, 1.0),
167 uuid(9939f4df-050a-4c0f-aa60-77075f9c4777)
169 interface IMapChangedEventArgs<T> : IInspectable
171 [propget] HRESULT CollectionChanged([out, retval] Windows.Foundation.Collections.CollectionChange *value);
172 [propget] HRESULT Key([out, retval] T *key);
175 interface IObservableMap<K, V>;
178 contract(Windows.Foundation.FoundationContract, 1.0),
179 uuid(179517f3-94ee-41f8-bddc-768a895544f3)
181 delegate HRESULT MapChangedEventHandler<K, V>([in] Windows.Foundation.Collections.IObservableMap<K, V> *sender,
182 [in] Windows.Foundation.Collections.IMapChangedEventArgs<K> *args);
185 contract(Windows.Foundation.FoundationContract, 1.0),
186 uuid(02b51929-c1c4-4a7e-8940-0312b5c18500)
188 interface IKeyValuePair<K, V> : IInspectable
190 [propget] HRESULT Key([out, retval] K *key);
191 [propget] HRESULT Value([out, retval] V *value);
195 contract(Windows.Foundation.FoundationContract, 1.0),
196 uuid(e480ce40-a338-4ada-adcf-272272e48cb9)
198 interface IMapView<K, V> : IInspectable
199 requires Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<K, V> *>
201 HRESULT Lookup([in] K key, [out, retval] V *value);
202 [propget] HRESULT Size([out, retval] unsigned int *size);
203 HRESULT HasKey([in] K key, [out, retval] boolean *found);
204 HRESULT Split([out] Windows.Foundation.Collections.IMapView<K, V> **first,
205 [out] Windows.Foundation.Collections.IMapView<K, V> **second);
209 contract(Windows.Foundation.FoundationContract, 1.0),
210 uuid(3c2925fe-8519-45c1-aa79-197b6718c1c1)
212 interface IMap<K, V> : IInspectable
213 requires Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<K, V> *>
215 HRESULT Lookup([in] K key, [out, retval] V *value);
216 [propget] HRESULT Size([out, retval] unsigned int *size);
217 HRESULT HasKey([in] K key, [out, retval] boolean *found);
218 HRESULT GetView([out, retval] Windows.Foundation.Collections.IMapView<K, V> **view);
219 HRESULT Insert([in] K key, [in] V value, [out, retval] boolean *replaced);
220 HRESULT Remove([in] K key);
221 HRESULT Clear();
225 contract(Windows.Foundation.FoundationContract, 1.0),
226 uuid(65df2bf5-bf39-41b5-aebc-5a9d865e472b)
228 interface IObservableMap<K, V> : IInspectable
229 requires Windows.Foundation.Collections.IMap<K, V>
231 [eventadd] HRESULT MapChanged([in] Windows.Foundation.Collections.MapChangedEventHandler<K, V> *handler,
232 [out, retval] EventRegistrationToken *token);
233 [eventremove] HRESULT MapChanged([in] EventRegistrationToken token);
236 interface IObservableVector<T>;
239 contract(Windows.Foundation.FoundationContract, 1.0),
240 uuid(0c051752-9fbf-4c70-aa0c-0e4c82d9a761)
242 delegate HRESULT VectorChangedEventHandler<T>([in] Windows.Foundation.Collections.IObservableVector<T> *sender,
243 [in] Windows.Foundation.Collections.IVectorChangedEventArgs *args);
246 contract(Windows.Foundation.FoundationContract, 1.0),
247 uuid(bbe1fa4c-b0e3-4583-baef-1f1b2e483e56)
249 interface IVectorView<T> : IInspectable
250 requires Windows.Foundation.Collections.IIterable<T>
252 HRESULT GetAt([in] UINT32 index, [out, retval] T *value);
253 [propget] HRESULT Size([out, retval] UINT32 *value);
254 HRESULT IndexOf([in, optional] T element, [out] UINT32 *index, [out, retval] BOOLEAN *value);
255 HRESULT GetMany([in] UINT32 start_index, [in] UINT32 items_size, [out] T *items, [out, retval] UINT32 *value);
259 contract(Windows.Foundation.FoundationContract, 1.0),
260 uuid(913337e9-11a1-4345-a3a2-4e7f956e222d)
262 interface IVector<T> : IInspectable
263 requires Windows.Foundation.Collections.IIterable<T>
265 HRESULT GetAt([in, optional] UINT32 index, [out, retval] T *value);
266 [propget] HRESULT Size([out, retval] UINT32 *value);
267 HRESULT GetView([out, retval] Windows.Foundation.Collections.IVectorView<T> **value);
268 HRESULT IndexOf([in, optional] T element, [out] UINT32 *index, [out, retval] BOOLEAN *value);
269 HRESULT SetAt([in] UINT32 index, [in, optional] T value);
270 HRESULT InsertAt([in] UINT32 index, [in, optional] T value);
271 HRESULT RemoveAt([in] UINT32 index);
272 HRESULT Append([in, optional] T value);
273 HRESULT RemoveAtEnd();
274 HRESULT Clear();
275 HRESULT GetMany([in] UINT32 start_index, [in] UINT32 items_size, [out] T *items, [out, retval] UINT32 *value);
276 HRESULT ReplaceAll([in] UINT32 count, [in] T *items);
280 contract(Windows.Foundation.FoundationContract, 1.0),
281 uuid(5917eb53-50b4-4a0d-b309-65862b3f1dbc)
283 interface IObservableVector<T> : IInspectable
284 requires Windows.Foundation.Collections.IVector<T>
286 [eventadd] HRESULT VectorChanged([in] Windows.Foundation.Collections.VectorChangedEventHandler<T> *handler,
287 [out, retval] EventRegistrationToken *token);
288 [eventremove] HRESULT VectorChanged([in] EventRegistrationToken token);
291 #endif