source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/rtworkq.idl@ 1170

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

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

File size: 5.8 KB
Line 
1/*
2 * Copyright 2020 Nikolay Sivov 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
19import "unknwn.idl";
20
21typedef enum
22{
23 RTWQ_STANDARD_WORKQUEUE = 0,
24 RTWQ_WINDOW_WORKQUEUE = 1,
25 RTWQ_MULTITHREADED_WORKQUEUE = 2,
26} RTWQ_WORKQUEUE_TYPE;
27
28typedef unsigned __int64 RTWQWORKITEM_KEY;
29
30[
31 object,
32 uuid(ac6b7889-0740-4d51-8619-905994a55cc6),
33 local
34]
35interface IRtwqAsyncResult : IUnknown
36{
37 HRESULT GetState([out] IUnknown **state);
38 HRESULT GetStatus();
39 HRESULT SetStatus([in] HRESULT status);
40 HRESULT GetObject([out] IUnknown **object);
41 IUnknown *GetStateNoAddRef();
42}
43
44[
45 object,
46 uuid(a27003cf-2354-4f2a-8d6a-ab7cff15437e),
47 local
48]
49interface IRtwqAsyncCallback : IUnknown
50{
51 HRESULT GetParameters([out] DWORD *flags, [out] DWORD *queue);
52 HRESULT Invoke([in] IRtwqAsyncResult *result);
53}
54
55[
56 object,
57 uuid(63d9255a-7ff1-4b61-8faf-ed6460dacf2b),
58 local
59]
60interface IRtwqPlatformEvents : IUnknown
61{
62 HRESULT InitializationComplete(void);
63 HRESULT ShutdownStart(void);
64 HRESULT ShutdownComplete(void);
65}
66
67cpp_quote("#define RTWQ_E_ERROR(x) ((HRESULT)(0xc00d0000L+x))")
68cpp_quote("#define RTWQ_E_BUFFERTOOSMALL RTWQ_E_ERROR(14001)")
69cpp_quote("#define RTWQ_E_NOT_INITIALIZED RTWQ_E_ERROR(14006)")
70cpp_quote("#define RTWQ_E_UNEXPECTED RTWQ_E_ERROR(14011)")
71cpp_quote("#define RTWQ_E_NOT_FOUND RTWQ_E_ERROR(14037)")
72cpp_quote("#define RTWQ_E_OPERATION_CANCELLED RTWQ_E_ERROR(14061)")
73cpp_quote("#define RTWQ_E_INVALID_WORKQUEUE RTWQ_E_ERROR(14079)")
74cpp_quote("#define RTWQ_E_SHUTDOWN RTWQ_E_ERROR(16005)")
75
76cpp_quote("#ifdef __WINESRC__")
77cpp_quote("typedef struct tagRTWQASYNCRESULT")
78cpp_quote("{")
79cpp_quote(" IRtwqAsyncResult AsyncResult;")
80cpp_quote("#else")
81cpp_quote("typedef struct tagRTWQASYNCRESULT : public IRtwqAsyncResult {")
82cpp_quote("#endif")
83cpp_quote(" OVERLAPPED overlapped;")
84cpp_quote(" IRtwqAsyncCallback *pCallback;")
85cpp_quote(" HRESULT hrStatusResult;")
86cpp_quote(" DWORD dwBytesTransferred;")
87cpp_quote(" HANDLE hEvent;")
88cpp_quote("} RTWQASYNCRESULT;")
89
90cpp_quote("typedef void (WINAPI *RTWQPERIODICCALLBACK)(IUnknown *context);")
91
92cpp_quote("HRESULT WINAPI RtwqAddPeriodicCallback(RTWQPERIODICCALLBACK callback, IUnknown *context, DWORD *key);")
93cpp_quote("HRESULT WINAPI RtwqAllocateSerialWorkQueue(DWORD target_queue, DWORD *queue);")
94cpp_quote("HRESULT WINAPI RtwqAllocateWorkQueue(RTWQ_WORKQUEUE_TYPE queue_type, DWORD *queue);")
95cpp_quote("HRESULT WINAPI RtwqBeginRegisterWorkQueueWithMMCSS(DWORD queue, const WCHAR *mmcss_class, DWORD taskid, LONG priority, IRtwqAsyncCallback *callback, IUnknown *state);")
96cpp_quote("HRESULT WINAPI RtwqBeginUnregisterWorkQueueWithMMCSS(DWORD queue, IRtwqAsyncCallback *callback, IUnknown *state);")
97cpp_quote("HRESULT WINAPI RtwqCancelDeadline(HANDLE request);")
98cpp_quote("HRESULT WINAPI RtwqCancelWorkItem(RTWQWORKITEM_KEY key);")
99cpp_quote("HRESULT WINAPI RtwqCreateAsyncResult(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **result);")
100cpp_quote("HRESULT WINAPI RtwqEndRegisterWorkQueueWithMMCSS(IRtwqAsyncResult *result, DWORD *taskid);")
101cpp_quote("HRESULT WINAPI RtwqGetWorkQueueMMCSSClass(DWORD queue, WCHAR *mmcss_class, DWORD *length);")
102cpp_quote("HRESULT WINAPI RtwqGetWorkQueueMMCSSPriority(DWORD queue, LONG *priority);")
103cpp_quote("HRESULT WINAPI RtwqGetWorkQueueMMCSSTaskId(DWORD queue, DWORD *taskid);")
104cpp_quote("HRESULT WINAPI RtwqInvokeCallback(IRtwqAsyncResult *result);")
105cpp_quote("HRESULT WINAPI RtwqJoinWorkQueue(DWORD queue, HANDLE hFile, HANDLE *cookie);")
106cpp_quote("HRESULT WINAPI RtwqLockPlatform(void);")
107cpp_quote("HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, DWORD *taskid, DWORD *queue);")
108cpp_quote("HRESULT WINAPI RtwqLockWorkQueue(DWORD queue);")
109cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IRtwqAsyncResult *result, RTWQWORKITEM_KEY *key);")
110cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);")
111cpp_quote("HRESULT WINAPI RtwqRegisterPlatformEvents(IRtwqPlatformEvents *events);")
112cpp_quote("HRESULT WINAPI RtwqRegisterPlatformWithMMCSS(const WCHAR *mmcss_class, DWORD *taskid, LONG priority);")
113cpp_quote("HRESULT WINAPI RtwqRemovePeriodicCallback(DWORD key);")
114cpp_quote("HRESULT WINAPI RtwqScheduleWorkItem(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key);")
115cpp_quote("HRESULT WINAPI RtwqSetDeadline(DWORD queue_id, LONGLONG deadline, HANDLE *request);")
116cpp_quote("HRESULT WINAPI RtwqSetDeadline2(DWORD queue_id, LONGLONG deadline, LONGLONG predeadline, HANDLE *request);")
117cpp_quote("HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, WINBOOL enable);")
118cpp_quote("HRESULT WINAPI RtwqShutdown(void);")
119cpp_quote("HRESULT WINAPI RtwqStartup(void);")
120cpp_quote("HRESULT WINAPI RtwqUnjoinWorkQueue(DWORD queue, HANDLE cookie);")
121cpp_quote("HRESULT WINAPI RtwqUnlockPlatform(void);")
122cpp_quote("HRESULT WINAPI RtwqUnlockWorkQueue(DWORD queue);")
123cpp_quote("HRESULT WINAPI RtwqUnregisterPlatformEvents(IRtwqPlatformEvents *events);")
124cpp_quote("HRESULT WINAPI RtwqUnregisterPlatformFromMMCSS(void);")
Note: See TracBrowser for help on using the repository browser.