blob: 9be7ec45617945ea660e3a222b2068ae16d72db5 [file] [log] [blame]
Kevin Koltzaue3e67042004-07-21 03:08:46 +00001/*
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
Jonathan Ernst360a3f92006-05-18 14:49:52 +020016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Kevin Koltzaue3e67042004-07-21 03:08:46 +000017 */
18
Alexandre Julliard9719bca2007-06-08 15:49:36 +020019#ifndef DO_NO_IMPORTS
Kevin Koltzaue3e67042004-07-21 03:08:46 +000020import "ocidl.idl";
21import "oleidl.idl";
22import "oaidl.idl";
Alexandre Julliard9719bca2007-06-08 15:49:36 +020023#endif
Jacek Caban7ba25f02008-03-11 13:00:46 +010024
25cpp_quote("#ifndef _NO_SCRIPT_GUIDS")
26
27cpp_quote("DEFINE_GUID(CATID_ActiveScript, 0xf0b7a1a1,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
28cpp_quote("DEFINE_GUID(CATID_ActiveScriptParse, 0xf0b7a1a2,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
29cpp_quote("DEFINE_GUID(CATID_ActiveScriptEncode, 0xf0b7a1a3,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
30
31cpp_quote("#endif")
Jacek Cabane553c562008-03-19 11:31:19 +010032
33cpp_quote("#define SCRIPTPROP_NAME 0x00000000")
34cpp_quote("#define SCRIPTPROP_MAJORVERSION 0x00000001")
35cpp_quote("#define SCRIPTPROP_MINORVERSION 0x00000002")
36cpp_quote("#define SCRIPTPROP_BUILDNUMBER 0x00000003")
37cpp_quote("#define SCRIPTPROP_DELAYEDEVENTSINKING 0x00001000")
38cpp_quote("#define SCRIPTPROP_CATCHEXCEPTION 0x00001001")
39cpp_quote("#define SCRIPTPROP_CONVERSIONLCID 0x00001002")
40cpp_quote("#define SCRIPTPROP_HOSTSTACKREQUIRED 0x00001003")
41cpp_quote("#define SCRIPTPROP_DEBUGGER 0x00001100")
42cpp_quote("#define SCRIPTPROP_JITDEBUG 0x00001101")
Paul Vriensaf1ef922009-06-22 20:57:32 +020043cpp_quote("#define SCRIPTPROP_INVOKEVERSIONING 0x00004000")
44
45cpp_quote("#define SCRIPTPROP_HACK_FIBERSUPPORT 0x70000000")
46cpp_quote("#define SCRIPTPROP_HACK_TRIDENTEVENTSINK 0x70000001")
47cpp_quote("#define SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION 0x70000002")
Kevin Koltzaue3e67042004-07-21 03:08:46 +000048
49typedef enum tagSCRIPTSTATE {
50 SCRIPTSTATE_UNINITIALIZED = 0,
51 SCRIPTSTATE_STARTED = 1,
52 SCRIPTSTATE_CONNECTED = 2,
53 SCRIPTSTATE_DISCONNECTED = 3,
54 SCRIPTSTATE_CLOSED = 4,
55 SCRIPTSTATE_INITIALIZED = 5
56} SCRIPTSTATE;
57
58typedef enum tagSCRIPTTHREADSTATE {
59 SCRIPTTHREADSTATE_NOTINSCRIPT = 0,
60 SCRIPTTHREADSTATE_RUNNING = 1
61} SCRIPTTHREADSTATE;
62
63typedef DWORD SCRIPTTHREADID;
64cpp_quote("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
65cpp_quote("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
66cpp_quote("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
67
68cpp_quote("#define SCRIPTITEM_ISVISIBLE 0x00000002")
69cpp_quote("#define SCRIPTITEM_ISSOURCE 0x00000004")
70cpp_quote("#define SCRIPTITEM_GLOBALMEMBERS 0x00000008")
71cpp_quote("#define SCRIPTITEM_ISPERSISTENT 0x00000040")
72cpp_quote("#define SCRIPTITEM_CODEONLY 0x00000200")
73cpp_quote("#define SCRIPTITEM_NOCODE 0x00000400")
74cpp_quote("#define SCRIPTITEM_ALL_FLAGS (SCRIPTITEM_ISSOURCE | \\")
75cpp_quote(" SCRIPTITEM_ISVISIBLE | \\")
76cpp_quote(" SCRIPTITEM_ISPERSISTENT | \\")
77cpp_quote(" SCRIPTITEM_GLOBALMEMBERS | \\")
78cpp_quote(" SCRIPTITEM_NOCODE | \\")
79cpp_quote(" SCRIPTITEM_CODEONLY)")
80cpp_quote("#define SCRIPTTYPELIB_ISCONTROL 0x00000010")
81cpp_quote("#define SCRIPTTYPELIB_ISPERSISTENT 0x00000040")
82cpp_quote("#define SCRIPTTYPELIB_ALL_FLAGS (SCRIPTTEXT_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
83cpp_quote("#define SCRIPTTEXT_DELAYEXECUTION 0x00000001")
84cpp_quote("#define SCRIPTTEXT_ISVISIBLE 0x00000002")
85cpp_quote("#define SCRIPTTEXT_ISEXPRESSION 0x00000020")
86cpp_quote("#define SCRIPTTEXT_ISPERSISTENT 0x00000040")
87cpp_quote("#define SCRIPTTEXT_HOSTMANAGESSOURCE 0x00000080")
88cpp_quote("#define SCRIPTTEXT_ALL_FLAGS (SCRIPTTEXT_DELAYEXECUTION | \\")
89cpp_quote(" SCRIPTTEXT_ISVISIBLE | \\")
90cpp_quote(" SCRIPTTEXT_ISEXPRESSION | \\")
91cpp_quote(" SCRIPTTEXT_ISPERSISTENT | \\")
92cpp_quote(" SCRIPTTEXT_HOSTMANAGESSOURCE)")
93cpp_quote("#define SCRIPTPROC_HOSTMANAGESSOURCE 0x00000080")
94cpp_quote("#define SCRIPTPROC_IMPLICIT_THIS 0x00000100")
95cpp_quote("#define SCRIPTPROC_IMPLICIT_PARENTS 0x00000200")
96cpp_quote("#define SCRIPTPROC_ALL_FLAGS (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
97cpp_quote(" SCRIPTPROC_IMPLICIT_THIS | \\")
98cpp_quote(" SCRIPTPROC_IMPLICIT_PARENTS)")
99cpp_quote("#define SCRIPTINFO_IUNKNOWN 0x00000001")
100cpp_quote("#define SCRIPTINFO_ITYPEINFO 0x00000002")
101cpp_quote("#define SCRIPTINFO_ALL_FLAGS (SCRIPTINFO_IUNKNOWN | SCRIPTINFO_ITYPEINFO)")
102cpp_quote("#define SCRIPTINTERRUPT_DEBUG 0x00000001")
103cpp_quote("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
104cpp_quote("#define SCRIPTINTERRUPT_ALL_FLAGS (SCRIPTINTERRUPT_DEBUG | SCRIPTINTERRUPT_RAISEEXCEPTION)")
105cpp_quote("#define SCRIPTSTAT_STATEMENT_COUNT 1")
106cpp_quote("#define SCRIPTSTAT_INSTRUCTION_COUNT 2")
107cpp_quote("#define SCRIPTSTAT_INTSTRUCTION_TIME 3")
108cpp_quote("#define SCRIPTSTAT_TOTAL_TIME 4")
109
110[
111object,
112uuid(EAE1BA61-A4ED-11cf-8F20-00805F2CD064),
113pointer_default(unique)
114]
115interface IActiveScriptError : IUnknown
116{
117 HRESULT GetExceptionInfo(
118 [out] EXCEPINFO *pexcepinfo
119 );
120
121 HRESULT GetSourcePosition(
122 [out] DWORD *pdwSourceContext,
123 [out] ULONG *pulLineNumber,
124 [out] LONG *plCharacterPosition
125 );
126
127 HRESULT GetSourceLineText(
128 [out] BSTR *pbstrSourceLine
129 );
130}
131
132[
133object,
134uuid(DB01A1E3-A42B-11cf-8F20-00805F2CD064),
135pointer_default(unique)
136]
137interface IActiveScriptSite : IUnknown
138{
139 HRESULT GetLCID(
140 [out] LCID *plcid);
141
142 HRESULT GetItemInfo(
143 [in] LPCOLESTR pstrName,
144 [in] DWORD dwReturnMask,
145 [out] IUnknown **ppiunkItem,
146 [out] ITypeInfo **ppti
147 );
148
149 HRESULT GetDocVersionString(
150 [out] BSTR *pbstrVersion
151 );
152
153 HRESULT OnScriptTerminate(
154 [in] const VARIANT *pvarResult,
155 [in] const EXCEPINFO *pexcepinfo
156 );
157
158 HRESULT OnStateChange(
159 [in] SCRIPTSTATE ssScriptState
160 );
161
162 HRESULT OnScriptError(
163 [in] IActiveScriptError *pscripterror
164 );
165
166 HRESULT OnEnterScript(void);
167
168 HRESULT OnLeaveScript(void);
169}
170
171cpp_quote("typedef IActiveScriptSite *PIActiveScriptSite;")
172
173[
174object,
175uuid(D10F6761-83E9-11cf-8F20-00805F2CD064),
176pointer_default(unique)
177]
178interface IActiveScriptSiteWindow : IUnknown
179{
180 HRESULT GetWindow(
181 [out] HWND *phwnd
182 );
183
184 HRESULT EnableModeless(
185 [in] BOOL fEnable
186 );
187}
188
189[
190object,
191uuid(539698A0-CDCA-11CF-A5EB-00AA0047A063),
192pointer_default(unique)
193]
194interface IActiveScriptSiteInterruptPoll : IUnknown
195{
196 HRESULT QueryContinue();
197}
198
199[
200object,
201uuid(BB1A2AE1-A4F9-11cf-8F20-00805F2CD064),
202pointer_default(unique)
203]
204interface IActiveScript : IUnknown
205{
206 HRESULT SetScriptSite(
207 [in] IActiveScriptSite *pass
208 );
209
210 HRESULT GetScriptSite(
211 [in] REFIID riid,
212 [out, iid_is(riid)] void **ppvObject
213 );
214
215 HRESULT SetScriptState(
216 [in] SCRIPTSTATE ss
217 );
218
219 HRESULT GetScriptState(
220 [out] SCRIPTSTATE *pssState
221 );
222
223 HRESULT Close(void);
224
225 HRESULT AddNamedItem(
226 [in] LPCOLESTR pstrName,
227 [in] DWORD dwFlags
228 );
229
230 HRESULT AddTypeLib(
231 [in] REFGUID rguidTypeLib,
232 [in] DWORD dwMajor,
233 [in] DWORD dwMinor,
234 [in] DWORD dwFlags
235 );
236
237 HRESULT GetScriptDispatch(
238 [in] LPCOLESTR pstrItemName,
239 [out] IDispatch **ppdisp
240 );
241
242 HRESULT GetCurrentScriptThreadID(
243 [out] SCRIPTTHREADID *pstidThread
244 );
245
246 HRESULT GetScriptThreadID(
247 [in] DWORD dwWin32ThreadId,
248 [out] SCRIPTTHREADID *pstidThread
249 );
250
251 HRESULT GetScriptThreadState(
252 [in] SCRIPTTHREADID stidThread,
253 [out] SCRIPTTHREADSTATE *pstsState
254 );
255
256 HRESULT InterruptScriptThread(
257 [in] SCRIPTTHREADID stidThread,
258 [in] const EXCEPINFO *pexcepinfo,
259 [in] DWORD dwFlags
260 );
261
262 HRESULT Clone(
263 [out] IActiveScript **ppscript
264 );
265}
266
267cpp_quote("typedef IActiveScript *PIActiveScript;")
268
269[
270object,
271uuid(BB1A2AE2-A4F9-11cf-8F20-00805F2CD064),
272pointer_default(unique)
273]
Jacek Caban0194b8f2009-02-02 15:27:24 +0100274interface IActiveScriptParse32 : IUnknown
Kevin Koltzaue3e67042004-07-21 03:08:46 +0000275{
276 HRESULT InitNew(void);
277
278 HRESULT AddScriptlet(
279 [in] LPCOLESTR pstrDefaultName,
280 [in] LPCOLESTR pstrCode,
281 [in] LPCOLESTR pstrItemName,
282 [in] LPCOLESTR pstrSubItemName,
283 [in] LPCOLESTR pstrEventName,
284 [in] LPCOLESTR pstrDelimiter,
285 [in] DWORD dwSourceContextCookie,
286 [in] ULONG ulStartingLineNumber,
287 [in] DWORD dwFlags,
288 [out] BSTR *pbstrName,
289 [out] EXCEPINFO *pexcepinfo
290 );
291
292 HRESULT ParseScriptText(
293 [in] LPCOLESTR pstrCode,
294 [in] LPCOLESTR pstrItemName,
295 [in] IUnknown *punkContext,
296 [in] LPCOLESTR pstrDelimiter,
297 [in] DWORD dwSourceContextCookie,
298 [in] ULONG ulStartingLineNumber,
299 [in] DWORD dwFlags,
300 [out] VARIANT *pvarResult,
301 [out] EXCEPINFO *pexcepinfo
302 );
303}
304
Jacek Caban0194b8f2009-02-02 15:27:24 +0100305[
306 object,
307 uuid(c7ef7658-e1ee-480e-97ea-d52cb4d76d17),
308 pointer_default(unique)
309]
310interface IActiveScriptParse64 : IUnknown
311{
312 HRESULT InitNew(void);
313
314 HRESULT AddScriptlet(
315 [in] LPCOLESTR pstrDefaultName,
316 [in] LPCOLESTR pstrCode,
317 [in] LPCOLESTR pstrItemName,
318 [in] LPCOLESTR pstrSubItemName,
319 [in] LPCOLESTR pstrEventName,
320 [in] LPCOLESTR pstrDelimiter,
321 [in] DWORDLONG dwSourceContextCookie,
322 [in] ULONG ulStartingLineNumber,
323 [in] DWORD dwFlags,
324 [out] BSTR *pbstrName,
325 [out] EXCEPINFO *pexcepinfo
326 );
327
328 HRESULT ParseScriptText(
329 [in] LPCOLESTR pstrCode,
330 [in] LPCOLESTR pstrItemName,
331 [in] IUnknown *punkContext,
332 [in] LPCOLESTR pstrDelimiter,
333 [in] DWORDLONG dwSourceContextCookie,
334 [in] ULONG ulStartingLineNumber,
335 [in] DWORD dwFlags,
336 [out] VARIANT *pvarResult,
337 [out] EXCEPINFO *pexcepinfo
338 );
339}
340
341cpp_quote("#ifdef _WIN64")
342cpp_quote("#define IActiveScriptParse IActiveScriptParse64")
343cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse64")
344cpp_quote("#else")
345cpp_quote("#define IActiveScriptParse IActiveScriptParse32")
346cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse32")
347cpp_quote("#endif")
348
Kevin Koltzaue3e67042004-07-21 03:08:46 +0000349cpp_quote("typedef IActiveScriptParse *PIActiveScriptParse;")
350
351[
352object,
353uuid(1CFF0050-6FDD-11d0-9328-00A0C90DCAA9),
354pointer_default(unique)
355]
Jacek Caban2e29c7d2009-02-09 21:11:36 +0100356interface IActiveScriptParseProcedureOld32 : IUnknown
Kevin Koltzaue3e67042004-07-21 03:08:46 +0000357{
358 HRESULT ParseProcedureText(
359 [in] LPCOLESTR pstrCode,
360 [in] LPCOLESTR pstrFormalParams,
361 [in] LPCOLESTR pstrItemName,
362 [in] IUnknown *punkContext,
363 [in] LPCOLESTR pstrDelimiter,
364 [in] DWORD dwSourceContextCookie,
365 [in] ULONG ulStartingLineNumber,
366 [in] DWORD dwFlags,
367 [out] IDispatch **ppdisp
368 );
369}
370
371[
Jacek Caban2e29c7d2009-02-09 21:11:36 +0100372 object,
373 uuid(21f57128-08c9-4638-ba12-22d15d88dc5c),
374 pointer_default(unique)
375]
376interface IActiveScriptParseProcedureOld64 : IUnknown
377{
378 HRESULT ParseProcedureText(
379 [in] LPCOLESTR pstrCode,
380 [in] LPCOLESTR pstrFormalParams,
381 [in] LPCOLESTR pstrItemName,
382 [in] IUnknown *punkContext,
383 [in] LPCOLESTR pstrDelimiter,
384 [in] DWORDLONG dwSourceContextCookie,
385 [in] ULONG ulStartingLineNumber,
386 [in] DWORD dwFlags,
387 [out] IDispatch **ppdisp
388 );
389}
390
391cpp_quote("#ifdef _WIN64")
392cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld64")
393cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld64")
394cpp_quote("#else")
395cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld32")
396cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld32")
397cpp_quote("#endif")
398
399[
Kevin Koltzaue3e67042004-07-21 03:08:46 +0000400object,
401uuid(AA5B6A80-B834-11d0-932F-00A0C90DCAA9),
402pointer_default(unique)
403]
Jacek Caban2e29c7d2009-02-09 21:11:36 +0100404interface IActiveScriptParseProcedure32 : IUnknown
Kevin Koltzaue3e67042004-07-21 03:08:46 +0000405{
406 HRESULT ParseProcedureText(
407 [in] LPCOLESTR pstrCode,
408 [in] LPCOLESTR pstrFormalParams,
409 [in] LPCOLESTR pstrProcedureName,
410 [in] LPCOLESTR pstrItemName,
411 [in] IUnknown *punkContext,
412 [in] LPCOLESTR pstrDelimiter,
413 [in] DWORD dwSourceContextCookie,
414 [in] ULONG ulStartingLineNumber,
415 [in] DWORD dwFlags,
416 [out] IDispatch **ppdisp
417 );
418}
419
420[
Jacek Caban96219452008-03-21 13:02:30 +0100421 object,
Jacek Caban2e29c7d2009-02-09 21:11:36 +0100422 uuid(c64713b6-e029-4cc5-9200-438b72890b6a),
423 pointer_default(unique)
424]
425interface IActiveScriptParseProcedure64 : IUnknown
426{
427 HRESULT ParseProcedureText(
428 [in] LPCOLESTR pstrCode,
429 [in] LPCOLESTR pstrFormalParams,
430 [in] LPCOLESTR pstrProcedureName,
431 [in] LPCOLESTR pstrItemName,
432 [in] IUnknown *punkContext,
433 [in] LPCOLESTR pstrDelimiter,
434 [in] DWORDLONG dwSourceContextCookie,
435 [in] ULONG ulStartingLineNumber,
436 [in] DWORD dwFlags,
437 [out] IDispatch **ppdisp
438 );
439}
440
441cpp_quote("#ifdef _WIN64")
442cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure64")
443cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure64")
444cpp_quote("#else")
445cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure32")
446cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure32")
447cpp_quote("#endif")
448
449[
450 object,
Jacek Caban96219452008-03-21 13:02:30 +0100451 uuid(71ee5b20-fb04-11d1-b3a8-00a0c911e8b2),
452 pointer_default(unique)
453]
Jacek Caban2e29c7d2009-02-09 21:11:36 +0100454interface IActiveScriptParseProcedure2_32 : IActiveScriptParseProcedure32
Jacek Caban96219452008-03-21 13:02:30 +0100455{
456}
457
458[
Jacek Caban2e29c7d2009-02-09 21:11:36 +0100459 object,
460 uuid(fe7c4271-210c-448d-9f54-76dab7047b28),
461 pointer_default(unique)
462]
463interface IActiveScriptParseProcedure2_64 : IActiveScriptParseProcedure64
464{
465}
466
467cpp_quote("#ifdef _WIN64")
468cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_64")
469cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_64")
470cpp_quote("#else")
471cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_32")
472cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_32")
473cpp_quote("#endif")
474
475[
Kevin Koltzaue3e67042004-07-21 03:08:46 +0000476object,
477uuid(63CDBCB0-C1B1-11d0-9336-00A0C90DCAA9),
478pointer_default(unique)
479]
480interface IBindEventHandler : IUnknown
481{
482 HRESULT BindHandler(
483 [in] LPCOLESTR pstrEvent,
484 [in] IDispatch *pdisp
485 );
486}
487
488[
489object,
490uuid(B8DA6310-E19B-11d0-933C-00A0C90DCAA9),
491pointer_default(unique)
492]
493interface IActiveScriptStats : IUnknown
494{
495 HRESULT GetStat(
496 [in] DWORD stid,
497 [out] ULONG *pluHi,
498 [out] ULONG *pluLo
499 );
500
501 HRESULT GetStatEx(
502 [in] REFGUID guid,
503 [out] ULONG *pluHi,
504 [out] ULONG *pluLo
505 );
506
507 HRESULT ResetStats(void);
508}
Jacek Cabane553c562008-03-19 11:31:19 +0100509
510[
511 object,
512 uuid(4954e0d0-fbc7-11d1-8410-006008c3fbfc),
513 pointer_default(unique)
514]
515interface IActiveScriptProperty : IUnknown
516{
517 HRESULT GetProperty(
518 [in] DWORD dwProperty,
519 [in] VARIANT *pvarIndex,
520 [out] VARIANT *pvarValue);
521
522 HRESULT SetProperty(
523 [in] DWORD dwProperty,
524 [in] VARIANT *pvarIndex,
525 [in] VARIANT *pvarValue);
526}