source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/windows.system.threading.idl@ 1175

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

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

File size: 4.0 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7#ifdef __WIDL__
8#pragma winrt ns_prefix
9#endif
10
11import "inspectable.idl";
12import "windows.foundation.idl";
13
14namespace Windows {
15 namespace Foundation {
16 interface IAsyncAction;
17 }
18
19 namespace System {
20 namespace Threading {
21 typedef enum WorkItemPriority WorkItemPriority;
22 typedef enum WorkItemOptions WorkItemOptions;
23 interface TimerElapsedHandler; //delegate
24 interface TimerDestroyedHandler; //delegate
25 interface WorkItemHandler; //delegate
26 interface IThreadPoolStatics;
27 interface IThreadPoolTimer;
28 interface IThreadPoolTimerStatics;
29 }
30 }
31}
32
33namespace Windows {
34 namespace System {
35 namespace Threading
36 {
37 enum WorkItemPriority {
38 Low = -1,
39 Normal = 0,
40 High = 1
41 };
42
43 enum WorkItemOptions {
44 None = 0,
45 TimeSliced = 1
46 };
47
48 typedef struct TimeSpan {
49 INT64 Duration;
50 } TimeSpan;
51
52 [uuid(FAAEA667-FBEB-49CB-ADB2-71184C556E43)]
53 interface TimerElapsedHandler : IUnknown {
54 HRESULT Invoke(IThreadPoolTimer* timer);
55 }
56
57 [uuid(34ED19FA-8384-4EB9-8209-FB5094EEEC35)]
58 interface TimerDestroyedHandler : IUnknown {
59 HRESULT Invoke(IThreadPoolTimer* timer);
60 }
61
62 [uuid(1D1A8B8B-FA66-414F-9CBD-B65FC99D17FA)]
63 interface WorkItemHandler : IUnknown {
64 HRESULT Invoke(
65 Windows.Foundation.IAsyncAction* operation);
66 }
67
68 [uuid(B6BF67DD-84BD-44F8-AC1C-93EBCB9DBA91)]
69 interface IThreadPoolStatics : IInspectable
70 {
71 HRESULT RunAsync(
72 WorkItemHandler* handler,
73 Windows.Foundation.IAsyncAction** operation);
74
75 HRESULT RunWithPriorityAsync(
76 WorkItemHandler* handler,
77 WorkItemPriority priority,
78 Windows.Foundation.IAsyncAction** operation);
79
80 HRESULT RunWithPriorityAndOptionsAsync(
81 WorkItemHandler* handler,
82 WorkItemPriority priority,
83 WorkItemOptions options,
84 Windows.Foundation.IAsyncAction** operation);
85 }
86
87 [uuid(594EBE78-55EA-4A88-A50D-3402AE1F9CF2)]
88 interface IThreadPoolTimer : IInspectable
89 {
90 [propget] HRESULT Period(TimeSpan* value);
91 [propget] HRESULT Delay(TimeSpan* value);
92 HRESULT Cancel();
93 }
94
95 [uuid(1A8A9D02-E482-461B-B8C7-8EFAD1CCE590)]
96 interface IThreadPoolTimerStatics : IInspectable
97 {
98 HRESULT CreatePeriodicTimer(
99 TimerElapsedHandler* handler,
100 TimeSpan period,
101 IThreadPoolTimer** timer);
102
103 HRESULT CreateTimer(
104 TimerElapsedHandler* handler,
105 TimeSpan delay,
106 IThreadPoolTimer** timer);
107
108 HRESULT CreatePeriodicTimerWithCompletion(
109 TimerElapsedHandler* handler,
110 TimeSpan period,
111 TimerDestroyedHandler* destroyed,
112 IThreadPoolTimer** timer);
113
114 HRESULT CreateTimerWithCompletion(
115 TimerElapsedHandler* handler,
116 TimeSpan delay,
117 TimerDestroyedHandler* destroyed,
118 IThreadPoolTimer** timer);
119 }
120 }
121 }
122}
Note: See TracBrowser for help on using the repository browser.