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_XEventAttacher_idl__
20 #define __com_sun_star_script_XEventAttacher_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/lang
/XEventListener.idl
>
26 #include
<com
/sun
/star
/script
/XAllListener.idl
>
28 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
30 #include
<com
/sun
/star
/beans
/IntrospectionException.idl
>
32 #include
<com
/sun
/star
/script
/CannotCreateAdapterException.idl
>
34 #include
<com
/sun
/star
/lang
/ServiceNotRegisteredException.idl
>
38 module com
{ module sun
{ module star
{ module script
{
40 /** makes it possible to attach script events given by a sequence of
41 ScriptEventDescriptor structures to a given interface.
43 published
interface XEventAttacher
: com
::sun
::star
::uno
::XInterface
45 /** registers the given "AllListener" object as a listener at the
46 given interface by creating a suitable listener adapter and
47 calling the "addListener" method corresponding to the
50 com
::sun
::star
::lang
::XEventListener attachListener
( [in] com
::sun
::star
::uno
::XInterface xTarget
,
51 [in] com
::sun
::star
::script
::XAllListener xAllListener
,
53 [in] string aListenerType
,
54 [in] string aAddListenerParam
)
55 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
56 com
::sun
::star
::beans
::IntrospectionException
,
57 com
::sun
::star
::script
::CannotCreateAdapterException
,
58 com
::sun
::star
::lang
::ServiceNotRegisteredException
);
60 /** registers an object as a listener at the given interface by
61 creating a suitable listener adapter and calling the method
62 which corresponds to the listener type.
64 <p>Only the event corresponding to the given event method
65 will be delegated to <var>xAllListener</var>.</p>
67 com
::sun
::star
::lang
::XEventListener attachSingleEventListener
( [in] com
::sun
::star
::uno
::XInterface xTarget
,
68 [in] com
::sun
::star
::script
::XAllListener xAllListener
,
70 [in] string aListenerType
,
71 [in] string aAddListenerParam
,
72 [in] string aEventMethod
)
73 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
74 com
::sun
::star
::beans
::IntrospectionException
,
75 com
::sun
::star
::script
::CannotCreateAdapterException
,
76 com
::sun
::star
::lang
::ServiceNotRegisteredException
);
78 /** removes a listener object as a listener from the given interface.
80 <p> This method can and should be used as a contrary method
81 to the two attach methods.</p>
83 void removeListener
( [in] com
::sun
::star
::uno
::XInterface xTarget
,
84 [in] string aListenerType
,
85 [in] string aRemoveListenerParam
,
86 [in] com
::sun
::star
::lang
::XEventListener xToRemoveListener
)
87 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
88 com
::sun
::star
::beans
::IntrospectionException
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */