File: rtworkq.idl

package info (click to toggle)
wine 10.0~repack-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 325,920 kB
  • sloc: ansic: 4,156,003; perl: 23,800; yacc: 22,031; javascript: 15,872; makefile: 12,346; pascal: 9,519; objc: 6,923; lex: 5,273; xml: 3,219; python: 2,673; cpp: 1,741; sh: 893; java: 750; asm: 299; cs: 62
file content (124 lines) | stat: -rw-r--r-- 5,918 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
 * Copyright 2020 Nikolay Sivov for CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

import "unknwn.idl";

typedef enum
{
    RTWQ_STANDARD_WORKQUEUE = 0,
    RTWQ_WINDOW_WORKQUEUE = 1,
    RTWQ_MULTITHREADED_WORKQUEUE = 2,
} RTWQ_WORKQUEUE_TYPE;

typedef unsigned __int64 RTWQWORKITEM_KEY;

[
    object,
    uuid(ac6b7889-0740-4d51-8619-905994a55cc6),
    local
]
interface IRtwqAsyncResult : IUnknown
{
    HRESULT GetState([out] IUnknown **state);
    HRESULT GetStatus();
    HRESULT SetStatus([in] HRESULT status);
    HRESULT GetObject([out] IUnknown **object);
    IUnknown *GetStateNoAddRef();
}

[
    object,
    uuid(a27003cf-2354-4f2a-8d6a-ab7cff15437e),
    local
]
interface IRtwqAsyncCallback : IUnknown
{
    HRESULT GetParameters([out] DWORD *flags, [out] DWORD *queue);
    HRESULT Invoke([in] IRtwqAsyncResult *result);
}

[
    object,
    uuid(63d9255a-7ff1-4b61-8faf-ed6460dacf2b),
    local
]
interface IRtwqPlatformEvents : IUnknown
{
    HRESULT InitializationComplete(void);
    HRESULT ShutdownStart(void);
    HRESULT ShutdownComplete(void);
}

cpp_quote("#define RTWQ_E_ERROR(x)            ((HRESULT)(0xc00d0000L+x))")
cpp_quote("#define RTWQ_E_BUFFERTOOSMALL      RTWQ_E_ERROR(14001)")
cpp_quote("#define RTWQ_E_NOT_INITIALIZED     RTWQ_E_ERROR(14006)")
cpp_quote("#define RTWQ_E_UNEXPECTED          RTWQ_E_ERROR(14011)")
cpp_quote("#define RTWQ_E_NOT_FOUND           RTWQ_E_ERROR(14037)")
cpp_quote("#define RTWQ_E_OPERATION_CANCELLED RTWQ_E_ERROR(14061)")
cpp_quote("#define RTWQ_E_INVALID_WORKQUEUE   RTWQ_E_ERROR(14079)")
cpp_quote("#define RTWQ_E_SHUTDOWN            RTWQ_E_ERROR(16005)")

cpp_quote("#ifdef __WINESRC__")
cpp_quote("typedef struct tagRTWQASYNCRESULT")
cpp_quote("{")
cpp_quote("    IRtwqAsyncResult AsyncResult;")
cpp_quote("#else")
cpp_quote("typedef struct tagRTWQASYNCRESULT : public IRtwqAsyncResult {")
cpp_quote("#endif")
cpp_quote("    OVERLAPPED overlapped;")
cpp_quote("    IRtwqAsyncCallback *pCallback;")
cpp_quote("    HRESULT hrStatusResult;")
cpp_quote("    DWORD dwBytesTransferred;")
cpp_quote("    HANDLE hEvent;")
cpp_quote("} RTWQASYNCRESULT;")

cpp_quote("typedef void (WINAPI *RTWQPERIODICCALLBACK)(IUnknown *context);")

