fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / udkapi / com / sun / star / script / XEventAttacherManager.idl
blob46793bdef7755ea494b603452ead2ae4e71a3042
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_XEventAttacherManager_idl__
20 #define __com_sun_star_script_XEventAttacherManager_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/script/ScriptEventDescriptor.idl>
26 #include <com/sun/star/lang/IllegalArgumentException.idl>
28 #include <com/sun/star/lang/ServiceNotRegisteredException.idl>
30 #include <com/sun/star/script/XScriptListener.idl>
34 module com { module sun { module star { module script {
36 /** registers listeners for specified events.
38 published interface XEventAttacherManager: com::sun::star::uno::XInterface
40 /** registers one event for an object identified by its index.
42 <p>If any object is attached under this index, then this
43 event is attached automatically.</p>
44 <p>Exceptions of type
45 com::sun::star::beans::IntrospectionException and
46 com::sun::star::script::CannotCreateAdapterException
47 that can be thrown by methods of XEventAttacher are caught
48 and ignored.</p>
50 void registerScriptEvent( [in] long nIndex,
51 [in] com::sun::star::script::ScriptEventDescriptor aScriptEvent )
52 raises( com::sun::star::lang::IllegalArgumentException );
54 /** registers several events for an object identified by its index.
56 <p>The result is the same as if the method registerScriptEvent()
57 was called once for each ScriptEventDescriptor
58 in the sequence.</p>
60 <p>If any object is attached under this index, then this
61 event is attached automatically (see attach())</p>
63 <p>Exceptions of type
64 com::sun::star::beans::IntrospectionException and
65 com::sun::star::script::CannotCreateAdapterException
66 that can be thrown by methods of XEventAttacher are caught
67 and ignored.</p>
69 @see registerScriptEvent
70 @see attach
72 void registerScriptEvents( [in] long nIndex,
73 [in] sequence<com::sun::star::script::ScriptEventDescriptor> aScriptEvents )
74 raises( com::sun::star::lang::IllegalArgumentException );
76 /** revokes the registration of an event.
78 <p>The parameters <var>ListenerType</var> and
79 <var>EventMethod</var> are equivalent to the first two
80 members of the ScriptEventDescriptor
81 used to register events. If this event at this index has
82 been attached to any object, it is detached automatically
83 (see attach()).</p>
85 <p>Exceptions of type
86 com::sun::star::beans::IntrospectionException and
87 com::sun::star::script::CannotCreateAdapterException
88 that can be thrown by methods of XEventAttacher are caught
89 and ignored.</p>
91 @see attach
93 void revokeScriptEvent( [in] long nIndex,
94 [in] string aListenerType,
95 [in] string aEventMethod,
96 [in] string aRemoveListenerParam )
97 raises( com::sun::star::lang::IllegalArgumentException );
99 /** revokes all events which are registered for the given index.
101 <p>If the events at this index have been attached to any
102 object, they are detached automatically.
103 (see attach()).</p>
105 @see attach
107 void revokeScriptEvents( [in] long nIndex )
108 raises( com::sun::star::lang::IllegalArgumentException );
110 /** creates an empty entry at the given position.
112 <p>The index <var>n</var> of all entries with <code>n &amp;gt;=
113 nIndex</code> will be increased by one.</p>
115 void insertEntry( [in] long nIndex )
116 raises( com::sun::star::lang::IllegalArgumentException );
118 /** removes the entry at the given position.
120 <p>If any events are registered at this index, they will
121 be revoked, too. So if the events at this index have been
122 attached to any object they are detached automatically.
123 (see attach()).</p>
125 @see attach
127 void removeEntry( [in] long nIndex )
128 raises( com::sun::star::lang::IllegalArgumentException );
130 /** @return
131 all events registered for the given object index.
133 @param Index
134 an index previously inserted with the method insertEntry.
136 @throws IllegalArgumentException
137 if Index is not valid.
139 sequence<com::sun::star::script::ScriptEventDescriptor> getScriptEvents( [in] long Index )
140 raises( com::sun::star::lang::IllegalArgumentException );
142 /** attaches all the ScriptEvents which are registered
143 for the given index to the given object.
145 <p>Exceptions of type
146 com::sun::star::beans::IntrospectionException and
147 com::sun::star::script::CannotCreateAdapterException
148 that can be thrown by methods of XEventAttacher are caught
149 and ignored.</p>
151 void attach( [in] long nIndex,
152 [in] com::sun::star::uno::XInterface xObject,
153 [in] any aHelper )
154 raises( com::sun::star::lang::IllegalArgumentException,
155 com::sun::star::lang::ServiceNotRegisteredException );
157 /** detaches all the ScriptEvents from the given object
158 which are registered at this object for the given index.
160 <p>Exceptions of type
161 com::sun::star::beans::IntrospectionException and
162 com::sun::star::script::CannotCreateAdapterException
163 that can be thrown by methods of XEventAttacher are caught
164 and ignored.</p>
166 void detach( [in] long nIndex,
167 [in] com::sun::star::uno::XInterface xObject )
168 raises( com::sun::star::lang::IllegalArgumentException );
170 /** adds an XScriptListener that will be notified when an
171 event takes place. For that a
172 ScriptEventDescriptor is registered at and
173 attached to an object by an XEventAttacherManager.
175 <p>It is suggested to allow multiple registration of the same listener,
176 thus for each time a listener is added, it has to be removed.
178 @see removeScriptListener
180 void addScriptListener( [in] com::sun::star::script::XScriptListener xListener )
181 raises( com::sun::star::lang::IllegalArgumentException );
183 /** removes a XScriptListener from the listener list.
185 <p>Nothing happens if the listener is not registered.
187 <p>It is suggested to allow multiple registration of the same listener,
188 thus for each time a listener is added, it has to be removed.
190 @see addScriptListener
192 void removeScriptListener( [in] com::sun::star::script::XScriptListener Listener )
193 raises( com::sun::star::lang::IllegalArgumentException );
198 }; }; }; };
200 #endif
202 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */