richedit: Missing capitalization on TxGetScrollBars.
[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 cpp_quote("#ifndef _NO_SCRIPT_GUIDS")
26
27 cpp_quote("DEFINE_GUID(CATID_ActiveScript,       0xf0b7a1a1,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
28 cpp_quote("DEFINE_GUID(CATID_ActiveScriptParse,  0xf0b7a1a2,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
29 cpp_quote("DEFINE_GUID(CATID_ActiveScriptEncode, 0xf0b7a1a3,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
30
31 cpp_quote("#endif")
32
33 cpp_quote("#define SCRIPTPROP_NAME                   0x00000000")
34 cpp_quote("#define SCRIPTPROP_MAJORVERSION           0x00000001")
35 cpp_quote("#define SCRIPTPROP_MINORVERSION           0x00000002")
36 cpp_quote("#define SCRIPTPROP_BUILDNUMBER            0x00000003")
37 cpp_quote("#define SCRIPTPROP_DELAYEDEVENTSINKING    0x00001000")
38 cpp_quote("#define SCRIPTPROP_CATCHEXCEPTION         0x00001001")
39 cpp_quote("#define SCRIPTPROP_CONVERSIONLCID         0x00001002")
40 cpp_quote("#define SCRIPTPROP_HOSTSTACKREQUIRED      0x00001003")
41 cpp_quote("#define SCRIPTPROP_DEBUGGER               0x00001100")
42 cpp_quote("#define SCRIPTPROP_JITDEBUG               0x00001101")
43 cpp_quote("#define SCRIPTPROP_HACK_FIBERSUPPORT      0x70000000")
44 cpp_quote("#define SCRIPTPROP_HACK_TRIDENTEVENTSINK  0x70000001")
45  
46 typedef enum tagSCRIPTSTATE {
47     SCRIPTSTATE_UNINITIALIZED = 0,
48     SCRIPTSTATE_STARTED       = 1,
49     SCRIPTSTATE_CONNECTED     = 2,
50     SCRIPTSTATE_DISCONNECTED  = 3,
51     SCRIPTSTATE_CLOSED        = 4,
52     SCRIPTSTATE_INITIALIZED   = 5
53 } SCRIPTSTATE;
54
55 typedef enum tagSCRIPTTHREADSTATE {
56     SCRIPTTHREADSTATE_NOTINSCRIPT = 0,
57     SCRIPTTHREADSTATE_RUNNING     = 1
58 } SCRIPTTHREADSTATE;
59
60 typedef DWORD SCRIPTTHREADID;
61 cpp_quote("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
62 cpp_quote("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
63 cpp_quote("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
64
65 cpp_quote("#define SCRIPTITEM_ISVISIBLE           0x00000002")
66 cpp_quote("#define SCRIPTITEM_ISSOURCE            0x00000004")
67 cpp_quote("#define SCRIPTITEM_GLOBALMEMBERS       0x00000008")
68 cpp_quote("#define SCRIPTITEM_ISPERSISTENT        0x00000040")
69 cpp_quote("#define SCRIPTITEM_CODEONLY            0x00000200")
70 cpp_quote("#define SCRIPTITEM_NOCODE              0x00000400")
71 cpp_quote("#define SCRIPTITEM_ALL_FLAGS           (SCRIPTITEM_ISSOURCE | \\")
72 cpp_quote("                                        SCRIPTITEM_ISVISIBLE | \\")
73 cpp_quote("                                        SCRIPTITEM_ISPERSISTENT | \\")
74 cpp_quote("                                        SCRIPTITEM_GLOBALMEMBERS | \\")
75 cpp_quote("                                        SCRIPTITEM_NOCODE | \\")
76 cpp_quote("                                        SCRIPTITEM_CODEONLY)")
77 cpp_quote("#define SCRIPTTYPELIB_ISCONTROL        0x00000010")
78 cpp_quote("#define SCRIPTTYPELIB_ISPERSISTENT     0x00000040")
79 cpp_quote("#define SCRIPTTYPELIB_ALL_FLAGS        (SCRIPTTEXT_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
80 cpp_quote("#define SCRIPTTEXT_DELAYEXECUTION      0x00000001")
81 cpp_quote("#define SCRIPTTEXT_ISVISIBLE           0x00000002")
82 cpp_quote("#define SCRIPTTEXT_ISEXPRESSION        0x00000020")
83 cpp_quote("#define SCRIPTTEXT_ISPERSISTENT        0x00000040")
84 cpp_quote("#define SCRIPTTEXT_HOSTMANAGESSOURCE   0x00000080")
85 cpp_quote("#define SCRIPTTEXT_ALL_FLAGS           (SCRIPTTEXT_DELAYEXECUTION | \\")
86 cpp_quote("                                        SCRIPTTEXT_ISVISIBLE | \\")
87 cpp_quote("                                        SCRIPTTEXT_ISEXPRESSION | \\")
88 cpp_quote("                                        SCRIPTTEXT_ISPERSISTENT | \\")
89 cpp_quote("                                        SCRIPTTEXT_HOSTMANAGESSOURCE)")
90 cpp_quote("#define SCRIPTPROC_HOSTMANAGESSOURCE   0x00000080")
91 cpp_quote("#define SCRIPTPROC_IMPLICIT_THIS       0x00000100")
92 cpp_quote("#define SCRIPTPROC_IMPLICIT_PARENTS    0x00000200")
93 cpp_quote("#define SCRIPTPROC_ALL_FLAGS           (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
94 cpp_quote("                                        SCRIPTPROC_IMPLICIT_THIS | \\")
95 cpp_quote("                                        SCRIPTPROC_IMPLICIT_PARENTS)")
96 cpp_quote("#define SCRIPTINFO_IUNKNOWN            0x00000001")
97 cpp_quote("#define SCRIPTINFO_ITYPEINFO           0x00000002")
98 cpp_quote("#define SCRIPTINFO_ALL_FLAGS           (SCRIPTINFO_IUNKNOWN | SCRIPTINFO_ITYPEINFO)")
99 cpp_quote("#define SCRIPTINTERRUPT_DEBUG          0x00000001")
100 cpp_quote("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
101 cpp_quote("#define SCRIPTINTERRUPT_ALL_FLAGS      (SCRIPTINTERRUPT_DEBUG | SCRIPTINTERRUPT_RAISEEXCEPTION)")
102 cpp_quote("#define SCRIPTSTAT_STATEMENT_COUNT      1")
103 cpp_quote("#define SCRIPTSTAT_INSTRUCTION_COUNT    2")
104 cpp_quote("#define SCRIPTSTAT_INTSTRUCTION_TIME    3")
105 cpp_quote("#define SCRIPTSTAT_TOTAL_TIME           4")
106
107 [
108 object,
109 uuid(EAE1BA61-A4ED-11cf-8F20-00805F2CD064),
110 pointer_default(unique)
111 ]
112 interface IActiveScriptError : IUnknown
113 {
114     HRESULT GetExceptionInfo(
115             [out] EXCEPINFO *pexcepinfo
116     );
117     
118     HRESULT GetSourcePosition(
119             [out] DWORD *pdwSourceContext,
120             [out] ULONG *pulLineNumber,
121             [out] LONG *plCharacterPosition
122     );
123     
124     HRESULT GetSourceLineText(
125             [out] BSTR *pbstrSourceLine
126     );
127 }
128
129 [
130 object,
131 uuid(DB01A1E3-A42B-11cf-8F20-00805F2CD064),
132 pointer_default(unique)
133 ]
134 interface IActiveScriptSite : IUnknown
135 {
136     HRESULT GetLCID(
137             [out] LCID *plcid);
138     
139     HRESULT GetItemInfo(
140             [in] LPCOLESTR pstrName,
141             [in] DWORD dwReturnMask,
142             [out] IUnknown **ppiunkItem,
143             [out] ITypeInfo **ppti
144     );
145     
146     HRESULT GetDocVersionString(
147             [out] BSTR *pbstrVersion
148     );
149     
150     HRESULT OnScriptTerminate(
151             [in] const VARIANT *pvarResult,
152             [in] const EXCEPINFO *pexcepinfo
153     );
154     
155     HRESULT OnStateChange(
156             [in] SCRIPTSTATE ssScriptState
157     );
158     
159     HRESULT OnScriptError(
160             [in] IActiveScriptError *pscripterror
161     );
162     
163     HRESULT OnEnterScript(void);
164     
165     HRESULT OnLeaveScript(void);
166 }
167
168 cpp_quote("typedef IActiveScriptSite *PIActiveScriptSite;")
169
170 [
171 object,
172 uuid(D10F6761-83E9-11cf-8F20-00805F2CD064),
173 pointer_default(unique)
174 ]
175 interface IActiveScriptSiteWindow : IUnknown
176 {
177     HRESULT GetWindow(
178             [out] HWND *phwnd
179     );
180
181     HRESULT EnableModeless(
182             [in] BOOL fEnable
183     );
184 }
185
186 [
187 object,
188 uuid(539698A0-CDCA-11CF-A5EB-00AA0047A063),
189 pointer_default(unique)
190 ]
191 interface IActiveScriptSiteInterruptPoll : IUnknown
192 {
193     HRESULT QueryContinue();
194 }
195
196 [
197 object,
198 uuid(BB1A2AE1-A4F9-11cf-8F20-00805F2CD064),
199 pointer_default(unique)
200 ]
201 interface IActiveScript : IUnknown
202 {
203     HRESULT SetScriptSite(
204             [in] IActiveScriptSite *pass
205     );
206
207     HRESULT GetScriptSite(
208             [in] REFIID riid,
209             [out, iid_is(riid)] void **ppvObject
210     );
211
212     HRESULT SetScriptState(
213             [in] SCRIPTSTATE ss
214     );
215
216     HRESULT GetScriptState(
217             [out] SCRIPTSTATE *pssState
218     );
219
220     HRESULT Close(void);
221
222     HRESULT AddNamedItem(
223             [in] LPCOLESTR pstrName,
224             [in] DWORD dwFlags
225     );
226
227     HRESULT AddTypeLib(
228             [in] REFGUID rguidTypeLib,
229             [in] DWORD dwMajor,
230             [in] DWORD dwMinor,
231             [in] DWORD dwFlags
232     );
233
234     HRESULT GetScriptDispatch(
235             [in] LPCOLESTR pstrItemName,
236             [out] IDispatch **ppdisp
237     );
238
239     HRESULT GetCurrentScriptThreadID(
240             [out] SCRIPTTHREADID *pstidThread
241     );
242
243     HRESULT GetScriptThreadID(
244             [in] DWORD dwWin32ThreadId,
245             [out] SCRIPTTHREADID *pstidThread
246     );
247
248     HRESULT GetScriptThreadState(
249             [in] SCRIPTTHREADID stidThread,
250             [out] SCRIPTTHREADSTATE *pstsState
251     );
252
253     HRESULT InterruptScriptThread(
254             [in] SCRIPTTHREADID stidThread,
255             [in] const EXCEPINFO *pexcepinfo,
256             [in] DWORD dwFlags
257     );
258
259     HRESULT Clone(
260             [out] IActiveScript **ppscript
261     );
262 }
263
264 cpp_quote("typedef IActiveScript *PIActiveScript;")
265
266 [
267 object,
268 uuid(BB1A2AE2-A4F9-11cf-8F20-00805F2CD064),
269 pointer_default(unique)
270 ]
271 interface IActiveScriptParse : IUnknown
272 {
273     HRESULT InitNew(void);
274
275     HRESULT AddScriptlet(
276             [in] LPCOLESTR pstrDefaultName,
277             [in] LPCOLESTR pstrCode,
278             [in] LPCOLESTR pstrItemName,
279             [in] LPCOLESTR pstrSubItemName,
280             [in] LPCOLESTR pstrEventName,
281             [in] LPCOLESTR pstrDelimiter,
282             [in] DWORD dwSourceContextCookie,
283             [in] ULONG ulStartingLineNumber,
284             [in] DWORD dwFlags,
285             [out] BSTR *pbstrName,
286             [out] EXCEPINFO *pexcepinfo
287     );
288
289     HRESULT ParseScriptText(
290             [in] LPCOLESTR pstrCode,
291             [in] LPCOLESTR pstrItemName,
292             [in] IUnknown *punkContext,
293             [in] LPCOLESTR pstrDelimiter,
294             [in] DWORD dwSourceContextCookie,
295             [in] ULONG ulStartingLineNumber,
296             [in] DWORD dwFlags,
297             [out] VARIANT *pvarResult,
298             [out] EXCEPINFO *pexcepinfo
299     );
300 }
301
302 cpp_quote("typedef IActiveScriptParse *PIActiveScriptParse;")
303
304 [
305 object,
306 uuid(1CFF0050-6FDD-11d0-9328-00A0C90DCAA9),
307 pointer_default(unique)
308 ]
309 interface IActiveScriptParseProcedureOld : IUnknown
310 {
311     HRESULT ParseProcedureText(
312             [in] LPCOLESTR pstrCode,
313             [in] LPCOLESTR pstrFormalParams,
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(AA5B6A80-B834-11d0-932F-00A0C90DCAA9),
327 pointer_default(unique)
328 ]
329 interface IActiveScriptParseProcedure : IUnknown
330 {
331     HRESULT ParseProcedureText(
332             [in] LPCOLESTR pstrCode,
333             [in] LPCOLESTR pstrFormalParams,
334             [in] LPCOLESTR pstrProcedureName,
335             [in] LPCOLESTR pstrItemName,
336             [in] IUnknown *punkContext,
337             [in] LPCOLESTR pstrDelimiter,
338             [in] DWORD dwSourceContextCookie,
339             [in] ULONG ulStartingLineNumber,
340             [in] DWORD dwFlags,
341             [out] IDispatch **ppdisp
342     );
343 }
344
345 [
346     object,
347     uuid(71ee5b20-fb04-11d1-b3a8-00a0c911e8b2),
348     pointer_default(unique)
349 ]
350 interface IActiveScriptParseProcedure2 : IActiveScriptParseProcedure
351 {
352 }
353
354 [
355 object,
356 uuid(63CDBCB0-C1B1-11d0-9336-00A0C90DCAA9),
357 pointer_default(unique)
358 ]
359 interface IBindEventHandler : IUnknown
360 {
361     HRESULT BindHandler(
362             [in] LPCOLESTR pstrEvent,
363             [in] IDispatch *pdisp
364     );
365 }
366
367 [
368 object,
369 uuid(B8DA6310-E19B-11d0-933C-00A0C90DCAA9),
370 pointer_default(unique)
371 ]
372 interface IActiveScriptStats : IUnknown
373 {
374     HRESULT GetStat(
375             [in] DWORD stid,
376             [out] ULONG *pluHi,
377             [out] ULONG *pluLo
378     );
379
380     HRESULT GetStatEx(
381             [in] REFGUID guid,
382             [out] ULONG *pluHi,
383             [out] ULONG *pluLo
384     );
385
386     HRESULT ResetStats(void);
387 }
388
389 [
390     object,
391     uuid(4954e0d0-fbc7-11d1-8410-006008c3fbfc),
392     pointer_default(unique)
393 ]
394 interface IActiveScriptProperty : IUnknown
395 {
396     HRESULT GetProperty(
397             [in] DWORD dwProperty,
398             [in] VARIANT *pvarIndex,
399             [out] VARIANT *pvarValue);
400
401     HRESULT SetProperty(
402             [in] DWORD dwProperty,
403             [in] VARIANT *pvarIndex,
404             [in] VARIANT *pvarValue);
405 }