Debian Codegraph @

mingw-w64-headers/include/windows.applicationmodel.core.idl

raw
1 /*
2 * Copyright 2023 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
23 import "windows.foundation.idl";
24 import "windows.storage.idl";
25 import "windows.system.idl";
26 import "windows.applicationmodel.idl";
27 import "windows.applicationmodel.activation.idl";
28 import "windows.ui.core.idl";
29
30 namespace Windows.ApplicationModel.Core {
31 runtimeclass CoreApplicationView;
32 }
33
34 namespace Windows.ApplicationModel.Activation {
35 interface IActivatedEventArgs;
36
37 runtimeclass BackgroundActivatedEventArgs;
38
39 declare {
40 interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
41 interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *>;
42 }
43 }
44
45 namespace Windows.ApplicationModel {
46 runtimeclass AppDisplayInfo;
47 runtimeclass EnteredBackgroundEventArgs;
48 runtimeclass LeavingBackgroundEventArgs;
49 runtimeclass SuspendingEventArgs;
50
51 declare {
52 interface Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *>;
53 interface Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *>;
54 interface Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *>;
55 }
56 }
57
58 namespace Windows.Foundation {
59 interface IGetActivationFactory;
60 }
61
62 namespace Windows.UI.Core {
63 runtimeclass CoreDispatcher;
64 runtimeclass CoreWindow;
65 }
66
67 namespace Windows.ApplicationModel.Core {
68 typedef enum AppRestartFailureReason AppRestartFailureReason;
69
70 interface IAppListEntry;
71 interface ICoreApplication;
72 interface ICoreApplication2;
73 interface ICoreApplication3;
74 interface ICoreApplicationExit;
75 interface ICoreApplicationUnhandledError;
76 interface ICoreApplicationUseCount;
77 interface ICoreApplicationView;
78 interface ICoreApplicationView2;
79 interface ICoreApplicationView3;
80 interface ICoreApplicationView5;
81 interface ICoreApplicationView6;
82 interface ICoreApplicationViewTitleBar;
83 interface ICoreImmersiveApplication;
84 interface ICoreImmersiveApplication2;
85 interface ICoreImmersiveApplication3;
86 interface IFrameworkView;
87 interface IFrameworkViewSource;
88 interface IHostedViewClosingEventArgs;
89 interface IUnhandledError;
90 interface IUnhandledErrorDetectedEventArgs;
91
92 runtimeclass AppListEntry;
93 runtimeclass CoreApplication;
94 runtimeclass CoreApplicationView;
95 runtimeclass CoreApplicationViewTitleBar;
96 runtimeclass HostedViewClosingEventArgs;
97 runtimeclass UnhandledError;
98 runtimeclass UnhandledErrorDetectedEventArgs;
99
100 declare {
101 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.ApplicationModel.Core.AppRestartFailureReason>;
102 interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.CoreApplicationView *>;
103 interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs *>;
104 interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason>;
105 interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Core.HostedViewClosingEventArgs *>;
106 interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *>;
107 }
108
109 [
110 contract(Windows.Foundation.UniversalApiContract, 5.0)
111 ]
112 enum AppRestartFailureReason
113 {
114 RestartPending = 0,
115 NotInForeground = 1,
116 InvalidUser = 2,
117 Other = 3
118 };
119
120 [
121 contract(Windows.Foundation.UniversalApiContract, 1.0),
122 exclusiveto(Windows.ApplicationModel.Core.AppListEntry),
123 uuid(ef00f07f-2108-490a-877a-8a9f17c25fad)
124 ]
125 interface IAppListEntry : IInspectable
126 {
127 [propget] HRESULT DisplayInfo([out, retval] Windows.ApplicationModel.AppDisplayInfo **value);
128 HRESULT LaunchAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean> **operation);
129 }
130
131 [
132 contract(Windows.Foundation.UniversalApiContract, 1.0),
133 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
134 uuid(0aacf7a4-5e1d-49df-8034-fb6a68bc5ed1)
135 ]
136 interface ICoreApplication : IInspectable
137 {
138 [propget] HRESULT Id([out, retval] HSTRING *value);
139 [eventadd] HRESULT Suspending([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
140 [eventremove] HRESULT Suspending([in] EventRegistrationToken token);
141 [eventadd] HRESULT Resuming([in] Windows.Foundation.EventHandler<IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
142 [eventremove] HRESULT Resuming([in] EventRegistrationToken token);
143 [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IPropertySet **value);
144 HRESULT GetCurrentView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **value);
145 HRESULT Run([in] Windows.ApplicationModel.Core.IFrameworkViewSource *view_source);
146 HRESULT RunWithActivationFactories([in] Windows.Foundation.IGetActivationFactory *factory);
147 }
148
149 [
150 contract(Windows.Foundation.UniversalApiContract, 3.0),
151 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
152 uuid(998681fb-1ab6-4b7f-be4a-9a0645224c04)
153 ]
154 interface ICoreApplication2 : IInspectable
155 {
156 [eventadd] HRESULT BackgroundActivated([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
157 [eventremove] HRESULT BackgroundActivated([in] EventRegistrationToken token);
158 [eventadd] HRESULT LeavingBackground([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
159 [eventremove] HRESULT LeavingBackground([in] EventRegistrationToken token);
160 [eventadd] HRESULT EnteredBackground([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
161 [eventremove] HRESULT EnteredBackground([in] EventRegistrationToken token);
162 HRESULT EnablePrelaunch([in] boolean value);
163 }
164
165 [
166 contract(Windows.Foundation.UniversalApiContract, 5.0),
167 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
168 uuid(feec0d39-598b-4507-8a67-772632580a57)
169 ]
170 interface ICoreApplication3 : IInspectable
171 {
172 HRESULT RequestRestartAsync([in] HSTRING launch_arguments, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason> **operation);
173 HRESULT RequestRestartForUserAsync([in] Windows.System.User *user, [in] HSTRING launch_arguments, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason> **operation);
174 }
175
176 [
177 contract(Windows.Foundation.UniversalApiContract, 1.0),
178 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
179 uuid(cf86461d-261e-4b72-9acd-44ed2ace6a29)
180 ]
181 interface ICoreApplicationExit : IInspectable
182 {
183 HRESULT Exit();
184 [eventadd] HRESULT Exiting([in] Windows.Foundation.EventHandler<IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
185 [eventremove] HRESULT Exiting([in] EventRegistrationToken token);
186 }
187
188 [
189 contract(Windows.Foundation.UniversalApiContract, 1.0),
190 uuid(f0e24ab0-dd09-42e1-b0bc-e0e131f78d7e)
191 ]
192 interface ICoreApplicationUnhandledError : IInspectable
193 {
194 [eventadd] HRESULT UnhandledErrorDetected([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
195 [eventremove] HRESULT UnhandledErrorDetected([in] EventRegistrationToken token);
196 }
197
198 [
199 contract(Windows.Foundation.UniversalApiContract, 1.0),
200 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
201 uuid(518dc408-c077-475b-809e-0bc0c57e4b74)
202 ]
203 interface ICoreApplicationUseCount : IInspectable
204 {
205 HRESULT IncrementApplicationUseCount();
206 HRESULT DecrementApplicationUseCount();
207 }
208
209 [
210 contract(Windows.Foundation.UniversalApiContract, 1.0),
211 exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
212 uuid(638bb2db-451d-4661-b099-414f34ffb9f1)
213 ]
214 interface ICoreApplicationView : IInspectable
215 {
216 [propget] HRESULT CoreWindow([out, retval] Windows.UI.Core.CoreWindow **value);
217 [eventadd] HRESULT Activated([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
218 [eventremove] HRESULT Activated([in] EventRegistrationToken token);
219 [propget] HRESULT IsMain([out, retval] boolean *value);
220 [propget] HRESULT IsHosted([out, retval] boolean *value);
221 }
222
223 [
224 contract(Windows.Foundation.UniversalApiContract, 1.0),
225 exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
226 uuid(68eb7adf-917f-48eb-9aeb-7de53e086ab1)
227 ]
228 interface ICoreApplicationView2 : IInspectable
229 {
230 [propget] HRESULT Dispatcher([out, retval] Windows.UI.Core.CoreDispatcher **value);
231 }
232
233 [
234 contract(Windows.Foundation.UniversalApiContract, 1.0),
235 exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
236 uuid(07ebe1b3-a4cf-4550-ab70-b07e85330bc8)
237 ]
238 interface ICoreApplicationView3 : IInspectable
239 {
240 [propget] HRESULT IsComponent([out, retval] boolean *value);
241 [propget] HRESULT TitleBar([out, retval] Windows.ApplicationModel.Core.CoreApplicationViewTitleBar **value);
242 [eventadd] HRESULT HostedViewClosing([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Core.HostedViewClosingEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
243 [eventremove] HRESULT HostedViewClosing([in] EventRegistrationToken token);
244 }
245
246 [
247 contract(Windows.Foundation.UniversalApiContract, 4.0),
248 exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
249 uuid(2bc095a8-8ef0-446d-9e60-3a3e0428c671)
250 ]
251 interface ICoreApplicationView5 : IInspectable
252 {
253 [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IPropertySet **value);
254 }
255
256 [
257 contract(Windows.Foundation.UniversalApiContract, 5.0),
258 exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
259 uuid(c119d49a-0679-49ba-803f-b79c5cf34cca)
260 ]
261 interface ICoreApplicationView6 : IInspectable
262 {
263 [propget] HRESULT DispatcherQueue([out, retval] Windows.System.DispatcherQueue **value);
264 }
265
266 [
267 contract(Windows.Foundation.UniversalApiContract, 1.0),
268 exclusiveto(Windows.ApplicationModel.Core.CoreApplicationViewTitleBar),
269 uuid(006d35e3-e1f1-431b-9508-29b96926ac53)
270 ]
271 interface ICoreApplicationViewTitleBar : IInspectable
272 {
273 [propput] HRESULT ExtendViewIntoTitleBar([in] boolean value);
274 [propget] HRESULT ExtendViewIntoTitleBar([out, retval] boolean *value);
275 [propget] HRESULT SystemOverlayLeftInset([out, retval] DOUBLE *value);
276 [propget] HRESULT SystemOverlayRightInset([out, retval] DOUBLE *value);
277 [propget] HRESULT Height([out, retval] DOUBLE *value);
278 [eventadd] HRESULT LayoutMetricsChanged([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
279 [eventremove] HRESULT LayoutMetricsChanged([in] EventRegistrationToken token);
280 [propget] HRESULT IsVisible([out, retval] boolean *value);
281 [eventadd] HRESULT IsVisibleChanged([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
282 [eventremove] HRESULT IsVisibleChanged([in] EventRegistrationToken token);
283 }
284
285 [
286 contract(Windows.Foundation.UniversalApiContract, 1.0),
287 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
288 uuid(1ada0e3e-e4a2-4123-b451-dc96bf800419)
289 ]
290 interface ICoreImmersiveApplication : IInspectable
291 {
292 [propget] HRESULT Views([out, retval] Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.CoreApplicationView *> **value);
293 [overload("CreateNewView"), default_overload]
294 HRESULT CreateNewView([in] HSTRING runtime_type, [in] HSTRING entry_point, [out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view);
295 [propget] HRESULT MainView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **value);
296 }
297
298 [
299 contract(Windows.Foundation.UniversalApiContract, 1.0),
300 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
301 uuid(828e1e36-e9e3-4cfc-9b66-48b78ea9bb2c)
302 ]
303 interface ICoreImmersiveApplication2 : IInspectable
304 {
305 [overload("CreateNewView")]
306 HRESULT CreateNewViewFromMainView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view);
307 }
308
309 [
310 contract(Windows.Foundation.UniversalApiContract, 1.0),
311 exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
312 uuid(34a05b2f-ee0d-41e5-8314-cf10c91bf0af)
313 ]
314 interface ICoreImmersiveApplication3 : IInspectable
315 {
316 [overload("CreateNewView")]
317 HRESULT CreateNewViewWithViewSource([in] Windows.ApplicationModel.Core.IFrameworkViewSource *view_source, [out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view);
318 }
319
320 [
321 contract(Windows.Foundation.UniversalApiContract, 1.0),
322 uuid(faab5cd0-8924-45ac-ad0f-a08fae5d0324)
323 ]
324 interface IFrameworkView : IInspectable
325 {
326 HRESULT Initialize([in] Windows.ApplicationModel.Core.CoreApplicationView *application_view);
327 HRESULT SetWindow([in] Windows.UI.Core.CoreWindow *window);
328 HRESULT Load([in] HSTRING entry_point);
329 HRESULT Run();
330 HRESULT Uninitialize();
331 }
332
333 [
334 contract(Windows.Foundation.UniversalApiContract, 1.0),
335 uuid(cd770614-65c4-426c-9494-34fc43554862)
336 ]
337 interface IFrameworkViewSource : IInspectable
338 {
339 HRESULT CreateView([out, retval] Windows.ApplicationModel.Core.IFrameworkView **view);
340 }
341
342 [
343 contract(Windows.Foundation.UniversalApiContract, 1.0),
344 exclusiveto(Windows.ApplicationModel.Core.HostedViewClosingEventArgs),
345 uuid(d238943c-b24e-4790-acb5-3e4243c4ff87)
346 ]
347 interface IHostedViewClosingEventArgs : IInspectable
348 {
349 HRESULT GetDeferral([out, retval] Windows.Foundation.Deferral **result);
350 }
351
352 [
353 contract(Windows.Foundation.UniversalApiContract, 1.0),
354 exclusiveto(Windows.ApplicationModel.Core.UnhandledError),
355 uuid(9459b726-53b5-4686-9eaf-fa8162dc3980)
356 ]
357 interface IUnhandledError : IInspectable
358 {
359 [propget] HRESULT Handled([out, retval] boolean *value);
360 HRESULT Propagate();
361 }
362
363 [
364 contract(Windows.Foundation.UniversalApiContract, 1.0),
365 exclusiveto(Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs),
366 uuid(679ab78b-b336-4822-ac40-0d750f0b7a2b)
367 ]
368 interface IUnhandledErrorDetectedEventArgs : IInspectable
369 {
370 [propget] HRESULT UnhandledError([out, retval] Windows.ApplicationModel.Core.UnhandledError **value);
371 }
372
373 [
374 contract(Windows.Foundation.UniversalApiContract, 1.0),
375 marshaling_behavior(agile),
376 threading(both)
377 ]
378 runtimeclass AppListEntry
379 {
380 [default] interface Windows.ApplicationModel.Core.IAppListEntry;
381 /* [contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.ApplicationModel.Core.IAppListEntry2; */
382 /* [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.ApplicationModel.Core.IAppListEntry3; */
383 /* [contract(Windows.Foundation.UniversalApiContract, 11.0)] interface Windows.ApplicationModel.Core.IAppListEntry4; */
384 }
385
386 [
387 contract(Windows.Foundation.UniversalApiContract, 1.0),
388 marshaling_behavior(agile),
389 static(Windows.ApplicationModel.Core.ICoreApplication, Windows.Foundation.UniversalApiContract, 1.0),
390 static(Windows.ApplicationModel.Core.ICoreApplication2, Windows.Foundation.UniversalApiContract, 3.0),
391 static(Windows.ApplicationModel.Core.ICoreApplication3, Windows.Foundation.UniversalApiContract, 5.0),
392 static(Windows.ApplicationModel.Core.ICoreApplicationExit, Windows.Foundation.UniversalApiContract, 1.0),
393 static(Windows.ApplicationModel.Core.ICoreApplicationUnhandledError, Windows.Foundation.UniversalApiContract, 1.0),
394 static(Windows.ApplicationModel.Core.ICoreApplicationUseCount, Windows.Foundation.UniversalApiContract, 1.0),
395 static(Windows.ApplicationModel.Core.ICoreImmersiveApplication, Windows.Foundation.UniversalApiContract, 1.0),
396 static(Windows.ApplicationModel.Core.ICoreImmersiveApplication2, Windows.Foundation.UniversalApiContract, 1.0),
397 static(Windows.ApplicationModel.Core.ICoreImmersiveApplication3, Windows.Foundation.UniversalApiContract, 1.0)
398 ]
399 runtimeclass CoreApplication
400 {
401 }
402
403 [
404 contract(Windows.Foundation.UniversalApiContract, 1.0),
405 marshaling_behavior(standard)
406 ]
407 runtimeclass CoreApplicationView
408 {
409 [default] interface Windows.ApplicationModel.Core.ICoreApplicationView;
410 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView2;
411 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView3;
412 [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView5;
413 [contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView6;
414 }
415
416 [
417 contract(Windows.Foundation.UniversalApiContract, 1.0),
418 marshaling_behavior(standard)
419 ]
420 runtimeclass CoreApplicationViewTitleBar
421 {
422 [default] interface Windows.ApplicationModel.Core.ICoreApplicationViewTitleBar;
423 }
424
425 [
426 contract(Windows.Foundation.UniversalApiContract, 1.0),
427 marshaling_behavior(agile)
428 ]
429 runtimeclass HostedViewClosingEventArgs
430 {
431 [default] interface Windows.ApplicationModel.Core.IHostedViewClosingEventArgs;
432 }
433
434 [
435 contract(Windows.Foundation.UniversalApiContract, 1.0),
436 marshaling_behavior(agile)
437 ]
438 runtimeclass UnhandledError
439 {
440 [default] interface Windows.ApplicationModel.Core.IUnhandledError;
441 }
442
443 [
444 contract(Windows.Foundation.UniversalApiContract, 1.0),
445 marshaling_behavior(agile)
446 ]
447 runtimeclass UnhandledErrorDetectedEventArgs
448 {
449 [default] interface Windows.ApplicationModel.Core.IUnhandledErrorDetectedEventArgs;
450 }
451 }