Debian Codegraph @

mingw-w64-headers/include/windows.system.idl

raw
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 makedep header install winmd
21 #pragma winrt ns_prefix
22 #endif
23
24 import "inspectable.idl";
25 import "asyncinfo.idl";
26 import "eventtoken.idl";
27 import "windowscontracts.idl";
28 import "windows.foundation.idl";
29 import "windows.storage.idl";
30 import "windows.storage.streams.idl";
31
32 namespace Windows.Foundation.Collections {
33 interface IPropertySet;
34 }
35
36 namespace Windows.Storage.Streams {
37 interface IRandomAccessStreamReference;
38 }
39
40 namespace Windows.System
41 {
42 typedef enum DispatcherQueuePriority DispatcherQueuePriority;
43 typedef enum ProcessorArchitecture ProcessorArchitecture;
44 typedef enum UserAuthenticationStatus UserAuthenticationStatus;
45 typedef enum UserPictureSize UserPictureSize;
46 typedef enum UserType UserType;
47 typedef enum VirtualKey VirtualKey;
48 typedef enum VirtualKeyModifiers VirtualKeyModifiers;
49
50 interface IDispatcherQueue;
51 interface IDispatcherQueue2;
52 interface IDispatcherQueueController;
53 interface IDispatcherQueueControllerStatics;
54 interface IDispatcherQueueShutdownStartingEventArgs;
55 interface IDispatcherQueueStatics;
56 interface IDispatcherQueueTimer;
57 interface IUser;
58 interface IUserStatics;
59 interface IUserChangedEventArgs;
60 interface IUserChangedEventArgs2;
61
62 runtimeclass DispatcherQueue;
63 runtimeclass DispatcherQueueController;
64 runtimeclass DispatcherQueueShutdownStartingEventArgs;
65 runtimeclass DispatcherQueueTimer;
66 runtimeclass User;
67 runtimeclass UserChangedEventArgs;
68
69 declare
70 {
71 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IPropertySet *>;
72 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.Streams.IRandomAccessStreamReference *>;
73 interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IPropertySet *>;
74 interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStreamReference *>;
75 interface Windows.Foundation.TypedEventHandler<Windows.System.DispatcherQueue *, IInspectable *>;
76 interface Windows.Foundation.TypedEventHandler<Windows.System.DispatcherQueue *, Windows.System.DispatcherQueueShutdownStartingEventArgs *>;
77 interface Windows.Foundation.TypedEventHandler<Windows.System.DispatcherQueueTimer *, IInspectable *>;
78 }
79
80 [
81 contract(Windows.Foundation.UniversalApiContract, 5.0)
82 ]
83 enum DispatcherQueuePriority
84 {
85 Low = -10,
86 Normal = 0,
87 High = 10,
88 };
89
90 [
91 contract(Windows.Foundation.UniversalApiContract, 1.0)
92 ]
93 enum ProcessorArchitecture
94 {
95 X86 = 0,
96 Arm = 5,
97 X64 = 9,
98 Neutral = 11,
99 [contract(Windows.Foundation.UniversalApiContract, 8.0)]
100 Arm64 = 12,
101 [contract(Windows.Foundation.UniversalApiContract, 8.0)]
102 X86OnArm64 = 14,
103 Unknown = 65535
104 };
105
106 [
107 contract(Windows.Foundation.UniversalApiContract, 1.0)
108 ]
109 enum UserAuthenticationStatus
110 {
111 Unauthenticated = 0,
112 LocallyAuthenticated = 1,
113 RemotelyAuthenticated = 2,
114 };
115
116 [
117 contract(Windows.Foundation.UniversalApiContract, 1.0)
118 ]
119 enum UserPictureSize
120 {
121 Size64x64 = 0,
122 Size208x208 = 1,
123 Size424x424 = 2,
124 Size1080x1080 = 3,
125 };
126
127 [
128 contract(Windows.Foundation.UniversalApiContract, 1.0)
129 ]
130 enum UserType
131 {
132 LocalUser = 0,
133 RemoteUser = 1,
134 LocalGuest = 2,
135 RemoteGuest = 3,
136 [contract(Windows.Foundation.UniversalApiContract, 11.0)]
137 SystemManaged = 4,
138 };
139
140 [
141 contract(Windows.Foundation.UniversalApiContract, 1.0)
142 ]
143 enum VirtualKey
144 {
145 None = 0,
146 LeftButton = 1,
147 RightButton = 2,
148 Cancel = 3,
149 MiddleButton = 4,
150 XButton1 = 5,
151 XButton2 = 6,
152 Back = 8,
153 Tab = 9,
154 Clear = 12,
155 Enter = 13,
156 Shift = 16,
157 Control = 17,
158 Menu = 18,
159 Pause = 19,
160 CapitalLock = 20,
161 Kana = 21,
162 Hangul = 21,
163 [contract(Windows.Foundation.UniversalApiContract, 10.0)]
164 ImeOn = 22,
165 Junja = 23,
166 Final = 24,
167 Hanja = 25,
168 Kanji = 25,
169 [contract(Windows.Foundation.UniversalApiContract, 10.0)]
170 ImeOff = 26,
171 Escape = 27,
172 Convert = 28,
173 NonConvert = 29,
174 Accept = 30,
175 ModeChange = 31,
176 Space = 32,
177 PageUp = 33,
178 PageDown = 34,
179 End = 35,
180 Home = 36,
181 Left = 37,
182 Up = 38,
183 Right = 39,
184 Down = 40,
185 Select = 41,
186 Print = 42,
187 Execute = 43,
188 Snapshot = 44,
189 Insert = 45,
190 Delete = 46,
191 Help = 47,
192 Number0 = 48,
193 Number1 = 49,
194 Number2 = 50,
195 Number3 = 51,
196 Number4 = 52,
197 Number5 = 53,
198 Number6 = 54,
199 Number7 = 55,
200 Number8 = 56,
201 Number9 = 57,
202 A = 65,
203 B = 66,
204 C = 67,
205 D = 68,
206 E = 69,
207 F = 70,
208 G = 71,
209 H = 72,
210 I = 73,
211 J = 74,
212 K = 75,
213 L = 76,
214 M = 77,
215 N = 78,
216 O = 79,
217 P = 80,
218 Q = 81,
219 R = 82,
220 S = 83,
221 T = 84,
222 U = 85,
223 V = 86,
224 W = 87,
225 X = 88,
226 Y = 89,
227 Z = 90,
228 LeftWindows = 91,
229 RightWindows = 92,
230 Application = 93,
231 Sleep = 95,
232 NumberPad0 = 96,
233 NumberPad1 = 97,
234 NumberPad2 = 98,
235 NumberPad3 = 99,
236 NumberPad4 = 100,
237 NumberPad5 = 101,
238 NumberPad6 = 102,
239 NumberPad7 = 103,
240 NumberPad8 = 104,
241 NumberPad9 = 105,
242 Multiply = 106,
243 Add = 107,
244 Separator = 108,
245 Subtract = 109,
246 Decimal = 110,
247 Divide = 111,
248 F1 = 112,
249 F2 = 113,
250 F3 = 114,
251 F4 = 115,
252 F5 = 116,
253 F6 = 117,
254 F7 = 118,
255 F8 = 119,
256 F9 = 120,
257 F10 = 121,
258 F11 = 122,
259 F12 = 123,
260 F13 = 124,
261 F14 = 125,
262 F15 = 126,
263 F16 = 127,
264 F17 = 128,
265 F18 = 129,
266 F19 = 130,
267 F20 = 131,
268 F21 = 132,
269 F22 = 133,
270 F23 = 134,
271 F24 = 135,
272 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
273 NavigationView = 136,
274 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
275 NavigationMenu = 137,
276 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
277 NavigationUp = 138,
278 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
279 NavigationDown = 139,
280 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
281 NavigationLeft = 140,
282 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
283 NavigationRight = 141,
284 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
285 NavigationAccept = 142,
286 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
287 NavigationCancel = 143,
288 NumberKeyLock = 144,
289 Scroll = 145,
290 LeftShift = 160,
291 RightShift = 161,
292 LeftControl = 162,
293 RightControl = 163,
294 LeftMenu = 164,
295 RightMenu = 165,
296 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
297 GoBack = 166,
298 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
299 GoForward = 167,
300 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
301 Refresh = 168,
302 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
303 Stop = 169,
304 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
305 Search = 170,
306 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
307 Favorites = 171,
308 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
309 GoHome = 172,
310 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
311 GamepadA = 195,
312 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
313 GamepadB = 196,
314 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
315 GamepadX = 197,
316 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
317 GamepadY = 198,
318 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
319 GamepadRightShoulder = 199,
320 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
321 GamepadLeftShoulder = 200,
322 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
323 GamepadLeftTrigger = 201,
324 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
325 GamepadRightTrigger = 202,
326 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
327 GamepadDPadUp = 203,
328 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
329 GamepadDPadDown = 204,
330 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
331 GamepadDPadLeft = 205,
332 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
333 GamepadDPadRight = 206,
334 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
335 GamepadMenu = 207,
336 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
337 GamepadView = 208,
338 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
339 GamepadLeftThumbstickButton = 209,
340 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
341 GamepadRightThumbstickButton = 210,
342 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
343 GamepadLeftThumbstickUp = 211,
344 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
345 GamepadLeftThumbstickDown = 212,
346 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
347 GamepadLeftThumbstickRight = 213,
348 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
349 GamepadLeftThumbstickLeft = 214,
350 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
351 GamepadRightThumbstickUp = 215,
352 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
353 GamepadRightThumbstickDown = 216,
354 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
355 GamepadRightThumbstickRight = 217,
356 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
357 GamepadRightThumbstickLeft = 218
358 };
359
360 [
361 contract(Windows.Foundation.UniversalApiContract, 1.0),
362 flags
363 ]
364 enum VirtualKeyModifiers
365 {
366 None = 0x0,
367 Control = 0x1,
368 Menu = 0x2,
369 Shift = 0x4,
370 Windows = 0x8
371 };
372
373 [
374 contract(Windows.Foundation.UniversalApiContract, 5.0),
375 uuid(dfa2dc9c-1a2d-4917-98f2-939af1d6e0c8)
376 ]
377 delegate HRESULT DispatcherQueueHandler();
378
379 [
380 contract(Windows.Foundation.UniversalApiContract, 5.0),
381 exclusiveto(Windows.System.DispatcherQueue),
382 uuid(603e88e4-a338-4ffe-a457-a5cfb9ceb899)
383 ]
384 interface IDispatcherQueue : IInspectable
385 {
386 HRESULT CreateTimer([out, retval] Windows.System.DispatcherQueueTimer **result);
387 [overload("TryEnqueue")] HRESULT TryEnqueue([in] Windows.System.DispatcherQueueHandler *callback, [out, retval] boolean *result);
388 [overload("TryEnqueue")] HRESULT TryEnqueueWithPriority([in] Windows.System.DispatcherQueuePriority priority, [in] Windows.System.DispatcherQueueHandler *callback,
389 [out, retval] boolean *result);
390 [eventadd] HRESULT ShutdownStarting([in] Windows.Foundation.TypedEventHandler<Windows.System.DispatcherQueue *, Windows.System.DispatcherQueueShutdownStartingEventArgs *> *handler,
391 [out, retval] EventRegistrationToken *token);
392 [eventremove] HRESULT ShutdownStarting([in] EventRegistrationToken token);
393 [eventadd] HRESULT ShutdownCompleted([in] Windows.Foundation.TypedEventHandler<Windows.System.DispatcherQueue *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
394 [eventremove] HRESULT ShutdownCompleted([in] EventRegistrationToken token);
395 }
396
397 [
398 contract(Windows.Foundation.UniversalApiContract, 8.0),
399 exclusiveto(Windows.System.DispatcherQueue),
400 uuid(c822c647-30ef-506e-bd1e-a647ae6675ff)
401 ]
402 interface IDispatcherQueue2 : IInspectable
403 {
404 [propget] HRESULT HasThreadAccess([out, retval] boolean *value);
405 }
406
407 [
408 contract(Windows.Foundation.UniversalApiContract, 5.0),
409 exclusiveto(Windows.System.DispatcherQueueController),
410 uuid(22f34e66-50db-4e36-a98d-61c01b384d20)
411 ]
412 interface IDispatcherQueueController : IInspectable
413 {
414 [propget] HRESULT DispatcherQueue([out, retval] Windows.System.DispatcherQueue **value);
415 HRESULT ShutdownQueueAsync([out, retval] Windows.Foundation.IAsyncAction **operation);
416 }
417
418 [
419 contract(Windows.Foundation.UniversalApiContract, 5.0),
420 exclusiveto(Windows.System.DispatcherQueueController),
421 uuid(0a6c98e0-5198-49a2-a313-3f70d1f13c27)
422 ]
423 interface IDispatcherQueueControllerStatics : IInspectable
424 {
425 HRESULT CreateOnDedicatedThread([out, retval] Windows.System.DispatcherQueueController **result);
426 }
427
428 [
429 contract(Windows.Foundation.UniversalApiContract, 5.0),
430 exclusiveto(Windows.System.DispatcherQueueShutdownStartingEventArgs),
431 uuid(c4724c4c-ff97-40c0-a226-cc0aaa545e89)
432 ]
433 interface IDispatcherQueueShutdownStartingEventArgs : IInspectable
434 {
435 HRESULT GetDeferral([out, retval] Windows.Foundation.Deferral **result);
436 }
437
438 [
439 contract(Windows.Foundation.UniversalApiContract, 5.0),
440 exclusiveto(Windows.System.DispatcherQueue),
441 uuid(a96d83d7-9371-4517-9245-d0824ac12c74)
442 ]
443 interface IDispatcherQueueStatics : IInspectable
444 {
445 HRESULT GetForCurrentThread([out, retval] Windows.System.DispatcherQueue **result);
446 }
447
448 [
449 contract(Windows.Foundation.UniversalApiContract, 5.0),
450 exclusiveto(Windows.System.DispatcherQueueTimer),
451 uuid(5feabb1d-a31c-4727-b1ac-37454649d56a)
452 ]
453 interface IDispatcherQueueTimer : IInspectable
454 {
455 [propget] HRESULT Interval([out, retval] Windows.Foundation.TimeSpan *value);
456 [propput] HRESULT Interval([in] Windows.Foundation.TimeSpan value);
457 [propget] HRESULT IsRunning([out, retval] boolean *value);
458 [propget] HRESULT IsRepeating([out, retval] boolean *value);
459 [propput] HRESULT IsRepeating([in] boolean value);
460 HRESULT Start();
461 HRESULT Stop();
462 [eventadd] HRESULT Tick([in] Windows.Foundation.TypedEventHandler<Windows.System.DispatcherQueueTimer *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
463 [eventremove] HRESULT Tick([in] EventRegistrationToken token);
464 }
465
466 [
467 contract(Windows.Foundation.UniversalApiContract, 1.0),
468 exclusiveto(Windows.System.User),
469 uuid(df9a26c6-e746-4bcd-b5d4-120103c4209b)
470 ]
471 interface IUser : IInspectable
472 {
473 [propget] HRESULT NonRoamableId([out, retval] HSTRING *value);
474 [propget] HRESULT AuthenticationStatus([out, retval] Windows.System.UserAuthenticationStatus *value);
475 [propget] HRESULT Type([out, retval] Windows.System.UserType *value);
476 HRESULT GetPropertyAsync([in] HSTRING value, [out, retval] Windows.Foundation.IAsyncOperation<IInspectable *> **operation);
477 HRESULT GetPropertiesAsync([in] Windows.Foundation.Collections.IVectorView<HSTRING> *values, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IPropertySet *> **operation);
478 HRESULT GetPictureAsync([in] Windows.System.UserPictureSize desired_size, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStreamReference *> **operation);
479 }
480
481 [
482 contract(Windows.Foundation.UniversalApiContract, 1.0),
483 exclusiveto(Windows.System.UserChangedEventArgs),
484 uuid(086459dc-18c6-48db-bc99-724fb9203ccc)
485 ]
486 interface IUserChangedEventArgs : IInspectable
487 {
488 [propget] HRESULT User([out, retval] Windows.System.User **value);
489 }
490
491 [
492 contract(Windows.Foundation.UniversalApiContract, 5.0),
493 marshaling_behavior(agile),
494 static(Windows.System.IDispatcherQueueStatics, Windows.Foundation.UniversalApiContract, 5.0),
495 threading(both)
496 ]
497 runtimeclass DispatcherQueue
498 {
499 [default] interface Windows.System.IDispatcherQueue;
500 [contract(Windows.Foundation.UniversalApiContract, 8.0)] interface Windows.System.IDispatcherQueue2;
501 }
502
503 [
504 contract(Windows.Foundation.UniversalApiContract, 5.0),
505 marshaling_behavior(agile),
506 static(Windows.System.IDispatcherQueueControllerStatics, Windows.Foundation.UniversalApiContract, 5.0),
507 threading(both)
508 ]
509 runtimeclass DispatcherQueueController
510 {
511 [default] interface Windows.System.IDispatcherQueueController;
512 }
513
514 [
515 contract(Windows.Foundation.UniversalApiContract, 5.0),
516 marshaling_behavior(agile)
517 ]
518 runtimeclass DispatcherQueueShutdownStartingEventArgs
519 {
520 [default] interface Windows.System.IDispatcherQueueShutdownStartingEventArgs;
521 }
522
523 [
524 contract(Windows.Foundation.UniversalApiContract, 5.0),
525 marshaling_behavior(agile)
526 ]
527 runtimeclass DispatcherQueueTimer
528 {
529 [default] interface Windows.System.IDispatcherQueueTimer;
530 }
531
532 [
533 contract(Windows.Foundation.UniversalApiContract, 1.0),
534 marshaling_behavior(agile),
535 /* static(Windows.System.IUserStatics, Windows.Foundation.UniversalApiContract, 1.0), */
536 threading(both),
537 ]
538 runtimeclass User
539 {
540 [default] interface Windows.System.IUser;
541 }
542
543 [
544 contract(Windows.Foundation.UniversalApiContract, 1.0),
545 marshaling_behavior(agile)
546 ]
547 runtimeclass UserChangedEventArgs
548 {
549 [default] interface Windows.System.IUserChangedEventArgs;
550 /* [contract(Windows.Foundation.UniversalApiContract, 10.0)] interface Windows.System.IUserChangedEventArgs2; */
551 }
552 }