winealsa: Handle MIDI running status.
[wine.git] / include / windows.foundation.idl
blobcdc603f8e84fabccb7eba64fb077a822c0f614e1
1 /*
2 * Copyright 2015 Jacek Caban 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"; */
28 import "windows.foundation.collections.idl";
30 namespace Windows.Foundation {
31 typedef enum PropertyType PropertyType;
32 typedef struct Point Point;
33 typedef struct Size Size;
34 typedef struct Rect Rect;
35 typedef struct DateTime DateTime;
36 typedef struct TimeSpan TimeSpan;
37 interface IAsyncAction;
38 interface IClosable;
39 interface IMemoryBuffer;
40 interface IMemoryBufferFactory;
41 interface IMemoryBufferReference;
42 interface IStringable;
43 runtimeclass MemoryBuffer;
45 declare {
46 interface Windows.Foundation.Collections.IIterable<HSTRING>;
47 interface Windows.Foundation.Collections.IIterable<IInspectable *>;
48 interface Windows.Foundation.Collections.IIterator<HSTRING>;
49 interface Windows.Foundation.Collections.IIterator<IInspectable *>;
50 interface Windows.Foundation.Collections.IVectorView<HSTRING>;
51 interface Windows.Foundation.Collections.IVectorView<IInspectable *>;
52 interface Windows.Foundation.Collections.IVector<HSTRING>;
53 interface Windows.Foundation.Collections.IVector<IInspectable *>;
54 interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING> *>;
55 interface Windows.Foundation.EventHandler<IInspectable *>;
56 interface Windows.Foundation.AsyncOperationCompletedHandler<IInspectable *>;
57 interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>;
58 interface Windows.Foundation.IAsyncOperation<IInspectable *>;
59 interface Windows.Foundation.IAsyncOperation<boolean>;
60 interface Windows.Foundation.IReference<INT32>;
61 interface Windows.Foundation.TypedEventHandler<IInspectable *, IInspectable *>;
62 interface Windows.Foundation.TypedEventHandler<Windows.Foundation.IMemoryBufferReference *, IInspectable *>;
66 contract(Windows.Foundation.FoundationContract, 1.0),
67 uuid(a4ed5c81-76c9-40bd-8be6-b1d90fb20ae7)
69 delegate HRESULT AsyncActionCompletedHandler([in] Windows.Foundation.IAsyncAction *action, [in] AsyncStatus status);
71 [contract(Windows.Foundation.FoundationContract, 1.0)]
72 enum PropertyType
74 Empty = 0,
75 UInt8 = 1,
76 Int16 = 2,
77 UInt16 = 3,
78 Int32 = 4,
79 UInt32 = 5,
80 Int64 = 6,
81 UInt64 = 7,
82 Single = 8,
83 Double = 9,
84 Char16 = 10,
85 Boolean = 11,
86 String = 12,
87 Inspectable = 13,
88 DateTime = 14,
89 TimeSpan = 15,
90 Guid = 16,
91 Point = 17,
92 Size = 18,
93 Rect = 19,
94 OtherType = 20,
95 UInt8Array = 1025,
96 Int16Array = 1026,
97 UInt16Array = 1027,
98 Int32Array = 1028,
99 UInt32Array = 1029,
100 Int64Array = 1030,
101 UInt64Array = 1031,
102 SingleArray = 1032,
103 DoubleArray = 1033,
104 Char16Array = 1034,
105 BooleanArray = 1035,
106 StringArray = 1036,
107 InspectableArray = 1037,
108 DateTimeArray = 1038,
109 TimeSpanArray = 1039,
110 GuidArray = 1040,
111 PointArray = 1041,
112 SizeArray = 1042,
113 RectArray = 1043,
114 OtherTypeArray = 1044,
117 [contract(Windows.Foundation.FoundationContract, 1.0)]
118 struct Point
120 FLOAT X;
121 FLOAT Y;
124 [contract(Windows.Foundation.FoundationContract, 1.0)]
125 struct Size
127 FLOAT Width;
128 FLOAT Height;
131 [contract(Windows.Foundation.FoundationContract, 1.0)]
132 struct Rect
134 FLOAT X;
135 FLOAT Y;
136 FLOAT Width;
137 FLOAT Height;
140 [contract(Windows.Foundation.FoundationContract, 1.0)]
141 struct DateTime
143 INT64 UniversalTime;
146 [contract(Windows.Foundation.FoundationContract, 1.0)]
147 struct TimeSpan
149 INT64 Duration;
153 contract(Windows.Foundation.FoundationContract, 1.0),
154 uuid(96369f54-8eb6-48f0-abce-c1b211e627c3)
156 interface IStringable : IInspectable
158 HRESULT ToString([out, retval] HSTRING *value);
162 contract(Windows.Foundation.FoundationContract, 1.0),
163 uuid(30d5a829-7fa4-4026-83bb-d75bae4ea99e)
165 interface IClosable : IInspectable
167 HRESULT Close();
171 contract(Windows.Foundation.FoundationContract, 1.0),
172 uuid(5a648006-843a-4da9-865b-9d26e5dfad7b)
174 interface IAsyncAction : IInspectable
175 requires IAsyncInfo
177 [propput] HRESULT Completed([in] Windows.Foundation.AsyncActionCompletedHandler *handler);
178 [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncActionCompletedHandler **handler);
179 HRESULT GetResults();
183 contract(Windows.Foundation.UniversalApiContract, 1.0),
184 uuid(fbc4dd2a-245b-11e4-af98-689423260cf8)
186 interface IMemoryBuffer : IInspectable
187 requires Windows.Foundation.IClosable
189 HRESULT CreateReference([out, retval] Windows.Foundation.IMemoryBufferReference **reference);
193 contract(Windows.Foundation.UniversalApiContract, 1.0),
194 exclusiveto(Windows.Foundation.MemoryBuffer),
195 uuid(fbc4dd2b-245b-11e4-af98-689423260cf8)
197 interface IMemoryBufferFactory : IInspectable
199 HRESULT Create([in, range(0x00000000, 0x7fffffff)] UINT32 capacity,
200 [out, retval] Windows.Foundation.MemoryBuffer **value);
204 contract(Windows.Foundation.UniversalApiContract, 1.0),
205 uuid(fbc4dd29-245b-11e4-af98-689423260cf8)
207 interface IMemoryBufferReference : IInspectable
208 requires Windows.Foundation.IClosable
210 [propget] HRESULT Capacity([out, retval] UINT32 *value);
211 [eventadd] HRESULT Closed([in] Windows.Foundation.TypedEventHandler<Windows.Foundation.IMemoryBufferReference *, IInspectable *> *handler,
212 [out, retval] EventRegistrationToken *cookie);
213 [eventremove] HRESULT Closed([in] EventRegistrationToken cookie);
217 activatable(Windows.Foundation.IMemoryBufferFactory, Windows.Foundation.UniversalApiContract, 1.0),
218 contract(Windows.Foundation.UniversalApiContract, 1.0),
219 marshaling_behavior(agile),
220 threading(both)
222 runtimeclass MemoryBuffer
224 [default] interface Windows.Foundation.IMemoryBuffer;
225 interface Windows.Foundation.IClosable;