ntoskrnl.exe: Add stub Implementation of IoAllocateWorkItem.
[wine] / include / activscp.idl
1 /*
2  * Copyright 2004 Kevin Koltzau
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 #ifndef DO_NO_IMPORTS
20 import "ocidl.idl";
21 import "oleidl.idl";
22 import "oaidl.idl";
23 #endif
24  
25 typedef enum tagSCRIPTSTATE {
26     SCRIPTSTATE_UNINITIALIZED = 0,
27     SCRIPTSTATE_STARTED       = 1,
28     SCRIPTSTATE_CONNECTED     = 2,
29     SCRIPTSTATE_DISCONNECTED  = 3,
30     SCRIPTSTATE_CLOSED        = 4,
31     SCRIPTSTATE_INITIALIZED   = 5
32 } SCRIPTSTATE;
33
34 typedef enum tagSCRIPTTHREADSTATE {
35     SCRIPTTHREADSTATE_NOTINSCRIPT = 0,
36     SCRIPTTHREADSTATE_RUNNING     = 1
37 } SCRIPTTHREADSTATE;
38
39 typedef DWORD SCRIPTTHREADID;
40 cpp_quote("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
41 cpp_quote("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
42 cpp_quote("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
43
44 cpp_quote("#define SCRIPTITEM_ISVISIBLE           0x00000002")
45 cpp_quote("#define SCRIPTITEM_ISSOURCE            0x00000004")
46 cpp_quote("#define SCRIPTITEM_GLOBALMEMBERS       0x00000008")
47 cpp_quote("#define SCRIPTITEM_ISPERSISTENT        0x00000040")
48 cpp_quote("#define SCRIPTITEM_CODEONLY            0x00000200")
49 cpp_quote("#define SCRIPTITEM_NOCODE              0x00000400")
50 cpp_quote("#define SCRIPTITEM_ALL_FLAGS           (SCRIPTITEM_ISSOURCE | \\")
51 cpp_quote("                                        SCRIPTITEM_ISVISIBLE | \\")
52 cpp_quote("                                        SCRIPTITEM_ISPERSISTENT | \\")
53 cpp_quote("                                        SCRIPTITEM_GLOBALMEMBERS | \\")
54 cpp_quote("                                        SCRIPTITEM_NOCODE | \\")
55 cpp_quote("                                        SCRIPTITEM_CODEONLY)")
56 cpp_quote("#define SCRIPTTYPELIB_ISCONTROL        0x00000010")
57 cpp_quote("#define SCRIPTTYPELIB_ISPERSISTENT     0x00000040")
58 cpp_quote("#define SCRIPTTYPELIB_ALL_FLAGS        (SCRIPTTEXT_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
59 cpp_quote("#define SCRIPTTEXT_DELAYEXECUTION      0x00000001")
60 cpp_quote("#define SCRIPTTEXT_ISVISIBLE           0x00000002")
61 cpp_quote("#define SCRIPTTEXT_ISEXPRESSION        0x00000020")
62 cpp_quote("#define SCRIPTTEXT_ISPERSISTENT        0x00000040")
63 cpp_quote("#define SCRIPTTEXT_HOSTMANAGESSOURCE   0x00000080")
64 cpp_quote("#define SCRIPTTEXT_ALL_FLAGS           (SCRIPTTEXT_DELAYEXECUTION | \\")
65 cpp_quote("                                        SCRIPTTEXT_ISVISIBLE | \\")
66 cpp_quote("                                        SCRIPTTEXT_ISEXPRESSION | \\")
67 cpp_quote("                                        SCRIPTTEXT_ISPERSISTENT | \\")
68 cpp_quote("                                        SCRIPTTEXT_HOSTMANAGESSOURCE)")
69 cpp_quote("#define SCRIPTPROC_HOSTMANAGESSOURCE   0x00000080")
70 cpp_quote("#define SCRIPTPROC_IMPLICIT_THIS       0x00000100")
71 cpp_quote("#define SCRIPTPROC_IMPLICIT_PARENTS    0x00000200")
72 cpp_quote("#define SCRIPTPROC_ALL_FLAGS           (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
73 cpp_quote("                                        SCRIPTPROC_IMPLICIT_THIS | \\")
74 cpp_quote("                                        SCRIPTPROC_IMPLICIT_PARENTS)")
75 cpp_quote("#define SCRIPTINFO_IUNKNOWN            0x00000001")
76 cpp_quote("#define SCRIPTINFO_ITYPEINFO           0x00000002")
77 cpp_quote("#define SCRIPTINFO_ALL_FLAGS           (SCRIPTINFO_IUNKNOWN | SCRIPTINFO_ITYPEINFO)")
78 cpp_quote("#define SCRIPTINTERRUPT_DEBUG          0x00000001")
79 cpp_quote("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
80 cpp_quote("#define SCRIPTINTERRUPT_ALL_FLAGS      (SCRIPTINTERRUPT_DEBUG | SCRIPTINTERRUPT_RAISEEXCEPTION)")
81 cpp_quote("#define SCRIPTSTAT_STATEMENT_COUNT      1")
82 cpp_quote("#define SCRIPTSTAT_INSTRUCTION_COUNT    2")
83 cpp_quote("#define SCRIPTSTAT_INTSTRUCTION_TIME    3")
84 cpp_quote("#define SCRIPTSTAT_TOTAL_TIME           4")
85
86 [
87 object,
88 uuid(EAE1BA61-A4ED-11cf-8F20-00805F2CD064),
89 pointer_default(unique)
90 ]
91 interface IActiveScriptError : IUnknown
92 {
93     HRESULT GetExceptionInfo(
94             [out] EXCEPINFO *pexcepinfo
95     );
96     
97     HRESULT GetSourcePosition(
98             [out] DWORD *pdwSourceContext,
99             [out] ULONG *pulLineNumber,
100             [out] LONG *plCharacterPosition
101     );
102     
103     HRESULT GetSourceLineText(
104             [out] BSTR *pbstrSourceLine
105     );
106 }
107
108 [
109 object,
110 uuid(DB01A1E3-A42B-11cf-8F20-00805F2CD064),
111 pointer_default(unique)
112 ]
113 interface IActiveScriptSite : IUnknown
114 {
115     HRESULT GetLCID(
116             [out] LCID *plcid);
117     
118     HRESULT GetItemInfo(
119             [in] LPCOLESTR pstrName,
120             [in] DWORD dwReturnMask,
121             [out] IUnknown **ppiunkItem,
122             [out] ITypeInfo **ppti
123     );
124     
125     HRESULT GetDocVersionString(
126             [out] BSTR *pbstrVersion
127     );
128     
129     HRESULT OnScriptTerminate(
130             [in] const VARIANT *pvarResult,
131             [in] const EXCEPINFO *pexcepinfo
132     );
133     
134     HRESULT OnStateChange(
135             [in] SCRIPTSTATE ssScriptState
136     );
137     
138     HRESULT OnScriptError(
139             [in] IActiveScriptError *pscripterror
140     );
141     
142     HRESULT OnEnterScript(void);
143     
144     HRESULT OnLeaveScript(void);
145 }
146
147 cpp_quote("typedef IActiveScriptSite *PIActiveScriptSite;")
148
149 [
150 object,
151 uuid(D10F6761-83E9-11cf-8F20-00805F2CD064),
152 pointer_default(unique)
153 ]
154 interface IActiveScriptSiteWindow : IUnknown
155 {
156     HRESULT GetWindow(
157             [out] HWND *phwnd
158     );
159
160     HRESULT EnableModeless(
161             [in] BOOL fEnable
162     );
163 }
164
165 [
166 object,
167 uuid(539698A0-CDCA-11CF-A5EB-00AA0047A063),
168 pointer_default(unique)
169 ]
170 interface IActiveScriptSiteInterruptPoll : IUnknown
171 {
172     HRESULT QueryContinue();
173 }
174
175 [
176 object,
177 uuid(BB1A2AE1-A4F9-11cf-8F20-00805F2CD064),
178 pointer_default(unique)
179 ]
180 interface IActiveScript : IUnknown
181 {
182     HRESULT SetScriptSite(
183             [in] IActiveScriptSite *pass
184     );
185
186     HRESULT GetScriptSite(
187             [in] REFIID riid,
188             [out, iid_is(riid)] void **ppvObject
189     );
190
191     HRESULT SetScriptState(
192             [in] SCRIPTSTATE ss
193     );
194
195     HRESULT GetScriptState(
196             [out] SCRIPTSTATE *pssState
197     );
198
199     HRESULT Close(void);
200
201     HRESULT AddNamedItem(
202             [in] LPCOLESTR pstrName,
203             [in] DWORD dwFlags
204     );
205
206     HRESULT AddTypeLib(
207             [in] REFGUID rguidTypeLib,
208             [in] DWORD dwMajor,
209             [in] DWORD dwMinor,
210             [in] DWORD dwFlags
211     );
212
213     HRESULT GetScriptDispatch(
214             [in] LPCOLESTR pstrItemName,
215             [out] IDispatch **ppdisp
216     );
217
218     HRESULT GetCurrentScriptThreadID(
219             [out] SCRIPTTHREADID *pstidThread
220     );
221
222     HRESULT GetScriptThreadID(
223             [in] DWORD dwWin32ThreadId,
224             [out] SCRIPTTHREADID *pstidThread
225     );
226
227     HRESULT GetScriptThreadState(
228             [in] SCRIPTTHREADID stidThread,
229             [out] SCRIPTTHREADSTATE *pstsState
230     );
231
232     HRESULT InterruptScriptThread(
233             [in] SCRIPTTHREADID stidThread,
234             [in] const EXCEPINFO *pexcepinfo,
235             [in] DWORD dwFlags
236     );
237
238     HRESULT Clone(
239             [out] IActiveScript **ppscript
240     );
241 }
242
243 cpp_quote("typedef IActiveScript *PIActiveScript;")
244
245 [
246 object,
247 uuid(BB1A2AE2-A4F9-11cf-8F20-00805F2CD064),
248 pointer_default(unique)
249 ]
250 interface IActiveScriptParse : IUnknown
251 {
252     HRESULT InitNew(void);
253
254     HRESULT AddScriptlet(
255             [in] LPCOLESTR pstrDefaultName,
256             [in] LPCOLESTR pstrCode,
257             [in] LPCOLESTR pstrItemName,
258             [in] LPCOLESTR pstrSubItemName,
259             [in] LPCOLESTR pstrEventName,
260             [in] LPCOLESTR pstrDelimiter,
261             [in] DWORD dwSourceContextCookie,
262             [in] ULONG ulStartingLineNumber,
263             [in] DWORD dwFlags,
264             [out] BSTR *pbstrName,
265             [out] EXCEPINFO *pexcepinfo
266     );
267
268     HRESULT ParseScriptText(
269             [in] LPCOLESTR pstrCode,
270             [in] LPCOLESTR pstrItemName,
271             [in] IUnknown *punkContext,
272             [in] LPCOLESTR pstrDelimiter,
273             [in] DWORD dwSourceContextCookie,
274             [in] ULONG ulStartingLineNumber,
275             [in] DWORD dwFlags,
276             [out] VARIANT *pvarResult,
277             [out] EXCEPINFO *pexcepinfo
278     );
279 }
280
281 cpp_quote("typedef IActiveScriptParse *PIActiveScriptParse;")
282
283 [
284 object,
285 uuid(1CFF0050-6FDD-11d0-9328-00A0C90DCAA9),
286 pointer_default(unique)
287 ]
288 interface IActiveScriptParseProcedureOld : IUnknown
289 {
290     HRESULT ParseProcedureText(
291             [in] LPCOLESTR pstrCode,
292             [in] LPCOLESTR pstrFormalParams,
293             [in] LPCOLESTR pstrItemName,
294             [in] IUnknown *punkContext,
295             [in] LPCOLESTR pstrDelimiter,
296             [in] DWORD dwSourceContextCookie,
297             [in] ULONG ulStartingLineNumber,
298             [in] DWORD dwFlags,
299             [out] IDispatch **ppdisp
300     );
301 }
302
303 [
304 object,
305 uuid(AA5B6A80-B834-11d0-932F-00A0C90DCAA9),
306 pointer_default(unique)
307 ]
308 interface IActiveScriptParseProcedure : IUnknown
309 {
310     HRESULT ParseProcedureText(
311             [in] LPCOLESTR pstrCode,
312             [in] LPCOLESTR pstrFormalParams,
313             [in] LPCOLESTR pstrProcedureName,
314             [in] LPCOLESTR pstrItemName,
315             [in] IUnknown *punkContext,
316             [in] LPCOLESTR pstrDelimiter,
317             [in] DWORD dwSourceContextCookie,
318             [in] ULONG ulStartingLineNumber,
319             [in] DWORD dwFlags,
320             [out] IDispatch **ppdisp
321     );
322 }
323
324 [
325 object,
326 uuid(63CDBCB0-C1B1-11d0-9336-00A0C90DCAA9),
327 pointer_default(unique)
328 ]
329 interface IBindEventHandler : IUnknown
330 {
331     HRESULT BindHandler(
332             [in] LPCOLESTR pstrEvent,
333             [in] IDispatch *pdisp
334     );
335 }
336
337 [
338 object,
339 uuid(B8DA6310-E19B-11d0-933C-00A0C90DCAA9),
340 pointer_default(unique)
341 ]
342 interface IActiveScriptStats : IUnknown
343 {
344     HRESULT GetStat(
345             [in] DWORD stid,
346             [out] ULONG *pluHi,
347             [out] ULONG *pluLo
348     );
349
350     HRESULT GetStatEx(
351             [in] REFGUID guid,
352             [out] ULONG *pluHi,
353             [out] ULONG *pluLo
354     );
355
356     HRESULT ResetStats(void);
357 }