1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_script_XEngine_idl__
20 #define __com_sun_star_script_XEngine_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/script
/XLibraryAccess.idl
>
26 #include
<com
/sun
/star
/script
/XEngineListener.idl
>
30 module com
{ module sun
{ module star
{ module script
{
32 /** makes it possible to control a scripting engine.
35 published
interface XEngine
: com
::sun
::star
::uno
::XInterface
37 /** sets an interface to an object as a scripting root.
39 <p>If the root object implements the XInvocation interface,
40 then the engine uses this interface to set/get properties and
44 void setRoot
( [in] com
::sun
::star
::uno
::XInterface xRoot
);
46 /** gets an interface to the object which is the scripting root.
48 com
::sun
::star
::uno
::XInterface getRoot
();
50 /** sets an access object to get external functions.
52 void setLibraryAccess
( [in] com
::sun
::star
::script
::XLibraryAccess
Library );
54 /** compiles a script module in the scope of the root object.
56 boolean compile
( [in] string ModuleName
,
58 [in] boolean CreateDebugInfo
);
60 /** runs a script specified by a string.
62 <p>The arguments given in <var>aArgs</var> can be ignored by
63 the engine. The Script is executed synchronously.</p>
65 any run
( [in] string aScript
,
66 [in] com
::sun
::star
::uno
::XInterface xThis
,
67 [in] sequence
<any
> aArgs
);
69 /** runs the script specified by a string and makes callbacks.
71 <p>The arguments given in <var>aArgs</var> can be ignored by
72 the engine. The script is executed asynchronously.
76 void runAsync
( [in] string acript
,
77 [in] com
::sun
::star
::uno
::XInterface xThis
,
78 [in] sequence
<any
> args
,
79 [in] com
::sun
::star
::script
::XEngineListener xCallback
);
81 /** terminates the execution of the running script.
83 <p>The waiting queue is cleared too.</p>
87 /** adds an engine listener.
89 <p>It is suggested to allow multiple registration of the same listener,
90 thus for each time a listener is added, it has to be removed.
92 void addEngineListener
( [in] com
::sun
::star
::script
::XEngineListener Listener
);
94 /** removes an engine listener.
96 <p>It is suggested to allow multiple registration of the same listener,
97 thus for each time a listener is added, it has to be removed.
99 void removeEngineListener
( [in] com
::sun
::star
::script
::XEngineListener Listener
);
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */