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