update dev300-m58
[ooovba.git] / udkapi / com / sun / star / script / XEngine.idl
blob4ff54b928ca3c09a373ec3fba66bd7c2ca0fd700
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XEngine.idl,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_script_XEngine_idl__
31 #define __com_sun_star_script_XEngine_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_script_XLibraryAccess_idl__
38 #include <com/sun/star/script/XLibraryAccess.idl>
39 #endif
41 #ifndef __com_sun_star_script_XEngineListener_idl__
42 #include <com/sun/star/script/XEngineListener.idl>
43 #endif
46 //=============================================================================
48 module com { module sun { module star { module script {
50 //=============================================================================
51 /** makes it possible to control a scripting engine.
52 @deprecated
54 published interface XEngine: com::sun::star::uno::XInterface
56 //-------------------------------------------------------------------------
57 /** sets an interface to an object as a scripting root.
59 <p>If the root object implements the XInvocation interface,
60 then the engine uses this interface to set/get properties and
61 call methods.
62 </p>
64 void setRoot( [in] com::sun::star::uno::XInterface xRoot );
66 //-------------------------------------------------------------------------
67 /** gets an interface to the object which is the scripting root.
69 com::sun::star::uno::XInterface getRoot();
71 //-------------------------------------------------------------------------
72 /** sets an access object to get external functions.
74 void setLibraryAccess( [in] com::sun::star::script::XLibraryAccess Library );
76 //-------------------------------------------------------------------------
77 /** compiles a script module in the scope of the root object.
79 boolean compile( [in] string ModuleName,
80 [in] string Script,
81 [in] boolean CreateDebugInfo );
83 //-------------------------------------------------------------------------
84 /** runs a script specified by a string.
86 <p>The arguments given in <var>aArgs</var> can be ignored by
87 the engine. The Script is executed synchronously.</p>
89 any run( [in] string aScript,
90 [in] com::sun::star::uno::XInterface xThis,
91 [in] sequence<any> aArgs );
93 //-------------------------------------------------------------------------
94 /** runs the script specified by a string and makes callbacks.
96 <p>The arguments given in <var>aArgs</var> can be ignored by
97 the engine. The script is executed asynchronously.
99 </p>
101 void runAsync( [in] string acript,
102 [in] com::sun::star::uno::XInterface xThis,
103 [in] sequence<any> args,
104 [in] com::sun::star::script::XEngineListener xCallback );
106 //-------------------------------------------------------------------------
107 /** terminates the execution of the running script.
109 <p>The waiting queue is cleared too.</p>
111 void cancel();
113 //-------------------------------------------------------------------------
114 /** adds an engine listener.
116 <p>It is suggested to allow multiple registration of the same listener,
117 thus for each time a listener is added, it has to be removed.
119 void addEngineListener( [in] com::sun::star::script::XEngineListener Listener );
121 //-------------------------------------------------------------------------
122 /** removes an engine listener.
124 <p>It is suggested to allow multiple registration of the same listener,
125 thus for each time a listener is added, it has to be removed.
127 void removeEngineListener( [in] com::sun::star::script::XEngineListener Listener );
131 //=============================================================================
133 }; }; }; };
135 #endif