cpp_quote("HRESULT WINAPI RtwqAddPeriodicCallback(RTWQPERIODICCALLBACK callback, IUnknown *context, DWORD *key);")
cpp_quote("HRESULT WINAPI RtwqAllocateSerialWorkQueue(DWORD target_queue, DWORD *queue);")
cpp_quote("HRESULT WINAPI RtwqAllocateWorkQueue(RTWQ_WORKQUEUE_TYPE queue_type, DWORD *queue);")
cpp_quote("HRESULT WINAPI RtwqBeginRegisterWorkQueueWithMMCSS(DWORD queue, const WCHAR *mmcss_class, DWORD taskid, LONG priority, IRtwqAsyncCallback *callback, IUnknown *state);")
cpp_quote("HRESULT WINAPI RtwqBeginUnregisterWorkQueueWithMMCSS(DWORD queue, IRtwqAsyncCallback *callback, IUnknown *state);")
cpp_quote("HRESULT WINAPI RtwqCancelDeadline(HANDLE request);")
cpp_quote("HRESULT WINAPI RtwqCancelWorkItem(RTWQWORKITEM_KEY key);")
cpp_quote("HRESULT WINAPI RtwqCreateAsyncResult(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **result);")
cpp_quote("HRESULT WINAPI RtwqEndRegisterWorkQueueWithMMCSS(IRtwqAsyncResult *result, DWORD *taskid);")
cpp_quote("HRESULT WINAPI RtwqGetWorkQueueMMCSSClass(DWORD queue, WCHAR *mmcss_class, DWORD *length);")
cpp_quote("HRESULT WINAPI RtwqGetWorkQueueMMCSSPriority(DWORD queue, LONG *priority);")
cpp_quote("HRESULT WINAPI RtwqGetWorkQueueMMCSSTaskId(DWORD queue, DWORD *taskid);")
cpp_quote("HRESULT WINAPI RtwqInvokeCallback(IRtwqAsyncResult *result);")
cpp_quote("HRESULT WINAPI RtwqJoinWorkQueue(DWORD queue, HANDLE hFile, HANDLE *cookie);")
cpp_quote("HRESULT WINAPI RtwqLockPlatform(void);")
cpp_quote("HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, DWORD *taskid, DWORD *queue);")
cpp_quote("HRESULT WINAPI RtwqLockWorkQueue(DWORD queue);")
cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IRtwqAsyncResult *result, RTWQWORKITEM_KEY *key);")
cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);")
cpp_quote("HRESULT WINAPI RtwqRegisterPlatformEvents(IRtwqPlatformEvents *events);")
cpp_quote("HRESULT WINAPI RtwqRegisterPlatformWithMMCSS(const WCHAR *mmcss_class, DWORD *taskid, LONG priority);")
cpp_quote("HRESULT WINAPI RtwqRemovePeriodicCallback(DWORD key);")
cpp_quote("HRESULT WINAPI RtwqScheduleWorkItem(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key);")
cpp_quote("HRESULT WINAPI RtwqSetDeadline(DWORD queue_id, LONGLONG deadline, HANDLE *request);")
cpp_quote("HRESULT WINAPI RtwqSetDeadline2(DWORD queue_id, LONGLONG deadline, LONGLONG predeadline, HANDLE *request);")
cpp_quote("HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable);")
cpp_quote("HRESULT WINAPI RtwqShutdown(void);")
cpp_quote("HRESULT WINAPI RtwqStartup(void);")
cpp_quote("HRESULT WINAPI RtwqUnjoinWorkQueue(DWORD queue, HANDLE cookie);")
cpp_quote("HRESULT WINAPI RtwqUnlockPlatform(void);")
cpp_quote("HRESULT WINAPI RtwqUnlockWorkQueue(DWORD queue);")
cpp_quote("HRESULT WINAPI RtwqUnregisterPlatformEvents(IRtwqPlatformEvents *events);")
cpp_quote("HRESULT WINAPI RtwqUnregisterPlatformFromMMCSS(void);")