[Tizen] Unify dnetmemoryenumlib terms to match the codebase (#291)
[platform/upstream/coreclr.git] / src / vm / winrtdispatcherqueue.h
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 /*============================================================
5 **
6 ** Header: winrtdispatcherqueue.h
7 **
8 ===========================================================*/
9
10 #ifndef _WINRTDISPATCHERQUEUE_H
11 #define _WINRTDISPATCHERQUEUE_H
12
13 #include <inspectable.h>
14
15 // The following definitions were taken from windows.system.h.
16 // Use windows.system.h from the RS3 SDK instead of this when that SDK is available.
17 namespace Windows {
18     namespace System {
19         /* [v1_enum] */
20         enum DispatcherQueuePriority
21         {
22             DispatcherQueuePriority_Low = -10,
23             DispatcherQueuePriority_Normal  = 0,
24             DispatcherQueuePriority_High    = 10
25         } ;
26
27         MIDL_INTERFACE("DFA2DC9C-1A2D-4917-98F2-939AF1D6E0C8")
28         IDispatcherQueueHandler : public IUnknown
29         {
30         public:
31             virtual HRESULT STDMETHODCALLTYPE Invoke( void) = 0;
32         };
33
34         MIDL_INTERFACE("5FEABB1D-A31C-4727-B1AC-37454649D56A")
35         IDispatcherQueueTimer : public IInspectable
36         {
37         public:
38             virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;
39
40             virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;
41
42             virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Interval( 
43                 /* [out][retval] */ __RPC__out ABI::Windows::Foundation::TimeSpan *value) = 0;
44
45             virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Interval( 
46                 /* [in] */ ABI::Windows::Foundation::TimeSpan value) = 0;
47
48             virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsStarted( 
49                 /* [out][retval] */ __RPC__out boolean *value) = 0;
50
51             virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsRepeating( 
52                 /* [out][retval] */ __RPC__out boolean *value) = 0;
53
54             virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsRepeating( 
55                 /* [in] */ boolean value) = 0;
56
57 #if 0 // We don't use these functions
58             virtual HRESULT STDMETHODCALLTYPE add_Tick( 
59                 /* [in] */ __RPC__in_opt __FITypedEventHandler_2_Windows__CSystem__CDispatcherQueueTimer_IInspectable *handler,
60                 /* [out][retval] */ __RPC__out EventRegistrationToken *token) = 0;
61             
62             virtual HRESULT STDMETHODCALLTYPE remove_Tick( 
63                 /* [in] */ EventRegistrationToken token) = 0;
64 #endif
65         };
66
67         MIDL_INTERFACE("603E88E4-A338-4FFE-A457-A5CFB9CEB899")
68         IDispatcherQueue : public IInspectable
69         {
70         public:
71             virtual HRESULT STDMETHODCALLTYPE CreateTimer( 
72                 /* [out][retval] */ __RPC__deref_out_opt Windows::System::IDispatcherQueueTimer **result) = 0;
73
74             virtual HRESULT STDMETHODCALLTYPE TryEnqueue( 
75                 /* [in] */ __RPC__in_opt Windows::System::IDispatcherQueueHandler *callback,
76                 /* [out][retval] */ __RPC__out boolean *result) = 0;
77
78             virtual HRESULT STDMETHODCALLTYPE TryEnqueueWithPriority( 
79                 /* [in] */ Windows::System::DispatcherQueuePriority priority,
80                 /* [in] */ __RPC__in_opt Windows::System::IDispatcherQueueHandler *callback,
81                 /* [out][retval] */ __RPC__out boolean *result) = 0;
82         };
83
84         MIDL_INTERFACE("A96D83D7-9371-4517-9245-D0824AC12C74")
85         IDispatcherQueueStatics : public IInspectable
86         {
87         public:
88             virtual HRESULT STDMETHODCALLTYPE GetForCurrentThread( 
89                 /* [out][retval] */ __RPC__deref_out_opt Windows::System::IDispatcherQueue **result) = 0;
90         };
91
92         extern const __declspec(selectany) IID & IID_IDispatcherQueueStatics = __uuidof(IDispatcherQueueStatics);
93     }
94 }
95
96 #ifndef RUNTIMECLASS_Windows_System_DispatcherQueue_DEFINED
97 #define RUNTIMECLASS_Windows_System_DispatcherQueue_DEFINED
98     extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_System_DispatcherQueue[] = L"Windows.System.DispatcherQueue";
99 #endif
100
101 #endif // _WINRTDISPATCHERQUEUE_H