1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XEventAttacher.idl,v $
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_XEventAttacher_idl__
31 #define __com_sun_star_script_XEventAttacher_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_lang_XEventListener_idl__
38 #include
<com
/sun
/star
/lang
/XEventListener.idl
>
41 #ifndef __com_sun_star_script_XAllListener_idl__
42 #include
<com
/sun
/star
/script
/XAllListener.idl
>
45 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
46 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
49 #ifndef __com_sun_star_beans_IntrospectionException_idl__
50 #include
<com
/sun
/star
/beans
/IntrospectionException.idl
>
53 #ifndef __com_sun_star_script_CannotCreateAdapterException_idl__
54 #include
<com
/sun
/star
/script
/CannotCreateAdapterException.idl
>
57 #ifndef __com_sun_star_lang_ServiceNotRegisteredException_idl__
58 #include
<com
/sun
/star
/lang
/ServiceNotRegisteredException.idl
>
62 //=============================================================================
64 module com
{ module sun
{ module star
{ module script
{
66 //=============================================================================
67 /** makes it possible to attach script events given by a sequence of
68 <type>ScriptEventDescriptor</type> structures to a given interface.
70 published
interface XEventAttacher
: com
::sun
::star
::uno
::XInterface
72 //-------------------------------------------------------------------------
73 /** registers the given "AllListener" object as a listener at the
74 given interface by creating a suitable listener adapter and
75 calling the "addListener" method corresponding to the
78 com
::sun
::star
::lang
::XEventListener attachListener
( [in] com
::sun
::star
::uno
::XInterface xTarget
,
79 [in] com
::sun
::star
::script
::XAllListener xAllListener
,
81 [in] string aListenerType
,
82 [in] string aAddListenerParam
)
83 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
84 com
::sun
::star
::beans
::IntrospectionException
,
85 com
::sun
::star
::script
::CannotCreateAdapterException
,
86 com
::sun
::star
::lang
::ServiceNotRegisteredException
);
88 //-------------------------------------------------------------------------
89 /** registers an object as a listener at the given interface by
90 creating a suitable listener adapter and calling the method
91 which corresponds to the listener type.
93 <p>Only the event corresponding to the given event method
94 will be delegated to <var>xAllListener</var>.</p>
96 com
::sun
::star
::lang
::XEventListener attachSingleEventListener
( [in] com
::sun
::star
::uno
::XInterface xTarget
,
97 [in] com
::sun
::star
::script
::XAllListener xAllListener
,
99 [in] string aListenerType
,
100 [in] string aAddListenerParam
,
101 [in] string aEventMethod
)
102 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
103 com
::sun
::star
::beans
::IntrospectionException
,
104 com
::sun
::star
::script
::CannotCreateAdapterException
,
105 com
::sun
::star
::lang
::ServiceNotRegisteredException
);
107 //-------------------------------------------------------------------------
108 /** removes a listener object as a listener from the given interface.
110 <p> This method can and should be used as a contrary method
111 to the two attach methods.</p>
113 void removeListener
( [in] com
::sun
::star
::uno
::XInterface xTarget
,
114 [in] string aListenerType
,
115 [in] string aRemoveListenerParam
,
116 [in] com
::sun
::star
::lang
::XEventListener xToRemoveListener
)
117 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
118 com
::sun
::star
::beans
::IntrospectionException
);
122 //=============================================================================