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
20 #pragma winrt ns_prefix
23 import
"inspectable.idl";
24 import
"asyncinfo.idl";
25 import
"eventtoken.idl";
26 import
"windowscontracts.idl";
27 import
"windows.foundation.idl";
29 namespace Windows.System
31 typedef enum DispatcherQueuePriority DispatcherQueuePriority
;
32 typedef enum ProcessorArchitecture ProcessorArchitecture
;
34 interface IDispatcherQueue
;
35 interface IDispatcherQueue2
;
36 interface IDispatcherQueueController
;
37 interface IDispatcherQueueControllerStatics
;
38 interface IDispatcherQueueShutdownStartingEventArgs
;
39 interface IDispatcherQueueStatics
;
40 interface IDispatcherQueueTimer
;
42 interface IUserStatics
;
43 interface IUserChangedEventArgs
;
44 interface IUserChangedEventArgs2
;
46 runtimeclass DispatcherQueue
;
47 runtimeclass DispatcherQueueController
;
48 runtimeclass DispatcherQueueShutdownStartingEventArgs
;
49 runtimeclass DispatcherQueueTimer
;
51 runtimeclass UserChangedEventArgs
;
55 interface Windows.Foundation.TypedEventHandler
<Windows.System.DispatcherQueue
*, IInspectable
*>;
56 interface Windows.Foundation.TypedEventHandler
<Windows.System.DispatcherQueue
*, Windows.System.DispatcherQueueShutdownStartingEventArgs
*>;
57 interface Windows.Foundation.TypedEventHandler
<Windows.System.DispatcherQueueTimer
*, IInspectable
*>;
61 contract
(Windows.Foundation.UniversalApiContract
, 5.0)
63 enum DispatcherQueuePriority
71 contract
(Windows.Foundation.UniversalApiContract
, 1.0)
73 enum ProcessorArchitecture
79 [contract
(Windows.Foundation.UniversalApiContract
, 8.0)]
81 [contract
(Windows.Foundation.UniversalApiContract
, 8.0)]
87 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
88 uuid(dfa2dc9c
-1a2d
-4917-98f2
-939af1d6e0c8
)
90 delegate
HRESULT DispatcherQueueHandler
();
93 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
94 exclusiveto
(Windows.System.DispatcherQueue
),
95 uuid(603e88e4
-a338
-4ffe
-a457
-a5cfb9ceb899
)
97 interface IDispatcherQueue
: IInspectable
99 HRESULT CreateTimer
([out, retval] Windows.System.DispatcherQueueTimer
**result
);
100 [overload
("TryEnqueue")] HRESULT TryEnqueue
([in] Windows.System.DispatcherQueueHandler
*callback, [out, retval] boolean *result
);
101 [overload
("TryEnqueue")] HRESULT TryEnqueueWithPriority
([in] Windows.System.DispatcherQueuePriority priority
, [in] Windows.System.DispatcherQueueHandler
*callback,
102 [out, retval] boolean *result
);
103 [eventadd
] HRESULT ShutdownStarting
([in] Windows.Foundation.TypedEventHandler
<Windows.System.DispatcherQueue
*, Windows.System.DispatcherQueueShutdownStartingEventArgs
*> *handler
,
104 [out, retval] EventRegistrationToken
*token
);
105 [eventremove
] HRESULT ShutdownStarting
([in] EventRegistrationToken token
);
106 [eventadd
] HRESULT ShutdownCompleted
([in] Windows.Foundation.TypedEventHandler
<Windows.System.DispatcherQueue
*, IInspectable
*> *handler
, [out, retval] EventRegistrationToken
*token
);
107 [eventremove
] HRESULT ShutdownCompleted
([in] EventRegistrationToken token
);
111 contract
(Windows.Foundation.UniversalApiContract
, 8.0),
112 exclusiveto
(Windows.System.DispatcherQueue
),
113 uuid(c822c647
-30ef
-506e
-bd1e
-a647ae6675ff
)
115 interface IDispatcherQueue2
: IInspectable
117 [propget] HRESULT HasThreadAccess
([out, retval] boolean *value
);
121 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
122 exclusiveto
(Windows.System.DispatcherQueueController
),
123 uuid(22f34e66
-50db
-4e36
-a98d
-61c01b384d20
)
125 interface IDispatcherQueueController
: IInspectable
127 [propget] HRESULT DispatcherQueue
([out, retval] Windows.System.DispatcherQueue
**value
);
128 HRESULT ShutdownQueueAsync
([out, retval] Windows.Foundation.IAsyncAction
**operation
);
132 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
133 exclusiveto
(Windows.System.DispatcherQueueController
),
134 uuid(0a6c98e0
-5198-49a2
-a313
-3f70d1f13c27
)
136 interface IDispatcherQueueControllerStatics
: IInspectable
138 HRESULT CreateOnDedicatedThread
([out, retval] Windows.System.DispatcherQueueController
**result
);
142 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
143 exclusiveto
(Windows.System.DispatcherQueueShutdownStartingEventArgs
),
144 uuid(c4724c4c
-ff97
-40c0
-a226
-cc0aaa545e89
)
146 interface IDispatcherQueueShutdownStartingEventArgs
: IInspectable
148 HRESULT GetDeferral
([out, retval] Windows.Foundation.Deferral
**result
);
152 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
153 exclusiveto
(Windows.System.DispatcherQueue
),
154 uuid(a96d83d7
-9371-4517-9245-d0824ac12c74
)
156 interface IDispatcherQueueStatics
: IInspectable
158 HRESULT GetForCurrentThread
([out, retval] Windows.System.DispatcherQueue
**result
);
162 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
163 exclusiveto
(Windows.System.DispatcherQueueTimer
),
164 uuid(5feabb1d
-a31c
-4727-b1ac
-37454649d56a
)
166 interface IDispatcherQueueTimer
: IInspectable
168 [propget] HRESULT Interval
([out, retval] Windows.Foundation.TimeSpan
*value
);
169 [propput] HRESULT Interval
([in] Windows.Foundation.TimeSpan value
);
170 [propget] HRESULT IsRunning
([out, retval] boolean *value
);
171 [propget] HRESULT IsRepeating
([out, retval] boolean *value
);
172 [propput] HRESULT IsRepeating
([in] boolean value
);
175 [eventadd
] HRESULT Tick
([in] Windows.Foundation.TypedEventHandler
<Windows.System.DispatcherQueueTimer
*, IInspectable
*> *handler
, [out, retval] EventRegistrationToken
*token
);
176 [eventremove
] HRESULT Tick
([in] EventRegistrationToken token
);
180 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
181 exclusiveto
(Windows.System.UserChangedEventArgs
),
182 uuid(086459dc
-18c6
-48db
-bc99
-724fb9203ccc
)
184 interface IUserChangedEventArgs
: IInspectable
186 [propget] HRESULT User
([out, retval] Windows.System.User
**value
);
190 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
191 marshaling_behavior
(agile
),
192 static
(Windows.System.IDispatcherQueueStatics
, Windows.Foundation.UniversalApiContract
, 5.0),
195 runtimeclass DispatcherQueue
197 [default] interface Windows.System.IDispatcherQueue
;
198 [contract
(Windows.Foundation.UniversalApiContract
, 8.0)] interface Windows.System.IDispatcherQueue2
;
202 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
203 marshaling_behavior
(agile
),
204 static
(Windows.System.IDispatcherQueueControllerStatics
, Windows.Foundation.UniversalApiContract
, 5.0),
207 runtimeclass DispatcherQueueController
209 [default] interface Windows.System.IDispatcherQueueController
;
213 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
214 marshaling_behavior
(agile
)
216 runtimeclass DispatcherQueueShutdownStartingEventArgs
218 [default] interface Windows.System.IDispatcherQueueShutdownStartingEventArgs
;
222 contract
(Windows.Foundation.UniversalApiContract
, 5.0),
223 marshaling_behavior
(agile
)
225 runtimeclass DispatcherQueueTimer
227 [default] interface Windows.System.IDispatcherQueueTimer
;
231 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
232 marshaling_behavior
(agile
),
233 static
(Windows.System.IUserStatics
, Windows.Foundation.UniversalApiContract
, 1.0),
238 [default] interface Windows.System.IUser
;
242 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
243 marshaling_behavior
(agile
)
245 runtimeclass UserChangedEventArgs
247 [default] interface Windows.System.IUserChangedEventArgs
;
248 [contract
(Windows.Foundation.UniversalApiContract
, 10.0)] interface Windows.System.IUserChangedEventArgs2
;