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 .
22 module com
{ module sun
{ module star
{ module script
{
24 /** makes it possible to control a scripting engine.
27 published
interface XEngine
: com
::sun
::star
::uno
::XInterface
29 /** sets an interface to an object as a scripting root.
31 <p>If the root object implements the XInvocation interface,
32 then the engine uses this interface to set/get properties and
36 void setRoot
( [in] com
::sun
::star
::uno
::XInterface xRoot
);
38 /** gets an interface to the object which is the scripting root.
40 com
::sun
::star
::uno
::XInterface getRoot
();
42 /** sets an access object to get external functions.
44 void setLibraryAccess
( [in] com
::sun
::star
::script
::XLibraryAccess
Library );
46 /** compiles a script module in the scope of the root object.
48 boolean compile
( [in] string ModuleName
,
50 [in] boolean CreateDebugInfo
);
52 /** runs a script specified by a string.
54 <p>The arguments given in <var>aArgs</var> can be ignored by
55 the engine. The Script is executed synchronously.</p>
57 any run
( [in] string aScript
,
58 [in] com
::sun
::star
::uno
::XInterface xThis
,
59 [in] sequence
<any
> aArgs
);
61 /** runs the script specified by a string and makes callbacks.
63 <p>The arguments given in <var>aArgs</var> can be ignored by
64 the engine. The script is executed asynchronously.
68 void runAsync
( [in] string acript
,
69 [in] com
::sun
::star
::uno
::XInterface xThis
,
70 [in] sequence
<any
> args
,
71 [in] com
::sun
::star
::script
::XEngineListener xCallback
);
73 /** terminates the execution of the running script.
75 <p>The waiting queue is cleared too.</p>
79 /** adds an engine listener.
81 <p>It is suggested to allow multiple registration of the same listener,
82 thus for each time a listener is added, it has to be removed.
84 void addEngineListener
( [in] com
::sun
::star
::script
::XEngineListener Listener
);
86 /** removes an engine listener.
88 <p>It is suggested to allow multiple registration of the same listener,
89 thus for each time a listener is added, it has to be removed.
91 void removeEngineListener
( [in] com
::sun
::star
::script
::XEngineListener Listener
);
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */