1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_script_XEngine_idl__
28 #define __com_sun_star_script_XEngine_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_script_XLibraryAccess_idl__
35 #include
<com
/sun
/star
/script
/XLibraryAccess.idl
>
38 #ifndef __com_sun_star_script_XEngineListener_idl__
39 #include
<com
/sun
/star
/script
/XEngineListener.idl
>
43 //=============================================================================
45 module com
{ module sun
{ module star
{ module script
{
47 //=============================================================================
48 /** makes it possible to control a scripting engine.
51 published
interface XEngine
: com
::sun
::star
::uno
::XInterface
53 //-------------------------------------------------------------------------
54 /** sets an interface to an object as a scripting root.
56 <p>If the root object implements the XInvocation interface,
57 then the engine uses this interface to set/get properties and
61 void setRoot
( [in] com
::sun
::star
::uno
::XInterface xRoot
);
63 //-------------------------------------------------------------------------
64 /** gets an interface to the object which is the scripting root.
66 com
::sun
::star
::uno
::XInterface getRoot
();
68 //-------------------------------------------------------------------------
69 /** sets an access object to get external functions.
71 void setLibraryAccess
( [in] com
::sun
::star
::script
::XLibraryAccess
Library );
73 //-------------------------------------------------------------------------
74 /** compiles a script module in the scope of the root object.
76 boolean compile
( [in] string ModuleName
,
78 [in] boolean CreateDebugInfo
);
80 //-------------------------------------------------------------------------
81 /** runs a script specified by a string.
83 <p>The arguments given in <var>aArgs</var> can be ignored by
84 the engine. The Script is executed synchronously.</p>
86 any run
( [in] string aScript
,
87 [in] com
::sun
::star
::uno
::XInterface xThis
,
88 [in] sequence
<any
> aArgs
);
90 //-------------------------------------------------------------------------
91 /** runs the script specified by a string and makes callbacks.
93 <p>The arguments given in <var>aArgs</var> can be ignored by
94 the engine. The script is executed asynchronously.
98 void runAsync
( [in] string acript
,
99 [in] com
::sun
::star
::uno
::XInterface xThis
,
100 [in] sequence
<any
> args
,
101 [in] com
::sun
::star
::script
::XEngineListener xCallback
);
103 //-------------------------------------------------------------------------
104 /** terminates the execution of the running script.
106 <p>The waiting queue is cleared too.</p>
110 //-------------------------------------------------------------------------
111 /** adds an engine listener.
113 <p>It is suggested to allow multiple registration of the same listener,
114 thus for each time a listener is added, it has to be removed.
116 void addEngineListener
( [in] com
::sun
::star
::script
::XEngineListener Listener
);
118 //-------------------------------------------------------------------------
119 /** removes an engine listener.
121 <p>It is suggested to allow multiple registration of the same listener,
122 thus for each time a listener is added, it has to be removed.
124 void removeEngineListener
( [in] com
::sun
::star
::script
::XEngineListener Listener
);
128 //=============================================================================