merged tag ooo/OOO330_m14
[LibreOffice.git] / udkapi / com / sun / star / script / XEventAttacher.idl
blob7acc672af968ed0cfec3f847dada0e257d95dbb4
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_XEventAttacher_idl__
28 #define __com_sun_star_script_XEventAttacher_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_lang_XEventListener_idl__
35 #include <com/sun/star/lang/XEventListener.idl>
36 #endif
38 #ifndef __com_sun_star_script_XAllListener_idl__
39 #include <com/sun/star/script/XAllListener.idl>
40 #endif
42 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43 #include <com/sun/star/lang/IllegalArgumentException.idl>
44 #endif
46 #ifndef __com_sun_star_beans_IntrospectionException_idl__
47 #include <com/sun/star/beans/IntrospectionException.idl>
48 #endif
50 #ifndef __com_sun_star_script_CannotCreateAdapterException_idl__
51 #include <com/sun/star/script/CannotCreateAdapterException.idl>
52 #endif
54 #ifndef __com_sun_star_lang_ServiceNotRegisteredException_idl__
55 #include <com/sun/star/lang/ServiceNotRegisteredException.idl>
56 #endif
59 //=============================================================================
61 module com { module sun { module star { module script {
63 //=============================================================================
64 /** makes it possible to attach script events given by a sequence of
65 <type>ScriptEventDescriptor</type> structures to a given interface.
67 published interface XEventAttacher: com::sun::star::uno::XInterface
69 //-------------------------------------------------------------------------
70 /** registers the given "AllListener" object as a listener at the
71 given interface by creating a suitable listener adapter and
72 calling the "addListener" method corresponding to the
73 "ListenerType".
75 com::sun::star::lang::XEventListener attachListener( [in] com::sun::star::uno::XInterface xTarget,
76 [in] com::sun::star::script::XAllListener xAllListener,
77 [in] any aHelper,
78 [in] string aListenerType,
79 [in] string aAddListenerParam )
80 raises( com::sun::star::lang::IllegalArgumentException,
81 com::sun::star::beans::IntrospectionException,
82 com::sun::star::script::CannotCreateAdapterException,
83 com::sun::star::lang::ServiceNotRegisteredException );
85 //-------------------------------------------------------------------------
86 /** registers an object as a listener at the given interface by
87 creating a suitable listener adapter and calling the method
88 which corresponds to the listener type.
90 <p>Only the event corresponding to the given event method
91 will be delegated to <var>xAllListener</var>.</p>
93 com::sun::star::lang::XEventListener attachSingleEventListener( [in] com::sun::star::uno::XInterface xTarget,
94 [in] com::sun::star::script::XAllListener xAllListener,
95 [in] any aHelper,
96 [in] string aListenerType,
97 [in] string aAddListenerParam,
98 [in] string aEventMethod )
99 raises( com::sun::star::lang::IllegalArgumentException,
100 com::sun::star::beans::IntrospectionException,
101 com::sun::star::script::CannotCreateAdapterException,
102 com::sun::star::lang::ServiceNotRegisteredException );
104 //-------------------------------------------------------------------------
105 /** removes a listener object as a listener from the given interface.
107 <p> This method can and should be used as a contrary method
108 to the two attach methods.</p>
110 void removeListener( [in] com::sun::star::uno::XInterface xTarget,
111 [in] string aListenerType,
112 [in] string aRemoveListenerParam,
113 [in] com::sun::star::lang::XEventListener xToRemoveListener )
114 raises( com::sun::star::lang::IllegalArgumentException,
115 com::sun::star::beans::IntrospectionException );
119 //=============================================================================
121 }; }; }; };
123 #endif