source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/windows.foundation.collections.idl@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 4.4 KB
Line 
1/*
2 * Copyright 2021 Rémi Bernon for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19#ifdef __WIDL__
20#pragma winrt ns_prefix
21#endif
22
23import "inspectable.idl";
24import "asyncinfo.idl";
25import "windowscontracts.idl";
26/* import "eventtoken.idl"; */
27
28namespace Windows {
29 namespace Foundation {
30
31cpp_quote("#ifdef __cplusplus")
32cpp_quote("} /* extern \"C\" */")
33cpp_quote("namespace ABI { namespace Windows { namespace Foundation { namespace Internal {")
34cpp_quote("template <class T> struct GetAbiType { typedef T type; };")
35cpp_quote("template <class T> struct GetLogicalType { typedef T type; };")
36cpp_quote("template <class L, class A> struct AggregateType {};")
37cpp_quote("template <class L, class A> struct GetAbiType<AggregateType<L, A> > { typedef A type; };")
38cpp_quote("template <class L, class A> struct GetLogicalType<AggregateType<L, A> > { typedef L type; };")
39cpp_quote("}}}}")
40cpp_quote("extern \"C\" {")
41cpp_quote("#endif")
42
43#ifdef __WIDL__
44 [
45 contract(Windows.Foundation.FoundationContract, 1.0),
46 uuid(9de1c535-6ae1-11e0-84e1-18a905bcc53f)
47 ]
48 delegate HRESULT EventHandler<T>([in] IInspectable *sender, [in] T args);
49
50 interface IAsyncOperation<TResult>;
51
52 [
53 contract(Windows.Foundation.FoundationContract, 1.0),
54 uuid(fcdcf02c-e5d8-4478-915a-4d90b74b83a5)
55 ]
56 delegate HRESULT AsyncOperationCompletedHandler<TResult>([in] IAsyncOperation<TResult> *info, [in] AsyncStatus status);
57
58 [
59 contract(Windows.Foundation.FoundationContract, 1.0),
60 uuid(9fc2b0bb-e446-44e2-aa61-9cab8f636af2)
61 ]
62 interface IAsyncOperation<TResult> : IInspectable
63 {
64 [propput] HRESULT Completed([in] AsyncOperationCompletedHandler<TResult> *handler);
65 [propget] HRESULT Completed([out, retval] AsyncOperationCompletedHandler<TResult> **handler);
66 HRESULT GetResults([out, retval] TResult **results);
67 }
68
69 [
70 contract(Windows.Foundation.FoundationContract, 1.0),
71 uuid(9de1c534-6ae1-11e0-84e1-18a905bcc53f)
72 ]
73 delegate HRESULT TypedEventHandler<TSender, TArgs>([in] TSender sender, [in] TArgs args);
74
75 namespace Collections
76 {
77 [
78 contract(Windows.Foundation.FoundationContract, 1.0),
79 uuid(6a79e863-4300-459a-9966-cbb660963ee1)
80 ]
81 interface IIterator<T> : IInspectable
82 {
83 [propget] HRESULT Current([out, retval] T *value);
84 [propget] HRESULT HasCurrent([out, retval] BOOL *value);
85 HRESULT MoveNext([out, retval] BOOL *value);
86 HRESULT GetMany([in] UINT32 count, [in] UINT32 items_size, [out] T *items, [out, retval] UINT32 *value);
87 }
88
89 [
90 contract(Windows.Foundation.FoundationContract, 1.0),
91 uuid(faa585ea-6214-4217-afda-7f46de5869b3)
92 ]
93 interface IIterable<T> : IInspectable
94 {
95 HRESULT First([out, retval] Windows.Foundation.Collections.IIterator<T> **value);
96 }
97
98 [
99 contract(Windows.Foundation.FoundationContract, 1.0),
100 uuid(bbe1fa4c-b0e3-4583-baef-1f1b2e483e56)
101 ]
102 interface IVectorView<T> : IInspectable
103 {
104 HRESULT GetAt([in] UINT32 index, [out, retval] T *value);
105 [propget] HRESULT Size([out, retval] UINT32 *value);
106 HRESULT IndexOf([in, optional] T element, [out] UINT32 *index, [out, retval] BOOLEAN *value);
107 HRESULT GetMany([in] UINT32 start_index, [in] UINT32 items_size, [out] T *items, [out, retval] UINT32 *value);
108 }
109 }
110#endif
111 }
112}
Note: See TracBrowser for help on using the repository browser.