Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / accessibility / AccessibleEventId.idl
blobd848f84cb322339d5403c694d47cc1dd5b1fc8f4
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: AccessibleEventId.idl,v $
10 * $Revision: 1.9 $
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_accessibility_AccessibleEventId_idl__
31 #define __com_sun_star_accessibility_AccessibleEventId_idl__
33 module com { module sun { module star { module accessibility {
35 /** These constants identify the type of <type>AccessibleEventObject</type>
36 objects.
38 <p>The <member>AccessibleEventObject::OldValue</member> and
39 <member>AccessibleEventObject::NewValue</member> fields contain, where
40 applicable and not otherwise stated, the old and new value of the
41 property in question.</p>
43 @see AccessibleEventObject
44 @see XAccessibleEventListener
46 @since OOo 1.1.2
48 published constants AccessibleEventId
50 /** Use this event type to indicate a change of the name string
51 of an accessible object. The
52 <member>AccessibleEventObject::OldValue</member> and
53 <member>AccessibleEventObject::NewValue</member> fields contain the
54 name before and after the change.
56 const short NAME_CHANGED = 1;
58 /** Use this event type to indicate a change of the description string
59 of an accessible object. The
60 <member>AccessibleEventObject::OldValue</member> and
61 <member>AccessibleEventObject::NewValue</member> fields contain the
62 description before and after the change.
64 const short DESCRIPTION_CHANGED = 2;
66 /** The change of the number or attributes of actions of an accessible
67 object is signaled by events of this type.
68 <p>The <member>AccessibleEventObject::OldValue</member> and
69 <member>AccessibleEventObject::NewValue</member> fields contain the
70 old and new number of actions.
72 const short ACTION_CHANGED = 3;
74 /** State changes are signaled with this event type. Use one event for
75 every state that is set or reset. The
76 <member>AccessibleEventObject::OldValue</member> and
77 <member>AccessibleEventObject::NewValue</member> fields contain the
78 old and new value respectively. To set a state put the state id
79 into the <member>AccessibleEventObject::NewValue</member> field and
80 leave <member>AccessibleEventObject::OldValue</member> empty. To
81 reset a state put the state id into the
82 <member>AccessibleEventObject::OldValue</member> field and leave
83 <member>AccessibleEventObject::NewValue</member> empty.
85 const short STATE_CHANGED = 4;
87 /** Constant used to determine when the active descendant of a component
88 has changed. The active descendant is used in objects with
89 transient children. The <member>AccessibleEventObject::NewValue</member>
90 contains the now active object. The
91 <member>AccessibleEventObject::OldValue</member> contains the
92 previously active child. Empty references indicate that no child
93 has been respectively is currently active.
95 const short ACTIVE_DESCENDANT_CHANGED = 5;
97 /** This event indicates a change of the bounding rectangle of an
98 accessible object with respect only to its size or relative
99 position. If the absolute position changes but not the relative
100 position then its is not necessary to send an event.
102 <p>Use this event rather than the
103 <const>VISIBLE_DATA_EVENT</const> when really only the
104 (relative) bounding box of an accessible object has changed. It is
105 much more specific than the later one and reduces the number of
106 calls an AT-Tool has to make to retrieve all affected data.</p>
108 <p>The <member>AccessibleEventObject::OldValue</member> and
109 <member>AccessibleEventObject::NewValue</member> remain empty. Use
110 a call to the <member>XAccessibleComponent::getBounds()</member>
111 method to determine the new bounding box.</p>
113 const short BOUNDRECT_CHANGED = 6;
115 /** A child event indicates the addition of a new or the removal of an
116 existing child. The contents of the
117 <member>AccessibleEventObject::OldValue</member> and
118 <member>AccessibleEventObject::NewValue</member> fields determines
119 which of both has taken place.
121 <p>If a new child has been added then
122 the <member>AccessibleEventObject::NewValue</member> contains a
123 reference to this new object and
124 <member>AccessibleEventObject::OldValue</member> remains empty.</p>
126 <p>If a child has been removed then the
127 <member>AccessibleEventObject::OldValue</member> contains a
128 reference to this object and
129 <member>AccessibleEventObject::NewValue</member> remains empty.</p>
131 <p>If a child has been added and a another one has been removed
132 don't set both fields at the same. Send separate events
133 instead.</p>
135 <p>Note that a child event is sent after a child has been added or
136 removed. Especially in the case of a removal this means that the
137 removed object does not have a parent anymore.</p>
139 const short CHILD = 7;
141 /** Use this event to tell the listeners to re-retrieve the whole set of
142 children. This should be used by a parent object which exchanges all
143 or most of its children. It is a short form of first sending one
144 <const>CHILD</const> event for every old child indicating that
145 this child is about to be removed and then sending one
146 <const>CHILD</const> for every new child indicating that this
147 child has been added to the list of children.
149 <p>When this API is used by Java or Gnome AT-Tools then a bridge can
150 generate the events described above automatically.</p>
152 const short INVALIDATE_ALL_CHILDREN = 8;
154 /** Events of this type indicate changes of the selection. The
155 <member>AccessibleEventObject::OldValue</member> and
156 <member>AccessibleEventObject::NewValue</member> fields remain empty.
158 const short SELECTION_CHANGED = 9;
160 /** A visibile data event indicates the change of the visual appearance
161 of an accessible object. This includes for example most of the
162 attributes available over the <type>XAccessibleComponent</type> and
163 <type>XAccessibleExtendedComponent</type> interfaces. The
164 <member>AccessibleEventObject::OldValue</member> and
165 <member>AccessibleEventObject::NewValue</member> fields are left empty.
167 const short VISIBLE_DATA_CHANGED = 10;
169 /** This constant indicates changes of the value of an
170 <type>XAccessibleValue</type> interface. The
171 <member>AccessibleEventObject::OldValue</member> and
172 <member>AccessibleEventObject::NewValue</member> field contain the
173 old and new value as a number. Its exact type is implementation
174 dependant but has to be the same as is returned by the
175 <member>XAccessibleValue::getCurrentValue</member> function.
178 const short VALUE_CHANGED = 11;
180 /** Identifies the change of a relation set: The content flow has
181 changed.
183 <p>Not used: The <member>AccessibleEventObject::OldValue</member> and
184 <member>AccessibleEventObject::NewValue</member> fields contain
185 refrences to the old and new predecessor. Note that both references
186 my be <NULL/> to indicate that a flow to the sending object has not
187 existed or does not exist anymore.</p>
189 const short CONTENT_FLOWS_FROM_RELATION_CHANGED = 12;
191 /** Identifies the change of a relation set: The content flow has
192 changed.
194 <p>Not used: The <member>AccessibleEventObject::OldValue</member> and
195 <member>AccessibleEventObject::NewValue</member> fields contain
196 refrences to the old and new successor. Note that both references
197 my be <NULL/> to indicate that a flow from the sending object has not
198 existed or does not exist anymore.</p>
200 const short CONTENT_FLOWS_TO_RELATION_CHANGED = 13;
202 /** Identifies the change of a relation set: The target object that is
203 doing the controlling has changed. The
204 <member>AccessibleEventObject::OldValue</member> and
205 <member>AccessibleEventObject::NewValue</member> fields contain the
206 old and new controlling objects.
208 const short CONTROLLED_BY_RELATION_CHANGED = 14;
210 /** Identifies the change of a relation set: The controller for the
211 target object has changed. The
212 <member>AccessibleEventObject::OldValue</member> and
213 <member>AccessibleEventObject::NewValue</member> fields contain the
214 old and new number of controlled objects.
216 const short CONTROLLER_FOR_RELATION_CHANGED = 15;
218 /** Identifies the change of a relation set: The target group for a
219 label has changed. The
220 <member>AccessibleEventObject::OldValue</member> and
221 <member>AccessibleEventObject::NewValue</member> fields contain the
222 old and new number labeled objects.
224 const short LABEL_FOR_RELATION_CHANGED = 16;
226 /** Identifies the change of a relation set: The objects that are doing
227 the labeling have changed. The
228 <member>AccessibleEventObject::OldValue</member> and
229 <member>AccessibleEventObject::NewValue</member> fields contain the
230 old and new accessible label.
232 const short LABELED_BY_RELATION_CHANGED = 17;
234 /** Identifies the change of a relation set: The group membership has
235 changed. The
236 <member>AccessibleEventObject::OldValue</member> and
237 <member>AccessibleEventObject::NewValue</member> fields contain the
238 old and new number of members.
240 const short MEMBER_OF_RELATION_CHANGED = 18;
242 /** Identifies the change of a relation set: The sub-window-of relation
243 has changed. The
244 <member>AccessibleEventObject::OldValue</member> and
245 <member>AccessibleEventObject::NewValue</member> fields contain the
246 old and new accessible parent window objects.
248 const short SUB_WINDOW_OF_RELATION_CHANGED = 19;
250 /** Events of this type are sent when the caret has moved to a new
251 position. The old and new position can be found in the
252 <member>AccessibleEventObject::OldValue</member> and
253 <member>AccessibleEventObject::NewValue</member> fields.
255 const short CARET_CHANGED = 20;
257 /** Events of this type signal changes of the selection. The old or new
258 selection is <em>not</em> available through the event object. You
259 have to query the <type>XAccessibleText</type> interface of the
260 event source for this information. The type of content of the
261 <member>AccessibleEventObject::OldValue</member> and
262 <member>AccessibleEventObject::NewValue</member> fields is not
263 specified at the moment. This may change in the future.
265 const short TEXT_SELECTION_CHANGED = 21;
267 /** Use this id to indicate general text changes, i.e. changes to text
268 that is exposed through the <type>XAccessibleText</type> and
269 <type>XAccessibleEditableText</type> interfaces.
271 <p>The affected text ranges are represented by <type
272 scope="com::sun::star::accessibility">TextSegment</type> structures.<p>
274 <p>The content of the <member>AccessibleEventObject::OldValue</member> and
275 <member>AccessibleEventObject::NewValue</member> expresses the type
276 of text change: <ul> <li>Insertion: the
277 <member>AccessibleEventObject::NewValue</member> field specifies the
278 inserted text after the insertion, the
279 <member>AccessibleEventObject::OldValue</member> field remains
280 empty.</li> <li>Deletion: the
281 <member>AccessibleEventObject::OldValue</member> field specifies the
282 deleted text before the deletion, the
283 <member>AccessibleEventObject::NewValue</member> field remains
284 empty.</li> <li>Update/Replace/Modification: the
285 <member>AccessibleEventObject::OldValue</member> and
286 <member>AccessibleEventObject::NewValue</member> fields specify the
287 modified text before respectively after the modification.</li>
288 <li>Unknown: when the type of text change or the place where it took
289 place can not be determined by the event broadcaster then both
290 fields remain empty. In this case the whole text may have changed
291 and the listener should refetch the text completely.</li> </ol>
293 <p>When broadcasting an event allways prefer the first three cases
294 to the last one. Use it only as a last resort.</p>
296 <p> Text ranges should be as small as possible but, of course,
297 include all the text that is involved in a modification. That means
298 that when two or more discontiguous text ranges are inserted,
299 deleted, or otherwise modified the two fields of the event have to
300 cover all the effected text ranges as well as the text in
301 between.</p>
303 const short TEXT_CHANGED = 22;
306 /** This entry is reserved for future extension. Don't use it right now.
308 const short TEXT_ATTRIBUTE_CHANGED = 23;
310 /** Constant used to indicate that a hypertext element has received
311 focus. The <member>AccessibleEventObject::OldValue</member> field
312 contains the start index of previously focused element. The
313 <member>AccessibleEventObject::NewValue</member> field holds the
314 start index in the document of the current element that has focus. A
315 value of -1 indicates that an element does not or did not have
316 focus.
318 const short HYPERTEXT_CHANGED = 24;
319 /** Constant used to indicate that the table caption has changed. The
320 <member>AccessibleEventObject::OldValue</member> and
321 <member>AccessibleEventObject::NewValue</member> fields contain the
322 old and new accessible objects representing the table caption.
324 const short TABLE_CAPTION_CHANGED = 25;
326 /** Constant used to indicate that the column description has changed.
327 The <member>AccessibleEventObject::NewValue</member> field contains
328 the column index. The
329 <member>AccessibleEventObject::OldValue</member> is left empty.
331 const short TABLE_COLUMN_DESCRIPTION_CHANGED = 26;
333 /** Constant used to indicate that the column header has changed. The
334 <member>AccessibleEventObject::OldValue</member> is empty, the
335 <member>AccessibleEventObject::NewValue</member> field contains an
336 <type>AccessibleTableModelChange</type> representing the header
337 change.
339 const short TABLE_COLUMN_HEADER_CHANGED = 27;
341 /** Constant used to indicate that the table data has changed. The
342 <member>AccessibleEventObject::OldValue</member> is empty, the
343 <member>AccessibleEventObject::NewValue</member> field contains an
344 <type>AccessibleTableModelChange</type> representing the data
345 change.
347 const short TABLE_MODEL_CHANGED = 28;
349 /** Constant used to indicate that the row description has changed. The
350 <member>AccessibleEventObject::NewValue</member> field contains the
351 row index. The <member>AccessibleEventObject::OldValue</member> is
352 left empty.
354 const short TABLE_ROW_DESCRIPTION_CHANGED = 29;
356 /** Constant used to indicate that the row header has changed. The
357 <member>AccessibleEventObject::OldValue</member> is empty, the
358 <member>AccessibleEventObject::NewValue</member> field contains an
359 <type>AccessibleTableModelChange</type> representing the header
360 change.
362 const short TABLE_ROW_HEADER_CHANGED = 30;
364 /** Constant used to indicate that the table summary has changed. The
365 <member>AccessibleEventObject::OldValue</member> and
366 <member>AccessibleEventObject::NewValue</member> fields contain the
367 old and new accessible objects representing the table summary.
369 const short TABLE_SUMMARY_CHANGED = 31;
371 /** Constant used to indicate that a list box entry has been expanded.
372 <member>AccessibleEventObject::OldValue</member> is empty.
373 <member>AccessibleEventObject::NewValue</member> contains the expanded list box entry.
375 @since OOo 3.2
377 const short LISTBOX_ENTRY_EXPANDED = 32;
379 /** Constant used to indicate that a list box entry has been collapsed.
380 <member>AccessibleEventObject::OldValue</member> is empty.
381 <member>AccessibleEventObject::NewValue</member> contains the collapsed list box entry.
383 @since OOo 3.2
385 const short LISTBOX_ENTRY_COLLAPSED = 33;
388 }; }; }; };
390 #endif